[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipfire-scm
Subject:    [git.ipfire.org] IPFire 2.x development tree branch, next, updated. a722eae9dd0067eead8898fa2a53c954
From:       git () ipfire ! org (Michael Tremer)
Date:       2015-07-16 10:02:30
Message-ID: 20150716100230.C956B2239C () argus ! ipfire ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  a722eae9dd0067eead8898fa2a53c95469e10226 (commit)
      from  b720e702885654c142baaff07e3f9a8979c78d5c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a722eae9dd0067eead8898fa2a53c95469e10226
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Jul 16 12:01:40 2015 +0200

    ddns: Update to version 008
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 .../{oldcore/90 => core/93}/filelists/ddns         |  0
 lfs/ddns                                           |  7 +-
 .../001-ddns-007-perform-lazy-database-init.patch  | 89 ----------------------
 ...-also-open-database-for-search-operations.patch | 40 ----------
 4 files changed, 2 insertions(+), 134 deletions(-)
 copy config/rootfiles/{oldcore/90 => core/93}/filelists/ddns (100%)
 delete mode 100644 src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch
 delete mode 100644 src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch


Difference in files:
diff --git a/config/rootfiles/core/93/filelists/ddns \
b/config/rootfiles/core/93/filelists/ddns new file mode 120000
index 0000000..7395164
--- /dev/null
+++ b/config/rootfiles/core/93/filelists/ddns
@@ -0,0 +1 @@
+../../../common/ddns
\ No newline at end of file
diff --git a/lfs/ddns b/lfs/ddns
index 463ae28..b692d9a 100644
--- a/lfs/ddns
+++ b/lfs/ddns
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 007
+VER        = 008
 
 THISAPP    = ddns-$(VER)
 DL_FILE    = $(THISAPP).tar.xz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 44f63cecc36db0d9ffddfa4bca7983ae
+$(DL_FILE)_MD5 = f8b9441f18c2667d440d5416ec2e0011
 
 install : $(TARGET)
 
@@ -71,9 +71,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
 
-	cd $(DIR_APP) && patch -Np1 < \
                $(DIR_SRC)/src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch
                
-	cd $(DIR_APP) && patch -Np1 < \
$(DIR_SRC)/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch
                
-
 	cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
 	cd $(DIR_APP) && ./configure \
 		--prefix=/usr \
diff --git a/src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch \
b/src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch deleted file mode \
100644 index c9b893e..0000000
--- a/src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-commit 63e16feedea3639ef1f21fecbff9ed2ae256728b
-Author: Michael Tremer <michael.tremer@ipfire.org>
-Date:   Sat Apr 25 13:18:07 2015 +0200
-
-    Perform lazy initialization of the database
-    
-    The database will only be initialized when it is actually
-    needed. That makes starting up ddns a bit faster and allows
-    us to execute it as non-root for simple commands like
-    "list-providers".
-    
-    If the database path is not writable at all, the database
-    feature is disable and an error message is logged. This
-    will hopefully help us to perform the DNS update even when
-    there is a local misconfiguration.
-
-diff --git a/src/ddns/database.py b/src/ddns/database.py
-index 5d4ffc9..42c3433 100644
---- a/src/ddns/database.py
-+++ b/src/ddns/database.py
-@@ -20,7 +20,7 @@
- ###############################################################################
- 
- import datetime
--import os.path
-+import os
- import sqlite3
- 
- # Initialize the logger.
-@@ -31,9 +31,11 @@ logger.propagate = 1
- class DDNSDatabase(object):
- 	def __init__(self, core, path):
- 		self.core = core
-+		self.path = path
- 
--		# Open the database file
--		self._db = self._open_database(path)
-+		# We won't open the connection to the database directly
-+		# so that we do not do it unnecessarily.
-+		self._db = None
- 
- 	def __del__(self):
- 		self._close_database()
-@@ -46,7 +48,7 @@ class DDNSDatabase(object):
- 		conn = sqlite3.connect(path, \
                detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
- 		conn.isolation_level = None
- 
--		if not exists:
-+		if not exists and self.is_writable():
- 			logger.debug("Initialising database layout")
- 			c = conn.cursor()
- 			c.executescript("""
-@@ -68,12 +70,25 @@ class DDNSDatabase(object):
- 
- 		return conn
- 
-+	def is_writable(self):
-+		# Check if the database file exists and is writable.
-+		ret = os.access(self.path, os.W_OK)
-+		if ret:
-+			return True
-+
-+		# If not, we check if we are able to write to the directory.
-+		# In that case the database file will be created in _open_database().
-+		return os.access(os.path.dirname(self.path), os.W_OK)
-+
- 	def _close_database(self):
- 		if self._db:
- 			self._db_close()
- 			self._db = None
- 
- 	def _execute(self, query, *parameters):
-+		if self._db is None:
-+			self._db = self._open_database(self.path)
-+
- 		c = self._db.cursor()
- 		try:
- 			c.execute(query, parameters)
-@@ -81,6 +96,10 @@ class DDNSDatabase(object):
- 			c.close()
- 
- 	def add_update(self, hostname, status, message=None):
-+		if not self.is_writable():
-+			logger.warning("Could not log any updates because the database is not writable")
-+			return
-+
- 		self._execute("INSERT INTO updates(hostname, status, message, timestamp) \
- 			VALUES(?, ?, ?, ?)", hostname, status, message, datetime.datetime.utcnow())
- 
diff --git a/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch \
b/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch \
deleted file mode 100644 index 19534f3..0000000
--- a/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-commit f62fa5baffe2d225604460ecd03b8159b987df8f
-Author: Michael Tremer <michael.tremer@ipfire.org>
-Date:   Sun Apr 26 20:15:33 2015 +0200
-
-    database: Open database for the search operations, too
-
-diff --git a/src/ddns/database.py b/src/ddns/database.py
-index 42c3433..70a7363 100644
---- a/src/ddns/database.py
-+++ b/src/ddns/database.py
-@@ -122,6 +122,9 @@ class DDNSDatabase(object):
- 		"""
- 			Returns the timestamp of the last update (with the given status code).
- 		"""
-+		if self._db is None:
-+			self._db = self._open_database(self.path)
-+
- 		c = self._db.cursor()
- 
- 		try:
-@@ -141,6 +144,9 @@ class DDNSDatabase(object):
- 		"""
- 			Returns the update status of the last update.
- 		"""
-+		if self._db is None:
-+			self._db = self._open_database(self.path)
-+
- 		c = self._db.cursor()
- 
- 		try:
-@@ -156,6 +162,9 @@ class DDNSDatabase(object):
- 		"""
- 			Returns the reason string for the last failed update (if any).
- 		"""
-+		if self._db is None:
-+			self._db = self._open_database(self.path)
-+
- 		c = self._db.cursor()
- 
- 		try:


hooks/post-receive
--
IPFire 2.x development tree
_______________________________________________
IPFire-SCM mailing list
IPFire-SCM@lists.ipfire.org
http://lists.ipfire.org/mailman/listinfo/ipfire-scm


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic