diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /net-ftp | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'net-ftp')
146 files changed, 5755 insertions, 0 deletions
diff --git a/net-ftp/atftp/Manifest b/net-ftp/atftp/Manifest new file mode 100644 index 000000000000..e88fed471e1f --- /dev/null +++ b/net-ftp/atftp/Manifest @@ -0,0 +1 @@ +DIST atftp-0.8.0.tar.gz 133417 BLAKE2B 6c0ec29c78f345f24adb65fd162e4572bd5b91e067c8db1ff6600ed2ea9a8461693bb6635c2edf09c77693dc6227689406a97b1d6e86a742ffbe3849ab9d3ee3 SHA512 b700b3e4182970fb494ffabd49e39d3622b1aff5f69882549eff0b52a01c8c47babe51b451c4829f9b833ea2ea7c590a2f3819f8e3508176fa7d1b5c0e152b68 diff --git a/net-ftp/atftp/atftp-0.8.0.ebuild b/net-ftp/atftp/atftp-0.8.0.ebuild new file mode 100644 index 000000000000..c79459c844ca --- /dev/null +++ b/net-ftp/atftp/atftp-0.8.0.ebuild @@ -0,0 +1,65 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic systemd + +DESCRIPTION="Advanced TFTP implementation client/server" +HOMEPAGE="https://sourceforge.net/projects/atftp/" +SRC_URI="https://downloads.sourceforge.net/atftp/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 arm ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="selinux tcpd readline pcre" + +DEPEND="tcpd? ( sys-apps/tcp-wrappers ) + readline? ( sys-libs/readline:0= ) + pcre? ( dev-libs/libpcre2:= )" +RDEPEND="${DEPEND} + !net-ftp/tftp-hpa + !net-ftp/uftpd + selinux? ( sec-policy/selinux-tftp )" + +PATCHES=( + "${FILESDIR}/${PN}-0.7.5-CFLAGS.patch" + "${FILESDIR}/${PN}-0.8.0-test-sh-declare-local.patch" # https://sourceforge.net/p/atftp/bugs/12/ + "${FILESDIR}/${PN}-fix-test.patch" # https://sourceforge.net/p/atftp/bugs/11/ +) + +src_prepare() { + append-cppflags -D_REENTRANT -DRATE_CONTROL + # fix #561720 by restoring pre-GCC5 inline semantics + append-cflags -std=gnu89 + + default + eautoreconf +} + +src_configure() { + filter-lto # https://bugs.gentoo.org/876939 + + econf \ + $(use_enable tcpd libwrap) \ + $(use_enable readline libreadline) \ + $(use_enable pcre libpcre) \ + --enable-mtftp +} + +src_install() { + default + + newinitd "${FILESDIR}"/atftp.init atftp + newconfd "${FILESDIR}"/atftp.confd atftp + + systemd_dounit "${FILESDIR}"/atftp.service + systemd_install_serviced "${FILESDIR}"/atftp.service.conf + + dodoc README* BUGS FAQ Changelog INSTALL TODO + dodoc "${S}"/docs/* + + docinto test + cd "${S}"/test || die + dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt +} diff --git a/net-ftp/atftp/files/atftp-0.7.5-CFLAGS.patch b/net-ftp/atftp/files/atftp-0.7.5-CFLAGS.patch new file mode 100644 index 000000000000..4f68d97f800f --- /dev/null +++ b/net-ftp/atftp/files/atftp-0.7.5-CFLAGS.patch @@ -0,0 +1,32 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -69,29 +69,6 @@ + dnl Check for AIX + AC_AIX + +-CFLAGS="$CFLAGS -g -Wall -D_REENTRANT" +- +-if test x$debug = xtrue; then +- CFLAGS="$CFLAGS -O0 -DDEBUG" +-else +- if test -n "$auto_cflags"; then +- if test -n "$GCC"; then +- CFLAGS="$CFLAGS -g -O2 -Wall -Wno-implicit" +- else +- case "$host_os" in +- *hpux*) CFLAGS="$CFLAGS +O3" +- ;; +- *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" +- ;; +- *) CFLAGS="$CFLAGS -O2" +- ;; +- esac +- fi +- else +- CFLAGS="$CFLAGS -O2" +- fi +-fi +- + case "$CC" in + gcc*|clang*) CFLAGS="$CFLAGS -std=gnu89" + ;; diff --git a/net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch b/net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch new file mode 100644 index 000000000000..de63fc03a626 --- /dev/null +++ b/net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch @@ -0,0 +1,18 @@ +From a718243fe78fe9002b4145a158e02801e907399b Mon Sep 17 00:00:00 2001 +From: Florian Schmaus <flo@geekplace.eu> +Date: Sun, 2 Oct 2022 19:47:47 +0200 +Subject: [PATCH 1/2] Declare variable D as local in stop_and_clean + +This also fixes tests in Gentoo, where src_test() has already declare +a variable D, containing the path of the temporary install +directory (aka. DESTDIR). +--- a/test/test.sh ++++ b/test/test.sh +@@ -576,6 +576,7 @@ stop_and_clean(){ + ## +3 is for "Test tsize option ..." and "Test PCRE mapped download ... " + ## +2 for diskspace tests: + local M=$(grep "/tmp/" "$TDIR"/multicast*.log | wc -l) ++ local D + $INTERACTIVE && D=2 + cat <<EOF + Expected: diff --git a/net-ftp/atftp/files/atftp-fix-test.patch b/net-ftp/atftp/files/atftp-fix-test.patch new file mode 100644 index 000000000000..1b2eba57c49f --- /dev/null +++ b/net-ftp/atftp/files/atftp-fix-test.patch @@ -0,0 +1,17 @@ +From f7ccbf188cd682f7210a2253187e460f0fe5d647 Mon Sep 17 00:00:00 2001 +From: Martin Dummer <martin.dummer@gmx.net> +Date: Sun, 2 Oct 2022 19:49:44 +0200 +Subject: [PATCH 2/2] test.sh: redirect stderr to /dev/null when counting lines + +To avoid counting stderr lines, redirect the output to /dev/null. +--- a/test/test.sh ++++ b/test/test.sh +@@ -575,7 +575,7 @@ stop_and_clean(){ + echo + ## +3 is for "Test tsize option ..." and "Test PCRE mapped download ... " + ## +2 for diskspace tests: +- local M=$(grep "/tmp/" "$TDIR"/multicast*.log | wc -l) ++ local M=$(grep "/tmp/" "$TDIR"/multicast*.log 2> /dev/null | wc -l) + local D + $INTERACTIVE && D=2 + cat <<EOF diff --git a/net-ftp/atftp/files/atftp.confd b/net-ftp/atftp/files/atftp.confd new file mode 100644 index 000000000000..a46a7047dbb6 --- /dev/null +++ b/net-ftp/atftp/files/atftp.confd @@ -0,0 +1,4 @@ +# Config file for tftp server + +TFTPD_ROOT="/tftproot" +TFTPD_OPTS="--daemon --user nobody --group nobody" diff --git a/net-ftp/atftp/files/atftp.init b/net-ftp/atftp/files/atftp.init new file mode 100644 index 000000000000..8ab499127ba4 --- /dev/null +++ b/net-ftp/atftp/files/atftp.init @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -d ${TFTPD_ROOT} ] + then + eerror "You need a tftp root directory" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting tftpd" + start-stop-daemon --start --quiet --exec /usr/sbin/in.tftpd \ + -- ${TFTPD_OPTS} ${TFTPD_ROOT} + eend $? +} + +stop() { + ebegin "Stopping tftpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/in.tftpd + eend $? +} diff --git a/net-ftp/atftp/files/atftp.service b/net-ftp/atftp/files/atftp.service new file mode 100644 index 000000000000..e6570f63445c --- /dev/null +++ b/net-ftp/atftp/files/atftp.service @@ -0,0 +1,9 @@ +[Unit] +Description=Advanced TFTP implementation client/server +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/atftpd --daemon --no-fork --user nobody --group nobody $TFTPD_ROOT + +[Install] +WantedBy=multi-user.target diff --git a/net-ftp/atftp/files/atftp.service.conf b/net-ftp/atftp/files/atftp.service.conf new file mode 100644 index 000000000000..d8aa19abe32f --- /dev/null +++ b/net-ftp/atftp/files/atftp.service.conf @@ -0,0 +1,2 @@ +[Service] +Environment="TFTPD_ROOT=/tftproot" diff --git a/net-ftp/atftp/metadata.xml b/net-ftp/atftp/metadata.xml new file mode 100644 index 000000000000..12f43d0c51b6 --- /dev/null +++ b/net-ftp/atftp/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>martin.dummer@gmx.net</email> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:atftp_project:atftp</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/cmdftp/Manifest b/net-ftp/cmdftp/Manifest new file mode 100644 index 000000000000..0d33a19f6c2b --- /dev/null +++ b/net-ftp/cmdftp/Manifest @@ -0,0 +1 @@ +DIST cmdftp-0.9.8.tar.gz 145985 BLAKE2B cc5869cc8c43208161886020b2a3c4df9151d48053ab3c6d4e7d0759bb47a23a687c09eda2c202ac93167f26c33a6c4ac49568f356a9fe16ef09237d499f04c8 SHA512 8c8bb670988c439838493f1c6d31e47ae01e3fd6a1521602267dc8cb8dcc6ed18605277bdbf22a06b3af61e33a676ff3f188648f54af5d0839c7039eaab6b262 diff --git a/net-ftp/cmdftp/cmdftp-0.9.8.ebuild b/net-ftp/cmdftp/cmdftp-0.9.8.ebuild new file mode 100644 index 000000000000..c25a8815551c --- /dev/null +++ b/net-ftp/cmdftp/cmdftp-0.9.8.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Light weight, yet robust command line FTP client with shell-likefunctions" +HOMEPAGE="https://savannah.nongnu.org/projects/cmdftp/" +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~riscv x86" + +DOCS=( NEWS README AUTHORS ) + +src_configure() { + econf --enable-largefile +} diff --git a/net-ftp/cmdftp/metadata.xml b/net-ftp/cmdftp/metadata.xml new file mode 100644 index 000000000000..5f33304011d5 --- /dev/null +++ b/net-ftp/cmdftp/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/filezilla/Manifest b/net-ftp/filezilla/Manifest new file mode 100644 index 000000000000..022d25597c3f --- /dev/null +++ b/net-ftp/filezilla/Manifest @@ -0,0 +1,4 @@ +DIST FileZilla_3.69.5_src.tar.xz 4167108 BLAKE2B dc3430a9c64720578f78b5bbcfb50775510660472ad98ab5fd1acd460742af7358a37cf029162df8ce395026c6052cb9526d50ed2611c9c01f89df115f63c32e SHA512 ef31535d8c1ca21c37577f30c2960c3cddec35a993d398460f105e2c8cfecb1c517cc092ce4042e4cde49b255afdeb245db1007d88a6bfdc8901afdde991db82 +DIST FileZilla_3.69.6_src.tar.xz 4166148 BLAKE2B 7e2c229f688879a773f7b45ce530eff00c2fcbac02941a6ee2ff71f1f9ca69a704efaa57a88c2c34548c21ef42427646c2bd6afa50750fea2033f1d9ccd5e6d7 SHA512 4986ac95aa510fa4e44584afecb46f352bdf1330a65d37df9919f5a620dc2f1e927a148b564eb93a4a7afdc553c46e0626e54edd6c9953b8a9f0853942426908 +DIST FileZilla_3.70.4_src.tar.xz 3564240 BLAKE2B d4ef89ee55bd1f3e4605fc3e923a1d52ed76b59f78639f30f1e0d6343857db68188316033cf4d09cea8decdd713e396971d2b714ff3f36ec1dc16bbb4b928f09 SHA512 26f95f28fd0c8687ab35cea975d6994a9c61b3fed542ae406ce945b41db43db83858e8341968c44babebebcc9c6b98719e1b3f7671aca6060e087065b548147a +DIST FileZilla_3.70.5_src.tar.xz 3566656 BLAKE2B fc64a73c4512955a6a75529eb708d1e62a49c51dc00613a996eab6c5baa3156a3f11617e334d11b748e3100211ce5034a574cdffad2405be89d4879e487a6352 SHA512 09e7b924d0aa5ebdc078b2ba0ce579a229612be8a4b46581bc9688825c6be2fac2897f9041c88e6710fb08873f13691dff30bd607e56aca79758897fb7494296 diff --git a/net-ftp/filezilla/files/filezilla-3.22.1-debug.patch b/net-ftp/filezilla/files/filezilla-3.22.1-debug.patch new file mode 100644 index 000000000000..71430db1c79e --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.22.1-debug.patch @@ -0,0 +1,12 @@ +--- filezilla-3.22.1/configure.ac ++++ filezilla-3.22.1/configure.ac +@@ -36,9 +36,7 @@ + + if test "X$GCC" = Xyes; then + AX_APPEND_FLAG(-Wall, CFLAGS) +- AX_APPEND_FLAG(-g, CFLAGS) + AX_APPEND_FLAG(-Wall, CXXFLAGS) +- AX_APPEND_FLAG(-g, CXXFLAGS) + fi + + # Do this early: Compiler and linker flags to work around a nasty bug in Xcode. diff --git a/net-ftp/filezilla/files/filezilla-3.47.0-disable-shellext_conf.patch b/net-ftp/filezilla/files/filezilla-3.47.0-disable-shellext_conf.patch new file mode 100644 index 000000000000..55868dce80fc --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.47.0-disable-shellext_conf.patch @@ -0,0 +1,13 @@ +diff -Naur filezilla-3.47.2.1.orig/configure.ac filezilla-3.47.2.1/configure.ac +--- filezilla-3.47.2.1.orig/configure.ac 2020-03-11 12:24:12.000000000 +0100 ++++ filezilla-3.47.2.1/configure.ac 2020-05-09 16:09:23.832476049 +0200 +@@ -130,9 +130,6 @@ + "$ac_abs_confdir/src/fzshellext/configure" --prefix="$prefix" --exec-prefix="$exec_prefix" --host=i686-w64-mingw32 || exit 1 + cd "$OLD_DIR/src/fzshellext/64" || exit 1 + "$ac_abs_confdir/src/fzshellext/configure" --prefix="$prefix" --exec-prefix="$exec_prefix" --host=x86_64-w64-mingw32 || exit 1 +-else +- cd "$OLD_DIR/src/fzshellext/64" || exit 1 +- "$ac_abs_confdir/src/fzshellext/configure" --disable-shellext || exit 1 + fi + cd "$OLD_DIR" + diff --git a/net-ftp/filezilla/files/filezilla-3.47.0-metainfo.patch b/net-ftp/filezilla/files/filezilla-3.47.0-metainfo.patch new file mode 100644 index 000000000000..309c66815e3c --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.47.0-metainfo.patch @@ -0,0 +1,11 @@ +--- filezilla-3.47.0/data/Makefile.am ++++ filezilla-3.47.0/data/Makefile.am +@@ -75,7 +75,7 @@ + desktopentrydir = $(datadir)/applications + dist_desktopentry_DATA = filezilla.desktop + +-appdatadir = $(datadir)/appdata ++appdatadir = $(datadir)/metainfo + dist_appdata_DATA = filezilla.appdata.xml + + clean-local: diff --git a/net-ftp/filezilla/files/filezilla-3.52.2-slibtool.patch b/net-ftp/filezilla/files/filezilla-3.52.2-slibtool.patch new file mode 100644 index 000000000000..4eaae857e1db --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.52.2-slibtool.patch @@ -0,0 +1,24 @@ +This fixes compilation with slibtool instead of GNU libtool + +--- filezilla-3.52.2/src/engine/Makefile.am ++++ filezilla-3.52.2/src/engine/Makefile.am +@@ -146,6 +146,8 @@ + libfzclient_private_la_LDFLAGS += $(LIBFILEZILLA_LIBS) + libfzclient_private_la_LDFLAGS += $(IDN_LIB) + ++libfzclient_private_la_LIBADD = $(PUGIXML_LIBS) ++ + dist_noinst_DATA = engine.vcxproj + + CLEANFILES = filezilla.h.gch +--- filezilla-3.52.2/src/interface/Makefile.am ++++ filezilla-3.52.2/src/interface/Makefile.am +@@ -309,7 +309,7 @@ + + if HAVE_DBUS + filezilla_DEPENDENCIES += ../dbus/libfzdbus.a +-filezilla_LDFLAGS += ../dbus/libfzdbus.a $(LIBDBUS_LIBS) ++filezilla_LDADD = ../dbus/libfzdbus.a $(LIBDBUS_LIBS) + endif + + filezilla_LDFLAGS += $(WX_LIBS) diff --git a/net-ftp/filezilla/files/filezilla-3.60.1-desktop.patch b/net-ftp/filezilla/files/filezilla-3.60.1-desktop.patch new file mode 100644 index 000000000000..25b81826b7fe --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.60.1-desktop.patch @@ -0,0 +1,7 @@ +--- a/data/filezilla.desktop 2020-06-04 13:18:01.000000000 +0300 ++++ b/data/filezilla.desktop 2022-06-16 02:16:03.727229995 +0300 +@@ -14,3 +14,4 @@ + Type=Application + Categories=Network;FileTransfer; + Version=1.0 ++MimeType=x-scheme-handler/ftp; diff --git a/net-ftp/filezilla/files/filezilla-3.70.4-slibtool.patch b/net-ftp/filezilla/files/filezilla-3.70.4-slibtool.patch new file mode 100644 index 000000000000..a2928faf8e42 --- /dev/null +++ b/net-ftp/filezilla/files/filezilla-3.70.4-slibtool.patch @@ -0,0 +1,26 @@ +diff --git a/src/engine/Makefile.am b/src/engine/Makefile.am +index 90671dd..72a95ad 100644 +--- a/src/engine/Makefile.am ++++ b/src/engine/Makefile.am +@@ -156,6 +156,8 @@ if FZ_MAC + libfzclient_private_la_LDFLAGS += -framework CoreServices + endif + ++libfzclient_private_la_LIBADD = $(PUGIXML_LIBS) ++ + CLEANFILES = filezilla.h.gch + DISTCLEANFILES = ./$(DEPDIR)/filezilla.Po + +diff --git a/src/interface/Makefile.am b/src/interface/Makefile.am +index 60937a8..438b099 100644 +--- a/src/interface/Makefile.am ++++ b/src/interface/Makefile.am +@@ -310,7 +310,7 @@ filezilla_LDFLAGS += $(PUGIXML_LIBS) + + if HAVE_DBUS + filezilla_DEPENDENCIES += ../dbus/libfzdbus.a +-filezilla_LDFLAGS += ../dbus/libfzdbus.a $(LIBDBUS_LIBS) ++filezilla_LDADD = ../dbus/libfzdbus.a $(LIBDBUS_LIBS) + endif + + filezilla_LDFLAGS += $(WX_LIBS) diff --git a/net-ftp/filezilla/filezilla-3.69.5.ebuild b/net-ftp/filezilla/filezilla-3.69.5.ebuild new file mode 100644 index 000000000000..c26e9b7c98dd --- /dev/null +++ b/net-ftp/filezilla/filezilla-3.69.5.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.2-gtk3" + +inherit autotools flag-o-matic wxwidgets xdg + +MY_PV="${PV/_/-}" +MY_P="FileZilla_${MY_PV}" + +DESCRIPTION="FTP client with lots of useful features and an intuitive interface" +HOMEPAGE="https://filezilla-project.org/" +# Broken URL behind CDN +SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}/${MY_P}_src.tar.xz" + +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 ~riscv x86" +IUSE="cpu_flags_x86_sse2 dbus nls test" +RESTRICT="!test? ( test )" + +# pugixml 1.7 minimal dependency is for c++11 proper configuration +RDEPEND=" + >=dev-libs/nettle-3.1:= + >=dev-db/sqlite-3.7 + >=dev-libs/boost-1.76.0:= + >=dev-libs/libfilezilla-0.51.1:= + >=dev-libs/pugixml-1.7 + >=net-libs/gnutls-3.5.7 + x11-libs/wxGTK:${WX_GTK_VER}=[X] + x11-misc/xdg-utils + dbus? ( sys-apps/dbus )" +DEPEND="${RDEPEND} + test? ( >=dev-util/cppunit-1.13.0 )" +BDEPEND=" + virtual/pkgconfig + >=dev-build/libtool-1.4 + nls? ( >=sys-devel/gettext-0.11 )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.22.1-debug.patch + "${FILESDIR}"/${PN}-3.47.0-metainfo.patch + "${FILESDIR}"/${PN}-3.47.0-disable-shellext_conf.patch + "${FILESDIR}"/${PN}-3.52.2-slibtool.patch + "${FILESDIR}"/${PN}-3.60.1-desktop.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + if use x86 && ! use cpu_flags_x86_sse2; then + append-cppflags -D_FORCE_SOFTWARE_SHA + fi + setup-wxwidgets + + local myeconfargs=( + --disable-autoupdatecheck + --with-pugixml=system + $(use_enable nls locales) + $(use_with dbus) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-ftp/filezilla/filezilla-3.69.6.ebuild b/net-ftp/filezilla/filezilla-3.69.6.ebuild new file mode 100644 index 000000000000..c158eb06c5d8 --- /dev/null +++ b/net-ftp/filezilla/filezilla-3.69.6.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.2-gtk3" + +inherit autotools flag-o-matic wxwidgets xdg + +MY_PV="${PV/_/-}" +MY_P="FileZilla_${MY_PV}" + +DESCRIPTION="FTP client with lots of useful features and an intuitive interface" +HOMEPAGE="https://filezilla-project.org/" +# Broken URL behind CDN +SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}/${MY_P}_src.tar.xz" + +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="cpu_flags_x86_sse2 dbus nls test" +RESTRICT="!test? ( test )" + +# pugixml 1.7 minimal dependency is for c++11 proper configuration +RDEPEND=" + >=dev-libs/nettle-3.1:= + >=dev-db/sqlite-3.7 + >=dev-libs/boost-1.76.0:= + >=dev-libs/libfilezilla-0.51.1:= + >=dev-libs/pugixml-1.7 + >=net-libs/gnutls-3.5.7 + x11-libs/wxGTK:${WX_GTK_VER}=[X] + x11-misc/xdg-utils + dbus? ( sys-apps/dbus )" +DEPEND="${RDEPEND} + test? ( >=dev-util/cppunit-1.13.0 )" +BDEPEND=" + virtual/pkgconfig + >=dev-build/libtool-1.4 + nls? ( >=sys-devel/gettext-0.11 )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.22.1-debug.patch + "${FILESDIR}"/${PN}-3.47.0-metainfo.patch + "${FILESDIR}"/${PN}-3.47.0-disable-shellext_conf.patch + "${FILESDIR}"/${PN}-3.52.2-slibtool.patch + "${FILESDIR}"/${PN}-3.60.1-desktop.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + if use x86 && ! use cpu_flags_x86_sse2; then + append-cppflags -D_FORCE_SOFTWARE_SHA + fi + setup-wxwidgets + + local myeconfargs=( + --disable-autoupdatecheck + --with-pugixml=system + $(use_enable nls locales) + $(use_with dbus) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-ftp/filezilla/filezilla-3.70.4.ebuild b/net-ftp/filezilla/filezilla-3.70.4.ebuild new file mode 100644 index 000000000000..e5a77d5b342a --- /dev/null +++ b/net-ftp/filezilla/filezilla-3.70.4.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.2-gtk3" + +inherit autotools flag-o-matic wxwidgets xdg + +MY_PV="${PV/_/-}" +MY_P="FileZilla_${MY_PV}" + +DESCRIPTION="FTP client with lots of useful features and an intuitive interface" +HOMEPAGE="https://filezilla-project.org/" +# Broken URL behind CDN +SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}/${MY_P}_src.tar.xz" + +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="cpu_flags_x86_sse2 dbus nls test" +RESTRICT="!test? ( test )" + +# pugixml 1.7 minimal dependency is for c++11 proper configuration +RDEPEND=" + >=dev-libs/nettle-3.1:= + >=dev-db/sqlite-3.7 + >=dev-libs/boost-1.76.0:= + >=dev-libs/libfilezilla-0.55.0:= + >=dev-libs/pugixml-1.7 + >=net-libs/fzssh-1.1.9:= + >=net-libs/gnutls-3.5.7 + x11-libs/wxGTK:${WX_GTK_VER}=[X] + x11-misc/xdg-utils + dbus? ( sys-apps/dbus )" +DEPEND="${RDEPEND} + test? ( >=dev-util/cppunit-1.13.0 )" +BDEPEND=" + virtual/pkgconfig + >=dev-build/libtool-1.4 + nls? ( >=sys-devel/gettext-0.11 )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.22.1-debug.patch + "${FILESDIR}"/${PN}-3.47.0-metainfo.patch + "${FILESDIR}"/${PN}-3.47.0-disable-shellext_conf.patch + "${FILESDIR}"/${PN}-3.70.4-slibtool.patch + "${FILESDIR}"/${PN}-3.60.1-desktop.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + if use x86 && ! use cpu_flags_x86_sse2; then + append-cppflags -D_FORCE_SOFTWARE_SHA + fi + setup-wxwidgets + + local myeconfargs=( + --disable-autoupdatecheck + --with-pugixml=system + $(use_enable nls locales) + $(use_with dbus) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-ftp/filezilla/filezilla-3.70.5.ebuild b/net-ftp/filezilla/filezilla-3.70.5.ebuild new file mode 100644 index 000000000000..eb26ae916458 --- /dev/null +++ b/net-ftp/filezilla/filezilla-3.70.5.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.2-gtk3" + +inherit autotools flag-o-matic wxwidgets xdg + +MY_PV="${PV/_/-}" +MY_P="FileZilla_${MY_PV}" + +DESCRIPTION="FTP client with lots of useful features and an intuitive interface" +HOMEPAGE="https://filezilla-project.org/" +# Broken URL behind CDN +SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}/${MY_P}_src.tar.xz" + +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="cpu_flags_x86_sse2 dbus nls test" +RESTRICT="!test? ( test )" + +# pugixml 1.7 minimal dependency is for c++11 proper configuration +RDEPEND=" + >=dev-libs/nettle-3.1:= + >=dev-db/sqlite-3.7 + >=dev-libs/boost-1.76.0:= + >=dev-libs/libfilezilla-0.55.5:= + >=dev-libs/pugixml-1.7 + >=net-libs/fzssh-1.2.1:= + >=net-libs/gnutls-3.5.7 + x11-libs/wxGTK:${WX_GTK_VER}=[X] + x11-misc/xdg-utils + dbus? ( sys-apps/dbus )" +DEPEND="${RDEPEND} + test? ( >=dev-util/cppunit-1.13.0 )" +BDEPEND=" + virtual/pkgconfig + >=dev-build/libtool-1.4 + nls? ( >=sys-devel/gettext-0.11 )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.22.1-debug.patch + "${FILESDIR}"/${PN}-3.47.0-metainfo.patch + "${FILESDIR}"/${PN}-3.47.0-disable-shellext_conf.patch + "${FILESDIR}"/${PN}-3.70.4-slibtool.patch + "${FILESDIR}"/${PN}-3.60.1-desktop.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + if use x86 && ! use cpu_flags_x86_sse2; then + append-cppflags -D_FORCE_SOFTWARE_SHA + fi + setup-wxwidgets + + local myeconfargs=( + --disable-autoupdatecheck + --with-pugixml=system + $(use_enable nls locales) + $(use_with dbus) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-ftp/filezilla/metadata.xml b/net-ftp/filezilla/metadata.xml new file mode 100644 index 000000000000..3836db999730 --- /dev/null +++ b/net-ftp/filezilla/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>voyageur@gentoo.org</email> + <name>Bernard Cafarelli</name> + </maintainer> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:filezilla:filezilla</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/frox/Manifest b/net-ftp/frox/Manifest new file mode 100644 index 000000000000..b852ec5bce36 --- /dev/null +++ b/net-ftp/frox/Manifest @@ -0,0 +1 @@ +DIST frox-0.7.18.tar.bz2 173355 BLAKE2B 70e51ef14fd16dfeb8c2b8c42acf32b4fc8456622f6258aca7faee49e59ccd4e3cb563620a50a4cb877401d9154311dd2f88e76a94c48974bf9b77ad558a6d9f SHA512 bdffe4b70c91b920378a422dcf386088c3bb34f26e10de8ff57f487ccef6356803c93057eee2b3801a79120a6b2e1618a51dde5bc8c42e13211abf4182c4ff8c diff --git a/net-ftp/frox/files/0.7.18-netfilter-includes.patch b/net-ftp/frox/files/0.7.18-netfilter-includes.patch new file mode 100644 index 000000000000..889f42121722 --- /dev/null +++ b/net-ftp/frox/files/0.7.18-netfilter-includes.patch @@ -0,0 +1,16 @@ +--- a/configure.in.ori 2012-03-01 22:32:17.044450088 +0100 ++++ b/configure.in 2012-03-01 22:36:40.995882948 +0100 +@@ -331,7 +331,12 @@ + AC_HEADER_STDC + AC_HEADER_SYS_WAIT + AC_CHECK_HEADERS(fcntl.h strings.h sys/ioctl.h sys/time.h syslog.h unistd.h) +-AC_CHECK_HEADERS(linux/netfilter_ipv4.h, , , [#include <limits.h>]) ++AC_CHECK_HEADERS(linux/netfilter_ipv4.h, , ,[ ++ #include <limits.h> ++ #include <sys/socket.h> ++ #include <linux/in.h> ++ #include <linux/in6.h> ++]) + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST diff --git a/net-ftp/frox/files/0.7.18-respect-CFLAGS.patch b/net-ftp/frox/files/0.7.18-respect-CFLAGS.patch new file mode 100644 index 000000000000..8076d91ea268 --- /dev/null +++ b/net-ftp/frox/files/0.7.18-respect-CFLAGS.patch @@ -0,0 +1,15 @@ +--- a/configure.in 2005-02-04 11:24:55.000000000 +0100 ++++ b/configure.in 2012-03-01 22:56:25.985725178 +0100 +@@ -46,11 +46,9 @@ + ;; + *) + AC_MSG_RESULT(no) +- CFLAGS="$CFLAGS -O2" + ;; + esac], +- [AC_MSG_RESULT(no) +- CFLAGS="$CFLAGS -O2"] ++ [AC_MSG_RESULT(no)] + ) + + AC_MSG_CHECKING(whether to compile in profiling info) diff --git a/net-ftp/frox/files/frox-0.7.18-config.patch b/net-ftp/frox/files/frox-0.7.18-config.patch new file mode 100644 index 000000000000..feee37e3674e --- /dev/null +++ b/net-ftp/frox/files/frox-0.7.18-config.patch @@ -0,0 +1,66 @@ +--- a/src/frox.conf 2005-02-04 19:54:55.000000000 +0930 ++++ b/src/frox.conf 2005-02-07 19:35:32.995421344 +0930 +@@ -18,7 +18,9 @@ + # commented out to listen on all local IPs. + # + # Listen firewall.localnet +-Listen 192.168.2.1 ++# Listen 192.168.2.1 ++ ++Listen 127.0.0.1 + + # Port to listen on. Must be supplied. + # +@@ -26,7 +28,7 @@ + + # If specified then bind to this device + # +-BindToDevice eth0 ++#BindToDevice eth0 + + # Whether to run from inetd. You should still define Port above, but + # it isn't used for much. +@@ -69,12 +71,12 @@ + #################################################################### + # General Options # + #################################################################### +-# User and group to drop priveliges to. This must be specified - if ++User ftpproxy + # you really want to run as root (not a good idea) you must say so + # specifically, and have compiled with --enable-run-as-root. + # +-# User nobody +-# Group nogroup ++User ftpproxy ++Group ftpproxy + + # This is frox's working directory - it must be specified. Temporary + # files and sockets will be created here. If you are using local +@@ -83,7 +85,7 @@ + # also chroot to this dir on startup. To avoid this you must specifically + # set DontChroot to Yes. + # +-# WorkingDir /usr/local/lib/frox ++WorkingDir /var/spool/frox + # DontChroot Yes + + # Logging level. 0=No logging. 5=Critical errors only. 10= All errors. +@@ -96,15 +98,15 @@ + # transferred irrespective of the log level. You can turn this off + # below. + # +-# LogLevel 15 +-# LogFile /usr/local/lib/frox/frox-log ++LogLevel 20 ++LogFile /var/log/frox/frox-log + # XferLogging no + + # File to store PID in. Default is not to. If this file is not within + # the Chroot directory then it cannot be deleted on exit, but will + # otherwise work fine. + # +-PidFile /var/run/frox.pid ++PidFile /var/run/frox/frox.pid + + + #################################################################### diff --git a/net-ftp/frox/files/frox-0.7.18-no-common.patch b/net-ftp/frox/files/frox-0.7.18-no-common.patch new file mode 100644 index 000000000000..ef2e72898aca --- /dev/null +++ b/net-ftp/frox/files/frox-0.7.18-no-common.patch @@ -0,0 +1,63 @@ +Fix compilation with -fno-common (default for GCC 10) + +Signed-off-by: Marek Behún kabel@blackhole.sk> +--- +diff --git a/lib/sstrlib/sstr_private.h b/lib/sstrlib/sstr_private.h +--- a/lib/sstrlib/sstr_private.h ++++ b/lib/sstrlib/sstr_private.h +@@ -32,6 +32,6 @@ struct _sstr { + }; + + int sstr_alloc_space(sstr * p, int len); +-void (*on_error) (void); ++extern void (*on_error) (void); + + #endif /*SSTR_PRIVATE_H */ +diff --git a/src/common.h b/src/common.h +--- a/src/common.h ++++ b/src/common.h +@@ -184,7 +184,7 @@ typedef struct _session_info { + /******************* + **Global Variables** + ********************/ +-session_info *info; ++extern session_info *info; + extern pid_t cmgrpid, tdatapid; + + #endif /* COMMON_H */ +diff --git a/src/ftp-cmds.c b/src/ftp-cmds.c +--- a/src/ftp-cmds.c ++++ b/src/ftp-cmds.c +@@ -38,6 +38,8 @@ void xfer_command(sstr * cmd, sstr * arg + void cwd_command(sstr * cmd, sstr * arg); + void pasv_reply(sstr * msg); + ++struct cmd_struct *ftp_cmds; ++ + void ftpcmds_init() + { + static struct cmd_struct list[] = { /*Pinched in part SUSE */ +diff --git a/src/ftp-cmds.h b/src/ftp-cmds.h +--- a/src/ftp-cmds.h ++++ b/src/ftp-cmds.h +@@ -33,7 +33,7 @@ struct cmd_struct { + void (*cmd) (sstr * cmd, sstr * arg); + }; + +-struct cmd_struct *ftp_cmds; ++extern struct cmd_struct *ftp_cmds; + void user_munge(sstr * cmd, sstr * arg); + + +diff --git a/src/main.c b/src/main.c +--- a/src/main.c ++++ b/src/main.c +@@ -62,6 +62,8 @@ static struct client_info { + void add_client(pid_t, struct sockaddr_in client); + void rm_client(pid_t pid); + ++session_info *info; ++ + #ifdef ENABLE_CHANGEPROC + int main(int argc, char *argv[], char *envp[]) + #else diff --git a/net-ftp/frox/files/frox.initd b/net-ftp/frox/files/frox.initd new file mode 100644 index 000000000000..0512d05857a5 --- /dev/null +++ b/net-ftp/frox/files/frox.initd @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="reload" + +FROX_CONFIG="/etc/frox.conf" +FROX_PID_FILE="/var/run/frox/frox.pid" +FROX_OPTS="-f ${FROX_CONFIG}" + +checkconfig() { + local piddir="$(dirname ${FROX_PID_FILE})" + checkpath -q -d -o ftpproxy:ftpproxy -m 0770 "${piddir}" || return 1 + if [ ! -f "${FROX_CONFIG}" ] ; then + eerror "missing ${FROX_CONFIG}" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet --exec /usr/sbin/frox -- ${FROX_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --exec /usr/sbin/frox --pidfile "${FROX_PID_FILE}" + eend $? +} + +reload() { + ebegin "Reloading configuration" + start-stop-daemon --signal HUP --pidfile "${FROX_PID_FILE}" + eend $? +} diff --git a/net-ftp/frox/frox-0.7.18-r9.ebuild b/net-ftp/frox/frox-0.7.18-r9.ebuild new file mode 100644 index 000000000000..3600629b54f9 --- /dev/null +++ b/net-ftp/frox/frox-0.7.18-r9.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +DESCRIPTION="Transparent ftp proxy" +HOMEPAGE="https://frox.sourceforge.net/" +SRC_URI="https://frox.sourceforge.net/download/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="clamav ssl transparent" + +DEPEND=" + acct-group/ftpproxy + acct-user/ftpproxy + clamav? ( >=app-antivirus/clamav-0.80 ) + kernel_linux? ( >=sys-kernel/linux-headers-2.6 ) + ssl? ( + dev-libs/openssl:0= + ) +" + +RDEPEND="${DEPEND}" + +# INSTALL has useful filewall rules +DOCS=( + BUGS README + doc/CREDITS doc/ChangeLog doc/FAQ doc/INSTALL + doc/INTERNALS doc/README.transdata doc/RELEASE + doc/SECURITY doc/TODO +) + +pkg_setup() { + use clamav && ewarn "Virus scanner potentialy broken in chroot - see bug #81035" +} + +src_prepare() { + HTML_DOCS=( doc/*.html doc/*.sgml ) + + default + + eapply "${FILESDIR}/${PV}-respect-CFLAGS.patch" + eapply "${FILESDIR}/${PV}-netfilter-includes.patch" + eapply "${FILESDIR}/${P}-config.patch" + eapply "${FILESDIR}/${P}-no-common.patch" + + if use clamav ; then + sed -e "s:^# VirusScanner.*:# VirusScanner '\"/usr/bin/clamscan\" \"%s\"':" \ + -i "src/${PN}.conf" || die + fi + + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-http-cache --enable-local-cache + --enable-procname + --enable-configfile=/etc/frox.conf + $(use_enable !kernel_linux libiptc) + $(use_enable clamav virus-scan) + $(use_enable ssl) + $(use_enable transparent transparent-data) + $(use_enable !transparent ntp) + ) + + econf "${myeconfargs[@]}" +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +src_install() { + default + + keepdir /var/log/"${PN}" + + fowners ftpproxy:ftpproxy /var/log/frox + + newman "doc/${PN}.man" "${PN}.man.8" + newman "doc/${PN}.conf.man" "${PN}.conf.man.5" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + newins "src/${PN}.conf" "${PN}.conf.example" +} diff --git a/net-ftp/frox/metadata.xml b/net-ftp/frox/metadata.xml new file mode 100644 index 000000000000..00586fe62ae1 --- /dev/null +++ b/net-ftp/frox/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>kabel@kernel.org</email> + <name>Marek Behún</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="transparent">Enable transparent proxying of data connections</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/ftp/Manifest b/net-ftp/ftp/Manifest new file mode 100644 index 000000000000..18a3af575f76 --- /dev/null +++ b/net-ftp/ftp/Manifest @@ -0,0 +1,3 @@ +DIST netkit-ftp-0.17-patches-3.tar.bz2 4082 BLAKE2B d70c0340641647ab993a7b2aa1c49be2a1ff16e7b6b3038ebe9eff329bf4796cfa21d8c8d88f123c2f633cc1ba3b5ecdd4b1be78a7fda63b77ece077d643fca5 SHA512 083796f89c6d02f2b094616a6b7c9ef8ef7d0edbe337521cf311deb03f1af2000f12b85e3978a5eb1c56c64f2a2a105c0b7735fd6ea31d626d171a047cd858c3 +DIST netkit-ftp-0.17.tar.gz 53934 BLAKE2B 451f90f26cd5cc1a6693fea7c31d47127d8b89b4b00a2f863af61d46d87f6e416141db1c6f6bb320021665a99f0d9e00dc4a5c3b0bb209df0ae74aad97a45f20 SHA512 ba8e411d0230c78e9e4555c03dc1036c6e506ef8edb72ecee4d6a7559d85143721bffbe8b8a6e42918b3098072ac8f207584be9e3a241f6bd31e361c92de6554 +DIST netkit-ftp-ssl_0.17.34+0.2-5.1.debian.tar.xz 48976 BLAKE2B 30c867a3a8fabc55ba05603c54b5e4153d198e8e92d55353bf02cbf0494a41de1362c945aef013edfa3a6f0b1c78e5041ec7127db5eb99bac5351f57bb526c2d SHA512 6061b9b22fe8463a7d4542988685e108b282b6d2908d67cc70951fc23b1d842a70aee44af989d1e683e80c050ffe284fbfa776581e0120439bec98d479672718 diff --git a/net-ftp/ftp/files/ftp-0.17.34.0.2.5.1-musl-glob-brace.patch b/net-ftp/ftp/files/ftp-0.17.34.0.2.5.1-musl-glob-brace.patch new file mode 100644 index 000000000000..386af410e913 --- /dev/null +++ b/net-ftp/ftp/files/ftp-0.17.34.0.2.5.1-musl-glob-brace.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/832430 + +See e.g. https://patchwork.kernel.org/project/selinux/patch/20180517051117.48454-5-jason@perfinion.com/ too. +--- a/ftp/cmds.h ++++ b/ftp/cmds.h +@@ -61,3 +61,7 @@ + void do_umask(int argc, char *argv[]); + void idle_cmd(int argc, char *argv[]); + void setpassive(void); ++ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif + diff --git a/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild b/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild new file mode 100644 index 000000000000..ca63630adac2 --- /dev/null +++ b/net-ftp/ftp/ftp-0.17.34.0.2.5.1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit edo flag-o-matic toolchain-funcs + +PATCH_VER="3" +MY_PN="netkit-ftp" +MY_PV="$(ver_cut 1-2)" +MY_P="netkit-${PN}-${MY_PV}" +DEB_PN="${MY_PN}-ssl" +DEB_PV="$(ver_cut 1-3)+$(ver_cut 4-5)-$(ver_cut 6-7)" + +DESCRIPTION="Standard Linux FTP client" +HOMEPAGE="https://wiki.linuxfoundation.org/networking/netkit" +SRC_URI="http://ftp.linux.org.uk/pub/linux/Networking/netkit/${MY_P}.tar.gz + ftp://sunsite.unc.edu/pub/Linux/system/network/netkit/${MY_P}.tar.gz + mirror://debian/pool/main/n/${DEB_PN}/${DEB_PN}_${DEB_PV}.debian.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}-patches-${PATCH_VER}.tar.bz2" +S="${WORKDIR}"/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="ipv6 readline ssl" + +RDEPEND=" + >=sys-libs/ncurses-5.2:= + elibc_musl? ( sys-libs/obstack-standalone ) + readline? ( sys-libs/readline:= ) + ssl? ( dev-libs/openssl:= ) +" +DEPEND="${RDEPEND}" +BDEPEND="sys-apps/grep" + +src_prepare() { + local p + for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series || die); do + eapply "${WORKDIR}"/debian/patches/${p} + done + + eapply "${WORKDIR}"/patch + eapply "${FILESDIR}"/${PN}-0.17.34.0.2.5.1-musl-glob-brace.patch + + # Drop bashism from configure + sed -i \ + -e 's:echo -n:printf %s :' \ + configure || die + + default +} + +src_configure() { + # bug #101038 + append-lfs-flags + tc-export CC + + # bug #943875 + append-cflags "-std=gnu17" + + # Not an autoconf script + edo ./configure \ + --prefix=/usr \ + $(use_enable ipv6) \ + $(use_enable readline) \ + $(use_enable ssl) + + if use elibc_musl ; then + sed -i -e '/^LIBS=/ s/$/ -lobstack/' MCONFIG || die + fi +} + +src_install() { + dobin ftp/ftp + doman ftp/ftp.1 ftp/netrc.5 + dodoc ChangeLog README BUGS +} diff --git a/net-ftp/ftp/metadata.xml b/net-ftp/ftp/metadata.xml new file mode 100644 index 000000000000..f308c62eb267 --- /dev/null +++ b/net-ftp/ftp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/ftpbase/files/ftp-pamd-include b/net-ftp/ftpbase/files/ftp-pamd-include new file mode 100644 index 000000000000..c410527c8a60 --- /dev/null +++ b/net-ftp/ftpbase/files/ftp-pamd-include @@ -0,0 +1,17 @@ +# Provided by ftpbase (dont remove this line!) +# Standard pam.d file for ftp service packages. + +auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed +auth include system-auth + +# If this is enabled, anonymous logins will fail because the 'ftp' user does +# not have a "valid" shell, as listed in /etc/shells. +# +# If you enable this, it is recommended that you do *not* give the 'ftp' +# user a real shell. Instead, give the 'ftp' user /bin/false for a shell and +# add /bin/false to /etc/shells. +# auth required pam_shells.so + +account include system-auth + +session include system-auth diff --git a/net-ftp/ftpbase/files/ftp.service b/net-ftp/ftpbase/files/ftp.service new file mode 100644 index 000000000000..9194b45a8364 --- /dev/null +++ b/net-ftp/ftpbase/files/ftp.service @@ -0,0 +1,10 @@ +<?xml version="1.0" standalone='no'?><!--*-nxml-*--> +<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> + +<service-group> + <name replace-wildcards="yes">File Transfer Protocol (FTP) on %h</name> + <service> + <port>21</port> + <type>_ftp._tcp</type> + </service> +</service-group> diff --git a/net-ftp/ftpbase/files/ftpusers b/net-ftp/ftpbase/files/ftpusers new file mode 100644 index 000000000000..7754be9b7fc8 --- /dev/null +++ b/net-ftp/ftpbase/files/ftpusers @@ -0,0 +1,36 @@ +# Provided by ftpbase (dont remove this line!) +# /etc/ftpusers: list of users disallowed FTP access + +halt +operator +root +shutdown +sync +bin +daemon +adm +lp +mail +postmaster +news +uucp +man +games +at +cron +www +named +squid +gdm +mysql +postgres +guest +nobody +alias +qmaild +qmaill +qmailp +qmailq +qmailr +qmails +postfix diff --git a/net-ftp/ftpbase/ftpbase-0.01-r6.ebuild b/net-ftp/ftpbase/ftpbase-0.01-r6.ebuild new file mode 100644 index 000000000000..2d09dfa76980 --- /dev/null +++ b/net-ftp/ftpbase/ftpbase-0.01-r6.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pam + +DESCRIPTION="File Transfer Protocol (FTP) base layout" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +S="${WORKDIR}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="pam zeroconf" + +DEPEND=" + pam? ( sys-libs/pam ) + zeroconf? ( net-dns/avahi ) +" + +RDEPEND=" + acct-group/ftp + acct-user/ftp +" + +src_install() { + # The ftpusers file is a list of people who are NOT allowed + # to use the ftp service. + insinto /etc + doins "${FILESDIR}/ftpusers" + + use pam && newpamd "${FILESDIR}"/ftp-pamd-include ftp + + if use zeroconf; then + insinto /etc/avahi/services + doins "${FILESDIR}/ftp.service" + fi +} diff --git a/net-ftp/ftpbase/metadata.xml b/net-ftp/ftpbase/metadata.xml new file mode 100644 index 000000000000..467bc4ccaf79 --- /dev/null +++ b/net-ftp/ftpbase/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>conikost@gentoo.org</email> + <name>Conrad Kostecki</name> + </maintainer> + <stabilize-allarches /> + <use> + <flag name="zeroconf">Enable support for zero-configuration networking via Avahi.</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/gftp/Manifest b/net-ftp/gftp/Manifest new file mode 100644 index 000000000000..d3f87b51fe19 --- /dev/null +++ b/net-ftp/gftp/Manifest @@ -0,0 +1 @@ +DIST gftp-2.9.1b.tar.xz 872308 BLAKE2B 3588321689a1c6d8e0585e0439507f774b30e05630f774d7909f32fd66c289a961602b84cde97377de47d0c63fe4cf5452ec1e0b986c578958a6080cf5814fc8 SHA512 31d0aa4d3c5adf3d9ac2c2517402f9bdcab5fb1187df521a978acf41c1997a120797056dd1ca7bedc32e0dec0ac7c06c1790e47821660277fb6572205ce0fe93 diff --git a/net-ftp/gftp/files/gftp-2.9.1b-fix-socklen-type.patch b/net-ftp/gftp/files/gftp-2.9.1b-fix-socklen-type.patch new file mode 100644 index 000000000000..f5bcdca11bbf --- /dev/null +++ b/net-ftp/gftp/files/gftp-2.9.1b-fix-socklen-type.patch @@ -0,0 +1,11 @@ +--- a/lib/gftp.h 2024-04-26 09:08:32.404275437 +0000 ++++ b/lib/gftp.h 2024-04-26 09:11:56.292057323 +0000 +@@ -361,7 +361,7 @@ + int wakeup_main_thread[2]; /* FD that gets written to by the threads to wakeup the parent */ + + void *remote_addr; +- size_t remote_addr_len; ++ socklen_t remote_addr_len; + int ai_family; + int ai_socktype; + unsigned int use_udp : 1; /* does this use UDP protocol? */ diff --git a/net-ftp/gftp/gftp-2.9.1b-r1.ebuild b/net-ftp/gftp/gftp-2.9.1b-r1.ebuild new file mode 100644 index 000000000000..ca2ceb50197b --- /dev/null +++ b/net-ftp/gftp/gftp-2.9.1b-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit gnome2 + +DESCRIPTION="a free multithreaded file transfer client" +HOMEPAGE="https://github.com/masneyb/gftp" +SRC_URI="https://github.com/masneyb/gftp/releases/download/${PV}/${P}.tar.xz" + +# Override gnome.org.eclass's S= (bug #904064) +S="${WORKDIR}/${P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm64 ppc ppc64 ~riscv ~sparc x86" +IUSE="gtk ssl" + +RDEPEND=" + dev-libs/glib:2 + sys-libs/ncurses:0= + sys-libs/readline:0 + gtk? ( x11-libs/gtk+:2 ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +PATCHES=( + # https://github.com/masneyb/gftp/issues/178 + "${FILESDIR}"/"${P}"-fix-socklen-type.patch +) + +src_prepare() { + gnome2_src_prepare + # https://github.com/masneyb/gftp/issues/181 + sed -i -e 's/Icon=gftp.png/Icon=gftp/' docs/gftp.desktop || die +} + +src_configure() { + gnome2_src_configure \ + $(use_enable gtk gtkport) \ + $(use_enable ssl) +} + +src_install() { + gnome2_src_install + dodoc docs/USERS-GUIDE +} diff --git a/net-ftp/gftp/gftp-2.9.1b.ebuild b/net-ftp/gftp/gftp-2.9.1b.ebuild new file mode 100644 index 000000000000..0166dd9a66ae --- /dev/null +++ b/net-ftp/gftp/gftp-2.9.1b.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit gnome2 + +DESCRIPTION="a free multithreaded file transfer client" +SRC_URI="https://github.com/masneyb/gftp/releases/download/${PV}/${P}.tar.xz" +HOMEPAGE="https://github.com/masneyb/gftp" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm64 ppc ppc64 ~riscv ~sparc x86" +IUSE="gtk ssl" + +RDEPEND=" + dev-libs/glib:2 + sys-libs/ncurses:0= + sys-libs/readline:0 + gtk? ( x11-libs/gtk+:2 ) + ssl? ( dev-libs/openssl:0= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +# Override gnome.org.eclass's S= (bug #904064) +S="${WORKDIR}/${P}" + +src_configure() { + gnome2_src_configure \ + $(use_enable gtk gtkport) \ + $(use_enable ssl) +} + +src_install() { + gnome2_src_install + dodoc docs/USERS-GUIDE +} diff --git a/net-ftp/gftp/metadata.xml b/net-ftp/gftp/metadata.xml new file mode 100644 index 000000000000..f6b6cde5f785 --- /dev/null +++ b/net-ftp/gftp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/lftp/Manifest b/net-ftp/lftp/Manifest new file mode 100644 index 000000000000..4d8496fa08aa --- /dev/null +++ b/net-ftp/lftp/Manifest @@ -0,0 +1 @@ +DIST lftp-4.9.3.tar.gz 3385456 BLAKE2B 10d96a8d10d95ab205b63adb1fa31ffa71ee88aeea6ba1740e4f9e24fbc7499387507cb9a9d6b7025cd8ff05c4d4ac0acc9ddbc5e6d04561ad1a4fc644faf86a SHA512 3168077f065ab71d1c49fda9c6e22ecc67bc0a16c27206c413f2103ba343e0c1364f63a1ee10a4c0f06203cbb9a2a81f94f736f7ef8a3dd667445e17ea75206f diff --git a/net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch b/net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch new file mode 100644 index 000000000000..6180d923a8ff --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch @@ -0,0 +1,21 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -18,7 +18,8 @@ + example_module1_la_SOURCES = example-module1.cc + example_module1_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir) + +-TASK_MODULES = liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la ++TASK_MODULES = liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la liblftp-tasks.la liblftp-jobs.la ++ + JOB_MODULES = cmd-mirror.la cmd-sleep.la cmd-torrent.la + if WITH_MODULES + pkgverlib_LTLIBRARIES = $(TASK_MODULES) $(JOB_MODULES) +@@ -26,8 +27,6 @@ + TASK_MODULES_STATIC = $(TASK_MODULES) + JOB_MODULES_STATIC = $(JOB_MODULES) + endif +-lib_LTLIBRARIES = liblftp-tasks.la liblftp-jobs.la +- + proto_ftp_la_SOURCES = ftpclass.cc ftpclass.h FtpListInfo.cc FtpListInfo.h\ + FtpDirList.cc FtpDirList.h ftp-opie.c FileCopyFtp.cc FileCopyFtp.h + proto_http_la_SOURCES = Http.cc Http.h HttpDir.cc HttpDir.h HttpDirXML.cc diff --git a/net-ftp/lftp/files/lftp-4.7.5-libdir-additional.patch b/net-ftp/lftp/files/lftp-4.7.5-libdir-additional.patch new file mode 100644 index 000000000000..bf7f0a96d9f5 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.7.5-libdir-additional.patch @@ -0,0 +1,12 @@ +--- a/m4/lib-prefix.m4 ++++ b/m4/lib-prefix.m4 +@@ -108,7 +108,8 @@ + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. +- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" ++ dnl No, let's not do that. ++ : + fi + fi + fi diff --git a/net-ftp/lftp/files/lftp-4.7.5-libdir-expat.patch b/net-ftp/lftp/files/lftp-4.7.5-libdir-expat.patch new file mode 100644 index 000000000000..f82afc782565 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.7.5-libdir-expat.patch @@ -0,0 +1,11 @@ +--- a/m4/ax_lib_expat.m4 ++++ b/m4/ax_lib_expat.m4 +@@ -109,7 +109,7 @@ + + if test -n "$expat_prefix"; then + expat_include_dir="$expat_prefix/include" +- expat_ld_flags="-L$expat_prefix/lib" ++ expat_ld_flags="-L$libdir" + expat_lib_flags="-lexpat" + run_expat_test="yes" + elif test "$expat_requested" = "yes"; then diff --git a/net-ftp/lftp/files/lftp-4.8.2-libdir-configure.patch b/net-ftp/lftp/files/lftp-4.8.2-libdir-configure.patch new file mode 100644 index 000000000000..d8d620b8ee5f --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.8.2-libdir-configure.patch @@ -0,0 +1,18 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -186,7 +186,6 @@ + esac + + if test x$socks_loc != x; then +- LDFLAGS="$LDFLAGS -L$socks_loc/lib" + CPPFLAGS="$CPPFLAGS -I$socks_loc/include" + fi + +@@ -307,7 +306,6 @@ + AX_CHECK_ZLIB([ + AC_SUBST([ZLIB],[-lz]) + r=""; test "$enable_rpath" = yes -a "$ZLIB_HOME" != /usr && r=" -R${ZLIB_HOME}/lib" +- AC_SUBST([ZLIB_LDFLAGS],["-L${ZLIB_HOME}/lib$r"]) + AC_SUBST([ZLIB_CPPFLAGS],["-I${ZLIB_HOME}/include"]) + ],[ + AC_MSG_ERROR([cannot find -lz library, install zlib-devel package]) diff --git a/net-ftp/lftp/files/lftp-4.8.2-libdir-libidn2.patch b/net-ftp/lftp/files/lftp-4.8.2-libdir-libidn2.patch new file mode 100644 index 000000000000..cae07b9bafed --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.8.2-libdir-libidn2.patch @@ -0,0 +1,10 @@ +--- a/m4/lftp.m4 ++++ b/m4/lftp.m4 +@@ -319,7 +319,6 @@ + libidn2=$withval, libidn2=yes) + if test "$libidn2" != "no"; then + if test "$libidn2" != "yes"; then +- LDFLAGS="${LDFLAGS} -L$libidn2/lib" + CPPFLAGS="${CPPFLAGS} -I$libidn2/include" + fi + AC_CHECK_HEADER(idn2.h, diff --git a/net-ftp/lftp/files/lftp-4.8.2-libdir-openssl.patch b/net-ftp/lftp/files/lftp-4.8.2-libdir-openssl.patch new file mode 100644 index 000000000000..f8bf45b1d590 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.8.2-libdir-openssl.patch @@ -0,0 +1,18 @@ +--- a/m4/ssl.m4 ++++ b/m4/ssl.m4 +@@ -10,7 +10,6 @@ + old_CPPFLAGS="$CPPFLAGS" + LIBS="$LIBS -lssl -lcrypto" + if test $loc != default; then +- LDFLAGS="$LDFLAGS -L$loc/lib" + CPPFLAGS="$CPPFLAGS -I$loc/include" + fi + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <openssl/ssl.h> +@@ -22,7 +21,6 @@ + lftp_cv_openssl="OPENSSL_LIBS=\"-lssl -lcrypto\"" + if test $found_loc != default; then + r=""; test "$enable_rpath" = yes -a "$found_loc" != /usr && r=" -R$found_loc/lib" +- lftp_cv_openssl="$lftp_cv_openssl OPENSSL_LDFLAGS=\"-L$found_loc/lib$r\"" + lftp_cv_openssl="$lftp_cv_openssl OPENSSL_CPPFLAGS=-I$found_loc/include" + fi + break; diff --git a/net-ftp/lftp/files/lftp-4.8.2-libdir-zlib.patch b/net-ftp/lftp/files/lftp-4.8.2-libdir-zlib.patch new file mode 100644 index 000000000000..7ff003fe6eb3 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.8.2-libdir-zlib.patch @@ -0,0 +1,20 @@ +--- a/m4/ax_check_zlib.m4 ++++ b/m4/ax_check_zlib.m4 +@@ -105,7 +105,6 @@ + ZLIB_OLD_LDFLAGS="$LDFLAGS" + ZLIB_OLD_CPPFLAGS="$CPPFLAGS" + if test -n "${ZLIB_HOME}"; then +- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" + fi + AC_LANG_SAVE +@@ -118,8 +118,7 @@ + # If both library and header were found, action-if-found + # + m4_ifblank([$1],[ +- test "$enable_rpath" = yes -a "$ZLIB_HOME" != /usr && \ +- LDFLAGS="$LDFLAGS -R${ZLIB_HOME}/lib" ++ test "$enable_rpath" = yes -a "$ZLIB_HOME" != /usr + LIBS="-lz $LIBS" + AC_DEFINE([HAVE_LIBZ], [1], + [Define to 1 if you have `z' library (-lz)]) diff --git a/net-ftp/lftp/files/lftp-4.9.1-libdir-readline.patch b/net-ftp/lftp/files/lftp-4.9.1-libdir-readline.patch new file mode 100644 index 000000000000..fde1017f4bdc --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.9.1-libdir-readline.patch @@ -0,0 +1,11 @@ +--- a/m4/lftp_lib_readline.m4 ++++ b/m4/lftp_lib_readline.m4 +@@ -107,7 +107,7 @@ + if test -f "$readline_include_dir/readline/readline.h"; then + readline_include_dir="$readline_include_dir/readline" + fi +- readline_ld_flags="-L$readline_prefix/lib" ++ readline_ld_flags="-L$libdir" + if test -z "$readline_lib_flags"; then + readline_lib_flags="-lreadline" + fi diff --git a/net-ftp/lftp/files/lftp-4.9.2-socks.patch b/net-ftp/lftp/files/lftp-4.9.2-socks.patch new file mode 100644 index 000000000000..7e004118a968 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.9.2-socks.patch @@ -0,0 +1,26 @@ +diff '--color=auto' -urNd a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -192,18 +192,18 @@ + + if test x$with_socks = xyes; then + AC_DEFINE(SOCKS4, 1, [define if you are building with SOCKS support]) +- AC_CHECK_LIB(socks, main, [SOCKSLIBS=-lsocks], ++ AC_CHECK_LIB(socks, Rconnect, [SOCKSLIBS=-lsocks], + [AC_MSG_ERROR([cannot find -lsocks library])]) + fi + if test x$with_socks5 = xyes; then + AC_DEFINE(SOCKS5, 1, [define if you are building with SOCKSv5 support]) +- AC_CHECK_LIB(socks5, main, [SOCKSLIBS=-lsocks5], ++ AC_CHECK_LIB(socks5, Rconnect, [SOCKSLIBS=-lsocks5], + [AC_MSG_ERROR([cannot find -lsocks5 library])]) + fi + if test x$with_socksdante = xyes; then + AC_DEFINE(SOCKS_DANTE, 1, [define if you are building with SOCKS-Dante support]) +- AC_CHECK_LIB(socks, main, [SOCKSLIBS=-lsocks], +- [AC_MSG_ERROR([cannot find -lsocks library])]) ++ AC_CHECK_LIB(socksd, Rconnect, [SOCKSLIBS=-lsocksd], ++ [AC_MSG_ERROR([cannot find -lsocksd library])]) + fi + + AC_SUBST(SOCKSLIBS) diff --git a/net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch b/net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch new file mode 100644 index 000000000000..498ee402bee5 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch @@ -0,0 +1,13 @@ +diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h +index ed00a43..f37ff84 100644 +--- a/lib/stdlib.in.h ++++ b/lib/stdlib.in.h +@@ -119,7 +119,7 @@ struct random_data + # include <unistd.h> + #endif + +-#if ((@GNULIB_STRTOL@ && @REPLACE_STRTOL@) || (@GNULIB_STRTOLL@ && @REPLACE_STRTOLL@) || (@GNULIB_STRTOUL@ && @REPLACE_STRTOUL@) || (@GNULIB_STRTOULL@ && @REPLACE_STRTOULL@)) && defined __cplusplus && !defined GNULIB_NAMESPACE && defined __GNUG__ && !defined __clang__ ++#if ((@GNULIB_STRTOL@ && @REPLACE_STRTOL@) || (@GNULIB_STRTOLL@ && @REPLACE_STRTOLL@) || (@GNULIB_STRTOUL@ && @REPLACE_STRTOUL@) || (@GNULIB_STRTOULL@ && @REPLACE_STRTOULL@)) && defined __cplusplus && !defined GNULIB_NAMESPACE && defined __GNUG__ + /* When strtol, strtoll, strtoul, or strtoull is going to be defined as a macro + below, this may cause compilation errors later in the libstdc++ header files + (that are part of GCC), such as: diff --git a/net-ftp/lftp/files/lftp-4.9.3-gnulib.patch b/net-ftp/lftp/files/lftp-4.9.3-gnulib.patch new file mode 100644 index 000000000000..2d821907f2d7 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.9.3-gnulib.patch @@ -0,0 +1,45 @@ +From: Jan Palus <jpalus@fastmail.com> +Date: Sun, 17 Nov 2024 17:58:42 +0000 (+0100) +Subject: md5-stream, sha*-stream, sm3-stream: Avoid duplicate symbols. +X-Git-Url: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff_plain;h=353a3236d9328349c18ce2e4e984755cb4a76ea7 + +md5-stream, sha*-stream, sm3-stream: Avoid duplicate symbols. + +* lib/md5-stream.c (GL_OPENSSL_INLINE): Remove definition, that caused +the symbols defined in md5.o to be defined in md5-stream.o as well. +* lib/sha1-stream.c (GL_OPENSSL_INLINE): Likewise. +* lib/sha256-stream.c (GL_OPENSSL_INLINE): Likewise. +* lib/sha512-stream.c (GL_OPENSSL_INLINE): Likewise. +* lib/sm3-stream.c (GL_OPENSSL_INLINE): Likewise. + +Copyright-paperwork-exempt: Yes +--- + +diff --git a/lib/md5-stream.c b/lib/md5-stream.c +index fdd2bd8b4b..2cbdda6b0f 100644 +--- a/lib/md5-stream.c ++++ b/lib/md5-stream.c +@@ -22,9 +22,6 @@ + #include <config.h> + + /* Specification. */ +-#if HAVE_OPENSSL_MD5 +-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +-#endif + #include "md5.h" + + #include <stdlib.h> +diff --git a/lib/sha1-stream.c b/lib/sha1-stream.c +index cbdf95ab76..b713e678a6 100644 +--- a/lib/sha1-stream.c ++++ b/lib/sha1-stream.c +@@ -24,9 +24,6 @@ + #include <config.h> + + /* Specification. */ +-#if HAVE_OPENSSL_SHA1 +-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +-#endif + #include "sha1.h" + + #include <stdlib.h> diff --git a/net-ftp/lftp/lftp-4.9.3.ebuild b/net-ftp/lftp/lftp-4.9.3.ebuild new file mode 100644 index 000000000000..054c2a65aaf7 --- /dev/null +++ b/net-ftp/lftp/lftp-4.9.3.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools libtool xdg-utils + +DESCRIPTION="A sophisticated ftp/sftp/http/https/torrent client and file transfer program" +HOMEPAGE="http://lftp.yar.ru/" +SRC_URI="https://github.com/lavv17/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos" +IUSE="convert-mozilla-cookies +gnutls idn nls socks5 +ssl verify-file" +RESTRICT="test" + +RDEPEND=" + >=sys-libs/ncurses-5.1:= + >=sys-libs/readline-5.1:= + dev-libs/expat + virtual/zlib:= + convert-mozilla-cookies? ( dev-perl/DBI ) + idn? ( net-dns/libidn2:= ) + socks5? ( + >=net-proxy/dante-1.1.12 + sys-libs/pam + ) + ssl? ( + gnutls? ( >=net-libs/gnutls-1.2.3:0= ) + !gnutls? ( dev-libs/openssl:0= ) + ) + verify-file? ( + dev-perl/String-CRC32 + virtual/perl-Digest-MD5 + ) +" + +DEPEND=" + ${RDEPEND} + =dev-build/libtool-2* + app-arch/xz-utils + nls? ( >=sys-devel/gettext-0.21 ) + virtual/pkgconfig +" + +DOCS=( + BUGS ChangeLog FAQ FEATURES MIRRORS NEWS README README.debug-levels + README.dnssec README.modules THANKS TODO +) + +PATCHES=( + "${FILESDIR}"/${PN}-4.0.2.91-lafile.patch + "${FILESDIR}"/${PN}-4.7.5-libdir-additional.patch + "${FILESDIR}"/${PN}-4.7.5-libdir-expat.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-configure.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-libidn2.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-openssl.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-zlib.patch + "${FILESDIR}"/${PN}-4.9.1-libdir-readline.patch + "${FILESDIR}"/${PN}-4.9.2-socks.patch + "${FILESDIR}"/${PN}-4.9.3-gnulib.patch + "${FILESDIR}"/${PN}-4.9.3-gnulib-stdlib.h.patch +) + +# Gnulib false positive #900064 +QA_CONFIG_IMPL_DECL_SKIP="( MIN )" + +src_prepare() { + default + + # bug #875692 + sed -e '/#include/s/cmath/math.h/' -i trio/*.c || die + + eautoreconf + + elibtoolize # for Darwin bundles + + # bug #536036 + printf 'set fish:auto-confirm no\nset sftp:auto-confirm no\n' >> ${PN}.conf || die +} + +src_configure() { + econf \ + $(use_enable nls) \ + $(use_with idn libidn2) \ + $(use_with socks5 socksdante "${EPREFIX}"/usr) \ + $(usex ssl "$(use_with !gnutls openssl "${EPREFIX}"/usr)" '--without-openssl') \ + $(usex ssl "$(use_with gnutls)" '--without-gnutls') \ + --enable-ipv6 \ + --enable-packager-mode \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + --with-modules \ + --with-readline="${EPREFIX}"/usr \ + --without-included-regex +} + +src_install() { + default + + local script + for script in {convert-mozilla-cookies,verify-file}; do + use ${script} || { rm "${ED}"/usr/share/${PN}/${script} || die ;} + done +} + +pkg_postinst() { + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/net-ftp/lftp/lftp-9999.ebuild b/net-ftp/lftp/lftp-9999.ebuild new file mode 100644 index 000000000000..77987fc1375c --- /dev/null +++ b/net-ftp/lftp/lftp-9999.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools git-r3 libtool xdg-utils + +DESCRIPTION="A sophisticated ftp/sftp/http/https/torrent client and file transfer program" +HOMEPAGE="http://lftp.yar.ru/" +EGIT_REPO_URI="https://github.com/lavv17/lftp" + +LICENSE="GPL-3" +SLOT="0" +IUSE="convert-mozilla-cookies +gnutls idn nls socks5 +ssl verify-file" + +RDEPEND=" + >=sys-libs/ncurses-5.1:= + >=sys-libs/readline-5.1:= + dev-libs/expat + virtual/zlib:= + convert-mozilla-cookies? ( dev-perl/DBI ) + idn? ( net-dns/libidn2:= ) + socks5? ( + >=net-proxy/dante-1.1.12 + sys-libs/pam + ) + ssl? ( + gnutls? ( >=net-libs/gnutls-1.2.3:0= ) + !gnutls? ( dev-libs/openssl:0= ) + ) + verify-file? ( + dev-perl/String-CRC32 + virtual/perl-Digest-MD5 + ) +" + +DEPEND=" + ${RDEPEND} + =dev-build/libtool-2* + app-arch/xz-utils + nls? ( >=sys-devel/gettext-0.21 ) + virtual/pkgconfig +" + +DOCS=( + BUGS ChangeLog FAQ FEATURES MIRRORS NEWS README README.debug-levels + README.dnssec README.modules THANKS TODO +) + +PATCHES=( + "${FILESDIR}"/${PN}-4.0.2.91-lafile.patch + "${FILESDIR}"/${PN}-4.7.5-libdir-additional.patch + "${FILESDIR}"/${PN}-4.7.5-libdir-expat.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-configure.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-libidn2.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-openssl.patch + "${FILESDIR}"/${PN}-4.8.2-libdir-zlib.patch + "${FILESDIR}"/${PN}-4.9.1-libdir-readline.patch + "${FILESDIR}"/${PN}-4.9.2-socks.patch + "${FILESDIR}"/${PN}-4.9.3-gnulib.patch +) + +# Gnulib false positive #900064 +QA_CONFIG_IMPL_DECL_SKIP="( MIN )" + +src_prepare() { + default + + # bug #875692 + sed -e '/#include/s/cmath/math.h/' -i trio/*.c || die + + eautoreconf + + elibtoolize # for Darwin bundles + + # bug #536036 + printf 'set fish:auto-confirm no\nset sftp:auto-confirm no\n' >> ${PN}.conf || die +} + +src_configure() { + econf \ + $(use_enable nls) \ + $(use_with idn libidn2) \ + $(use_with socks5 socksdante "${EPREFIX}"/usr) \ + $(usex ssl "$(use_with !gnutls openssl "${EPREFIX}"/usr)" '--without-openssl') \ + $(usex ssl "$(use_with gnutls)" '--without-gnutls') \ + --enable-ipv6 \ + --enable-packager-mode \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + --with-modules \ + --with-readline="${EPREFIX}"/usr \ + --without-included-regex +} + +src_install() { + default + + local script + for script in {convert-mozilla-cookies,verify-file}; do + use ${script} || { rm "${ED}"/usr/share/${PN}/${script} || die ;} + done +} + +pkg_postinst() { + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/net-ftp/lftp/metadata.xml b/net-ftp/lftp/metadata.xml new file mode 100644 index 000000000000..2d30b2a33d47 --- /dev/null +++ b/net-ftp/lftp/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>conikost@gentoo.org</email> + <name>Conrad Kostecki</name> + </maintainer> + <use> + <flag name="convert-mozilla-cookies">Install the convert-mozilla-cookies script and its run-time dependencies</flag> + <flag name="verify-file">Install the verify-file script and its run-time dependencies</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:lftp_project:lftp</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/linksys-tftp/Manifest b/net-ftp/linksys-tftp/Manifest new file mode 100644 index 000000000000..adca9b51e260 --- /dev/null +++ b/net-ftp/linksys-tftp/Manifest @@ -0,0 +1 @@ +DIST linksys-tftp-1.2.1.tar.bz2 11124 BLAKE2B 44a3bb1a11c9dae6014c3ec5f0c56c2a056e542f2f7f1d7a805479925beedebe9a79a8cddc64ce2455b459d8fa4436f16d52c6d86d8595fa1f05aa747f14bc78 SHA512 7d99cd7cc2144396fe008ed0fbc21053ef4e614021d6d2e24adca799d8eabd1b3c177b4bee20e14034170bc234d36e9eeaaf8e825513ef6f37e73643b91667fc diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch new file mode 100644 index 000000000000..b374e808ece2 --- /dev/null +++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch @@ -0,0 +1,28 @@ +Fix LDFLAGS (bug http://bugs.gentoo.org/336956 ) and +CFLAGS (bug http://bugs.gentoo.org/240894 ) by +Michael Weber <xmw@gentoo.org> + +--- linksys-tftp-1.2.1/Makefile ++++ linksys-tftp-1.2.1/Makefile +@@ -19,18 +19,18 @@ + # We override /usr/include/arpa/tftp.h with our own because + # we want tu_block to be unsigned short, not short as on most platforms + # +-CFLAGS= -I. -O2 -Dsin=sin_x ++CFLAGS += -I. -Dsin=sin_x + #DEBUG + # CFLAGS= -I. -Wall -ggdb -Dsin=sin_x + SRCS= main.c tftp.c tftpsubs.c + OBJS= main.o tftp.o tftpsubs.o + DOBJS= tftpsubs.o +-CC= gcc ++CC?= gcc + + all: linksys-tftp + + linksys-tftp: ${OBJS} +- ${CC} -o $@ ${CFLAGS} ${OBJS} ++ ${CC} -o $@ ${CFLAGS} ${OBJS} ${LDFLAGS} + + clean: + rm -f ${OBJS} ${DOBJS} *core linksys-tftp diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-clang.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-clang.patch new file mode 100644 index 000000000000..94ccee0c9eef --- /dev/null +++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-clang.patch @@ -0,0 +1,196 @@ +--- a/main.c ++++ b/main.c +@@ -159,7 +159,7 @@ setpeer(argc, argv) + + if (!argv[1]) { + printf("usage: %s host-name [port] (Default port is 69/udp)\n", argv[0]); +- return; ++ return 0; + } + host = gethostbyname(argv[1]); + if (host) { +@@ -172,7 +172,7 @@ setpeer(argc, argv) + if (sin.sin_addr.s_addr == -1) { + connected = 0; + printf("%s: unknown host\n", argv[1]); +- return; ++ return 0; + } + strcpy(hostname, argv[1]); + } +@@ -182,7 +182,7 @@ setpeer(argc, argv) + if (port < 0) { + printf("%s: bad port number\n", argv[2]); + connected = 0; +- return; ++ return 0; + } + port = htons(port); + } +@@ -209,7 +209,7 @@ modecmd(argc, argv) + + if (argc < 2) { + printf("Using %s mode to transfer files.\n", mode); +- return; ++ return 0; + } + if (argc == 2) { + for (p = modes; p->m_name; p++) +@@ -217,7 +217,7 @@ modecmd(argc, argv) + break; + if (p->m_name) { + setmode(p->m_mode); +- return; ++ return 0; + } + printf("%s: unknown mode\n", argv[1]); + /* drop through and print usage message */ +@@ -231,7 +231,7 @@ modecmd(argc, argv) + sep = " | "; + } + printf(" ]\n"); +- return; ++ return 0; + } + + setbinary(argc, argv) +@@ -265,31 +265,32 @@ put(argc, argv) + + if (argc < 3) { + putusage(argv[0]); +- return; ++ return 0; + } + linkpass = argv[2]; + if (!connected) { + fprintf(stderr,"No target machine specified.\n"); +- return; ++ return 0; + } + cp = argv[1]; + fd = open(cp, O_RDONLY); + if (fd < 0) { + fprintf(stderr, "tftp: "); perror(cp); +- return; ++ return 0; + } + if (verbose) + printf("putting %s to %s:%s [%s] AUTH %s\n", + cp, hostname, cp, mode, linkpass); + sin.sin_port = port; + sendfile(fd, cp, mode, linkpass); +- return; ++ return 0; + } + + putusage(s) + char *s; + { + printf("usage: %s file [linksys pass] (you must be connected)\n", s); ++ return 0; + } + + /* +@@ -304,18 +305,18 @@ get(argc, argv) + + if (argc < 3) { + getusage(argv[0]); +- return; ++ return 0; + } + linkpass = argv[2]; + if (!connected) { + fprintf(stderr,"No target machine specified.\n"); +- return; ++ return 0; + } + cp = argv[1]; + fd = creat(cp, 0644); + if (fd < 0) { + fprintf(stderr, "tftp: "); perror(cp); +- return; ++ return 0; + } + if (verbose) + printf("getting from %s:%s to %s [%s] AUTH %s\n", +@@ -323,7 +324,7 @@ get(argc, argv) + sin.sin_port = port; + recvfile(fd, cp, mode, linkpass); + +- return; ++ return 0; + } + + getusage(s) +@@ -349,7 +350,7 @@ setrexmt(argc, argv) + } + if (argc != 2) { + printf("usage: %s value\n", argv[0]); +- return; ++ return 0; + } + t = atoi(argv[1]); + if (t < 0) +@@ -375,7 +376,7 @@ settimeout(argc, argv) + } + if (argc != 2) { + printf("usage: %s value\n", argv[0]); +- return; ++ return 0; + } + t = atoi(argv[1]); + if (t < 0) +@@ -450,7 +451,7 @@ getcmd(name) + longest = 0; + nmatches = 0; + found = 0; +- if(!name) return; ++ if(!name) return 0; + for (c = cmdtab; p = c->name; c++) { + for (q = name; *q == *p++; q++) + if (*q == 0) /* exact match? */ +@@ -513,7 +514,7 @@ help(argc, argv) + printf("Commands may be abbreviated. Commands are:\n\n"); + for (c = cmdtab; c->name; c++) + printf("%-*s\t%s\n", HELPINDENT, c->name, c->help); +- return; ++ return 0; + } + while (--argc > 0) { + register char *arg; +@@ -557,7 +558,7 @@ setblocksize(argc, argv) + } + if (argc != 2) { + printf("usage: %s value\n", argv[0]); +- return; ++ return 0; + } + t = atoi(argv[1]); + if (t < 8 || t > 1432) +@@ -570,5 +571,5 @@ banner() { + printf("Mike Lynn\tabaddon [at] 802.11ninja.net\n"); + printf("Linksys TFTP Client for *BSD/Linux\tThe Firmware gets sexier\n"); + printf("Modified Berkeley TFTP client Release: %s\n\n",svers); +- return; ++ return 0; + } +--- a/tftpsubs.c ++++ b/tftpsubs.c +@@ -116,7 +116,7 @@ read_ahead(file, convert) + + b = &bfs[nextone]; /* look at "next" buffer */ + if (b->counter != BF_FREE) /* nop if not free */ +- return; ++ return 0; + nextone = !nextone; /* "incr" next buffer ptr */ + + dp = (struct tftphdr *)b->buf; +@@ -131,7 +131,7 @@ read_ahead(file, convert) + b->counter += i; + } while (i != 0 && !(i < 0 && errno != EINTR) && + b->counter < segsize); +- return; ++ return 0; + } + + p = dp->th_data; diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-fno-common.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-fno-common.patch new file mode 100644 index 000000000000..a63977619845 --- /dev/null +++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-fno-common.patch @@ -0,0 +1,11 @@ +--- a/tftp.c ++++ b/tftp.c +@@ -50,7 +50,7 @@ extern int segsize; + #define PKTSIZE (1432+4) /* SEGSIZE+4 */ + char ackbuf[PKTSIZE]; + int timeout; +-jmp_buf toplevel; ++extern jmp_buf toplevel; + jmp_buf timeoutbuf; + + #ifndef OACK diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch new file mode 100644 index 000000000000..9944f3c059bc --- /dev/null +++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch @@ -0,0 +1,52 @@ +--- linksys-tftp-1.2.1/main.c ++++ linksys-tftp-1.2.1/main.c +@@ -40,6 +40,10 @@ + #include <setjmp.h> + #include <ctype.h> + #include <netdb.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> ++#include <sys/sendfile.h> + + #define TIMEOUT 5 /* secs between rexmt's */ + +@@ -110,7 +112,7 @@ + char *index(); + char *rindex(); + +-main(argc, argv) ++int main(argc, argv) + char *argv[]; + { + struct sockaddr_in sin; +--- a/tftp.c ++++ b/tftp.c +@@ -36,8 +36,8 @@ + #include <stdio.h> + #include <errno.h> + #include <setjmp.h> +- +-extern int errno; ++#include <string.h> ++#include <unistd.h> + + extern struct sockaddr_in sin; /* filled in by main */ + extern int f; /* the opened socket */ +@@ -69,16 +69,6 @@ void timer(int sig) + longjmp(timeoutbuf, 1); + } + +-strnlen(s, n) +- char *s; +- int n; +-{ +- int i = 0; +- +- while (n-- > 0 && *s++) i++; +- return(i); +-} +- + /* + * Parse an OACK package and set blocksize accordingly + */ diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r4-c99-port.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r4-c99-port.patch new file mode 100644 index 000000000000..b4db3d2df8b0 --- /dev/null +++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r4-c99-port.patch @@ -0,0 +1,572 @@ +Following patches are by Richard Narron from https://bugs.gentoo.org/928051 +--- linksys-tftp-1.2.1/tftpsubs.c 2024-04-16 08:27:50.310449884 -0700 ++++ linksys-tftp-1.2.1/tftpsubs.c 2024-04-16 08:53:26.084521570 -0700 +@@ -38,6 +38,7 @@ static char sccsid[] = "@(#)tftpsubs.c 5 + // modified tftp header to include pass + #include <tftp.h> + #include <stdio.h> ++#include <unistd.h> + + #define PKTSIZE (1432+4) /* SEGSIZE+4 */ /* should be moved to tftp.h */ + +@@ -60,14 +61,22 @@ static int current; /* index of buff + int newline = 0; /* fillbuf: in middle of newline expansion */ + int prevchar = -1; /* putbuf: previous char (cr check) */ + +-struct tftphdr *rw_init(); ++/* functions declared in this program */ ++struct tftphdr *w_init(); ++struct tftphdr *r_init(); ++struct tftphdr *rw_init(int x); ++int readit(FILE *file, struct tftphdr **dpp, int convert); ++int read_ahead(FILE *file, int convert); ++int writeit(FILE *file, struct tftphdr **dpp, int ct, int convert); ++int write_behind( FILE *file, int convert); ++int synchnet(int f); + + struct tftphdr *w_init() { return rw_init(0); } /* write-behind */ + struct tftphdr *r_init() { return rw_init(1); } /* read-ahead */ + +-struct tftphdr * +-rw_init(x) /* init for either read-ahead or write-behind */ +-int x; /* zero for write-behind, one for read-head */ ++/* init for either read-ahead or write-behind */ ++struct tftphdr *rw_init(int x) ++ /* zero for write-behind, one for read-head */ + { + newline = 0; /* init crlf flag */ + prevchar = -1; +@@ -82,10 +91,8 @@ int x; /* zero for writ + /* Have emptied current buffer by sending to net and getting ack. + Free it and return next buffer filled with data. + */ +-readit(file, dpp, convert) +- FILE *file; /* file opened for read */ +- struct tftphdr **dpp; +- int convert; /* if true, convert to ascii */ ++int readit(FILE *file, struct tftphdr **dpp, int convert) ++ /* file opened for read if true, convert to ascii */ + { + struct bf *b; + +@@ -104,9 +111,9 @@ readit(file, dpp, convert) + * fill the input buffer, doing ascii conversions if requested + * conversions are lf -> cr,lf and cr -> cr, nul + */ +-read_ahead(file, convert) +- FILE *file; /* file opened for read */ +- int convert; /* if true, convert to ascii */ ++int read_ahead(FILE *file, int convert) ++ /* file opened for read */ ++ /* if true, convert to ascii */ + { + register int i; + register char *p; +@@ -154,16 +161,14 @@ read_ahead(file, convert) + *p++ = c; + } + b->counter = (int)(p - dp->th_data); ++ return 0; + } + + /* Update count associated with the buffer, get new buffer + from the queue. Calls write_behind only if next buffer not + available. + */ +-writeit(file, dpp, ct, convert) +- FILE *file; +- struct tftphdr **dpp; +- int convert; ++int writeit(FILE *file, struct tftphdr **dpp, int ct, int convert) + { + bfs[current].counter = ct; /* set size of data to write */ + current = !current; /* switch to other buffer */ +@@ -180,9 +185,7 @@ writeit(file, dpp, ct, convert) + * Note spec is undefined if we get CR as last byte of file or a + * CR followed by anything else. In this case we leave it alone. + */ +-write_behind(file, convert) +- FILE *file; +- int convert; ++int write_behind( FILE *file, int convert) + { + char *buf; + int count; +@@ -238,9 +241,8 @@ skipit: + * when trace is active). + */ + +-int +-synchnet(f) +-int f; /* socket to flush */ ++int synchnet(int f) ++ /* socket to flush */ + { + int i, j = 0; + char rbuf[PKTSIZE]; +@@ -258,4 +260,5 @@ int f; /* socket to flush */ + return(j); + } + } ++ return 0; /* should never get here */ + } +--- linksys-tftp-1.2.1/tftp.c 2024-04-16 08:27:50.328449885 -0700 ++++ linksys-tftp-1.2.1/tftp.c 2024-04-15 21:26:36.259371211 -0700 +@@ -47,6 +47,13 @@ extern int rexmtval; + extern int maxtimeout; + extern int segsize; + ++/* functions from tftpsubs */ ++extern int readit(FILE *file, struct tftphdr **dpp, int convert); ++extern int read_ahead(FILE *file, int convert); ++extern int writeit(FILE *file, struct tftphdr **dpp, int ct, int convert); ++extern int write_behind( FILE *file, int convert); ++extern int synchnet(int f); ++ + #define PKTSIZE (1432+4) /* SEGSIZE+4 */ + char ackbuf[PKTSIZE]; + int timeout; +@@ -57,6 +64,19 @@ jmp_buf timeoutbuf; + #define OACK 6 + #endif + ++/* functions declared herein */ ++void timer(int sig); ++void parseoack(char *cp, int sz); ++void sendfile(int fd, char *name, char *mode, char *linkpass); ++void recvfile(int fd, char *name, char *mode, char *linkpass); ++int makerequest(int request, char *name, struct tftphdr *tp, char *mode, char *linkpass); ++void nak(int error); ++void topts(char *cp, int sz); ++void tpacket(char *s, struct tftphdr *tp, int n); ++void startclock(); ++void stopclock(); ++void printstats(char *direction, unsigned long amount); ++ + void timer(int sig) + { + +@@ -72,9 +92,7 @@ void timer(int sig) + /* + * Parse an OACK package and set blocksize accordingly + */ +-parseoack(cp, sz) +- char *cp; +- int sz; ++void parseoack(char *cp, int sz) + { + int n; + +@@ -106,11 +124,7 @@ parseoack(cp, sz) + /* + * Send the requested file. + */ +-sendfile(fd, name, mode, linkpass) +- int fd; +- char *name; +- char *mode; +- char *linkpass; ++void sendfile(int fd, char *name, char *mode, char *linkpass) + { + register struct tftphdr *ap; /* data and ack packets */ + struct tftphdr *r_init(), *dp; +@@ -211,7 +225,7 @@ send_data: + printf("protocol violation\n"); + longjmp(toplevel, -1); + } +- parseoack(&ap->th_stuff, n - 2); ++ parseoack(ap->th_stuff, n - 2); + break; + } + } +@@ -231,11 +245,7 @@ abort: + /* + * Receive a file. + */ +-recvfile(fd, name, mode, linkpass) +- int fd; +- char *name; +- char *mode; +- char *linkpass; ++void recvfile(int fd, char *name, char *mode, char *linkpass) + { + register struct tftphdr *ap; + struct tftphdr *dp, *w_init(); +@@ -336,7 +346,7 @@ send_ack: + longjmp(toplevel, -1); + } + waitforoack = 0; +- parseoack(&dp->th_stuff, n - 2); ++ parseoack(dp->th_stuff, n - 2); + ap->th_opcode = htons((u_short)ACK); + ap->th_block = htons(0); + size = 4; +@@ -362,10 +372,7 @@ abort: + printstats("Received", amount); + } + +-makerequest(request, name, tp, mode, linkpass) +- int request; +- char *name, *mode, *linkpass; +- struct tftphdr *tp; ++int makerequest(int request, char *name, struct tftphdr *tp, char *mode, char *linkpass) + { + register char *cp; + +@@ -404,8 +411,7 @@ struct errmsg { + * standard TFTP codes, or a UNIX errno + * offset by 100. + */ +-nak(error) +- int error; ++void nak(int error) + { + register struct tftphdr *tp; + int length; +@@ -431,9 +437,7 @@ nak(error) + perror("nak"); + } + +-topts(cp, sz) +- char *cp; +- int sz; ++void topts(char *cp, int sz) + { + int n, i = 0; + +@@ -454,10 +458,7 @@ topts(cp, sz) + } + } + +-tpacket(s, tp, n) +- char *s; +- struct tftphdr *tp; +- int n; ++void tpacket(char *s, struct tftphdr *tp, int n) + { + static char *opcodes[] = + { "#0", "RRQ", "WRQ", "DATA", "ACK", "ERROR", "OACK" }; +@@ -505,17 +506,15 @@ struct timeval tstart; + struct timeval tstop; + struct timezone zone; + +-startclock() { ++void startclock() { + gettimeofday(&tstart, &zone); + } + +-stopclock() { ++void stopclock() { + gettimeofday(&tstop, &zone); + } + +-printstats(direction, amount) +-char *direction; +-unsigned long amount; ++void printstats(char *direction, unsigned long amount) + { + double delta; + /* compute delta in 1/10's second units */ +--- linksys-tftp-1.2.1/main.c 2024-04-16 08:27:50.327449884 -0700 ++++ linksys-tftp-1.2.1/main.c 2024-04-15 21:36:43.035399534 -0700 +@@ -33,6 +33,7 @@ static char sccsid[] = "@(#)main.c 5.8 ( + #include <sys/file.h> + + #include <netinet/in.h> ++#include <arpa/inet.h> + + #include <signal.h> + #include <stdio.h> +@@ -43,7 +44,11 @@ static char sccsid[] = "@(#)main.c 5.8 ( + #include <stdlib.h> + #include <string.h> + #include <unistd.h> +-#include <sys/sendfile.h> ++/* #include <sys/sendfile.h> */ ++ ++/* routines from tftp.c */ ++extern void sendfile(int fd, char *name, char *mode, char *linkpass); ++extern void recvfile(int fd, char *name, char *mode, char *linkpass); + + #define TIMEOUT 5 /* secs between rexmt's */ + +@@ -64,9 +69,13 @@ struct servent *sp; + + int segsize = 512; + +-int quit(), help(), setverbose(), settrace(), status(); +-int get(), put(), setpeer(), modecmd(), setrexmt(), settimeout(); +-int setbinary(), banner(), setascii(), setblocksize(); ++/* local routines */ ++int quit(), help(), setverbose(), settrace(), status(), command(); ++int get(), getusage(), put(), putusage(); ++int setpeer(), modecmd(), setrexmt(), settimeout(), status(); ++int setbinary(), setascii(); ++void setmode(), makeargv(); ++int setblocksize(), banner(); + + #define HELPINDENT (sizeof("connect")) + +@@ -114,8 +123,7 @@ struct cmd *getcmd(); + char *index(); + char *rindex(); + +-int main(argc, argv) +- char *argv[]; ++int main(int argc, char *argv[]) + { + struct sockaddr_in sin; + int top; +@@ -147,13 +155,12 @@ int main(argc, argv) + top = setjmp(toplevel) == 0; + for (;;) + command(top); ++ return 0; + } + + char hostname[100]; + +-setpeer(argc, argv) +- int argc; +- char *argv[]; ++int setpeer(int argc, char *argv[]) + { + struct hostent *host; + +@@ -187,6 +194,7 @@ setpeer(argc, argv) + port = htons(port); + } + connected = 1; ++ return 0; + } + + struct modes { +@@ -201,8 +209,7 @@ struct modes { + { 0, 0 } + }; + +-modecmd(argc, argv) +- char *argv[]; ++int modecmd(int argc, char *argv[]) + { + register struct modes *p; + char *sep; +@@ -234,18 +241,17 @@ modecmd(argc, argv) + return 0; + } + +-setbinary(argc, argv) +-char *argv[]; +-{ setmode("octet"); ++int setbinary(int argc, char *argv[]) ++{ ++ setmode("octet"); + } + +-setascii(argc, argv) +-char *argv[]; +-{ setmode("netascii"); +-} ++int setascii(int argc, char *argv[]) ++{ ++ setmode("netascii"); ++ } + +-setmode(newmode) +-char *newmode; ++void setmode(char *newmode) + { + strcpy(mode, newmode); + if (verbose) +@@ -256,8 +262,7 @@ char *newmode; + * Send file(s). + */ + +-put(argc, argv) +- char *argv[]; ++int put(int argc, char *argv[]) + { + int fd; + register int n; +@@ -286,8 +291,7 @@ put(argc, argv) + return 0; + } + +-putusage(s) +- char *s; ++int putusage(char *s) + { + printf("usage: %s file [linksys pass] (you must be connected)\n", s); + return 0; +@@ -296,8 +300,7 @@ putusage(s) + /* + * Receive file(s). + */ +-get(argc, argv) +- char *argv[]; ++int get(int argc, char *argv[]) + { + int fd; + register int n; +@@ -327,16 +330,15 @@ get(argc, argv) + return 0; + } + +-getusage(s) +-char * s; ++int getusage(char *s) + { + printf("usage: %s file [linksys pass] (you must be connected)\n", s); ++ return 0; + } + + int rexmtval = TIMEOUT; + +-setrexmt(argc, argv) +- char *argv[]; ++int setrexmt(int argc, char *argv[]) + { + int t; + +@@ -357,12 +359,12 @@ setrexmt(argc, argv) + printf("%d: bad value\n", t); + else + rexmtval = t; ++ return 0; + } + + int maxtimeout = 5 * TIMEOUT; + +-settimeout(argc, argv) +- char *argv[]; ++int settimeout(int argc, char *argv[]) + { + int t; + +@@ -383,10 +385,10 @@ settimeout(argc, argv) + printf("%d: bad value\n", t); + else + maxtimeout = t; ++ return 0; + } + +-status(argc, argv) +- char *argv[]; ++int status(int argc, char *argv[]) + { + if (connected) + printf("Connected to %s.\n", hostname); +@@ -396,6 +398,7 @@ status(argc, argv) + verbose ? "on" : "off", trace ? "on" : "off"); + printf("Rexmt-interval: %d seconds, Max-timeout: %d seconds\n", + rexmtval, maxtimeout); ++ return 0; + } + + void intr(int sig) +@@ -408,8 +411,7 @@ void intr(int sig) + /* + * Command parser. + */ +-command(top) +- int top; ++int command(int top) + { + register struct cmd *c; + +@@ -438,11 +440,10 @@ command(top) + } + (*c->handler)(margc, margv); + } ++ return 0; + } + +-struct cmd * +-getcmd(name) +- register char *name; ++struct cmd *getcmd(register char *name) + { + register char *p, *q; + register struct cmd *c, *found; +@@ -473,7 +474,7 @@ getcmd(name) + /* + * Slice a string up into argc/argv. + */ +-makeargv() ++void makeargv() + { + register char *cp; + register char **argp = margv; +@@ -496,7 +497,7 @@ makeargv() + } + + /*VARARGS*/ +-quit() ++int quit() + { + exit(0); + } +@@ -504,9 +505,7 @@ quit() + /* + * Help command. + */ +-help(argc, argv) +- int argc; +- char *argv[]; ++int help(int argc, char *argv[]) + { + register struct cmd *c; + +@@ -527,24 +526,26 @@ help(argc, argv) + else + printf("%s\n", c->help); + } ++ return 0; + } + + /*VARARGS*/ +-settrace() ++int settrace() + { + trace = !trace; + printf("Packet tracing %s.\n", trace ? "on" : "off"); ++ return 0; + } + + /*VARARGS*/ +-setverbose() ++int setverbose() + { + verbose = !verbose; + printf("Verbose mode %s.\n", verbose ? "on" : "off"); ++ return 0; + } + +-setblocksize(argc, argv) +- char *argv[]; ++int setblocksize(int argc, char *argv[]) + { + int t; + +@@ -565,8 +566,9 @@ setblocksize(argc, argv) + printf("%d: bad value\n", t); + else + segsize = t; ++ return 0; + } +-banner() { ++int banner() { + printf("TJ Shelton\tredsand [at] redsand.net\n"); + printf("Mike Lynn\tabaddon [at] 802.11ninja.net\n"); + printf("Linksys TFTP Client for *BSD/Linux\tThe Firmware gets sexier\n"); +Following is to fix one last missing include on musl systems +--- linksys-tftp-1.2.1.orig/main.c 2024-04-24 10:53:18.768850587 +0000 ++++ linksys-tftp-1.2.1/main.c 2024-04-24 10:56:29.329427589 +0000 +@@ -44,6 +44,7 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <fcntl.h> + /* #include <sys/sendfile.h> */ + + /* routines from tftp.c */ diff --git a/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r4.ebuild b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r4.ebuild new file mode 100644 index 000000000000..41776fe25149 --- /dev/null +++ b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r4.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="TFTP client suitable for uploading to the Linksys WRT54G Wireless Router" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +SRC_URI="https://www.redsand.net/solutions/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~ppc ~riscv x86" + +PATCHES=( + "${FILESDIR}/${P}-r1-header.patch" + "${FILESDIR}/${P}-r1-Makefile.patch" + "${FILESDIR}/${P}-r1-fno-common.patch" + "${FILESDIR}/${P}-r1-clang.patch" + "${FILESDIR}/${P}-r4-c99-port.patch" +) + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin linksys-tftp + einstalldocs +} diff --git a/net-ftp/linksys-tftp/metadata.xml b/net-ftp/linksys-tftp/metadata.xml new file mode 100644 index 000000000000..683910a78d58 --- /dev/null +++ b/net-ftp/linksys-tftp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/metadata.xml b/net-ftp/metadata.xml new file mode 100644 index 000000000000..ec92214255c9 --- /dev/null +++ b/net-ftp/metadata.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The net-ftp contains FTP (File Transfer Protocol) software. + </longdescription> + <longdescription lang="de"> + Die Kategorie net-ftp enthält Software für das File Transfer Protocol (FTP). + </longdescription> + <longdescription lang="es"> + La categoría net-ftp contiene programas relacionados con FTP, el + protocolo de transferencia de ficheros. + </longdescription> + <longdescription lang="ja"> + net-ftpカテゴリーにはファイル・トランスファー・プロトコルの + ソフトウェアが含まれています。 + </longdescription> + <longdescription lang="nl"> + De net-ftp categorie bevat software voor gebruik van FTP (File Transfer Protocol). + </longdescription> + <longdescription lang="pt"> + A categoria net-ftp contem programas relacionados com FTP (File Transfer + Protocol). + </longdescription> + <longdescription lang="sk"> + Kategória net-ftp obsahuje aplikácie vzťahujúce sa k FTP (File Transfer Protocol). + </longdescription> + <longdescription lang="vi"> + Nhóm net-ftp chứa các phần mềm FTP (File Transfer Protocol). + </longdescription> + <longdescription lang="it"> + La categoria net-ftp contiene programmi per l'FTP (File Transfer Protocol). + </longdescription> + <longdescription lang="pl"> + Kategoria net-ftp zawiera pakiety związane z FTP (File Transfer Protocol). + </longdescription> +</catmetadata> diff --git a/net-ftp/ncftp/Manifest b/net-ftp/ncftp/Manifest new file mode 100644 index 000000000000..d197c7ccdc9d --- /dev/null +++ b/net-ftp/ncftp/Manifest @@ -0,0 +1 @@ +DIST ncftp-3.3.0-src.tar.gz 640869 BLAKE2B 86e9d4833acf173995cd88c4881b71b82e91ed995eb4b0134d31dcc6d2054da5125d76ccb8828dc3be1f161fe2155bfee528019d55146b5fcbda5fecc06f10d8 SHA512 44ac7326e2cda957b5e32e8130ec8b7c8180d085ff400209dd86c0284b5b07fd2b794ee5d707bdaad4f7581553bd12ac10914e2ef0a7dc0913a0ca540d0322a2 diff --git a/net-ftp/ncftp/metadata.xml b/net-ftp/ncftp/metadata.xml new file mode 100644 index 000000000000..4617d2006fdc --- /dev/null +++ b/net-ftp/ncftp/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ceamac@gentoo.org</email> + <name>Viorel Munteanu</name> + </maintainer> + <longdescription> +NcFTP Client (also known as just NcFTP) is a set of FREE application +programs implementing the File Transfer Protocol (FTP). + +The program has been in service on UNIX systems since 1991 and is a +popular alternative to the FTP program, /usr/bin/ftp. NcFTP offers many +ease-of-use and performance enhancements over the stock ftp client, and +runs on a wide variety of UNIX platforms as well as operating systems +such as Microsoft Windows and Apple Mac OS X. + </longdescription> + <upstream> + <remote-id type="cpe">cpe:/a:ncftp_software:ncftp</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/ncftp/ncftp-3.3.0.ebuild b/net-ftp/ncftp/ncftp-3.3.0.ebuild new file mode 100644 index 000000000000..1300f943232c --- /dev/null +++ b/net-ftp/ncftp/ncftp-3.3.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit autotools toolchain-funcs + +DESCRIPTION="An extremely configurable ftp client" +HOMEPAGE="https://www.ncftp.com/" +SRC_URI="https://www.ncftp.com/public_ftp/${PN}/${P}-src.tar.gz" + +LICENSE="Clarified-Artistic" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos" +IUSE="pch" + +DEPEND=" + sys-libs/ncurses:= +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + virtual/pkgconfig +" + +src_prepare() { + default + + sed \ + -e '/^AR=/d' \ + -e 's/STRIP=".*"/STRIP=":"/' \ + -e 's/\<AC_LANG\>/_AC_LANG/' \ + -i autoconf_local/aclocal.m4 || die + + AT_M4DIR=autoconf_local/ eautoreconf +} + +src_configure() { + tc-export AR CC + LC_ALL="C" \ + LIBS="$( $(tc-getPKG_CONFIG) --libs ncurses)" \ + econf \ + $(use_enable pch precomp) \ + --disable-ccdv \ + --disable-universal +} + +src_install() { + default + dodoc README.txt doc/*.txt + docinto html + dodoc doc/html/*.html +} diff --git a/net-ftp/proftpd/Manifest b/net-ftp/proftpd/Manifest new file mode 100644 index 000000000000..1ae42b349b45 --- /dev/null +++ b/net-ftp/proftpd/Manifest @@ -0,0 +1,9 @@ +DIST mod_case-0.9.1.tar.gz 22280 BLAKE2B f5cecaa81659eb37dbc378f3e9ad3a82cb927af3b9b5cb12d7c1949de167ab8699fab40436a9c53a9048d23e37e8d9cae3cc3fbc8e0160fde747ec03f8de8add SHA512 010fea310f320f7d3c117cb48cecdfc97764d0e4f0a0b487ea2441ca5d966b45fb5627f1349e9a237366342a6d15da4de490a023465f61a21d9a8abe6c7489dd +DIST mod_diskuse-0.9.1.tar.gz 72314 BLAKE2B e80d196cd1d7ca2defed7baf9bc2d31ac85b2181ac7824aef690384ee8cd8ce4f256e44e27a0aa931b8ca0b94dc2076543e9d9ca909a807300ea74f3c05b63dd SHA512 6f662e0b2f5f43cd0d5ff77f00427c8c32475fe834a614154e135181f9b8efc46e76d77e7ed0e9d0d5197a445ee89576a6b97aa3fd76180ff394aa6168ffa1a5 +DIST mod_gss-1.3.9.tar.gz 117158 BLAKE2B f957fa465f9a9b06ceb9c190ab60c7f67fdeeef79dce7f51bcfed8dc726cb01a231232c65821ca3a240b77a5019fa22f31b45496c128a06627bd24dc960b566f SHA512 44615983b0f67939b110e54c4a83b3056263bad72ba78de1b16f9f8590f5504c60e679f55484708d49e694c528d4715d9abd0cb75cfe439982ea9e02e0c18891 +DIST mod_msg-0.5.1.tar.gz 9689 BLAKE2B fc0cbcfa341c6339be4b064db9ea8860da91c22eeee91c77fd03581e49ebbce3fcd3a27a17da85d782286c6d329e12e7237ee7cbfb70ecc1d4d32bb21f0f74e2 SHA512 729261b151a98bc971c825e88131026725aa4f4fc161adc162af8c4c3c8a457bd981308aea20fe6a1b8711b26c63a17b8d40434ef00bc45504a7c9c2a9cbe4bf +DIST mod_vroot-0.9.12.tar.gz 112717 BLAKE2B 60a59539ff9db190432a807f88236e37ab42aea0510903586ff19a00ba9d2e118b58460bdef271f6de8f2b022411484d5fe6610d66552948a9ff459ddda45343 SHA512 a84c14b9d05c4890abe50c86f832c91fa4d0971bc2b1866a3a34d73ff85acd1e902fc0cae739e22ea46e530c73230fb005ea9edeb68fd6cfb963e0c5ca9655ec +DIST proftpd-1.3.9.tar.gz 19837398 BLAKE2B 30ad60148de79cd4198791ce89dc6c2204c75cb0966f7f17a0fefe25bf4678dd8ea7d373469fbf02f670ae0ca6879f4371ef97a65f4875ad131930d49d800b6f SHA512 5cc53d7909f8b45718509b547aeffaf027cec66b1c34ed9f3a7de1ba561f9ca3d51bb991edb24c8f833bb47e0131619850a4bfd4fec509505769d123e78dc8b3 +DIST proftpd-1.3.9a.tar.gz 19850748 BLAKE2B f024e1f112f326ebe11d1d478af258e43e4d506a01a025b6f6fa4096a19ac44f1913154489c9cd203e906ac9091806e2f2b3869c0db6b094fb960b6e6d3b4092 SHA512 217780522a9366dd16c678ab4ca3de8a6079482a0d68d2f0ab7869d0f8aba4982d0cb0105821f52c8d2fca6f76b3156da70bdbb7d01ac96ad5c16f99f33fdd76 +DIST proftpd-1.3.9a.tar.gz.asc 195 BLAKE2B 8b3f7f2fe2cc906d2804247de0b33ace669f6e0d43a99de592aaf82358c322bd42db95c23ae9bb8096702916bc42e639b6a9e8a99f7a1652731889f5a8cb5927 SHA512 6c8c872dea409745b89c5e225a421c67c3f655629d4432d03e7a55c9d4ee7921e43e8cc982743a1b32b5f3ee5e2b04467ea01237005e95cdd7add18749a9c2e4 +DIST proftpd-mod_clamav-0.14rc2.tar.gz 19710 BLAKE2B 3435e198cf029337904d4666910414124a3b7e1529d4b12f7acd8a9be563009fff4d9a30eb132a2d7361d2c830e5601c4a00a8814282585b6915e991cc29bc13 SHA512 b8e56880fadf36513215fa4c20be6db7cdf1274337072a9b29c3c3477b3de4743ebcdb1179572ec4cb1501fac0064330c855b1f818bf0cc52f0e91170f059772 diff --git a/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch b/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch new file mode 100644 index 000000000000..c7d918425636 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch @@ -0,0 +1,18 @@ +Make --disable-trace a build-time failure instead of link-time one. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/624570 +diff --git a/include/trace.h b/include/trace.h +index f05dd0e..398e939 100644 +--- a/include/trace.h ++++ b/include/trace.h +@@ -29,2 +29,4 @@ + ++#ifdef PR_USE_TRACE ++ + #define PR_TRACE_DEFAULT_CHANNEL "DEFAULT" +@@ -64,2 +66,4 @@ int pr_trace_vmsg(const char *, int, const char *, va_list); + ++#endif /* PR_USE_TRACE */ ++ + #endif /* PR_TRACE_H */ diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch new file mode 100644 index 000000000000..34f1d95ebee0 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch @@ -0,0 +1,17 @@ +diff --git a/mod_diskuse.c b/mod_diskuse.c +index 0e0a0d0..7eb5edf 100644 +--- a/mod_diskuse.c ++++ b/mod_diskuse.c +@@ -53,6 +53,12 @@ + + #define MOD_DISKUSE_VERSION "mod_diskuse/0.9" + ++#define pr_parse_expression pr_expr_create ++#define pr_class_or_expression pr_expr_eval_class_or ++#define pr_group_and_expression pr_expr_eval_group_and ++#define pr_group_or_expression pr_expr_eval_group_or ++#define pr_user_or_expression pr_expr_eval_user_or ++ + static unsigned char have_max_diskuse = FALSE; + static double min_diskfree = 0.0; + static double current_diskfree = 0.0; diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-clamav-debool.patch b/net-ftp/proftpd/files/proftpd-1.3.9-clamav-debool.patch new file mode 100644 index 000000000000..3753d3ee937d --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-clamav-debool.patch @@ -0,0 +1,82 @@ +https://bugs.gentoo.org/953810 +https://github.com/jbenden/mod_clamav/pull/24/commits +From ea822d6aa428b47aa9681d60af8d3c3d9eae0600 Mon Sep 17 00:00:00 2001 +From: TJ Saunders <tj@castaglia.org> +Date: Sat, 12 Apr 2025 09:02:45 -0700 +Subject: [PATCH] Issue #23: Fix compilation with newer GCC versions, which +complain of variables named `bool`. + +--- + mod_clamav.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/mod_clamav.c b/mod_clamav.c +index e25e99d..3be0ca6 100644 +--- a/mod_clamav.c ++++ b/mod_clamav.c +@@ -667,18 +667,18 @@ static unsigned long parse_nbytes(char *nbytes_str, char *units_str) { + * Configuration setter: ClamAV + */ + MODRET set_clamav(cmd_rec *cmd) { +- int bool = -1; ++ int engine = -1; + config_rec *c = NULL; + + CHECK_ARGS(cmd, 1); + CHECK_CONF(cmd, CONF_ROOT|CONF_LIMIT|CONF_VIRTUAL|CONF_GLOBAL|CONF_DIR); + +- if ((bool = get_boolean(cmd,1)) == -1) ++ if ((engine = get_boolean(cmd,1)) == -1) + CONF_ERROR(cmd, "expected Boolean parameter"); + + c = add_config_param(cmd->argv[0], 1, NULL); + c->argv[0] = pcalloc(c->pool, sizeof(unsigned char)); +- *((unsigned char *) c->argv[0]) = bool; ++ *((unsigned char *) c->argv[0]) = engine; + c->flags |= CF_MERGEDOWN; + + return PR_HANDLED(cmd); +@@ -688,18 +688,18 @@ MODRET set_clamav(cmd_rec *cmd) { + * Configuration setter: ClamStream + */ + MODRET set_clamstream(cmd_rec *cmd) { +- int bool = -1; ++ int use_stream = -1; + config_rec *c = NULL; + + CHECK_ARGS(cmd, 1); + CHECK_CONF(cmd, CONF_ROOT|CONF_LIMIT|CONF_VIRTUAL|CONF_GLOBAL|CONF_DIR); + +- if ((bool = get_boolean(cmd,1)) == -1) ++ if ((use_stream = get_boolean(cmd,1)) == -1) + CONF_ERROR(cmd, "expected Boolean parameter"); + + c = add_config_param(cmd->argv[0], 1, NULL); + c->argv[0] = pcalloc(c->pool, sizeof(unsigned char)); +- *((unsigned char *) c->argv[0]) = bool; ++ *((unsigned char *) c->argv[0]) = use_stream; + c->flags |= CF_MERGEDOWN; + + return PR_HANDLED(cmd); +@@ -709,18 +709,18 @@ MODRET set_clamstream(cmd_rec *cmd) { + * Configuration setter: ClamFailsafe + */ + MODRET set_clamfailsafe(cmd_rec *cmd) { +- int bool = -1; ++ int use_failsafe = -1; + config_rec *c = NULL; + + CHECK_ARGS(cmd, 1); + CHECK_CONF(cmd, CONF_ROOT|CONF_LIMIT|CONF_VIRTUAL|CONF_GLOBAL|CONF_DIR); + +- if ((bool = get_boolean(cmd, 1)) == -1) ++ if ((use_failsafe = get_boolean(cmd, 1)) == -1) + CONF_ERROR(cmd, "expected Boolean parameter"); + + c = add_config_param(cmd->argv[0], 1, NULL); + c->argv[0] = pcalloc(c->pool, sizeof(unsigned char)); +- *((unsigned char *) c->argv[0]) = bool; ++ *((unsigned char *) c->argv[0]) = use_failsafe; + c->flags |= CF_MERGEDOWN; + + return PR_HANDLED(cmd); diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-clamav-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.9-clamav-refresh-api.patch new file mode 100644 index 000000000000..f21cf4d49244 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-clamav-refresh-api.patch @@ -0,0 +1,24 @@ +https://github.com/jbenden/mod_clamav/commit/509be57280634453be338b52d1bd0af212356587 +From 509be57280634453be338b52d1bd0af212356587 Mon Sep 17 00:00:00 2001 +From: offsides <josh@honorablemenschen.com> +Date: Tue, 2 Jan 2024 17:21:37 -0500 +Subject: [PATCH] Update mod_clamav.c (#19) + +end_login is no longer defined in compat.h as of 1.3.9rc2, so the call needs to be replaced with pr_session_end +--- + mod_clamav.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mod_clamav.c b/mod_clamav.c +index dcc4929..d39e347 100644 +--- a/mod_clamav.c ++++ b/mod_clamav.c +@@ -239,7 +239,7 @@ static int clamavd_scan_stream(int sockd, const char *abs_filename, + buf = malloc(bufsz); + if (!buf) { + pr_log_pri(PR_LOG_CRIT, "Out of memory!"); +- end_login(1); ++ pr_session_end(1); + } + + /* send file contents using protocol defined by Clamd */ diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-fix_c23.patch b/net-ftp/proftpd/files/proftpd-1.3.9-fix_c23.patch new file mode 100644 index 000000000000..ebd1f74b4846 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-fix_c23.patch @@ -0,0 +1,118 @@ +PR merged https://github.com/proftpd/proftpd/pull/1979.patch +fix c23 +see https://bugs.gentoo.org/880481 for a part +--- a/lib/pr_fnmatch.c ++++ b/lib/pr_fnmatch.c +@@ -355,10 +355,7 @@ is_char_class (const wchar_t *wcs) + + + int +-pr_fnmatch (pattern, string, flags) +- const char *pattern; +- const char *string; +- int flags; ++pr_fnmatch (const char *pattern, const char *string, int flags) + { + # if HANDLE_MULTIBYTE + if (__builtin_expect (MB_CUR_MAX, 1) != 1) +--- a/lib/pr_fnmatch_loop.c ++++ b/lib/pr_fnmatch_loop.c +@@ -62,13 +62,8 @@ __mempcpy (void *dest, const void *src, size_t n) + + static int + internal_function +-FCT (pattern, string, string_end, no_leading_period, flags, ends) +- const CHAR *pattern; +- const CHAR *string; +- const CHAR *string_end; +- int no_leading_period; +- int flags; +- struct STRUCT *ends; ++FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, ++ int no_leading_period, int flags, struct STRUCT *ends) + { + register const CHAR *p = pattern, *n = string; + register UCHAR c; +--- a/src/memcache.c ++++ b/src/memcache.c +@@ -325,7 +325,7 @@ static int mcache_ping_servers(pr_memcache_t *mcache) { + + alive_server_list = NULL; + for (i = 0; i < server_count; i++) { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_instance_by_position(clone, i); + +@@ -448,7 +448,7 @@ static int mcache_stat_servers(pr_memcache_t *mcache) { + case MEMCACHED_SOME_ERRORS: + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -988,7 +988,7 @@ int pr_memcache_kadd(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -1058,7 +1058,7 @@ int pr_memcache_kdecr(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -1131,7 +1131,7 @@ void *pr_memcache_kget(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -1213,7 +1213,7 @@ char *pr_memcache_kget_str(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -1303,7 +1303,7 @@ int pr_memcache_kincr(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -1368,7 +1368,7 @@ int pr_memcache_kremove(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { +@@ -1437,7 +1437,7 @@ int pr_memcache_kset(pr_memcache_t *mcache, module *m, const char *key, + + case MEMCACHED_SERVER_MARKED_DEAD: + case MEMCACHED_CONNECTION_FAILURE: { +- memcached_server_instance_st server; ++ const memcached_instance_st *server; + + server = memcached_server_get_last_disconnect(mcache->mc); + if (server != NULL) { diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-fix_heimdal.patch b/net-ftp/proftpd/files/proftpd-1.3.9-fix_heimdal.patch new file mode 100644 index 000000000000..8c20d075bf2b --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-fix_heimdal.patch @@ -0,0 +1,151 @@ +fix compatiblity with heimdal : +* fix bashism '==' +* test libkrb5 instead of krb5-private.h for _krb5_principal2principalname +* include <gssapi/gssapi_krb5.h> even if HAVE_HEIMDAL_KERBEROS for krb5_gss_register_acceptor_identity +* initialize PrincipalName *pn +--- a/configure ++++ b/configure +@@ -2963,7 +2963,7 @@ + fi + ac_krb5_solaris="`$krb5confpath --version 2>/dev/null | grep -i solaris`" + ac_krb5_heimdal="`$krb5confpath --version 2>/dev/null | grep -i heimdal`" +- if test "x$ac_krb5_solaris" == x ; then ++ if test "x$ac_krb5_solaris" = x ; then + ac_krb5_cflags=`$krb5confpath --cflags krb5 2> /dev/null ` + if test $? != 0; then + krb5fail=t +@@ -3455,29 +3455,6 @@ + + done + +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _krb5_principal2principalname in krb5-private.h" >&5 +-$as_echo_n "checking for _krb5_principal2principalname in krb5-private.h... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include <krb5-private.h> +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "_krb5_principal2principalname" >/dev/null 2>&1; then : +- +-$as_echo "#define HAVE_KRB5_PRINCIPAL2PRINCIPAL 1" >>confdefs.h +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f conftest* +- +- +-ac_com_error_message=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include <krb5.h> +@@ -4118,6 +4095,57 @@ + fi + + fi ++if test "x$ac_krb5_heimdal" != x ; then ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _krb5_principal2principalname in -lkrb5" >&5 ++printf %s "checking for _krb5_principal2principalname in -lkrb5... " >&6; } ++if test ${ac_cv_lib_krb5__krb5_principal2principalname+y} ++then : ++ printf %s "(cached) " >&6 ++else case e in #( ++ e) ac_check_lib_save_LIBS=$LIBS ++LIBS="-lkrb5 $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. ++ The 'extern "C"' is for builds by C++ compilers; ++ although this is not generally supported in C code supporting it here ++ has little cost and some practical benefit (sr 110532). */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char _krb5_principal2principalname (void); ++int ++main (void) ++{ ++return _krb5_principal2principalname (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO" ++then : ++ ac_cv_lib_krb5__krb5_principal2principalname=yes ++else case e in #( ++ e) ac_cv_lib_krb5__krb5_principal2principalname=no ;; ++esac ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.beam \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ;; ++esac ++fi ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5__krb5_principal2principalname" >&5 ++printf "%s\n" "$ac_cv_lib_krb5__krb5_principal2principalname" >&6; } ++if test "x$ac_cv_lib_krb5__krb5_principal2principalname" = xyes ++then : ++ ++printf "%s\n" "#define HAVE_KRB5_PRINCIPAL2PRINCIPAL 1" >>confdefs.h ++ ++fi ++fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_get_err_text in -lkrb5" >&5 + $as_echo_n "checking for krb5_get_err_text in -lkrb5... " >&6; } + if ${ac_cv_lib_krb5_krb5_get_err_text+:} false; then : +--- a/mod_gss.h.in ++++ b/mod_gss.h.in +@@ -204,7 +204,6 @@ + #include <gssapi/gssapi.h> + #endif /* HAVE_GSSAPI_H */ + +-#ifndef HAVE_HEIMDAL_KERBEROS + #ifdef HAVE_GSSAPI_GSSAPI_EXT_H + #include <gssapi/gssapi_ext.h> + #endif /* HAVE_GSSAPI_GSSAPI_EXT_H */ +@@ -214,7 +213,6 @@ + #ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H + #include <gssapi/gssapi_generic.h> + #endif /* HAVE_GSSAPI_GSSAPI_GENERIC_H */ +-#endif /* HAVE_HEIMDAL_KERBEROS */ + + #ifndef HAVE_GSS_INT32 + #define gss_int32 int32_t +--- a/mod_auth_gss.c.in ++++ b/mod_auth_gss.c.in +@@ -109,7 +109,7 @@ + krb5_principal p; + krb5_error_code kerr; + #ifdef HAVE_HEIMDAL_KERBEROS +- PrincipalName *pn; ++ PrincipalName *pn = NULL; + #endif + char *princ_name; + +@@ -179,7 +179,7 @@ + krb5_principal p; + krb5_error_code kerr; + #ifdef HAVE_HEIMDAL_KERBEROS +- PrincipalName *pn; ++ PrincipalName *pn = NULL; + #endif + char *princ_name; + +@@ -251,7 +251,7 @@ + krb5_principal p; + krb5_error_code kerr; + #ifdef HAVE_HEIMDAL_KERBEROS +- PrincipalName *pn; ++ PrincipalName *pn = NULL; + #endif + char *princ_name; + diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-gss-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.9-gss-refresh-api.patch new file mode 100644 index 000000000000..ac05bb5bc8fb --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-gss-refresh-api.patch @@ -0,0 +1,87 @@ +Fixes for old API, rename of bool for C23 +https://bugs.gentoo.org/953866 +--- a/mod_gss.c.in ++++ b/mod_gss.c.in +@@ -1412,7 +1412,7 @@ + } + /* If session.user is set, we had a valid login reinforce USER,PASS,ACCT*/ + if (session.user) { +- end_login(0); ++ pr_session_end(0);; + } + + /* Convert the parameter to upper case */ +@@ -2126,18 +2126,18 @@ + + /* usage: GSSEngine on|off */ + MODRET set_gssengine(cmd_rec *cmd) { +- int bool = -1; ++ int Bool = -1; + config_rec *c = NULL; + + CHECK_ARGS(cmd, 1); + CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); + +- if ((bool = get_boolean(cmd, 1)) == -1) ++ if ((Bool = get_boolean(cmd, 1)) == -1) + CONF_ERROR(cmd, "expected Boolean parameter"); + + c = add_config_param(cmd->argv[0], 1, NULL); + c->argv[0] = pcalloc(c->pool, sizeof(unsigned char)); +- *((unsigned char *) c->argv[0]) = bool; ++ *((unsigned char *) c->argv[0]) = Bool; + + return PR_HANDLED(cmd); + } +@@ -2217,14 +2217,14 @@ + + /* usage: GSSRequired on|off|both|ctrl|control|data */ + MODRET set_gssrequired(cmd_rec *cmd) { +- int bool = -1; ++ int Bool = -1; + unsigned char on_ctrl = FALSE, on_data = FALSE; + config_rec *c = NULL; + + CHECK_ARGS(cmd, 1); + CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); + +- if ((bool = get_boolean(cmd, 1)) == -1) { ++ if ((Bool = get_boolean(cmd, 1)) == -1) { + + if (!strcmp(cmd->argv[1], "control") || !strcmp(cmd->argv[1], "ctrl")) + on_ctrl = TRUE; +@@ -2240,7 +2240,7 @@ + CONF_ERROR(cmd, "bad parameter"); + + } else { +- if (bool == TRUE) { ++ if (Bool == TRUE) { + on_ctrl = TRUE; + on_data = TRUE; + } +@@ -2259,14 +2259,14 @@ + + /* usage: GSSInet6 on|off|yes|no*/ + MODRET set_gss_af_inet6(cmd_rec *cmd) { +- int bool = -1; ++ int Bool = -1; + unsigned char on_inet6 = FALSE; + config_rec *c = NULL; + + CHECK_ARGS(cmd, 1); + CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); + +- if ((bool = get_boolean(cmd, 1)) == -1) { ++ if ((Bool = get_boolean(cmd, 1)) == -1) { + + if (!strcmp(cmd->argv[1], "on") || !strcmp(cmd->argv[1], "yes")) + on_inet6 = TRUE; +@@ -2278,7 +2278,7 @@ + CONF_ERROR(cmd, "bad parameter"); + + } else { +- if (bool == TRUE) ++ if (Bool == TRUE) + on_inet6 = TRUE; + } + diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-sftp_ssl-3.0.patch b/net-ftp/proftpd/files/proftpd-1.3.9-sftp_ssl-3.0.patch new file mode 100644 index 000000000000..3ff932ed4010 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-sftp_ssl-3.0.patch @@ -0,0 +1,25 @@ +PR pending https://github.com/proftpd/proftpd/pull/1980.patch +AES_ctr_128 is not supported with >=openssl-3.0 +--- a/contrib/mod_sftp/crypto.c ++++ b/contrib/mod_sftp/crypto.c +@@ -715,8 +715,9 @@ static int do_aes_ctr(EVP_CIPHER_CTX *ctx, unsigned char *dst, + return 0; + } + +-# if OPENSSL_VERSION_NUMBER <= 0x0090704fL || \ +- OPENSSL_VERSION_NUMBER >= 0x10100000L ++# if (OPENSSL_VERSION_NUMBER <= 0x0090704fL || \ ++ OPENSSL_VERSION_NUMBER >= 0x10100000L) && \ ++ OPENSSL_VERSION_NUMBER < 0x30000000L + /* In OpenSSL-0.9.7d and earlier, the AES CTR code did not properly handle + * the IV as big-endian; this would cause the dreaded "Incorrect MAC + * received on packet" error when using clients e.g. PuTTy. To see +@@ -747,7 +748,7 @@ static int do_aes_ctr(EVP_CIPHER_CTX *ctx, unsigned char *dst, + } + + return 1; +-# else ++# elif OPENSSL_VERSION_NUMBER < 0x30000000L + /* Thin wrapper around AES_ctr128_encrypt(). */ + AES_ctr128_encrypt(src, dst, len, &(ace->key), ace->counter, ace->enc_counter, + &(ace->num)); diff --git a/net-ftp/proftpd/files/proftpd-1.3.9-slibtool.patch b/net-ftp/proftpd/files/proftpd-1.3.9-slibtool.patch new file mode 100644 index 000000000000..4484e36ca0b3 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.9-slibtool.patch @@ -0,0 +1,34 @@ +https://github.com/proftpd/proftpd/pull/1954 +https://github.com/proftpd/proftpd/commit/d71ae3f226547b3409dd296e824a57a87354e58d + +From 75d79d68465ece9c67fc2f2a9788d28c2965d583 Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Mon, 2 Jun 2025 20:16:17 -0700 +Subject: [PATCH] use $(LIBTOOL) to install proftpd + +With slibtool 'make install' will install the slibtool wrapper script +instead of the actual executable file. This is because with slibtool +the executable is compiled into the .libs directory while the file in +the root directory is a wrapper script where with GNU libtool the +executable will be placed into the root directory. Using $(LIBTOOL) to +install the executable will ensure that both implementations install the +correct file. + +Gentoo-Issue: https://bugs.gentoo.org/953968 +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 32fd5f3c8b..3f574a8262 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -134,7 +134,7 @@ $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $ + fi + + install-proftpd: $(DESTDIR)$(includedir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sbindir) +- $(INSTALL_SBIN) $(top_builddir)/proftpd $(DESTDIR)$(sbindir)/proftpd ++ $(LIBTOOL) --mode=install --tag=CC $(INSTALL_SBIN) $(top_builddir)/proftpd $(DESTDIR)$(sbindir)/proftpd + if [ -f $(DESTDIR)$(sbindir)/in.proftpd ] ; then \ + rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \ + fi diff --git a/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 new file mode 100644 index 000000000000..241dc7cb1bdc --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 @@ -0,0 +1 @@ +d /run/proftpd 0755 root root diff --git a/net-ftp/proftpd/files/proftpd.conf.sample b/net-ftp/proftpd/files/proftpd.conf.sample new file mode 100644 index 000000000000..7bbfa03f0bc1 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.conf.sample @@ -0,0 +1,53 @@ +# This is a sample ProFTPD configuration file for Gentoo Linux (rename +# it to 'proftpd.conf' for actual use). It establishes a single server +# and a single anonymous login. + +ServerName "ProFTPD Default Server" +ServerType standalone +DefaultServer on +RequireValidShell off +AuthPAM off +AuthPAMConfig ftp + +# Listen on the standard FTP port 21. +Port 21 + +# New directories and files should not be group or world writable. +Umask 022 + +# To prevent DoS attacks set the maximum number of child processes +# to 30. If you need to allow more than 30 concurrent connections +# at once simply increase this value. +MaxInstances 30 + +# The server will run under ftp/ftp. +User ftp +Group ftp + +# Every FTP sessions is "jailed" into the user's home directory. +DefaultRoot ~ + +# Generally files are overwritable. +AllowOverwrite on + +# Disallow the use of the SITE CHMOD command. +<Limit SITE_CHMOD> + DenyAll +</Limit> + +# A basic anonymous FTP account without an upload directory. +<Anonymous ~ftp> + User ftp + Group ftp + + # Clients can login with the username "anonymous" and "ftp". + UserAlias anonymous ftp + + # Limit the maximum number of parallel anonymous logins to 10. + MaxClients 10 + + # Prohibit the WRITE command for the anonymous users. + <Limit WRITE> + DenyAll + </Limit> +</Anonymous> diff --git a/net-ftp/proftpd/files/proftpd.initd-r1 b/net-ftp/proftpd/files/proftpd.initd-r1 new file mode 100644 index 000000000000..0d59ec5762e8 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.initd-r1 @@ -0,0 +1,51 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + need net + use logger dns mysql postgresql antivirus +} + +check_configuration() { + if [ ! -e /etc/proftpd/proftpd.conf ] ; then + eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration" + eerror "file. In /etc/proftpd you can find a sample configuration." + return 1 + fi + /usr/sbin/proftpd -t >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + eerror "The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to" + eerror "fix your configuration in order to run the ProFTPD server. For more information" + eerror "you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'." + return 2 + fi +} + +start() { + checkpath -d /run/proftpd + [ "${RC_CMD}" = "restart" ] || check_configuration || return 1 + ebegin "Starting ProFTPD" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/proftpd \ + --pidfile /run/proftpd/proftpd.pid + eend $? +} + +stop() { + [ "${RC_CMD}" != "restart" ] || check_configuration || return 1 + ebegin "Stopping ProFTPD" + start-stop-daemon --stop --quiet --retry 20 \ + --pidfile /run/proftpd/proftpd.pid + eend $? +} + +reload() { + check_configuration || return 1 + ebegin "Reloading ProFTPD" + start-stop-daemon --quiet --signal HUP \ + --pidfile /run/proftpd/proftpd.pid + eend $? +} diff --git a/net-ftp/proftpd/files/proftpd.logrotate b/net-ftp/proftpd/files/proftpd.logrotate new file mode 100644 index 000000000000..cabf5193d54e --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.logrotate @@ -0,0 +1,11 @@ +# Syslog-ng logrotate snippet for Gentoo Linux + +/var/log/proftpd/*.log /var/log/xferlog { + compress + missingok + notifempty + sharedscripts + postrotate + /etc/init.d/proftpd reload > /dev/null 2>&1 || true + endscript +} diff --git a/net-ftp/proftpd/files/proftpd.service b/net-ftp/proftpd/files/proftpd.service new file mode 100644 index 000000000000..904c90f25714 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=ProFTPd FTP daemon + +[Service] +Type=simple +ExecStart=/usr/sbin/proftpd --nodaemon +StandardOutput=syslog +StandardError=syslog +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/net-ftp/proftpd/files/proftpd.xinetd b/net-ftp/proftpd/files/proftpd.xinetd new file mode 100644 index 000000000000..ad75aefddb6c --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.xinetd @@ -0,0 +1,15 @@ +# +# ProFTPd FTP daemon - http://www.proftpd.org +# +service ftp +{ + flags = REUSE + socket_type = stream + instances = 30 + wait = no + user = root + server = /usr/sbin/proftpd + log_on_success = HOST PID + log_on_failure = HOST + disable = yes +} diff --git a/net-ftp/proftpd/metadata.xml b/net-ftp/proftpd/metadata.xml new file mode 100644 index 000000000000..57fdb65e93e2 --- /dev/null +++ b/net-ftp/proftpd/metadata.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <longdescription>ProFTPD grew out of the desire to have a secure and +configurable FTP server, and out of a significant admiration of the Apache web +server.</longdescription> + <use> + <flag name="authfile">Enable support for the auth-file module</flag> + <flag name="ban">Enable support for the mod_ban module</flag> + <flag name="case">Enable support for the mod_case module</flag> + <flag name="ctrls">Enable support for the mod_ctrls and mod_ctrls_admin modules</flag> + <flag name="copy">Enable support for the mod_copy module</flag> + <flag name="deflate">Enable support for the mod_deflate module</flag> + <flag name="diskuse">Enable support for the mod_diskuse module</flag> + <flag name="dso">Enable support for the mod_dso module</flag> + <flag name="dynmasq">Enable support for the mod_dynmasq module, for dynamically updating MasqueradeAddress for dyndns-like scenarios)</flag> + <flag name="exec">Enable support for the mod_exec module. WARNING: this could be a security risk</flag> + <flag name="ident">Enable support for the mod_ident module</flag> + <flag name="ifsession">Enable support for the ifsession module</flag> + <flag name="ifversion">Enable support for the mod_ifversion module</flag> + <flag name="log-forensic">Enable support for the mod_log_forensic module, log only suspicious actions.</flag> + <flag name="memcache">Enable support for the mod_memcache module, for using memcached servers</flag> + <flag name="msg">Enable support for the mod_msg module, allows system users to send messages to connected clients via the ftpdctl program.</flag> + <flag name="qos">Enable support for the mod_qos module</flag> + <flag name="ratio">Enable support for the mod_ratio module</flag> + <flag name="readme">Enable support for the mod_readme module</flag> + <flag name="rewrite">Enable support for the rewrite module</flag> + <flag name="shaper">Enable support for the mod_shaper module</flag> + <flag name="sftp">Enable support for the mod_sftp module and optionally mod_sftp_sql and mod_sftp_pam if matching USE flags are enabled</flag> + <flag name="sitemisc">Enable support for the sitemisc module</flag> + <flag name="sodium">Use <pkg>dev-libs/libsodium</pkg> for password encryption an key exchange</flag> + <flag name="softquota">Enable support for the quotatab module</flag> + <flag name="unique-id">Enable support for the mod_unique_id module, every connection gets unique ID.</flag> + <flag name="vroot">Enable support for the virtual root module</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/proftpd/proftpd-1.3.9-r3.ebuild b/net-ftp/proftpd/proftpd-1.3.9-r3.ebuild new file mode 100644 index 000000000000..fa8add9b89d8 --- /dev/null +++ b/net-ftp/proftpd/proftpd-1.3.9-r3.ebuild @@ -0,0 +1,325 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd tmpfiles toolchain-funcs + +MOD_CASE="0.9.1" +MOD_CLAMAV="0.14rc2" +MOD_DISKUSE="0.9.1" +MOD_GSS="1.3.9" +MOD_MSG="0.5.1" +MOD_VROOT="0.9.12" + +DESCRIPTION="An advanced and very configurable FTP server" +HOMEPAGE=" + http://www.proftpd.org/ + http://www.castaglia.org/proftpd/ + https://github.com/jbenden/mod_clamav + https://gssmod.sourceforge.net/ +" +SRC_URI=" + ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz + case? ( https://github.com/Castaglia/${PN}-mod_case/archive/v${MOD_CASE}.tar.gz + -> mod_case-${MOD_CASE}.tar.gz ) + clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz + -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz ) + diskuse? ( https://github.com/Castaglia/${PN}-mod_diskuse/archive/v${MOD_DISKUSE}.tar.gz + -> mod_diskuse-${MOD_DISKUSE}.tar.gz ) + kerberos? ( https://downloads.sourceforge.net/gssmod/mod_gss-${MOD_GSS}.tar.gz ) + msg? ( https://github.com/Castaglia/${PN}-mod_msg/archive/v${MOD_MSG}.tar.gz + -> mod_msg-${MOD_MSG}.tar.gz ) + vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz + -> mod_vroot-${MOD_VROOT}.tar.gz ) +" +S="${WORKDIR}/${P/_/}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv ~sparc x86" +IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident + kerberos ldap log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius + ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot" +# Some tests are ran in chroot. Confuses sandbox. +RESTRICT="test" +# TODO: geoip +REQUIRED_USE=" + ban? ( ctrls ) + msg? ( ctrls ) + shaper? ( ctrls ) + + mysql? ( ssl ) + postgres? ( ssl ) + radius? ( ssl ) + sftp? ( ssl ) + sqlite? ( ssl ) +" + +COMMON_DEPEND=" + virtual/libcrypt:= + acl? ( virtual/acl ) + caps? ( sys-libs/libcap ) + deflate? ( virtual/zlib:= ) + kerberos? ( + sys-fs/e2fsprogs + virtual/krb5 + ) + ldap? ( net-nds/openldap:= ) + memcache? ( + || ( + dev-libs/libmemcached-awesome + >=dev-libs/libmemcached-0.41 + ) + ) + mysql? ( + dev-db/mysql-connector-c:0= + sodium? ( dev-libs/libsodium:0= ) + ) + nls? ( virtual/libiconv ) + ncurses? ( sys-libs/ncurses:0= ) + ssl? ( dev-libs/openssl:0= ) + pam? ( sys-libs/pam ) + pcre? ( dev-libs/libpcre ) + postgres? ( + dev-db/postgresql:= + sodium? ( dev-libs/libsodium:0= ) + ) + rewrite? ( + || ( + net-dns/libidn2 + net-dns/libidn + ) + ) + sftp? ( virtual/zlib:= ) + sqlite? ( + dev-db/sqlite:3 + sodium? ( dev-libs/libsodium:0= ) + ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + net-ftp/ftpbase + clamav? ( app-antivirus/clamav ) + selinux? ( sec-policy/selinux-ftp ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.6-use-trace.patch + # https://bugs.gentoo.org/953968 + "${FILESDIR}"/${PN}-1.3.9-slibtool.patch + "${FILESDIR}"/${PN}-1.3.9-sftp_ssl-3.0.patch + # PR 1979 merged + "${FILESDIR}"/${PN}-1.3.9-fix_c23.patch +) + +QA_CONFIG_IMPL_DECL_SKIP=( + # AIX only + authenticate + loginfailed + loginsuccess + + # Deprecated/removed functions, not actually checking for this anyway + SSLeay_add_all_algorithms + # Test isn't actually checking for BIO_f_zlib + BIO_f_zlib +) + +in_dir() { + pushd "${WORKDIR}/${1}" || die + shift + "$@" + popd +} + +src_prepare() { + # Skip 'install-conf' / Support LINGUAS + sed -i -e "/install-all/s/ install-conf//" Makefile.in || die + sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die + + # Prepare external modules + if use case; then + cp -v "${WORKDIR}"/${PN}-mod_case-${MOD_CASE}/mod_case.c contrib || die + cp -v "${WORKDIR}"/${PN}-mod_case-${MOD_CASE}/mod_case.html doc/contrib || die + fi + + if use clamav ; then + in_dir mod_clamav-${MOD_CLAMAV} eapply "${FILESDIR}"/"${PN}"-1.3.9-clamav-refresh-api.patch + in_dir mod_clamav-${MOD_CLAMAV} eapply "${FILESDIR}"/"${PN}"-1.3.9-clamav-debool.patch + cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die + eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch + fi + + if use diskuse; then + in_dir ${PN}-mod_diskuse-${MOD_DISKUSE} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch + + # ./configure will modify files. Symlink them instead of copying + ln -sv "${WORKDIR}"/${PN}-mod_diskuse-${MOD_DISKUSE}/mod_diskuse.h "${S}"/contrib || die + + cp -v "${WORKDIR}"/${PN}-mod_diskuse-${MOD_DISKUSE}/mod_diskuse.c "${S}"/contrib || die + cp -v "${WORKDIR}"/${PN}-mod_diskuse-${MOD_DISKUSE}/mod_diskuse.html "${S}"/doc/contrib || die + fi + + if use msg; then + cp -v "${WORKDIR}"/${PN}-mod_msg-${MOD_MSG}/mod_msg.c contrib || die + cp -v "${WORKDIR}"/${PN}-mod_msg-${MOD_MSG}/mod_msg.html doc/contrib || die + fi + + if use vroot; then + cp -rv "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT} contrib/mod_vroot || die + fi + + if use kerberos ; then + in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.9-gss-refresh-api.patch + in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.9-fix_heimdal.patch + + # ./configure will modify files. Symlink them instead of copying + ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die + ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die + ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die + + cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die + cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die + cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die + fi + + default + + tc-export CC +} + +src_configure() { + local c m + + use acl && m="${m}:mod_facl" + use ban && m="${m}:mod_ban" + use case && m="${m}:mod_case" + use clamav && m="${m}:mod_clamav" + use copy && m="${m}:mod_copy" + use ctrls && m="${m}:mod_ctrls_admin" + use deflate && m="${m}:mod_deflate" + if use diskuse ; then + in_dir ${PN}-mod_diskuse-${MOD_DISKUSE} econf + m="${m}:mod_diskuse" + fi + use dynmasq && m="${m}:mod_dynmasq" + use exec && m="${m}:mod_exec" + use ifsession && m="${m}:mod_ifsession" + use ifversion && m="${m}:mod_ifversion" + if use kerberos ; then + in_dir mod_gss-${MOD_GSS} econf --with-krb5-config="${EPREFIX}/usr/bin/krb5-config" + m="${m}:mod_gss:mod_auth_gss" + fi + use ldap && m="${m}:mod_ldap" + use log-forensic && m="${m}:mod_log_forensic" + use msg && m="${m}:mod_msg" + if use mysql || use postgres || use sqlite ; then + m="${m}:mod_sql:mod_sql_passwd" + use mysql && m="${m}:mod_sql_mysql" + use postgres && m="${m}:mod_sql_postgres" + use sqlite && m="${m}:mod_sql_sqlite" + fi + use qos && m="${m}:mod_qos" + use radius && m="${m}:mod_radius" + use ratio && m="${m}:mod_ratio" + use readme && m="${m}:mod_readme" + use rewrite && m="${m}:mod_rewrite" + if use sftp ; then + m="${m}:mod_sftp" + use pam && m="${m}:mod_sftp_pam" + use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql" + fi + use shaper && m="${m}:mod_shaper" + use sitemisc && m="${m}:mod_site_misc" + use snmp && m="${m}:mod_snmp" + if use softquota ; then + m="${m}:mod_quotatab:mod_quotatab_file" + use ldap && m="${m}:mod_quotatab_ldap" + use radius && m="${m}:mod_quotatab_radius" + use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql" + fi + if use ssl ; then + m="${m}:mod_tls:mod_tls_shmcache" + use memcache && m="${m}:mod_tls_memcache" + fi + if use tcpd ; then + m="${m}:mod_wrap2:mod_wrap2_file" + use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql" + fi + use unique-id && m="${m}:mod_unique_id" + use vroot && m="${m}:mod_vroot" + + if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then + einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'" + m="${m}:${PROFTP_CUSTOM_MODULES}" + fi + + [[ -z ${m} ]] || c="${c} --with-modules=${m:1}" + + local myeconfargs=( + --cache-file="${S}"/config.cache + --localstatedir=/run/proftpd + --sysconfdir=/etc/proftpd + --disable-strip + $(use_enable acl facl) + $(use_enable authfile auth-file) + $(use_enable caps cap) + $(use_enable ctrls) + $(use_enable dso) + $(use_enable ident) + $(use_enable memcache) + $(use_enable ncurses) + $(use_enable nls) + $(use_enable ssl openssl) + $(use_enable pam auth-pam) + $(use_enable pcre) + $(use_enable sodium) + $(use_enable test tests) + --enable-trace + --enable-shadow + --enable-autoshadow + ${c:1} + ) + + econf "${myeconfargs[@]}" +} + +src_test() { + emake api-tests -C tests +} + +src_install() { + default + [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale + rm -rf "${ED}"/run "${ED}"/var/run + + newinitd "${FILESDIR}"/proftpd.initd-r1 proftpd + insinto /etc/proftpd + doins "${FILESDIR}"/proftpd.conf.sample + + insinto /etc/xinetd.d + newins "${FILESDIR}"/proftpd.xinetd proftpd + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES + + docinto html + dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html + + docinto rfc + dodoc doc/rfc/*.txt + + systemd_dounit "${FILESDIR}"/${PN}.service + newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.d.conf-r1 ${PN}.conf +} + +pkg_postinst() { + # Create /var/run files at package merge time: bug #650000 + tmpfiles_process ${PN}.conf +} diff --git a/net-ftp/proftpd/proftpd-1.3.9a.ebuild b/net-ftp/proftpd/proftpd-1.3.9a.ebuild new file mode 100644 index 000000000000..052e754461f6 --- /dev/null +++ b/net-ftp/proftpd/proftpd-1.3.9a.ebuild @@ -0,0 +1,334 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/proftpd.asc +inherit flag-o-matic systemd tmpfiles toolchain-funcs verify-sig + +MOD_CASE="0.9.1" +MOD_CLAMAV="0.14rc2" +MOD_DISKUSE="0.9.1" +MOD_GSS="1.3.9" +MOD_MSG="0.5.1" +MOD_VROOT="0.9.12" + +DESCRIPTION="An advanced and very configurable FTP server" +HOMEPAGE=" + http://www.proftpd.org/ + http://www.castaglia.org/proftpd/ + https://github.com/jbenden/mod_clamav + https://gssmod.sourceforge.net/ +" +SRC_URI=" + ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz + case? ( https://github.com/Castaglia/${PN}-mod_case/archive/v${MOD_CASE}.tar.gz + -> mod_case-${MOD_CASE}.tar.gz ) + clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz + -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz ) + diskuse? ( https://github.com/Castaglia/${PN}-mod_diskuse/archive/v${MOD_DISKUSE}.tar.gz + -> mod_diskuse-${MOD_DISKUSE}.tar.gz ) + kerberos? ( https://downloads.sourceforge.net/gssmod/mod_gss-${MOD_GSS}.tar.gz ) + msg? ( https://github.com/Castaglia/${PN}-mod_msg/archive/v${MOD_MSG}.tar.gz + -> mod_msg-${MOD_MSG}.tar.gz ) + vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz + -> mod_vroot-${MOD_VROOT}.tar.gz ) + verify-sig? ( ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz.asc ) +" +S="${WORKDIR}/${P/_/}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv ~sparc x86" +IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident + kerberos ldap log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius + ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot" +# Some tests are ran in chroot. Confuses sandbox. +RESTRICT="test" +# TODO: geoip +REQUIRED_USE=" + ban? ( ctrls ) + msg? ( ctrls ) + shaper? ( ctrls ) + + mysql? ( ssl ) + postgres? ( ssl ) + radius? ( ssl ) + sftp? ( ssl ) + sqlite? ( ssl ) +" + +COMMON_DEPEND=" + virtual/libcrypt:= + acl? ( virtual/acl ) + caps? ( sys-libs/libcap ) + deflate? ( virtual/zlib:= ) + kerberos? ( + sys-fs/e2fsprogs + virtual/krb5 + ) + ldap? ( net-nds/openldap:= ) + memcache? ( + || ( + dev-libs/libmemcached-awesome + >=dev-libs/libmemcached-0.41 + ) + ) + mysql? ( + dev-db/mysql-connector-c:0= + sodium? ( dev-libs/libsodium:0= ) + ) + nls? ( virtual/libiconv ) + ncurses? ( sys-libs/ncurses:0= ) + ssl? ( dev-libs/openssl:0= ) + pam? ( sys-libs/pam ) + pcre? ( dev-libs/libpcre2:= ) + postgres? ( + dev-db/postgresql:= + sodium? ( dev-libs/libsodium:0= ) + ) + rewrite? ( net-dns/libidn2:= ) + sftp? ( virtual/zlib:= ) + sqlite? ( + dev-db/sqlite:3 + sodium? ( dev-libs/libsodium:0= ) + ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + net-ftp/ftpbase + clamav? ( app-antivirus/clamav ) + selinux? ( sec-policy/selinux-ftp ) +" +BDEPEND=" + verify-sig? ( sec-keys/openpgp-keys-proftpd ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.6-use-trace.patch + "${FILESDIR}"/${PN}-1.3.9-sftp_ssl-3.0.patch + + # merged in 1.3.10 + # https://bugs.gentoo.org/953968 + "${FILESDIR}"/${PN}-1.3.9-slibtool.patch +) + +QA_CONFIG_IMPL_DECL_SKIP=( + # AIX only + authenticate + loginfailed + loginsuccess + + # Deprecated/removed functions, not actually checking for this anyway + SSLeay_add_all_algorithms + # Test isn't actually checking for BIO_f_zlib + BIO_f_zlib +) + +in_dir() { + pushd "${WORKDIR}/${1}" || die + shift + "$@" + popd +} + +src_unpack() { + use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${P/_/}.tar.gz{,.asc} + default +} + +src_prepare() { + # Skip 'install-conf' / Support LINGUAS + sed -i -e "/install-all/s/ install-conf//" Makefile.in || die + sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die + + # Prepare external modules + if use case; then + cp -v "${WORKDIR}"/${PN}-mod_case-${MOD_CASE}/mod_case.c contrib || die + cp -v "${WORKDIR}"/${PN}-mod_case-${MOD_CASE}/mod_case.html doc/contrib || die + fi + + if use clamav ; then + in_dir mod_clamav-${MOD_CLAMAV} eapply "${FILESDIR}"/"${PN}"-1.3.9-clamav-refresh-api.patch + in_dir mod_clamav-${MOD_CLAMAV} eapply "${FILESDIR}"/"${PN}"-1.3.9-clamav-debool.patch + cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die + eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch + fi + + if use diskuse; then + in_dir ${PN}-mod_diskuse-${MOD_DISKUSE} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch + + # ./configure will modify files. Symlink them instead of copying + ln -sv "${WORKDIR}"/${PN}-mod_diskuse-${MOD_DISKUSE}/mod_diskuse.h "${S}"/contrib || die + + cp -v "${WORKDIR}"/${PN}-mod_diskuse-${MOD_DISKUSE}/mod_diskuse.c "${S}"/contrib || die + cp -v "${WORKDIR}"/${PN}-mod_diskuse-${MOD_DISKUSE}/mod_diskuse.html "${S}"/doc/contrib || die + fi + + if use msg; then + cp -v "${WORKDIR}"/${PN}-mod_msg-${MOD_MSG}/mod_msg.c contrib || die + cp -v "${WORKDIR}"/${PN}-mod_msg-${MOD_MSG}/mod_msg.html doc/contrib || die + fi + + if use vroot; then + cp -rv "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT} contrib/mod_vroot || die + fi + + if use kerberos ; then + in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.9-gss-refresh-api.patch + in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.9-fix_heimdal.patch + + # ./configure will modify files. Symlink them instead of copying + ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die + ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die + ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die + + cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die + cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die + cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die + fi + + default + + tc-export CC +} + +src_configure() { + # -Werror=lto-type-mismatch #969611 + # https://github.com/proftpd/proftpd/issues/2032 + use dso && filter-lto + + local c m + + use acl && m="${m}:mod_facl" + use ban && m="${m}:mod_ban" + use case && m="${m}:mod_case" + use clamav && m="${m}:mod_clamav" + use copy && m="${m}:mod_copy" + use ctrls && m="${m}:mod_ctrls_admin" + use deflate && m="${m}:mod_deflate" + if use diskuse ; then + in_dir ${PN}-mod_diskuse-${MOD_DISKUSE} econf + m="${m}:mod_diskuse" + fi + use dynmasq && m="${m}:mod_dynmasq" + use exec && m="${m}:mod_exec" + use ifsession && m="${m}:mod_ifsession" + use ifversion && m="${m}:mod_ifversion" + if use kerberos ; then + in_dir mod_gss-${MOD_GSS} econf --with-krb5-config="${EPREFIX}/usr/bin/krb5-config" + m="${m}:mod_gss:mod_auth_gss" + fi + use ldap && m="${m}:mod_ldap" + use log-forensic && m="${m}:mod_log_forensic" + use msg && m="${m}:mod_msg" + if use mysql || use postgres || use sqlite ; then + m="${m}:mod_sql:mod_sql_passwd" + use mysql && m="${m}:mod_sql_mysql" + use postgres && m="${m}:mod_sql_postgres" + use sqlite && m="${m}:mod_sql_sqlite" + fi + use qos && m="${m}:mod_qos" + use radius && m="${m}:mod_radius" + use ratio && m="${m}:mod_ratio" + use readme && m="${m}:mod_readme" + use rewrite && m="${m}:mod_rewrite" + if use sftp ; then + m="${m}:mod_sftp" + use pam && m="${m}:mod_sftp_pam" + use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql" + fi + use shaper && m="${m}:mod_shaper" + use sitemisc && m="${m}:mod_site_misc" + use snmp && m="${m}:mod_snmp" + if use softquota ; then + m="${m}:mod_quotatab:mod_quotatab_file" + use ldap && m="${m}:mod_quotatab_ldap" + use radius && m="${m}:mod_quotatab_radius" + use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql" + fi + if use ssl ; then + m="${m}:mod_tls:mod_tls_shmcache" + use memcache && m="${m}:mod_tls_memcache" + fi + if use tcpd ; then + m="${m}:mod_wrap2:mod_wrap2_file" + use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql" + fi + use unique-id && m="${m}:mod_unique_id" + use vroot && m="${m}:mod_vroot" + + if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then + einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'" + m="${m}:${PROFTP_CUSTOM_MODULES}" + fi + + [[ -z ${m} ]] || c="${c} --with-modules=${m:1}" + + local myeconfargs=( + --cache-file="${S}"/config.cache + --localstatedir=/run/proftpd + --sysconfdir=/etc/proftpd + --disable-strip + $(use_enable acl facl) + $(use_enable authfile auth-file) + $(use_enable caps cap) + $(use_enable ctrls) + $(use_enable dso) + $(use_enable ident) + $(use_enable memcache) + $(use_enable ncurses) + $(use_enable nls) + $(use_enable ssl openssl) + $(use_enable pam auth-pam) + $(use_enable pcre pcre2) + $(use_enable sodium) + $(use_enable test tests) + --enable-trace + --enable-shadow + --enable-autoshadow + ${c:1} + ) + + econf "${myeconfargs[@]}" +} + +src_test() { + emake api-tests -C tests +} + +src_install() { + default + [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale + rm -rf "${ED}"/run "${ED}"/var/run + + newinitd "${FILESDIR}"/proftpd.initd-r1 proftpd + insinto /etc/proftpd + doins "${FILESDIR}"/proftpd.conf.sample + + insinto /etc/xinetd.d + newins "${FILESDIR}"/proftpd.xinetd proftpd + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES + + docinto html + dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html + + docinto rfc + dodoc doc/rfc/*.txt + + systemd_dounit "${FILESDIR}"/${PN}.service + newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.d.conf-r1 ${PN}.conf +} + +pkg_postinst() { + # Create /var/run files at package merge time: bug #650000 + tmpfiles_process ${PN}.conf +} diff --git a/net-ftp/pure-ftpd/Manifest b/net-ftp/pure-ftpd/Manifest new file mode 100644 index 000000000000..883fa1ce16ba --- /dev/null +++ b/net-ftp/pure-ftpd/Manifest @@ -0,0 +1,2 @@ +DIST pure-ftpd-1.0.53.tar.bz2 528994 BLAKE2B d36d644f942275b3e40ab5468149f5329744a8e0a8fe1aaee1b9f1e3076cb7342cd2a5b2230e49c714428464cef564ddaeeac1fc6af8725c6e6b2698ce0dd389 SHA512 ee9b2c73a011bb90a977e84e97c00994f7983c3e205f4e793b436f5ad1e5e0bfae087cda0aafc3ad6b4a73c4007f3977ea233b86ef2d5e39d5a29a23751a87cb +DIST pure-ftpd-1.0.54.tar.bz2 532622 BLAKE2B e4af5dc50e28ae074e648497280341ddcaf5fff60aea053ea94badb577596cea547b51a9d3790c4db22f633d589cf106a1e6688ac4fa61b58df7d49c5c479192 SHA512 0b1d099201a4cae05d40628978d05a377542e999da3366474655d6c422ffbfc526acf7fcb63f40586605600db8ae68284c9e9e81d9db204d7e38b97a5bd23fd0 diff --git a/net-ftp/pure-ftpd/files/pure-certd.initd b/net-ftp/pure-ftpd/files/pure-certd.initd new file mode 100644 index 000000000000..1d254e5274a9 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-certd.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +certd_scriptfile="/etc/${SVCNAME}.sh" +certd_socketfile="/run/${SVCNAME}.sock" +pidfile="/run/pure-certd.pid" + +command="/usr/sbin/pure-certd" +command_args="--pidfile ${pidfile} --run ${certd_scriptfile} --socket ${certd_socketfile}" +command_background="true" + +start_pre() { + if [ ! -f "${certd_scriptfile}" ] ; then + eerror "The file ${certd_scriptfile} does not exist!" + eerror "Please create and configure the script." + return 1 + fi +} diff --git a/net-ftp/pure-ftpd/files/pure-certd.script b/net-ftp/pure-ftpd/files/pure-certd.script new file mode 100644 index 000000000000..1148962e919b --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-certd.script @@ -0,0 +1,27 @@ +#!/bin/sh +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Set default ssl directory +SSL_DIR="/etc/ssl/pure-ftpd" + +# Check SNI and select certificate +case "${CERTD_SNI_NAME}" in + domain1.tld) + FILE_CERT="${SSL_DIR}/domain1.tld.crt" + FILE_KEY="${SSL_DIR}/domain1.tld.key" + ;; + + domain2.tld) + FILE_CERT="${SSL_DIR}/domain2.tld.crt" + FILE_KEY="${SSL_DIR}/domain2.tld.key" + ;; +esac + +# Print selected certificate for 'pure-certd'. +# You can modify 'action' for your needs. +# See man page of 'pure-certd' for more information. +echo "action:fallback" +echo "cert_file:${FILE_CERT}" +echo "key_file:${FILE_KEY}" +echo "end" diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch new file mode 100644 index 000000000000..8346cf253f4f --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch @@ -0,0 +1,20 @@ +--- a/src/log_pam.c ++++ b/src/log_pam.c +@@ -49,7 +49,7 @@ + # endif + + #ifndef FTPD_PAM_SERVICE_NAME +-# define FTPD_PAM_SERVICE_NAME "pure-ftpd" ++# define FTPD_PAM_SERVICE_NAME "ftp" + #endif + + /* Static variables used to communicate between the conversation function +@@ -164,7 +164,7 @@ + &PAM_conversation, &pamh); + PAM_BAIL; + # ifdef PAM_TTY +- (void) pam_set_item(pamh, PAM_TTY, "pure-ftpd"); ++ (void) pam_set_item(pamh, PAM_TTY, FTPD_PAM_SERVICE_NAME); + # endif + # ifdef PAM_RUSER + (void) pam_set_item(pamh, PAM_RUSER, user); diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.confd-r4 b/net-ftp/pure-ftpd/files/pure-ftpd.confd-r4 new file mode 100644 index 000000000000..d49b6c509c58 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd.confd-r4 @@ -0,0 +1,5 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Optionally depend on started Pure-Certd +# RC_NEED="pure-certd" diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.initd-r12 b/net-ftp/pure-ftpd/files/pure-ftpd.initd-r12 new file mode 100644 index 000000000000..c971125784b7 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd.initd-r12 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +ftpd_configfile="/etc/${SVCNAME}.conf" +pidfile="/run/pure-ftpd.pid" + +command="/usr/sbin/pure-ftpd" +command_args="${ftpd_configfile}" +command_background="true" + +depend() { + need localmount + use netmount +} + +start_pre() { + if [ ! -f "${ftpd_configfile}" ] ; then + eerror "The file ${ftpd_configfile} does not exist!" + eerror "Please create and configure the configuration file." + return 1 + fi +} diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.xinetd b/net-ftp/pure-ftpd/files/pure-ftpd.xinetd new file mode 100644 index 000000000000..11022e6fde8d --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd.xinetd @@ -0,0 +1,13 @@ +# +# Pure-FTPd FTP daemon - http://www.pureftpd.org +# +service ftp +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/pure-ftpd + server_args = -s -a 42 + protocol = tcp + disable = yes +} diff --git a/net-ftp/pure-ftpd/files/pure-uploadscript.confd b/net-ftp/pure-ftpd/files/pure-uploadscript.confd new file mode 100644 index 000000000000..4b8fca0deb8f --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-uploadscript.confd @@ -0,0 +1,8 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# If you want to process each file uploaded through Pure-FTPd, enter the name +# of the script that should process the files below. +# Use man pure-uploadscript to learn more about how to write this script. +# UPLOADSCRIPT="/path/to/uploadscript" diff --git a/net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1 b/net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1 new file mode 100644 index 000000000000..5914c875fdf1 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1 @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +ftpd_configfile="/etc/pure-ftpd.conf" +pidfile="/run/pure-uploadscript.pid" + +command="/usr/sbin/pure-uploadscript" +command_args="${UPLOADSCRIPT}" +command_background="true" + +depend() { + need localmount + use netmount +} + +start_pre() { + if [ -n "${UPLOADSCRIPT}" ] ; then + eerror "The file ${ftpd_configfile} does not exist!" + eerror "Please create and configure the uploadscript file." + return 1 + fi + + if ! grep "^CallUploadScript" "${ftpd_configfile}" ; then + eerror "You cannot start this uploadscript," + eerror "unless you enable the option CallUploadScript" + eerror "in your main Pure-FTPd configuration file ${ftpd_configfile}" + return 1 + fi +} diff --git a/net-ftp/pure-ftpd/metadata.xml b/net-ftp/pure-ftpd/metadata.xml new file mode 100644 index 000000000000..9dc464a49e89 --- /dev/null +++ b/net-ftp/pure-ftpd/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>conikost@gentoo.org</email> + <name>Conrad Kostecki</name> + </maintainer> + <longdescription> + Free (BSD), secure, production-quality and standard-conformant FTP server + based upon Troll-FTPd. It doesn't provide useless bells and whistles, + but focuses on efficiency and ease of use. + </longdescription> + <use> + <flag name="anondel">Permit anonymous to delete files</flag> + <flag name="anonperm">Permit anonymous to change file permissions</flag> + <flag name="anonren">Permit anonymous to rename files</flag> + <flag name="anonres">Permit anonymous to resume file transfers</flag> + <flag name="implicittls">Enable TLS on Port 990</flag> + <flag name="noiplog">Disables logging of IP addresses</flag> + <flag name="paranoidmsg">Display paranoid messages instead of normal ones</flag> + <flag name="resolveids">Resolve UIDs/GIDs</flag> + <flag name="sysquota">Enables system quota support (needs <pkg>sys-fs/quota</pkg>)</flag> + <flag name="vchroot">Enable support for virtual chroot (possible security risk)</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.53.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.53.ebuild new file mode 100644 index 000000000000..4d4f2610f997 --- /dev/null +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.53.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit eapi9-ver flag-o-matic + +DESCRIPTION="Fast, production-quality, standard-conformant FTP server" +HOMEPAGE="https://www.pureftpd.org/project/pure-ftpd/" +if [[ "${PV}" == 9999 ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/jedisct1/pure-ftpd.git" +else + SRC_URI="https://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv ~sparc x86" +fi + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="anondel anonperm anonren anonres caps implicittls ldap mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd" +REQUIRED_USE="implicittls? ( ssl )" + +DEPEND=" + dev-libs/libsodium:= + virtual/libcrypt:= + caps? ( sys-libs/libcap ) + ldap? ( >=net-nds/openldap-2.0.25:= ) + mysql? ( || ( + dev-db/mariadb-connector-c + dev-db/mysql-connector-c + ) + ) + pam? ( sys-libs/pam ) + postgres? ( dev-db/postgresql:= ) + ssl? ( dev-libs/openssl:0=[-bindist(-)] ) + sysquota? ( sys-fs/quota[-rpc] ) + xinetd? ( virtual/inetd ) +" + +RDEPEND=" + ${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) +" + +BDEPEND="dev-build/autoconf-archive" + +QA_CONFIG_IMPL_DECL_SKIP=( + # FP noise (bug #900068) + sendfile sendfilev +) + +PATCHES=( "${FILESDIR}/${PN}-1.0.28-pam.patch" ) + +src_prepare() { + default + + # Don't hardcode FORTIFY_SOURCE + sed -e '/-D_FORTIFY_SOURCE=2/d' -i configure || die + + [[ "${PV}" == 9999 ]] && eautoreconf +} + +src_configure() { + # Those features are only configurable like this, see bug #179375. + use anondel && append-cppflags -DANON_CAN_DELETE + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS + use anonren && append-cppflags -DANON_CAN_RENAME + use anonres && append-cppflags -DANON_CAN_RESUME + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS + + # Do not auto-use SSP -- let the user select this. + export ax_cv_check_cflags___fstack_protector_all=no + + local myeconfargs=( + --enable-largefile + # Required for correct pid file location. + # Pure-FTPd appends "/run/pure-ftpd.pid" to the localstatedir + # path, and tries to write to that file even when being + # started in foreground. So we need to pin this to / + --localstatedir="${EPREFIX}"/ + --with-altlog + --with-cookie + --with-diraliases + --with-extauth + --with-ftpwho + --with-language=${PUREFTPD_LANG:=english} + --with-peruserlimits + --with-privsep + --with-puredb + --with-quotas + --with-ratios + --with-throttling + --with-uploadscript + --with-virtualhosts + $(use_with implicittls) + $(use_with ldap) + $(use_with mysql) + $(use_with pam) + $(use_with paranoidmsg) + $(use_with postgres pgsql) + $(use_with ssl tls) + $(use_with sysquota sysquotas) + $(use_with vchroot virtualchroot) + $(usex caps '' '--without-capabilities') + $(usex noiplog '--without-iplogging' '') + $(usex xinetd '' '--without-inetd') + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + newinitd "${FILESDIR}/pure-ftpd.initd-r12" pure-ftpd + newconfd "${FILESDIR}/pure-ftpd.confd-r4" pure-ftpd + + newinitd "${FILESDIR}/pure-uploadscript.initd-r1" pure-uploadscript + newconfd "${FILESDIR}/pure-uploadscript.confd" pure-uploadscript + + if use implicittls ; then + sed -e '/^# Bind/s@21@990@' -i "${ED}"/etc/pure-ftpd.conf || die + fi + + if use ssl ; then + newinitd "${FILESDIR}/pure-certd.initd" pure-certd + + exeinto /etc + newexe "${FILESDIR}/pure-certd.script" pure-certd.sh + fi + + if use ldap ; then + insinto /etc/openldap/schema + doins pureftpd.schema + insinto /etc/openldap + insopts -m 0600 + doins pureftpd-ldap.conf + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/pure-ftpd.xinetd" pure-ftpd + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + # This is a new installation + elog + elog "Before starting Pure-FTPd, you have to edit the /etc/pure-ftpd.conf file!" + elog + ewarn "It's *really* important to read the README provided with Pure-FTPd!" + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info" + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info." + ewarn + elif ver_replacing -le "1.0.50" ; then + einfo "Configuration through /etc/conf.d/pure-ftpd is now deprecated!" + einfo "Please migrate your settings to the new configuration file." + einfo "Use /etc/pure-ftpd.conf to adjust your settings." + fi +} diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.54.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.54.ebuild new file mode 100644 index 000000000000..2a2915282e73 --- /dev/null +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.54.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit eapi9-ver flag-o-matic + +DESCRIPTION="Fast, production-quality, standard-conformant FTP server" +HOMEPAGE="https://www.pureftpd.org/project/pure-ftpd/" +if [[ "${PV}" == 9999 ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/jedisct1/pure-ftpd.git" +else + SRC_URI="https://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="anondel anonperm anonren anonres caps implicittls ldap mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd" +REQUIRED_USE="implicittls? ( ssl )" + +DEPEND=" + dev-libs/libsodium:= + virtual/libcrypt:= + caps? ( sys-libs/libcap ) + ldap? ( >=net-nds/openldap-2.0.25:= ) + mysql? ( || ( + dev-db/mariadb-connector-c + dev-db/mysql-connector-c + ) + ) + pam? ( sys-libs/pam ) + postgres? ( dev-db/postgresql:= ) + ssl? ( dev-libs/openssl:0=[-bindist(-)] ) + sysquota? ( sys-fs/quota[-rpc] ) + xinetd? ( virtual/inetd ) +" + +RDEPEND=" + ${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) +" + +BDEPEND="dev-build/autoconf-archive" + +QA_CONFIG_IMPL_DECL_SKIP=( + # FP noise (bug #900068) + sendfile sendfilev +) + +PATCHES=( "${FILESDIR}/${PN}-1.0.28-pam.patch" ) + +src_prepare() { + default + + # Don't hardcode FORTIFY_SOURCE + sed -e '/-D_FORTIFY_SOURCE=2/d' -i configure || die + + [[ "${PV}" == 9999 ]] && eautoreconf +} + +src_configure() { + # Those features are only configurable like this, see bug #179375. + use anondel && append-cppflags -DANON_CAN_DELETE + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS + use anonren && append-cppflags -DANON_CAN_RENAME + use anonres && append-cppflags -DANON_CAN_RESUME + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS + + # Do not auto-use SSP -- let the user select this. + export ax_cv_check_cflags___fstack_protector_all=no + + local myeconfargs=( + --enable-largefile + # Required for correct pid file location. + # Pure-FTPd appends "/run/pure-ftpd.pid" to the localstatedir + # path, and tries to write to that file even when being + # started in foreground. So we need to pin this to / + --localstatedir="${EPREFIX}"/ + --with-altlog + --with-cookie + --with-diraliases + --with-extauth + --with-ftpwho + --with-language=${PUREFTPD_LANG:=english} + --with-peruserlimits + --with-privsep + --with-puredb + --with-quotas + --with-ratios + --with-throttling + --with-uploadscript + --with-virtualhosts + $(use_with implicittls) + $(use_with ldap) + $(use_with mysql) + $(use_with pam) + $(use_with paranoidmsg) + $(use_with postgres pgsql) + $(use_with ssl tls) + $(use_with sysquota sysquotas) + $(use_with vchroot virtualchroot) + $(usex caps '' '--without-capabilities') + $(usex noiplog '--without-iplogging' '') + $(usex xinetd '' '--without-inetd') + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + newinitd "${FILESDIR}/pure-ftpd.initd-r12" pure-ftpd + newconfd "${FILESDIR}/pure-ftpd.confd-r4" pure-ftpd + + newinitd "${FILESDIR}/pure-uploadscript.initd-r1" pure-uploadscript + newconfd "${FILESDIR}/pure-uploadscript.confd" pure-uploadscript + + if use implicittls ; then + sed -e '/^# Bind/s@21@990@' -i "${ED}"/etc/pure-ftpd.conf || die + fi + + if use ssl ; then + newinitd "${FILESDIR}/pure-certd.initd" pure-certd + + exeinto /etc + newexe "${FILESDIR}/pure-certd.script" pure-certd.sh + fi + + if use ldap ; then + insinto /etc/openldap/schema + doins pureftpd.schema + insinto /etc/openldap + insopts -m 0600 + doins pureftpd-ldap.conf + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/pure-ftpd.xinetd" pure-ftpd + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + # This is a new installation + elog + elog "Before starting Pure-FTPd, you have to edit the /etc/pure-ftpd.conf file!" + elog + ewarn "It's *really* important to read the README provided with Pure-FTPd!" + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info" + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info." + ewarn + elif ver_replacing -le "1.0.50" ; then + einfo "Configuration through /etc/conf.d/pure-ftpd is now deprecated!" + einfo "Please migrate your settings to the new configuration file." + einfo "Use /etc/pure-ftpd.conf to adjust your settings." + fi +} diff --git a/net-ftp/pure-ftpd/pure-ftpd-9999.ebuild b/net-ftp/pure-ftpd/pure-ftpd-9999.ebuild new file mode 100644 index 000000000000..bdada3101f81 --- /dev/null +++ b/net-ftp/pure-ftpd/pure-ftpd-9999.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit eapi9-ver flag-o-matic + +DESCRIPTION="Fast, production-quality, standard-conformant FTP server" +HOMEPAGE="https://www.pureftpd.org/project/pure-ftpd/" +if [[ "${PV}" == 9999 ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/jedisct1/pure-ftpd.git" +else + SRC_URI="https://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="anondel anonperm anonren anonres caps implicittls ldap mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd" +REQUIRED_USE="implicittls? ( ssl )" + +DEPEND=" + dev-libs/libsodium:= + virtual/libcrypt:= + caps? ( sys-libs/libcap ) + ldap? ( >=net-nds/openldap-2.0.25:= ) + mysql? ( || ( + dev-db/mariadb-connector-c + dev-db/mysql-connector-c + ) + ) + pam? ( sys-libs/pam ) + postgres? ( dev-db/postgresql:= ) + ssl? ( dev-libs/openssl:0=[-bindist(-)] ) + sysquota? ( sys-fs/quota[-rpc] ) + xinetd? ( virtual/inetd ) +" + +RDEPEND=" + ${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) +" + +BDEPEND="dev-build/autoconf-archive" + +QA_CONFIG_IMPL_DECL_SKIP=( + # FP noise (bug #900068) + sendfile sendfilev +) + +PATCHES=( "${FILESDIR}/${PN}-1.0.28-pam.patch" ) + +src_prepare() { + default + + # Don't hardcode FORTIFY_SOURCE + sed -e '/-D_FORTIFY_SOURCE=2/d' -i configure.ac || die + + [[ "${PV}" == 9999 ]] && eautoreconf +} + +src_configure() { + # Those features are only configurable like this, see bug #179375. + use anondel && append-cppflags -DANON_CAN_DELETE + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS + use anonren && append-cppflags -DANON_CAN_RENAME + use anonres && append-cppflags -DANON_CAN_RESUME + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS + + # Do not auto-use SSP -- let the user select this. + export ax_cv_check_cflags___fstack_protector_all=no + + local myeconfargs=( + --enable-largefile + # Required for correct pid file location. + # Pure-FTPd appends "/run/pure-ftpd.pid" to the localstatedir + # path, and tries to write to that file even when being + # started in foreground. So we need to pin this to / + --localstatedir="${EPREFIX}"/ + --with-altlog + --with-cookie + --with-diraliases + --with-extauth + --with-ftpwho + --with-language=${PUREFTPD_LANG:=english} + --with-peruserlimits + --with-privsep + --with-puredb + --with-quotas + --with-ratios + --with-throttling + --with-uploadscript + --with-virtualhosts + $(use_with implicittls) + $(use_with ldap) + $(use_with mysql) + $(use_with pam) + $(use_with paranoidmsg) + $(use_with postgres pgsql) + $(use_with ssl tls) + $(use_with sysquota sysquotas) + $(use_with vchroot virtualchroot) + $(usex caps '' '--without-capabilities') + $(usex noiplog '--without-iplogging' '') + $(usex xinetd '' '--without-inetd') + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + newinitd "${FILESDIR}/pure-ftpd.initd-r12" pure-ftpd + newconfd "${FILESDIR}/pure-ftpd.confd-r4" pure-ftpd + + newinitd "${FILESDIR}/pure-uploadscript.initd-r1" pure-uploadscript + newconfd "${FILESDIR}/pure-uploadscript.confd" pure-uploadscript + + if use implicittls ; then + sed -e '/^# Bind/s@21@990@' -i "${ED}"/etc/pure-ftpd.conf || die + fi + + if use ssl ; then + newinitd "${FILESDIR}/pure-certd.initd" pure-certd + + exeinto /etc + newexe "${FILESDIR}/pure-certd.script" pure-certd.sh + fi + + if use ldap ; then + insinto /etc/openldap/schema + doins pureftpd.schema + insinto /etc/openldap + insopts -m 0600 + doins pureftpd-ldap.conf + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/pure-ftpd.xinetd" pure-ftpd + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + # This is a new installation + elog + elog "Before starting Pure-FTPd, you have to edit the /etc/pure-ftpd.conf file!" + elog + ewarn "It's *really* important to read the README provided with Pure-FTPd!" + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info" + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info." + ewarn + elif ver_replacing -le "1.0.50" ; then + einfo "Configuration through /etc/conf.d/pure-ftpd is now deprecated!" + einfo "Please migrate your settings to the new configuration file." + einfo "Use /etc/pure-ftpd.conf to adjust your settings." + fi +} diff --git a/net-ftp/pureadmin/Manifest b/net-ftp/pureadmin/Manifest new file mode 100644 index 000000000000..a0f4622cd32c --- /dev/null +++ b/net-ftp/pureadmin/Manifest @@ -0,0 +1 @@ +DIST pureadmin-0.4.tar.gz 386739 BLAKE2B e0699210d6f22f4043bd667e82993b019e8a58b16d42157be42f4497ee383e1da7935beca77491e105a1b3537ef1920cbe57b0cc8ce1e48fb30c01c491f9605e SHA512 46fd4caff0d6c123412478690411409038d5590cc7388993eed35fc33a34302b8310ae1ede971ed31cbf29ba4ef3b4c21ce5b8c9b225659b3110c6abcd1e78c6 diff --git a/net-ftp/pureadmin/files/pureadmin-0.4-QA-desktop-file.patch b/net-ftp/pureadmin/files/pureadmin-0.4-QA-desktop-file.patch new file mode 100644 index 000000000000..39b47f60115b --- /dev/null +++ b/net-ftp/pureadmin/files/pureadmin-0.4-QA-desktop-file.patch @@ -0,0 +1,9 @@ +--- a/pureadmin.desktop.in ++++ b/pureadmin.desktop.in +@@ -9,5 +9,5 @@ + StartupNotify=true + Terminal=false + Type=Application +-Categories=GTK;Application;System; ++Categories=GTK;System; + diff --git a/net-ftp/pureadmin/files/pureadmin-0.4-fno-common.patch b/net-ftp/pureadmin/files/pureadmin-0.4-fno-common.patch new file mode 100644 index 000000000000..829867e8c0db --- /dev/null +++ b/net-ftp/pureadmin/files/pureadmin-0.4-fno-common.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/707206 +--- a/src/globals.h ++++ b/src/globals.h +@@ -90,7 +90,7 @@ typedef enum { + RUNMODE_INETD /* Running through inetd or similar */ + } ftp_runmode_t; + +-ftp_runmode_t ftp_runmode; ++extern ftp_runmode_t ftp_runmode; + + void exit_program (void); + +--- a/src/gui_helper.c ++++ b/src/gui_helper.c +@@ -39,6 +39,7 @@ + #include "binreloc.h" + #include "system_accounts.h" + ++extern ftp_runmode_t ftp_runmode; + EggStatusIcon *status_icon = NULL; + + static gchar *sec_to_time (gulong sec) +--- a/src/main.c ++++ b/src/main.c +@@ -53,6 +53,7 @@ + gboolean timeout_update_activity (gpointer data); + gboolean timeout_check_for_availability (gpointer data); + ++ftp_runmode_t ftp_runmode; + static ftp_runmode_t get_ftp_runmode (void); + static void activity_show_error_message (const gchar *errmsg); + static void activity_show_welcome_message (void); +--- a/src/mainwin_cb.c ++++ b/src/mainwin_cb.c +@@ -46,6 +46,7 @@ + + popup_src_t popup_source; + ++extern ftp_runmode_t ftp_runmode; + gboolean usermanager_initialized = FALSE; + + static void update_adv_info (void) diff --git a/net-ftp/pureadmin/files/pureadmin-0.4-gold.patch b/net-ftp/pureadmin/files/pureadmin-0.4-gold.patch new file mode 100644 index 000000000000..c410da51f507 --- /dev/null +++ b/net-ftp/pureadmin/files/pureadmin-0.4-gold.patch @@ -0,0 +1,20 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -38,5 +38,5 @@ pureadmin_CFLAGS = -std=gnu99 -Wall + + pureadmin_LDFLAGS = -export-dynamic + +-pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@ ++pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@ -lm -lX11 + +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -249,7 +249,7 @@ pureadmin_SOURCES = \ + + pureadmin_CFLAGS = -std=gnu99 -Wall + pureadmin_LDFLAGS = -export-dynamic +-pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@ ++pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@ -lm -lX11 + all: all-am + + .SUFFIXES: diff --git a/net-ftp/pureadmin/metadata.xml b/net-ftp/pureadmin/metadata.xml new file mode 100644 index 000000000000..5f33304011d5 --- /dev/null +++ b/net-ftp/pureadmin/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/pureadmin/pureadmin-0.4-r3.ebuild b/net-ftp/pureadmin/pureadmin-0.4-r3.ebuild new file mode 100644 index 000000000000..f0649feefb0e --- /dev/null +++ b/net-ftp/pureadmin/pureadmin-0.4-r3.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop xdg + +DESCRIPTION="GUI tool used to make the management of Pure-FTPd a little easier" +HOMEPAGE="http://purify.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/purify/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="doc" + +RDEPEND=" + gnome-base/libglade:2.0 + virtual/zlib:= + virtual/libcrypt:= + virtual/fam + x11-libs/gtk+:2 + x11-libs/libX11" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-gold.patch + "${FILESDIR}"/${P}-QA-desktop-file.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_prepare() { + default + + # prevent "make check" from complaining + cat >> po/POTFILES.skip <<- EOF || die + src/eggstatusicon.c + src/eggtrayicon.c + src/prereq_usrmanager.c + EOF +} + +src_install() { + default + + # Move the docs to the correct location, if we want the docs + use doc && + dodoc -r "${ED}"/usr/share/pureadmin/docs/. + rm -Rv "${ED}"/usr/share/pureadmin/docs || die + + make_desktop_entry pureadmin "Pure-FTPd menu config" pureadmin +} + +pkg_postinst() { + ewarn "PureAdmin is at a beta-stage right now and it may break your" + ewarn "configuration. DO NOT use it for safety critical system" + ewarn "or production use!" + + elog + elog "You need root-privileges to be able to use PureAdmin." + elog "This will probably change in the future." + elog +} diff --git a/net-ftp/tftp-hpa/Manifest b/net-ftp/tftp-hpa/Manifest new file mode 100644 index 000000000000..119ffddf14d8 --- /dev/null +++ b/net-ftp/tftp-hpa/Manifest @@ -0,0 +1 @@ +DIST tftp-hpa-5.2.tar.xz 89564 BLAKE2B 45917ca3d710f8a4b584dbe1e9a912e06fd181e4ffcfd8fba13008f08dbbce0fe339b61fb6f97236b8012e755025d05700214e365adac81dfce42b0edd636e80 SHA512 a5198e923a6e58281f749dc77b3f3ed8579e56b6f0fd6a17482cc88bdc8d34b6702c7c709717885b9b937ecae459d9a832328a49a2e3536dc7432cdb39d2a394 diff --git a/net-ftp/tftp-hpa/files/in.tftpd.confd-0.44 b/net-ftp/tftp-hpa/files/in.tftpd.confd-0.44 new file mode 100644 index 000000000000..14e8d1452881 --- /dev/null +++ b/net-ftp/tftp-hpa/files/in.tftpd.confd-0.44 @@ -0,0 +1,15 @@ +# /etc/init.d/in.tftpd + +# Path to server files from +# Depending on your application you may have to change this. +# This is commented out to force you to look at the file! +#INTFTPD_PATH="/var/tftp/" +#INTFTPD_PATH="/tftpboot/" +#INTFTPD_PATH="/tftproot/" + +# For more options, see in.tftpd(8) +# -R 4096:32767 solves problems with ARC firmware, and obsoletes +# the /proc/sys/net/ipv4/ip_local_port_range hack. +# -s causes $INTFTPD_PATH to be the root of the TFTP tree. +# -l is passed by the init script in addition to these options. +INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}" diff --git a/net-ftp/tftp-hpa/files/in.tftpd.rc6 b/net-ftp/tftp-hpa/files/in.tftpd.rc6 new file mode 100644 index 000000000000..92f7352358e1 --- /dev/null +++ b/net-ftp/tftp-hpa/files/in.tftpd.rc6 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting tftpd" + /usr/sbin/in.tftpd -l ${INTFTPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping tftpd" + start-stop-daemon --stop --exec /usr/sbin/in.tftpd + eend $? +} diff --git a/net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch b/net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch new file mode 100644 index 000000000000..ff2488d5dfb4 --- /dev/null +++ b/net-ftp/tftp-hpa/files/tftp-hpa-5.2-gcc-10.patch @@ -0,0 +1,42 @@ +From 7afd5aa65fdabaa4583f6e1a84936eb9bdd33c65 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Tue, 21 Jan 2020 23:10:46 +0000 +Subject: [PATCH] tftp-hpa: fix build failure against gcc-10 + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu tftp.o main.o ../common/libcommon.a -lreadline -liberty -o tftp +ld: main.o:(.bss+0x40): + multiple definition of `toplevel'; tftp.o:(.bss+0x100): first defined here +collect2: error: ld returned 1 exit status +make[1]: *** [Makefile:12: tftp] Error 1 +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Bug: https://bugs.gentoo.org/705834 +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + tftp/tftp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tftp/tftp.c b/tftp/tftp.c +index d15da22..d067f96 100644 +--- a/tftp/tftp.c ++++ b/tftp/tftp.c +@@ -48,7 +48,7 @@ extern int maxtimeout; + #define PKTSIZE SEGSIZE+4 + char ackbuf[PKTSIZE]; + int timeout; +-sigjmp_buf toplevel; ++extern sigjmp_buf toplevel; + sigjmp_buf timeoutbuf; + + static void nak(int, const char *); +-- +2.25.0 + diff --git a/net-ftp/tftp-hpa/files/tftp.service b/net-ftp/tftp-hpa/files/tftp.service new file mode 100644 index 000000000000..f43937875409 --- /dev/null +++ b/net-ftp/tftp-hpa/files/tftp.service @@ -0,0 +1,6 @@ +[Unit] +Description=Tftp Server + +[Service] +ExecStart=/usr/sbin/in.tftpd -R 4096:32767 -s /tftproot +StandardInput=socket diff --git a/net-ftp/tftp-hpa/files/tftp.socket b/net-ftp/tftp-hpa/files/tftp.socket new file mode 100644 index 000000000000..8764c1de349c --- /dev/null +++ b/net-ftp/tftp-hpa/files/tftp.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Tftp Server Activation Socket + +[Socket] +ListenDatagram=69 + +[Install] +WantedBy=sockets.target diff --git a/net-ftp/tftp-hpa/files/tftp.xinetd b/net-ftp/tftp-hpa/files/tftp.xinetd new file mode 100644 index 000000000000..c1bf20ab2929 --- /dev/null +++ b/net-ftp/tftp-hpa/files/tftp.xinetd @@ -0,0 +1,10 @@ +service tftp +{ + disable = yes + socket_type = dgram + protocol = udp + wait = yes + user = root + server = /usr/sbin/in.tftpd + server_args = -R 4096:32767 -s /tftpboot +} diff --git a/net-ftp/tftp-hpa/metadata.xml b/net-ftp/tftp-hpa/metadata.xml new file mode 100644 index 000000000000..a2bce1c9fe65 --- /dev/null +++ b/net-ftp/tftp-hpa/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="client">Compile and install the tftp client</flag> + <flag name="server">Compile and install the tftp server</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/tftp-hpa/tftp-hpa-5.2-r4.ebuild b/net-ftp/tftp-hpa/tftp-hpa-5.2-r4.ebuild new file mode 100644 index 000000000000..d9e5147642ed --- /dev/null +++ b/net-ftp/tftp-hpa/tftp-hpa-5.2-r4.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit systemd toolchain-funcs + +DESCRIPTION="Port of the OpenBSD TFTP server" +HOMEPAGE="https://www.kernel.org/pub/software/network/tftp/" +SRC_URI="https://www.kernel.org/pub/software/network/tftp/${PN}/${P}.tar.xz" + +LICENSE="BSD-4" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~s390 ~sparc x86" +IUSE="ipv6 readline selinux tcpd +client +server" + +DEPEND=" + readline? ( sys-libs/readline:0= ) + tcpd? ( sys-apps/tcp-wrappers ) +" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-tftp ) + !net-ftp/atftp + client? ( + !net-misc/inetutils[tftp(+)] + ) + server? ( + !net-misc/inetutils[tftpd(+)] + !net-misc/iputils[tftpd(-)] + !net-ftp/uftpd + ) +" + +PATCHES=( + "${FILESDIR}"/tftp-hpa-5.2-gcc-10.patch +) + +src_prepare() { + default + sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die +} + +src_configure() { + local myconf=( + ac_cv_search_bsd_signal=no + $(use_with ipv6) + $(use_with tcpd tcpwrappers) + $(use_with readline) + ) + econf "${myconf[@]}" +} + +src_compile() { + emake version.h + emake -C lib + emake -C common + if use client; then + emake -C tftp + fi + if use server; then + emake -C tftpd + fi +} + +src_install() { + dodoc README* CHANGES tftpd/sample.rules + + if use client; then + emake INSTALLROOT="${D}" -C tftp install + fi + if use server; then + emake INSTALLROOT="${D}" -C tftpd install + + newconfd "${FILESDIR}"/in.tftpd.confd-0.44 in.tftpd + newinitd "${FILESDIR}"/in.tftpd.rc6 in.tftpd + + systemd_dounit "${FILESDIR}"/tftp.service + systemd_dounit "${FILESDIR}"/tftp.socket + + insinto /etc/xinetd.d + newins "${FILESDIR}"/tftp.xinetd tftp + fi +} diff --git a/net-ftp/tnftp/Manifest b/net-ftp/tnftp/Manifest new file mode 100644 index 000000000000..d9634be254d9 --- /dev/null +++ b/net-ftp/tnftp/Manifest @@ -0,0 +1,2 @@ +DIST tnftp-20210827.tar.gz 699171 BLAKE2B fe1d4f9f972f349c18e98dbc40305c867511339cb661936fbd255c4a76d9df61f1eae7e723479ef67a96dd05886a079daa4b7367d0c8768d33bc08faa743e5e8 SHA512 9b33f48e237ff49fe3cf502635b948cf7d5e20e2f38a6a429288e3f4374099ac9fb910a9e5b88de4420f1570f6f92ec1fc7ab16f0b93dfe8c6f32d11f0fc0e47 +DIST tnftp-20230507.tar.gz 702357 BLAKE2B 780497f7bad44d3dcc8c22f6075d3d6ea556c641db5a740b63b0e226773a4fa4ba3b9081fbe9d57918f52d1e0d21b96181e6344c35e7ef4bae8d1178264fecb9 SHA512 c6539902b709d6b35a8754dd552ca71926fd09ad2a0244363005607089bea3947a6176e61a1dc9a232e8af415cfebed7decd9653b6f6bc38385a05ca86c85b1a diff --git a/net-ftp/tnftp/files/tnftp-20230507-socks-include.patch b/net-ftp/tnftp/files/tnftp-20230507-socks-include.patch new file mode 100644 index 000000000000..93d54a60e430 --- /dev/null +++ b/net-ftp/tnftp/files/tnftp-20230507-socks-include.patch @@ -0,0 +1,32 @@ +--- tnftp-20230507/tnftp.h ++++ tnftp-20230507/tnftp.h +@@ -487,28 +487,7 @@ + #define TM_YEAR_BASE 1900 + + #if defined(USE_SOCKS) /* (Dante) SOCKS5 */ +-#define connect Rconnect +-#define bind Rbind +-#define getsockname Rgetsockname +-#define getpeername Rgetpeername +-#define accept Raccept +-#define rresvport Rrresvport +-#define bindresvport Rbindresvport +-#define gethostbyname Rgethostbyname +-#define gethostbyname2 Rgethostbyname2 +-#define sendto Rsendto +-#define recvfrom Rrecvfrom +-#define recvfrom Rrecvfrom +-#define write Rwrite +-#define writev Rwritev +-#define send Rsend +-#define sendmsg Rsendmsg +-#define read Rread +-#define readv Rreadv +-#define recv Rrecv +-#define recvmsg Rrecvmsg +-#define getaddrinfo Rgetaddrinfo +-#define getipnodebyname Rgetipnodebyname ++#include <socks.h> + #endif /* defined(USE_SOCKS) */ + + diff --git a/net-ftp/tnftp/metadata.xml b/net-ftp/tnftp/metadata.xml new file mode 100644 index 000000000000..2ceacca48eb1 --- /dev/null +++ b/net-ftp/tnftp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>swegener@gentoo.org</email> + <name>Sven Wegenery</name> + </maintainer> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/tnftp/tnftp-20210827.ebuild b/net-ftp/tnftp/tnftp-20210827.ebuild new file mode 100644 index 000000000000..dd94cc6f8ee8 --- /dev/null +++ b/net-ftp/tnftp/tnftp-20210827.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +DESCRIPTION="NetBSD FTP client with several advanced features" +SRC_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/${P}.tar.gz" +HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" + +SLOT="0" +LICENSE="BSD-4 BSD ISC" +KEYWORDS="amd64 ~arm64 ppc x86" +IUSE="ipv6 socks5 ssl" +REQUIRED_USE="socks5? ( !ipv6 )" + +DEPEND=">=sys-libs/ncurses-5.1 + dev-libs/libedit + socks5? ( net-proxy/dante ) + ssl? ( dev-libs/openssl:= )" +RDEPEND="${DEPEND}" + +DOCS=( ChangeLog README THANKS ) + +src_configure() { + econf \ + --enable-editcomplete \ + --without-local-libedit \ + $(use_enable ipv6) \ + $(use_enable ssl) \ + $(use_with socks5 socks) +} diff --git a/net-ftp/tnftp/tnftp-20230507.ebuild b/net-ftp/tnftp/tnftp-20230507.ebuild new file mode 100644 index 000000000000..0c27e2a6dce3 --- /dev/null +++ b/net-ftp/tnftp/tnftp-20230507.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +DESCRIPTION="NetBSD FTP client with several advanced features" +SRC_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/${P}.tar.gz" +HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" + +SLOT="0" +LICENSE="BSD-4 BSD ISC" +KEYWORDS="amd64 ~arm64 ppc x86" +IUSE="ipv6 socks5 ssl" +REQUIRED_USE="socks5? ( !ipv6 )" + +DEPEND=">=sys-libs/ncurses-5.1 + dev-libs/libedit + socks5? ( net-proxy/dante ) + ssl? ( dev-libs/openssl:= )" +RDEPEND="${DEPEND}" + +DOCS=( ChangeLog README THANKS ) + +PATCHES=( + "${FILESDIR}"/${P}-socks-include.patch +) + +src_configure() { + econf \ + --enable-editcomplete \ + --without-local-libedit \ + $(use_enable ipv6) \ + $(use_enable ssl) \ + $(use_with socks5 socks) +} diff --git a/net-ftp/uftpd/Manifest b/net-ftp/uftpd/Manifest new file mode 100644 index 000000000000..bacabd941dca --- /dev/null +++ b/net-ftp/uftpd/Manifest @@ -0,0 +1 @@ +DIST uftpd-2.15.tar.xz 102820 BLAKE2B 19f80fb1cfa1194a154950c885cd26bf216014b3abae42d164e2c080dc7bf9c3810409bc989eec2a1ce559f0935415458cbd19abbd52dbf3816538d9463b754e SHA512 eaa867b6fe9b86786c8aec47224bda6aef5120845b67fa786c1663ec0b8437e5a0099fab8753db47feb9ab3a93de2d6519dba9dfb3d6ebefc8c4482113df45c1 diff --git a/net-ftp/uftpd/files/uftpd.confd b/net-ftp/uftpd/files/uftpd.confd new file mode 100644 index 000000000000..356ad42f59aa --- /dev/null +++ b/net-ftp/uftpd/files/uftpd.confd @@ -0,0 +1,5 @@ +# Config file for uftpd server + +# make sure you create the root directory +UFTPD_ROOT="/uftpdroot" +UFTDP_OPTS="" diff --git a/net-ftp/uftpd/files/uftpd.init b/net-ftp/uftpd/files/uftpd.init new file mode 100644 index 000000000000..8a2c7c659a49 --- /dev/null +++ b/net-ftp/uftpd/files/uftpd.init @@ -0,0 +1,27 @@ +#!/sbin/openrc-run + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -d ${UFTPD_ROOT} ] + then + eerror "You need a UFTPD root directory" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting uftpd" + start-stop-daemon --start --exec /usr/sbin/uftpd ${UFTPD_ROOT} ${UFTPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping uftpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/uftpd + eend $? +} diff --git a/net-ftp/uftpd/metadata.xml b/net-ftp/uftpd/metadata.xml new file mode 100644 index 000000000000..65a12a5a9a4b --- /dev/null +++ b/net-ftp/uftpd/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <name>Oz Tiram</name> + <email>oz.tiram@gmail.com</email> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + The no nonsense TFTP/FTP server. + An excellent choice for those of us who never wanted to learn every + config file format on this planet. uftpd has no configuration, and + starts automatically from the traditional UNIX inetd super server, + neatly tcpwrapped for your safety. + + Hardcore Internet users and anyone concerned about security should + probably consider a seperate TFTP server and for FTP look at one of: + vsftpd, proftpd or pure-ftpd. +</longdescription> + <upstream> + <remote-id type="cpe">cpe:/a:troglobit:uftpd</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/uftpd/uftpd-2.15-r1.ebuild b/net-ftp/uftpd/uftpd-2.15-r1.ebuild new file mode 100644 index 000000000000..d936b50b56a2 --- /dev/null +++ b/net-ftp/uftpd/uftpd-2.15-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="The no nonsense TFTP/FTP server" +HOMEPAGE="https://github.com/troglobit/uftpd" +SRC_URI="https://github.com/troglobit/${PN}/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="test" +RESTRICT="!test? ( test )" + +DEPEND=" + >=dev-libs/libite-1.5 + >=dev-libs/libuev-2.2" +RDEPEND=" + ${DEPEND} + !net-misc/uftp + !net-ftp/atftp + !net-ftp/tftp-hpa[server(+)]" +BDEPEND=" + virtual/pkgconfig + test? ( + net-ftp/ftp + net-ftp/tnftp + >=net-ftp/tftp-hpa-5.2-r2[client] + )" + +src_test() { + # can't run the tests in parallel since the order matters + emake -j 1 check +} + +src_install() { + default + newinitd "${FILESDIR}"/uftpd.init uftpd + newconfd "${FILESDIR}"/uftpd.confd uftpd +} diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest new file mode 100644 index 000000000000..c5ada34ac169 --- /dev/null +++ b/net-ftp/vsftpd/Manifest @@ -0,0 +1,2 @@ +DIST vsftpd-3.0.5.tar.gz 197778 BLAKE2B c197a070f7eef8c97ef0adc1ebb883520e7613d67ba0eabb1380b3adaae272f4ef79110e79ce4aad5ddebd6100fb059308d905203249c5445d3ea64c29dc5ec2 SHA512 9e9f9bde8c460fbc6b1d29ca531327fb2e40e336358f1cc19e1da205ef81b553719a148ad4613ceead25499d1ac3f03301a0ecd3776e5c228acccb7f9461a7ee +DIST vsftpd-3.0.5.tar.gz.asc 866 BLAKE2B 3eb1df8353dc33f134d7d5dc514a05edc89d8c90769bf88264468b0e206c974de8e6d7d071daa55d4b1b42386f1a6b0bf91b4fdaf5e71fb924235cc683f82472 SHA512 eda50fd7764d83c768a5ed5f6c077b947ae9ec659e4d2f37485cc7fbaad0ad81e85a32229359e028355b7f755ac927bcbffe5bd78011c6664ae7463d514c9523 diff --git a/net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch b/net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch new file mode 100644 index 000000000000..702363ee472b --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch @@ -0,0 +1,20 @@ +Index: vsftpd-2.3.2/twoprocess.c +=================================================================== +--- vsftpd-2.3.2.orig/twoprocess.c ++++ vsftpd-2.3.2/twoprocess.c +@@ -284,6 +284,7 @@ process_login_req(struct vsf_session* p_ + { + enum EVSFPrivopLoginResult e_login_result = kVSFLoginNull; + char cmd; ++ vsf_sysutil_install_null_sighandler(kVSFSysUtilSigCHLD); + /* Blocks */ + cmd = priv_sock_get_cmd(p_sess->parent_fd); + if (cmd != PRIV_SOCK_LOGIN) +@@ -363,7 +364,6 @@ common_do_login(struct vsf_session* p_se + int was_anon = anon; + const struct mystr* p_orig_user_str = p_user_str; + int newpid; +- vsf_sysutil_install_null_sighandler(kVSFSysUtilSigCHLD); + /* Tells the pre-login child all is OK (it may exit in response) */ + priv_sock_send_result(p_sess->parent_fd, PRIV_SOCK_RESULT_OK); + if (!p_sess->control_use_ssl) diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch b/net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch new file mode 100644 index 000000000000..2445bb54467c --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch @@ -0,0 +1,16 @@ +Author: Michael Cree <mcree@orcon.net.nz> +Description: Fixing FTBFS on alpha (Closes: #656182). + +diff -Naurp vsftpd.orig/sysdeputil.c vsftpd/sysdeputil.c +--- vsftpd.orig/sysdeputil.c 2010-03-26 04:25:33.000000000 +0100 ++++ vsftpd/sysdeputil.c 2012-01-21 10:53:37.353802546 +0100 +@@ -81,6 +81,9 @@ + #include <linux/unistd.h> + #include <errno.h> + #include <syscall.h> ++ #if defined(__alpha__) ++ #define __NR_getpid __NR_getxpid ++ #endif + #endif + + #if defined(__linux__) && !defined(__ia64__) && !defined(__s390__) diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.3-sparc.patch b/net-ftp/vsftpd/files/vsftpd-3.0.3-sparc.patch new file mode 100644 index 000000000000..9bae9c0238f8 --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd-3.0.3-sparc.patch @@ -0,0 +1,16 @@ +Workaround clone syscall mishandling. + +https://bugs.gentoo.org/630704 +--- a/sysdeputil.c 2017-09-11 11:38:06.522229630 +0200 ++++ b/sysdeputil.c 2017-09-11 11:38:10.422229500 +0200 +@@ -67,7 +67,9 @@ + #if defined(__linux__) + #include <errno.h> + #include <syscall.h> +- #define VSF_SYSDEP_HAVE_LINUX_CLONE ++ #ifndef __sparc__ ++ #define VSF_SYSDEP_HAVE_LINUX_CLONE ++ #endif + #include <sched.h> + #ifndef CLONE_NEWPID + #define CLONE_NEWPID 0x20000000 diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.5-gcc15.patch b/net-ftp/vsftpd/files/vsftpd-3.0.5-gcc15.patch new file mode 100644 index 000000000000..1dc39b1a7974 --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd-3.0.5-gcc15.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/880399 + +--- a/ssl.c ++++ b/ssl.c +@@ -34,7 +34,7 @@ + static char* get_ssl_error(); + static SSL* get_ssl(struct vsf_session* p_sess, int fd); + static int ssl_session_init(struct vsf_session* p_sess); +-static void setup_bio_callbacks(); ++static void setup_bio_callbacks(SSL* p_ssl); + static long bio_callback( + BIO* p_bio, int oper, const char* p_arg, int argi, long argl, long retval); + static int ssl_verify_callback(int verify_ok, X509_STORE_CTX* p_ctx); diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.5-seccomp.patch b/net-ftp/vsftpd/files/vsftpd-3.0.5-seccomp.patch new file mode 100644 index 000000000000..cd23e6b35c6a --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd-3.0.5-seccomp.patch @@ -0,0 +1,25 @@ +From 8a0ec911c17b64747b7cb2ff6e912c7cbb87d39f Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Sat, 14 Aug 2021 09:31:04 -0400 +Subject: [PATCH] Fix seccomp failures in the postlogin broker + +--- + seccompsandbox.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/seccompsandbox.c b/seccompsandbox.c +index bcd96a0..5411d69 100644 +--- a/seccompsandbox.c ++++ b/seccompsandbox.c +@@ -515,6 +515,8 @@ seccomp_sandbox_setup_postlogin_broker() + seccomp_sandbox_setup_base(); + seccomp_sandbox_setup_data_connections(); + allow_nr_1_arg_match(__NR_sendmsg, 3, 0); ++ allow_nr(__NR_alarm); ++ allow_nr(__NR_wait4); + } + + void +-- +2.32.0 + diff --git a/net-ftp/vsftpd/files/vsftpd.init-3.0.5 b/net-ftp/vsftpd/files/vsftpd.init-3.0.5 new file mode 100644 index 000000000000..84c5af155fd4 --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd.init-3.0.5 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +instance=${RC_SVCNAME#*.} + +: ${command=/usr/sbin/vsftpd} +command_background=true + +if [ "${instance}" = "${RC_SVCNAME}" ]; then + : ${pidfile=/run/vsftpd.pid} +else + : ${command_args=/etc/vsftpd/${instance}.conf} + : ${pidfile=/run/vsftpd.${instance}.pid} +fi + +depend() { + use dns logger net +} diff --git a/net-ftp/vsftpd/files/vsftpd.logrotate b/net-ftp/vsftpd/files/vsftpd.logrotate new file mode 100644 index 000000000000..b28a2a42628c --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd.logrotate @@ -0,0 +1,4 @@ +/var/log/vsftpd*.log { + missingok + notifempty +} diff --git a/net-ftp/vsftpd/files/vsftpd.service-3.0.5 b/net-ftp/vsftpd/files/vsftpd.service-3.0.5 new file mode 100644 index 000000000000..209b36636d55 --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd.service-3.0.5 @@ -0,0 +1,10 @@ +[Unit] +Description=Very Secure FTP Daemon +After=network.target + +[Service] +Type=simple +ExecStart=/usr/sbin/vsftpd + +[Install] +WantedBy=multi-user.target diff --git a/net-ftp/vsftpd/files/vsftpd.socket b/net-ftp/vsftpd/files/vsftpd.socket new file mode 100644 index 000000000000..cdc0d337efeb --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd.socket @@ -0,0 +1,9 @@ +[Unit] +Conflicts=vsftpd.service + +[Socket] +ListenStream=21 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/net-ftp/vsftpd/files/vsftpd.xinetd b/net-ftp/vsftpd/files/vsftpd.xinetd new file mode 100644 index 000000000000..a4ac0211d212 --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd.xinetd @@ -0,0 +1,14 @@ +# default: off +# description: Very Secure FTP Daemon + +service ftp +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/vsftpd + server_args = -olisten=NO + log_on_success += DURATION + nice = 10 + disable = yes +} diff --git a/net-ftp/vsftpd/files/vsftpd_at.service-3.0.5 b/net-ftp/vsftpd/files/vsftpd_at.service-3.0.5 new file mode 100644 index 000000000000..d06c92f4e9fa --- /dev/null +++ b/net-ftp/vsftpd/files/vsftpd_at.service-3.0.5 @@ -0,0 +1,7 @@ +[Unit] +Description=Very Secure FTP Daemon + +[Service] +Type=simple +ExecStart=/usr/sbin/vsftpd -olisten=NO +StandardInput=socket diff --git a/net-ftp/vsftpd/metadata.xml b/net-ftp/vsftpd/metadata.xml new file mode 100644 index 000000000000..97c6227959f5 --- /dev/null +++ b/net-ftp/vsftpd/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>floppym@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:beasts:vsftpd</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/net-ftp/vsftpd/vsftpd-3.0.5-r1.ebuild b/net-ftp/vsftpd/vsftpd-3.0.5-r1.ebuild new file mode 100644 index 000000000000..2a99eb55f154 --- /dev/null +++ b/net-ftp/vsftpd/vsftpd-3.0.5-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs + +DESCRIPTION="Very Secure FTP Daemon" +HOMEPAGE="https://security.appspot.com/vsftpd.html" +SRC_URI="https://security.appspot.com/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="pam selinux ssl tcpd" + +DEPEND=" + >=sys-libs/libcap-2 + pam? ( sys-libs/pam ) + !pam? ( virtual/libcrypt:= ) + ssl? ( dev-libs/openssl:0= ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) +" + +RDEPEND="${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) +" + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/vsftpd-2.3.2-kerberos.patch + "${FILESDIR}"/vsftpd-3.0.2-alpha.patch + "${FILESDIR}"/vsftpd-3.0.3-sparc.patch + "${FILESDIR}"/vsftpd-3.0.5-seccomp.patch + ) + default +} + +define() { + sed -i -e "/#undef $2/c#define $2${3:+ }$3" "$1" || die +} + +undef() { + sed -i -e "/#define $2/c#undef $2" "$1" || die +} + +src_configure() { + libs=( -lcap ) + + if use pam; then + libs+=( -lpam ) + else + undef builddefs.h VSF_BUILD_PAM + libs+=( -lcrypt ) + fi + + if use ssl; then + define builddefs.h VSF_BUILD_SSL + libs+=( -lcrypto -lssl ) + fi + + if use tcpd; then + define builddefs.h VSF_BUILD_TCPWRAPPERS + libs+=( -lwrap ) + fi + + if use elibc_musl; then + # musl does not support utmp/wtmp + # https://bugs.gentoo.org/713952 + undef sysdeputil.c VSF_SYSDEP_HAVE_UTMPX + fi +} + +src_compile() { + local args=( + CC="$(tc-getCC)" + CFLAGS="${CFLAGS}" + LDFLAGS="${LDFLAGS}" + LIBS="${libs[*]}" + LINK= + ) + emake "${args[@]}" +} + +src_install() { + into /usr + dosbin vsftpd + + doman vsftpd.conf.5 vsftpd.8 + + insinto /etc/logrotate.d + newins "${FILESDIR}"/vsftpd.logrotate vsftpd + + insinto /etc/xinetd.d + newins "${FILESDIR}"/vsftpd.xinetd vsftpd + + newinitd "${FILESDIR}"/vsftpd.init-3.0.5 vsftpd + + systemd_newunit "${FILESDIR}"/vsftpd.service-3.0.5 vsftpd.service + systemd_newunit "${FILESDIR}"/vsftpd_at.service-3.0.5 vsftpd@.service + systemd_dounit "${FILESDIR}"/vsftpd.socket + + keepdir /usr/share/empty + + dodoc vsftpd.conf + dodoc -r EXAMPLE SECURITY + + einstalldocs +} + +pkg_preinst() { + if [[ ! -e ${EROOT}/etc/vsftpd.conf && -e ${EROOT}/etc/vsftpd/vsftpd.conf ]]; then + elog "Moving ${EROOT}/etc/vsftpd/vsftpd.conf to ${EROOT}/etc/vsftpd.conf" + mv "${EROOT}"/etc/{vsftpd/,}vsftpd.conf || die + fi +} diff --git a/net-ftp/vsftpd/vsftpd-3.0.5-r2.ebuild b/net-ftp/vsftpd/vsftpd-3.0.5-r2.ebuild new file mode 100644 index 000000000000..7a7fd45b7090 --- /dev/null +++ b/net-ftp/vsftpd/vsftpd-3.0.5-r2.ebuild @@ -0,0 +1,124 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/vsftpd.asc +inherit systemd toolchain-funcs verify-sig + +DESCRIPTION="Very Secure FTP Daemon" +HOMEPAGE="https://security.appspot.com/vsftpd.html" +SRC_URI=" + https://security.appspot.com/downloads/${P}.tar.gz + verify-sig? ( https://security.appspot.com/downloads/${P}.tar.gz.asc ) +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="pam selinux ssl tcpd" + +DEPEND=" + >=sys-libs/libcap-2 + pam? ( sys-libs/pam ) + !pam? ( virtual/libcrypt:= ) + ssl? ( dev-libs/openssl:0= ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) +" + +RDEPEND="${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) +" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-vsftpd )" + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/vsftpd-2.3.2-kerberos.patch + "${FILESDIR}"/vsftpd-3.0.2-alpha.patch + "${FILESDIR}"/vsftpd-3.0.3-sparc.patch + "${FILESDIR}"/vsftpd-3.0.5-seccomp.patch + "${FILESDIR}"/vsftpd-3.0.5-gcc15.patch + ) + default +} + +define() { + sed -i -e "/#undef $2/c#define $2${3:+ }$3" "$1" || die +} + +undef() { + sed -i -e "/#define $2/c#undef $2" "$1" || die +} + +src_configure() { + libs=( -lcap ) + + if use pam; then + libs+=( -lpam ) + else + undef builddefs.h VSF_BUILD_PAM + libs+=( -lcrypt ) + fi + + if use ssl; then + define builddefs.h VSF_BUILD_SSL + libs+=( -lcrypto -lssl ) + fi + + if use tcpd; then + define builddefs.h VSF_BUILD_TCPWRAPPERS + libs+=( -lwrap ) + fi + + if use elibc_musl; then + # musl does not support utmp/wtmp + # https://bugs.gentoo.org/713952 + undef sysdeputil.c VSF_SYSDEP_HAVE_UTMPX + fi +} + +src_compile() { + local args=( + CC="$(tc-getCC)" + CFLAGS="${CFLAGS}" + LDFLAGS="${LDFLAGS}" + LIBS="${libs[*]}" + LINK= + ) + emake "${args[@]}" +} + +src_install() { + into /usr + dosbin vsftpd + + doman vsftpd.conf.5 vsftpd.8 + + insinto /etc/logrotate.d + newins "${FILESDIR}"/vsftpd.logrotate vsftpd + + insinto /etc/xinetd.d + newins "${FILESDIR}"/vsftpd.xinetd vsftpd + + newinitd "${FILESDIR}"/vsftpd.init-3.0.5 vsftpd + + systemd_newunit "${FILESDIR}"/vsftpd.service-3.0.5 vsftpd.service + systemd_newunit "${FILESDIR}"/vsftpd_at.service-3.0.5 vsftpd@.service + systemd_dounit "${FILESDIR}"/vsftpd.socket + + keepdir /usr/share/empty + + dodoc vsftpd.conf + dodoc -r EXAMPLE SECURITY + + einstalldocs +} + +pkg_preinst() { + if [[ ! -e ${EROOT}/etc/vsftpd.conf && -e ${EROOT}/etc/vsftpd/vsftpd.conf ]]; then + elog "Moving ${EROOT}/etc/vsftpd/vsftpd.conf to ${EROOT}/etc/vsftpd.conf" + mv "${EROOT}"/etc/{vsftpd/,}vsftpd.conf || die + fi +} |
