From: Dietmar Maurer Date: Tue, 17 Jul 2012 06:34:52 +0000 (+0200) Subject: update to latest master branch, bump version to 0.4.0-2 X-Git-Url: https://git.proxmox.com/?p=pve-sheepdog.git;a=commitdiff_plain;h=91080f123cd97f5a9dc5020cb064acce6c2123ea update to latest master branch, bump version to 0.4.0-2 --- diff --git a/Makefile b/Makefile index 5895fd9..968dcb4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ RELEASE=2.1 PACKAGE=pve-sheepdog -PKGREL=1 +PKGREL=2 SDVER=0.4.0 DEB=${PACKAGE}_${SDVER}-${PKGREL}_amd64.deb @@ -22,7 +22,7 @@ ${DEB} deb: ${SDSRC} ${SDSRC} download: rm -rf ${SDDIR} sheepdog.git git clone git://github.com/collie/sheepdog.git sheepdog.git - cd sheepdog.git; git checkout -b local v${SDVER} + #cd sheepdog.git; git checkout -b local v${SDVER} rsync -a --exclude .git --exclude .gitignore sheepdog.git/ ${SDDIR} tar czf ${SDSRC}.tmp ${SDDIR} rm -rf ${SDDIR} diff --git a/debian/changelog b/debian/changelog index 315e575..eb11040 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pve-sheepdog (0.4.0-2) unstable; urgency=low + + * update to master branch + + -- Proxmox Support Team Tue, 17 Jul 2012 08:33:58 +0200 + pve-sheepdog (0.4.0-1) unstable; urgency=low * update to v0.4.0 diff --git a/debian/patches/add-pid-file-option.patch b/debian/patches/add-pid-file-option.patch deleted file mode 100644 index b32c1b8..0000000 --- a/debian/patches/add-pid-file-option.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/sheep/sheep.c b/sheep/sheep.c -index 7d1e853..675e729 100644 ---- a/sheep/sheep.c -+++ b/sheep/sheep.c -@@ -19,6 +19,10 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - - #include "sheep_priv.h" - #include "trace/trace.h" -@@ -44,10 +48,11 @@ static struct option const long_options[] = { - {"vnodes", required_argument, NULL, 'v'}, - {"enable-cache", no_argument, NULL, 'w'}, - {"zone", required_argument, NULL, 'z'}, -+ {"pidfile", required_argument, NULL, 'P'}, - {NULL, 0, NULL, 0}, - }; - --static const char *short_options = "c:dDfghl:op:v:wy:z:"; -+static const char *short_options = "c:dDfghl:op:P:v:wy:z:"; - - static void usage(int status) - { -@@ -68,6 +73,7 @@ Options:\n\ - -l, --loglevel specify the level of logging detail\n\ - -o, --stdout log to stdout instead of shared logger\n\ - -p, --port specify the TCP port on which to listen\n\ -+ -P, --pidfile create a pid file\n\ - -v, --vnodes specify the number of virtual nodes\n\ - -w, --enable-cache enable object cache\n\ - -y, --myaddr specify the address advertised to other sheep\n\ -@@ -91,6 +97,31 @@ Available log levels:\n\ - 7 SDOG_DEBUG debugging messages\n"); - } - -+static int create_pidfile(const char *filename) -+{ -+ int fd = -1; -+ int len; -+ char buffer[128]; -+ -+ if ((fd = open(filename, O_RDWR|O_CREAT|O_SYNC, 0600)) == -1) { -+ return -1; -+ } -+ -+ if (lockf(fd, F_TLOCK, 0) == -1) { -+ close(fd); -+ return -1; -+ } -+ -+ len = snprintf(buffer, sizeof(buffer), "%d\n", getpid()); -+ if (write(fd, buffer, len) != len) { -+ close(fd); -+ return -1; -+ } -+ -+ /* keep pidfile open & locked forever */ -+ return 0; -+} -+ - static struct cluster_info __sys; - struct cluster_info *sys = &__sys; - -@@ -110,6 +141,7 @@ int main(int argc, char **argv) - char *p; - struct cluster_driver *cdrv; - int enable_write_cache = 0; /* disabled by default */ -+ char *pid_file = NULL; - - signal(SIGPIPE, SIG_IGN); - -@@ -124,6 +156,9 @@ int main(int argc, char **argv) - exit(1); - } - break; -+ case 'P': -+ pid_file = optarg; -+ break; - case 'f': - is_daemon = 0; - break; -@@ -264,6 +299,11 @@ int main(int argc, char **argv) - if (ret) - exit(1); - -+ if (pid_file && (create_pidfile(pid_file) != 0)) { -+ fprintf(stderr, "failed to pid file '%s' - %s\n", pid_file, strerror(errno)); -+ exit(1); -+ } -+ - if (chdir(dir) < 0) { - fprintf(stderr, "failed to chdir to %s: %m\n", dir); - exit(1); -@@ -279,5 +319,9 @@ int main(int argc, char **argv) - leave_cluster(); - log_close(); - -+ if (pid_file) { -+ unlink(pid_file); -+ } -+ - return 0; - } diff --git a/debian/patches/series b/debian/patches/series index 9b66781..d0de944 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ disable-test-suite.patch fix-manpage-section.patch do-not-install-generic-init-script.patch -add-pid-file-option.patch diff --git a/sheepdog-0.4.0.tar.gz b/sheepdog-0.4.0.tar.gz index f908e64..2fb1c10 100644 Binary files a/sheepdog-0.4.0.tar.gz and b/sheepdog-0.4.0.tar.gz differ