All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/proftpd: add mod_{sql, quotatab} support
@ 2018-09-17 19:33 Matt Weber
  2018-09-18 20:21 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Weber @ 2018-09-17 19:33 UTC (permalink / raw)
  To: buildroot

From: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>

 - Enables mod_sql which is required for quotatab
 - Adds options for enabling mod_quotatab and the sub-component
   file/LDAP/RADIUS/SQL modules
 - Copies over ftpasswd and ftpquota scripts if perl is enabled
   (These scripts aren't required and the feature works
    without them installed)

Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
 package/proftpd/Config.in  | 41 +++++++++++++++++++++++++++++++++++++++++
 package/proftpd/proftpd.mk | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/package/proftpd/Config.in b/package/proftpd/Config.in
index e7e3c13..7b742bf 100644
--- a/package/proftpd/Config.in
+++ b/package/proftpd/Config.in
@@ -26,4 +26,45 @@ config BR2_PACKAGE_PROFTPD_MOD_SFTP
 	help
 	  Compile ProFTPD with mod_sftp support
 
+config BR2_PACKAGE_PROFTPD_MOD_SQL
+	bool "mod_sql support"
+	help
+	  Compile ProFTPD with mode_sql support.
+
+config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB
+	bool "mod_quotatab support"
+	help
+	  Compile ProFTPD with mode_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"
+	depends on BR2_PACKAGE_PROFTPD_MOD_SQL
+	help
+	  Compile mod_quotatab with mod_quotatab_sql table.
+
+comment "mod_quotatab_sql needs mod_sql"
+	depends on !BR2_PACKAGE_PROFTPD_MOD_SQL
+endif
 endif
diff --git a/package/proftpd/proftpd.mk b/package/proftpd/proftpd.mk
index b02320f..1ae874a 100644
--- a/package/proftpd/proftpd.mk
+++ b/package/proftpd/proftpd.mk
@@ -42,6 +42,30 @@ else
 PROFTPD_CONF_OPTS += --disable-openssl
 endif
 
+ifeq ($(BR2_PACKAGE_PROFTPD_MOD_SQL),y)
+PROFTPD_MODULES += mod_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
@@ -62,6 +86,15 @@ PROFTPD_POST_CONFIGURE_HOOKS = PROFTPD_MAKENAMES
 
 PROFTPD_MAKE = $(MAKE1)
 
+#Install Perl based scripts in target
+ifeq ($(BR2_PACKAGE_PERL),y)
+define PROFTPD_INSTALL_PERL_BIN
+	$(INSTALL) -D -m 0755 $(@D)/contrib/ftpquota $(TARGET_DIR)/usr/sbin/ftpquota
+	$(INSTALL) -D -m 0755 $(@D)/contrib/ftpasswd $(TARGET_DIR)/usr/sbin/ftpasswd
+endef
+PROFTPD_POST_INSTALL_TARGET_HOOKS = PROFTPD_INSTALL_PERL_BIN
+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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] package/proftpd: add mod_{sql, quotatab} support
  2018-09-17 19:33 [Buildroot] [PATCH] package/proftpd: add mod_{sql, quotatab} support Matt Weber
@ 2018-09-18 20:21 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-09-18 20:21 UTC (permalink / raw)
  To: buildroot

Hello Matt,

On Mon, 17 Sep 2018 14:33:03 -0500, Matt Weber wrote:
> From: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
> 
>  - Enables mod_sql which is required for quotatab

It's required for mod_quotatab_sql, not mod_quotatab.

>  - Adds options for enabling mod_quotatab and the sub-component
>    file/LDAP/RADIUS/SQL modules
>  - Copies over ftpasswd and ftpquota scripts if perl is enabled
>    (These scripts aren't required and the feature works
>     without them installed)

If they aren't required, are they related to mod_sql and mod_quotatab ?
The question is: should this be done as part of the same patch, or as a
separate patch ?

> +config BR2_PACKAGE_PROFTPD_MOD_SQL
> +	bool "mod_sql support"
> +	help
> +	  Compile ProFTPD with mode_sql support.
> +
> +config BR2_PACKAGE_PROFTPD_MOD_QUOTATAB
> +	bool "mod_quotatab support"
> +	help
> +	  Compile ProFTPD with mode_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"
> +	depends on BR2_PACKAGE_PROFTPD_MOD_SQL

Please use:

	select BR2_PACKAGE_PROFTPD_MOD_SQL

> +	help
> +	  Compile mod_quotatab with mod_quotatab_sql table.
> +
> +comment "mod_quotatab_sql needs mod_sql"
> +	depends on !BR2_PACKAGE_PROFTPD_MOD_SQL

and drop this.

>  # configure script doesn't handle detection of %llu format string
> @@ -62,6 +86,15 @@ PROFTPD_POST_CONFIGURE_HOOKS = PROFTPD_MAKENAMES
>  
>  PROFTPD_MAKE = $(MAKE1)
>  
> +#Install Perl based scripts in target
> +ifeq ($(BR2_PACKAGE_PERL),y)
> +define PROFTPD_INSTALL_PERL_BIN
> +	$(INSTALL) -D -m 0755 $(@D)/contrib/ftpquota $(TARGET_DIR)/usr/sbin/ftpquota
> +	$(INSTALL) -D -m 0755 $(@D)/contrib/ftpasswd $(TARGET_DIR)/usr/sbin/ftpasswd
> +endef
> +PROFTPD_POST_INSTALL_TARGET_HOOKS = PROFTPD_INSTALL_PERL_BIN

Drop this hook, and do:

> +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_PERL_BIN)

instead.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-18 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 19:33 [Buildroot] [PATCH] package/proftpd: add mod_{sql, quotatab} support Matt Weber
2018-09-18 20:21 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.