initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
From 9c9623c8a47fb5580dfea1a59296c6d224479504 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Mon, 2 Mar 2020 23:45:22 +0000
|
||||
Subject: [PATCH] mod_quotatab: fix build failure against gcc-10
|
||||
|
||||
On gcc-10 (and gcc-9 -fno-common) build fails as:
|
||||
|
||||
```
|
||||
$ ./configure --with-modules=mod_quotatab && make
|
||||
...
|
||||
ld: modules/module_glue.o:(.data.rel+0x68):
|
||||
undefined reference to `quotatab_file_module'
|
||||
collect2: error: ld returned 1 exit status
|
||||
make: *** [Makefile:56: proftpd] 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.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/proftpd/proftpd/commit/9c9623c8a47fb5580dfea1a59296c6d224479504]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
contrib/mod_quotatab.c | 1 +
|
||||
contrib/mod_quotatab.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/mod_quotatab.c b/contrib/mod_quotatab.c
|
||||
index 4fa6c1f44..0ee480163 100644
|
||||
--- a/contrib/mod_quotatab.c
|
||||
+++ b/contrib/mod_quotatab.c
|
||||
@@ -50,6 +50,7 @@ typedef struct regtab_obj {
|
||||
module quotatab_module;
|
||||
|
||||
/* Quota objects for the current session */
|
||||
+quota_deltas_t quotatab_deltas;
|
||||
static quota_table_t *limit_tab = NULL;
|
||||
static quota_limit_t sess_limit;
|
||||
|
||||
diff --git a/contrib/mod_quotatab.h b/contrib/mod_quotatab.h
|
||||
index ed30333f5..c818395a0 100644
|
||||
--- a/contrib/mod_quotatab.h
|
||||
+++ b/contrib/mod_quotatab.h
|
||||
@@ -188,7 +188,7 @@ typedef struct table_obj {
|
||||
#define QUOTATAB_TALLY_SRC 0x0002
|
||||
|
||||
/* Quota objects for the current session. */
|
||||
-quota_deltas_t quotatab_deltas;
|
||||
+extern quota_deltas_t quotatab_deltas;
|
||||
|
||||
/* Function prototypes necessary for quotatab sub-modules */
|
||||
int quotatab_log(const char *, ...)
|
||||
@@ -0,0 +1,105 @@
|
||||
config BR2_PACKAGE_PROFTPD
|
||||
bool "proftpd"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
ProFTPD, a highly configurable FTP server.
|
||||
|
||||
http://www.proftpd.org/
|
||||
|
||||
if BR2_PACKAGE_PROFTPD
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_CAP
|
||||
bool "mod_cap support"
|
||||
select BR2_PACKAGE_LIBCAP
|
||||
help
|
||||
Compile ProFTPD with mod_cap support
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_REWRITE
|
||||
bool "mod_rewrite support"
|
||||
help
|
||||
Compile ProFTPD with mod_rewrite support
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_REDIS
|
||||
bool "mod_redis support"
|
||||
select BR2_PACKAGE_HIREDIS
|
||||
help
|
||||
The mod_redis module enables ProFTPD support for caching
|
||||
data in Redis servers, using the hiredis client library.
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_SFTP
|
||||
bool "mod_sftp support"
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160 if BR2_PACKAGE_LIBOPENSSL
|
||||
help
|
||||
Compile ProFTPD with mod_sftp support
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_SQL
|
||||
bool "mod_sql support"
|
||||
help
|
||||
Compile ProFTPD with mod_sql support.
|
||||
|
||||
if BR2_PACKAGE_PROFTPD_MOD_SQL
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_SQL_SQLITE
|
||||
bool "mod_sql_sqlite support"
|
||||
select BR2_PACKAGE_SQLITE
|
||||
help
|
||||
Compile ProFTPD with mod_sql_sqlite support.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_SFTP_SQL
|
||||
bool "mod_sftp_sql support"
|
||||
select BR2_PACKAGE_PROFTPD_MOD_SQL
|
||||
select BR2_PACKAGE_PROFTPD_MOD_SFTP
|
||||
help
|
||||
Compile ProFTPD with mod_sftp_sql support
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB
|
||||
bool "mod_quotatab support"
|
||||
help
|
||||
Compile ProFTPD with mod_quotatab support. This module
|
||||
is required in order to support quota tables:
|
||||
1. mod_quotatab_file
|
||||
2. mod_quotatab_ldap
|
||||
3. mod_quotatab_radius
|
||||
4. mod_quotatab_sql
|
||||
|
||||
if BR2_PACKAGE_PROFTPD_MOD_QUOTATAB
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_FILE
|
||||
bool "mod_quotatab_file table support"
|
||||
help
|
||||
Compile mod_quotatab with mod_quotatab_file table.
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_LDAP
|
||||
bool "mod_quotatab_ldap table support"
|
||||
help
|
||||
Compile mod_quotatab with mod_quotatab_ldap table.
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_RADIUS
|
||||
bool "mod_quotatab_radius table support"
|
||||
help
|
||||
Compile mod_quotatab with mod_quotatab_radius table.
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_SQL
|
||||
bool "mod_quotatab_sql table support"
|
||||
select BR2_PACKAGE_PROFTPD_MOD_SQL
|
||||
help
|
||||
Compile mod_quotatab with mod_quotatab_sql table.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_PACKAGE_PROFTPD_BUFFER_SIZE
|
||||
int "buffer size in bytes (0 for default)"
|
||||
default "0"
|
||||
help
|
||||
By increasing the buffer size above the default of 1K,
|
||||
proftpd reads and writes data in larger chunks, and makes
|
||||
fewer expensive system calls. Use of this option to set buffer
|
||||
sizes of 8K or more has been reported to drastically increase
|
||||
transfer speeds (depending on network configurations).
|
||||
|
||||
0 uses the default size of 1024.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
trap "" HUP
|
||||
trap "" TERM
|
||||
[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
|
||||
[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
|
||||
|
||||
start() {
|
||||
printf "Starting ProFTPD: "
|
||||
/usr/sbin/proftpd
|
||||
if [ $? != 0 ]; then
|
||||
echo "FAILED"
|
||||
exit 1
|
||||
else
|
||||
echo "done"
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping ProFTPD: "
|
||||
killall proftpd
|
||||
echo "done"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 2dbe684034ab592742ebdb778a8a234b70f959efeb30feedee3ea77f26f74fbb proftpd-1.3.6e.tar.gz
|
||||
sha256 391a473d755c29b5326fb726326ff3c37e42512f53a8f5789fc310232150bf80 COPYING
|
||||
@@ -0,0 +1,139 @@
|
||||
################################################################################
|
||||
#
|
||||
# proftpd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PROFTPD_VERSION = 1.3.6e
|
||||
PROFTPD_SITE = $(call github,proftpd,proftpd,v$(PROFTPD_VERSION))
|
||||
PROFTPD_LICENSE = GPL-2.0+
|
||||
PROFTPD_LICENSE_FILES = COPYING
|
||||
PROFTPD_CPE_ID_VENDOR = proftpd
|
||||
PROFTPD_SELINUX_MODULES = ftp
|
||||
|
||||
PROFTPD_CONF_ENV = \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
ac_cv_func_setgrent_void=yes
|
||||
|
||||
PROFTPD_CONF_OPTS = \
|
||||
--localstatedir=/var/run \
|
||||
--disable-static \
|
||||
--disable-curses \
|
||||
--disable-ncurses \
|
||||
--disable-facl \
|
||||
--disable-dso \
|
||||
--enable-sendfile \
|
||||
--enable-shadow \
|
||||
--with-gnu-ld \
|
||||
--without-openssl-cmdline
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_CAP),y)
|
||||
PROFTPD_CONF_OPTS += --enable-cap
|
||||
PROFTPD_DEPENDENCIES += libcap
|
||||
else
|
||||
PROFTPD_CONF_OPTS += --disable-cap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REWRITE),y)
|
||||
PROFTPD_MODULES += mod_rewrite
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REDIS),y)
|
||||
PROFTPD_CONF_OPTS += --enable-redis
|
||||
PROFTPD_DEPENDENCIES += hiredis
|
||||
else
|
||||
PROFTPD_CONF_OPTS += --disable-redis
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SFTP),y)
|
||||
PROFTPD_CONF_OPTS += --enable-openssl
|
||||
PROFTPD_MODULES += mod_sftp
|
||||
PROFTPD_DEPENDENCIES += openssl
|
||||
else
|
||||
PROFTPD_CONF_OPTS += --disable-openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SQL),y)
|
||||
PROFTPD_MODULES += mod_sql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SQL_SQLITE),y)
|
||||
PROFTPD_MODULES += mod_sql_sqlite
|
||||
PROFTPD_DEPENDENCIES += sqlite
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SFTP_SQL),y)
|
||||
PROFTPD_MODULES += mod_sftp_sql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB),y)
|
||||
PROFTPD_MODULES += mod_quotatab
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_FILE),y)
|
||||
PROFTPD_MODULES += mod_quotatab_file
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_LDAP),y)
|
||||
PROFTPD_MODULES += mod_quotatab_ldap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_RADIUS),y)
|
||||
PROFTPD_MODULES += mod_quotatab_radius
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB_SQL),y)
|
||||
PROFTPD_MODULES += mod_quotatab_sql
|
||||
endif
|
||||
|
||||
PROFTPD_CONF_OPTS += --with-modules=$(subst $(space),:,$(PROFTPD_MODULES))
|
||||
|
||||
# configure script doesn't handle detection of %llu format string
|
||||
# support for printing the file size when cross compiling, breaking
|
||||
# access for large files.
|
||||
# We unfortunately cannot AUTORECONF the package, so instead force it
|
||||
# on if we know we support it
|
||||
define PROFTPD_USE_LLU
|
||||
$(SED) 's/HAVE_LU/HAVE_LLU/' $(@D)/configure
|
||||
endef
|
||||
PROFTPD_PRE_CONFIGURE_HOOKS += PROFTPD_USE_LLU
|
||||
|
||||
PROFTPD_MAKE = $(MAKE1)
|
||||
|
||||
# install Perl based scripts in target
|
||||
ifeq ($(BR2_PACKAGE_PERL),y)
|
||||
ifeq ($(BR2_PACKAGE_PROFTPD_MOD_QUOTATAB),y)
|
||||
define PROFTPD_INSTALL_FTPQUOTA
|
||||
$(INSTALL) -D -m 0755 $(@D)/contrib/ftpquota $(TARGET_DIR)/usr/sbin/ftpquota
|
||||
endef
|
||||
endif
|
||||
define PROFTPD_INSTALL_FTPASSWD
|
||||
$(INSTALL) -D -m 0755 $(@D)/contrib/ftpasswd $(TARGET_DIR)/usr/sbin/ftpasswd
|
||||
endef
|
||||
endif
|
||||
|
||||
define PROFTPD_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/proftpd $(TARGET_DIR)/usr/sbin/proftpd
|
||||
$(INSTALL) -m 0644 -D $(@D)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf
|
||||
$(PROFTPD_INSTALL_FTPQUOTA)
|
||||
$(PROFTPD_INSTALL_FTPASSWD)
|
||||
endef
|
||||
|
||||
define PROFTPD_USERS
|
||||
ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User
|
||||
endef
|
||||
|
||||
define PROFTPD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/proftpd/S50proftpd $(TARGET_DIR)/etc/init.d/S50proftpd
|
||||
endef
|
||||
|
||||
define PROFTPD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/proftpd/proftpd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/proftpd.service
|
||||
endef
|
||||
|
||||
ifneq ($(BR2_PACKAGE_PROFTPD_BUFFER_SIZE),0)
|
||||
PROFTPD_CONF_OPTS += --enable-buffer-size=$(BR2_PACKAGE_PROFTPD_BUFFER_SIZE)
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=FTP server
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/proftpd -n -q
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user