summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schury2015-07-22 13:55:54 +0200
committerDavid Schury2015-07-22 13:55:54 +0200
commit31b3b24ff654e46f6279dfeddec8df2f32658b71 (patch)
treeb4e82c356d887146ab6351e283c8070e5632958c
parent90c464618fd734c3abf6640e04ab9bd9feb17b57 (diff)
parent1c13cb2268c99230ccdd07a4bf928634f69fb909 (diff)
downloadaur-31b3b24ff654e46f6279dfeddec8df2f32658b71.tar.gz
Fixed issues with v1.99.14 and updated.
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD15
-rw-r--r--pidfile.patch63
3 files changed, 76 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a45cdeffbd2..ff0391a8068 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = inadyn-fork
pkgdesc = Simple dynamic DNS client - fork of the original INADYN implementation from Narcis Ilisei
- pkgver = 1.99.13
+ pkgver = 1.99.14
pkgrel = 2
url = http://troglobit.com/inadyn.html
arch = x86_64
@@ -15,14 +15,14 @@ pkgbase = inadyn-fork
conflicts = inadyn-mt
conflicts = inadyn-fork-git
backup = etc/inadyn.conf
- source = https://github.com/troglobit/inadyn/releases/download/1.99.13/inadyn-1.99.13.tar.xz
+ source = https://github.com/troglobit/inadyn/releases/download/1.99.14/inadyn-1.99.14.tar.xz
+ source = pidfile.patch
source = inadyn.conf
source = inadyn.service
- source = missing_changelog.patch
- sha256sums = 9e003790a0c3b4fbe10e5744adacc839ceca1a469e3bf461b464097b30a67c34
+ sha256sums = b2dfed3bb1340843105b6ba73c0bccc558bf7ead53f7f598cb47ec18de46e8d1
+ sha256sums = 71d639c5b31157f53ea7a25374330ae60aa6c59780462c16ec8ce6c87d8c9b2d
sha256sums = 919f87ea87b58e4ddfaf3346ffbcf899b8d9dcee5a0e9440e17e5db9552bba53
sha256sums = 4587f4ae2a4215f9ba67d5b3b7d0aa120a9ebd31677472fa68d8792f42d7135f
- sha256sums = 8925258f5ce0307c4e6a3280f9ce29d4df93775dbc91515b6ad1ae8448b803f4
pkgname = inadyn-fork
diff --git a/PKGBUILD b/PKGBUILD
index 1224705181c..e4cbc0fd9c1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=inadyn-fork
_name=inadyn
-pkgver=1.99.13
+pkgver=1.99.14
pkgrel=2
pkgdesc='Simple dynamic DNS client - fork of the original INADYN implementation from Narcis Ilisei'
url='http://troglobit.com/inadyn.html'
@@ -16,22 +16,23 @@ backup=('etc/inadyn.conf')
conflicts=('inadyn-opendns' 'inadyn' 'inadyn-mt' 'inadyn-fork-git')
provides=('inadyn')
source=(https://github.com/troglobit/inadyn/releases/download/$pkgver/${_name}-$pkgver.tar.xz
+ pidfile.patch
inadyn.conf
- inadyn.service
- missing_changelog.patch)
-sha256sums=('9e003790a0c3b4fbe10e5744adacc839ceca1a469e3bf461b464097b30a67c34'
+ inadyn.service)
+sha256sums=('b2dfed3bb1340843105b6ba73c0bccc558bf7ead53f7f598cb47ec18de46e8d1'
+ '71d639c5b31157f53ea7a25374330ae60aa6c59780462c16ec8ce6c87d8c9b2d'
'919f87ea87b58e4ddfaf3346ffbcf899b8d9dcee5a0e9440e17e5db9552bba53'
- '4587f4ae2a4215f9ba67d5b3b7d0aa120a9ebd31677472fa68d8792f42d7135f'
- '8925258f5ce0307c4e6a3280f9ce29d4df93775dbc91515b6ad1ae8448b803f4')
+ '4587f4ae2a4215f9ba67d5b3b7d0aa120a9ebd31677472fa68d8792f42d7135f')
prepare(){
cd ${_name}-$pkgver
- patch -Np1 -i ../missing_changelog.patch
+ patch -Np1 -i ../pidfile.patch
}
build(){
cd ${_name}-$pkgver
./configure --prefix=/usr --sbindir=/usr/bin --enable-openssl
+ export prefix=/usr # libite needs this
make
}
diff --git a/pidfile.patch b/pidfile.patch
new file mode 100644
index 00000000000..596fa9b6787
--- /dev/null
+++ b/pidfile.patch
@@ -0,0 +1,63 @@
+diff --git a/src/os.c b/src/os.c
+index 66c3ada..246c10f 100644
+--- a/src/os.c
++++ b/src/os.c
+@@ -33,7 +33,6 @@
+ #include "debug.h"
+ #include "ddns.h"
+ #include "cache.h"
+-#include "libite/lite.h"
+
+ #define MAXSTRING 1024
+
+@@ -421,6 +420,39 @@ static int mkparentdir(char *file)
+ return rc;
+ }
+
++static void pidexit(void)
++{
++ if (pidfile_path) {
++ unlink(pidfile_path);
++ free(pidfile_path);
++ pidfile_path = NULL;
++ }
++}
++
++/* Continue using old pidfile fn for Inadyn 1.x series,
++ * incompatible semantics with OpenBSD version. */
++static int old_pidfile(char *file)
++{
++ FILE *fp;
++
++ /* Ignore any errors, we may not be allowed to create the dir,
++ * but still be able to create/overwrite the pidfile. */
++ mkparentdir(file);
++
++ fp = fopen(file, "w");
++ if (!fp) {
++ logit(LOG_ERR, "Failed creating pidfile %s: %s", file, strerror(errno));
++ return RC_FILE_IO_ACCESS_ERROR;
++ }
++
++ fprintf(fp, "%u\n", getpid());
++ fclose(fp);
++
++ atexit(pidexit);
++
++ return 0;
++}
++
+ /* Create pid and cache file repository, make sure we can write to it. If
+ * we are restarted we cannot otherwise make sure we've not already updated
+ * the IP -- and the user will be locked-out of their DDNS server provider
+@@ -440,8 +472,8 @@ int os_check_perms(void *UNUSED(arg))
+ return RC_FILE_IO_ACCESS_ERROR;
+ }
+
+- /* Not creating a pidfile is OK, the cache file is the critical point. */
+- pidfile(pidfile_path);
++ if (old_pidfile(pidfile_path))
++ logit(LOG_WARNING, "Failed creating pidfile %s: %m", pidfile_path);
+
+ return 0;
+ }