[proftpd-mod-fsync] 01/01: New upstream release compatible to proftp 1.3.6.

Hilmar Preuße hilmar-guest at moszumanska.debian.org
Sun Mar 11 22:06:52 UTC 2018


This is an automated email from the git hooks/post-receive script.

hilmar-guest pushed a commit to branch master
in repository proftpd-mod-fsync.

commit 52643ac58a7523848f8c0a2de4e99e9a834634e8
Author: Hilmar Preuße <hille42 at web.de>
Date:   Sun Mar 11 23:06:31 2018 +0100

    New upstream release compatible to proftp 1.3.6.
---
 README.md                     | 16 ++++++++++++++
 debian/changelog              | 18 ++++++++++++---
 debian/compat                 |  2 +-
 debian/control                |  8 +++----
 debian/proftpd-mod-fsync.docs |  1 +
 debian/rules                  | 12 +++-------
 mod_fsync.c                   | 51 +++++++++++++++++++++----------------------
 7 files changed, 64 insertions(+), 44 deletions(-)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..fe8b3b8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+proftpd-mod_fsync
+=================
+
+Status
+------
+[![Build Status](https://travis-ci.org/Castaglia/proftpd-mod_fsync.svg?branch=master)](https://travis-ci.org/Castaglia/proftpd-mod_fsync)
+[![License](https://img.shields.io/badge/license-GPL-brightgreen.svg)](https://img.shields.io/badge/license-GPL-brightgreen.svg)
+
+Synopsis
+--------
+The `mod_fsync` module for ProFTPD allows for configuring when the
+`fsync(2)` system call is used to flush data to disk, for use on
+kernels/filesystems where the buffer cache algorithms are less than desirable.
+
+See the [mod_fsync.html](https://htmlpreview.github.io/?https://github.com/Castaglia/proftpd-mod_fsync/blob/master/mod_fsync.html) documentation for more
+details.
diff --git a/debian/changelog b/debian/changelog
index a65f6d1..d618dda 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,20 @@
-proftpd-mod-fsync (0.2-2) UNRELEASED; urgency=low
+proftpd-mod-fsync (0.3-1) UNRELEASED; urgency=medium
 
-  * Removing libacl1-dev as BD and increasing proftpd-dev to (>= 1.3.4~rc3-2~)
+  [ Fabrizio Regalli ]
+
+  * Removing libacl1-dev as BD
+
+  [ Hilmar Preuße ]
+
+  * New upstream release: can be built with ProFTP 1.3.6 (Closes: #892373)
+    * Bump BD version of proftp-dev to >= 1.3.6.
+  * Overhaul clean target in debian/rules to make it work
+  * Remove "DM-Upload-Allowed" field.
+  * Standards Version 4.1.3, no changes needed.
+  * debhelper compat 9, BD Version of debhelper adapted.
+  * Remove Fabrizio Regalli from Uploaders field.
 
- -- Fabrizio Regalli <fabreg at fabreg.it>  Thu, 13 Oct 2011 11:58:46 +0200
+ -- Francesco Paolo Lovergine <frankie at debian.org>  Sat, 10 Mar 2018 20:16:28 +0100
 
 proftpd-mod-fsync (0.2-1) unstable; urgency=low
 
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index a314069..8f4bb8e 100644
--- a/debian/control
+++ b/debian/control
@@ -2,11 +2,9 @@ Source: proftpd-mod-fsync
 Section: net
 Priority: optional
 Maintainer: ProFTPD Maintainance Team <pkg-proftpd-maintainers at lists.alioth.debian.org>
-Uploaders: Fabrizio Regalli <fabreg at fabreg.it>,
-    Francesco Paolo Lovergine <frankie at debian.org>
-DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7.0.50~), proftpd-dev (>= 1.3.4~rc3-2~)
-Standards-Version: 3.9.2
+Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
+Build-Depends: debhelper (>= 9), proftpd-dev (>= 1.3.6~)
+Standards-Version: 4.1.3
 Homepage: http://www.castaglia.org/proftpd/modules/mod_fsync.html
 Vcs-Git: git://git.debian.org/pkg-proftpd/proftpd-mod-fsync.git
 Vcs-Browser: http://git.debian.org/?p=pkg-proftpd/proftpd-mod-fsync.git;a=summary
diff --git a/debian/proftpd-mod-fsync.docs b/debian/proftpd-mod-fsync.docs
index 56a9282..247e964 100644
--- a/debian/proftpd-mod-fsync.docs
+++ b/debian/proftpd-mod-fsync.docs
@@ -1 +1,2 @@
+README.md
 mod_fsync.html
diff --git a/debian/rules b/debian/rules
index a1008fe..1d9a1d2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@ MODULE_NAME=mod_fsync
 DEBNAME=proftpd-mod-fsync
 
 %:
-	dh $@
+	dh $@ --without python-support
 
 override_dh_auto_build:
 	DESTDIR=$(CURDIR)/debian/$(DEBNAME) prxs -c $(MODULE_NAME).c
@@ -19,11 +19,5 @@ override_dh_gencontrol:
 	cat /usr/share/proftpd/proftpd-substvars >>$(CURDIR)/debian/$(DEBNAME).substvars
 	dh_gencontrol
 
-clean:
-	dh_clean
-	$(RM) $(MODULE_NAME).a *.o *.la *.lo
-	$(LIBTOOL) --mode=clean $(RM) "$(MODULE_NAME).o"
-	$(LIBTOOL) --mode=clean $(RM) `echo "$(MODULE_NAME).la" | sed 's/\.la$\/.lo/g'`
-
-distclean: clean
-	$(RM) -r .libs/ 
+override_dh_auto_clean:
+	DESTDIR=$(CURDIR)/debian/$(DEBNAME) prxs -d $(MODULE_NAME).c
diff --git a/mod_fsync.c b/mod_fsync.c
index 96df212..9855053 100644
--- a/mod_fsync.c
+++ b/mod_fsync.c
@@ -1,7 +1,6 @@
 /*
  * ProFTPD: mod_fsync -- a module for using fsync to periodically force writes
- *
- * Copyright (c) 2004-2005 TJ Saunders
+ * Copyright (c) 2004-2017 TJ Saunders
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,16 +21,14 @@
  * resulting executable, without including the source code for OpenSSL in the
  * source distribution.
  *
- * This is mod_fsync, contrib software for proftpd 1.2 and above.
+ * This is mod_fsync, contrib software for proftpd 1.3.x and above.
  * For more information contact TJ Saunders <tj at castaglia.org>.
- *
- * $Id: mod_fsync.c,v 1.3 2005/11/19 22:34:41 tj Exp tj $
  */
 
 #include "conf.h"
 #include "privs.h"
 
-#define MOD_FSYNC_VERSION		"mod_fsync/0.2"
+#define MOD_FSYNC_VERSION		"mod_fsync/0.3"
 
 /* Make sure the version of proftpd is as necessary. */
 #if PROFTPD_VERSION_NUMBER < 0x0001030001
@@ -55,7 +52,7 @@ static int fsync_close(pr_fh_t *fh, int fd) {
    * by the kernel.
    */
 
-  if (fsync_fds &&
+  if (fsync_fds != NULL &&
       fsync_fds->nelts > 0) {
     register unsigned int i;
     int *fds = fsync_fds->elts;
@@ -133,25 +130,26 @@ static int fsync_write(pr_fh_t *fh, int fd, const char *buf, size_t size) {
 
   fsync_nwritten += res;
 
-  if (fsync_fds &&
+  if (fsync_fds != NULL &&
       fsync_nwritten >= fsync_threshold) {
     register unsigned int i;
     int *fds = fsync_fds->elts;
 
     (void) pr_log_writefile(fsync_logfd, MOD_FSYNC_VERSION,
       "FsyncThreshold (%" PR_LU ") reached, syncing %d descriptors",
-      fsync_threshold, fsync_fds->nelts);
+      (pr_off_t) fsync_threshold, fsync_fds->nelts);
 
     for (i = 0; i < fsync_fds->nelts; i++) {
       if (fds[i] != -1) {
 
 #ifdef HAVE_FDATASYNC
-        if (fdatasync(fds[i]) < 0)
+        if (fdatasync(fds[i]) < 0) {
 #else
-        if (fsync(fds[i]) < 0)
+        if (fsync(fds[i]) < 0) {
 #endif /* HAVE_FDATASYNC */
           (void) pr_log_writefile(fsync_logfd, MOD_FSYNC_VERSION,
             "error sync'ing data for %d: %s", fds[i], strerror(errno));
+        }
       }
     }
 
@@ -167,21 +165,22 @@ static int fsync_write(pr_fh_t *fh, int fd, const char *buf, size_t size) {
 
 /* usage: FsyncEngine on|off */
 MODRET set_fsyncengine(cmd_rec *cmd) {
-  int bool = -1;
+  int engine = -1;
   config_rec *c;
 
   CHECK_ARGS(cmd, 1);
   CHECK_CONF(cmd, CONF_ROOT);
 
-  bool = get_boolean(cmd, 1);
-  if (bool == -1)
+  engine = get_boolean(cmd, 1);
+  if (engine == -1) {
     CONF_ERROR(cmd, "expected Boolean parameter");
+  }
 
   c = add_config_param(cmd->argv[0], 1, NULL);
-  c->argv[0] = pcalloc(c->pool, sizeof(int));
-  *((int *) c->argv[0]) = bool;
+  c->argv[0] = palloc(c->pool, sizeof(int));
+  *((int *) c->argv[0]) = engine;
 
-  return HANDLED(cmd);
+  return PR_HANDLED(cmd);
 }
 
 /* usage: FsyncLog path */
@@ -189,11 +188,12 @@ MODRET set_fsynclog(cmd_rec *cmd) {
   CHECK_ARGS(cmd, 1);
   CHECK_CONF(cmd, CONF_ROOT);
 
-  if (pr_fs_valid_path(cmd->argv[1]) < 0)
+  if (pr_fs_valid_path(cmd->argv[1]) < 0) {
     CONF_ERROR(cmd, "must be an absolute path");
+  }
 
   add_config_param_str(cmd->argv[0], 1, cmd->argv[1]);
-  return HANDLED(cmd);
+  return PR_HANDLED(cmd);
 }
 
 /* usage: FsyncThreshold size */
@@ -218,10 +218,10 @@ MODRET set_fsyncthreshold(cmd_rec *cmd) {
   }
 
   c = add_config_param(cmd->argv[0], 1, NULL);
-  c->argv[0] = pcalloc(c->pool, sizeof(off_t));
+  c->argv[0] = palloc(c->pool, sizeof(off_t));
   *((off_t *) c->argv[0]) = threshold;
 
-  return HANDLED(cmd);
+  return PR_HANDLED(cmd);
 }
 
 /* Event handlers
@@ -266,12 +266,12 @@ static void fsync_postparse_ev(const void *event_data, void *user_data) {
           ": unable to open FsyncLog '%s': %s", path, strerror(errno));
         break;
 
-      case LOG_SYMLINK:
+      case PR_LOG_SYMLINK:
         pr_log_debug(DEBUG1, MOD_FSYNC_VERSION
           ": unable to open FsyncLog '%s': %s", path, "is a symlink");
         break;
 
-      case LOG_WRITEABLE_DIR:
+      case PR_LOG_WRITABLE_DIR:
         pr_log_debug(DEBUG0, MOD_FSYNC_VERSION
           ": unable to open FsyncLog '%s': %s", path,
           "parent directory is world-writable");
@@ -280,8 +280,7 @@ static void fsync_postparse_ev(const void *event_data, void *user_data) {
   }
 
   c = find_config(main_server->conf, CONF_PARAM, "FsyncThreshold", FALSE);
-  if (!c) {
-
+  if (c == NULL) {
     /* This is a required directive. */
     (void) pr_log_writefile(fsync_logfd, MOD_FSYNC_VERSION,
       "missing required FsyncThreshold directive, disabling module");
@@ -292,7 +291,7 @@ static void fsync_postparse_ev(const void *event_data, void *user_data) {
 
   /* Register our custom filesystem. */
   fs = pr_register_fs(permanent_pool, "fsync", "/");
-  if (!fs) {
+  if (fs == NULL) {
     (void) pr_log_writefile(fsync_logfd, MOD_FSYNC_VERSION,
       "error registering FS: %s", strerror(errno));
     return;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-proftpd/proftpd-mod-fsync.git



More information about the Pkg-proftpd-maintainers mailing list