From 76698758ba5a43b5f13d29d3633a7850e609a6e866474403762656ec019d2de9 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 7 Oct 2010 23:20:38 +0000 Subject: [PATCH] Accepting request 49791 from devel:libraries:c_c++ Copy from devel:libraries:c_c++/libdaemon based on submit request 49791 from user prusnak OBS-URL: https://build.opensuse.org/request/show/49791 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdaemon?expand=0&rev=18 --- libdaemon-0.12-bnc449728.diff | 18 ------ libdaemon-0.13-bnc469342.diff | 33 ---------- libdaemon-0.13.tar.bz2 | 3 - libdaemon-0.14.tar.bz2 | 3 + libdaemon.changes | 14 +++++ libdaemon.spec | 113 ++++++++-------------------------- 6 files changed, 41 insertions(+), 143 deletions(-) delete mode 100644 libdaemon-0.12-bnc449728.diff delete mode 100644 libdaemon-0.13-bnc469342.diff delete mode 100644 libdaemon-0.13.tar.bz2 create mode 100644 libdaemon-0.14.tar.bz2 diff --git a/libdaemon-0.12-bnc449728.diff b/libdaemon-0.12-bnc449728.diff deleted file mode 100644 index 0839fa2..0000000 --- a/libdaemon-0.12-bnc449728.diff +++ /dev/null @@ -1,18 +0,0 @@ -Index: b/libdaemon/dpid.c -=================================================================== ---- a/libdaemon/dpid.c -+++ b/libdaemon/dpid.c -@@ -215,11 +215,12 @@ int daemon_pid_file_create(void) { - goto finish; - } - - snprintf(t, sizeof(t), "%lu\n", (unsigned long) getpid()); - -- if (write(fd, t, l = strlen(t)) != l) { -+ l = strlen(t); -+ if (write(fd, t, l) != l) { - int saved_errno = errno; - daemon_log(LOG_WARNING, "write(): %s", strerror(errno)); - unlink(fn); - errno = saved_errno; - goto finish; diff --git a/libdaemon-0.13-bnc469342.diff b/libdaemon-0.13-bnc469342.diff deleted file mode 100644 index 6eb5f91..0000000 --- a/libdaemon-0.13-bnc469342.diff +++ /dev/null @@ -1,33 +0,0 @@ - -Index: b/libdaemon/dfork.c -=================================================================== ---- a/libdaemon/dfork.c -+++ b/libdaemon/dfork.c -@@ -529,10 +529,13 @@ int daemon_close_allv(const int except_f - closedir(d); - errno = saved_errno; - - return -1; - } -+ -+ if (fd == _daemon_retval_pipe[0]) -+ _daemon_retval_pipe[0] = -1; /* mark as closed */ - } - - closedir(d); - return 0; - } -@@ -561,10 +564,13 @@ int daemon_close_allv(const int except_f - if (found) - continue; - - if (close(fd) < 0 && errno != EBADF) - return -1; -+ -+ if (fd == _daemon_retval_pipe[0]) -+ _daemon_retval_pipe[0] = -1; /* mark as closed */ - } - - return 0; - } - diff --git a/libdaemon-0.13.tar.bz2 b/libdaemon-0.13.tar.bz2 deleted file mode 100644 index 64acec0..0000000 --- a/libdaemon-0.13.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1a0ebf11385280114b210ee056382f8f39fd11b786560116573602fa90ae1010 -size 272570 diff --git a/libdaemon-0.14.tar.bz2 b/libdaemon-0.14.tar.bz2 new file mode 100644 index 0000000..4765cfc --- /dev/null +++ b/libdaemon-0.14.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ca0c90323192503f5289e074f84d72d66091b87ea1ecad04f3f97b938d30cbf +size 278637 diff --git a/libdaemon.changes b/libdaemon.changes index 513ffe2..9da5392 100644 --- a/libdaemon.changes +++ b/libdaemon.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Oct 5 11:06:05 CEST 2010 - vuntz@opensuse.org + +- Update to version 0.14: + + add daemon_set_verbosity() call + + make daemon_nonblock() actually work + + numerous updates + + build fixes +- Drop libdaemon-0.12-bnc449728.diff, + libdaemon-0.13-bnc469342.diff: fixed upstream. +- Improve descriptions. +- Do not set CFLAGS since we use %configure. +- Use %makeinstall. + ------------------------------------------------------------------- Sat Apr 24 11:38:19 UTC 2010 - coolo@novell.com diff --git a/libdaemon.spec b/libdaemon.spec index 3eb7050..6bda14d 100644 --- a/libdaemon.spec +++ b/libdaemon.spec @@ -1,5 +1,5 @@ # -# spec file for package libdaemon (Version 0.13) +# spec file for package libdaemon (Version 0.14) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,18 +19,21 @@ Name: libdaemon -BuildRequires: doxygen pkg-config Url: http://0pointer.de/lennart/projects/libdaemon/ -Version: 0.13 -Release: 4 +Version: 0.14 +Release: 1 Summary: Lightweight C library That Eases the Writing of UNIX Daemons License: LGPLv2.1+ Group: System/Libraries Source: %{name}-%{version}.tar.bz2 -Patch2: libdaemon-0.12-bnc449728.diff -Patch3: libdaemon-0.13-bnc469342.diff +BuildRequires: doxygen +BuildRequires: pkg-config BuildRoot: %{_tmppath}/%{name}-%{version}-build +%description +libdaemon is a lightweight C library that eases the writing of UNIX +daemons. + %package -n libdaemon0 License: LGPLv2.1+ Summary: Lightweight C library That Eases the Writing of UNIX Daemons @@ -41,105 +44,36 @@ Obsoletes: %{name} <= 0.12 %description -n libdaemon0 libdaemon is a lightweight C library that eases the writing of UNIX -daemons. It consists of the following parts: - -* A wrapper around fork() that does the correct daemonization - procedure of a process - -* A wrapper around syslog() for simpler log output compatible with - syslog or STDERR - -* An API for writing PID files - -* An API for serializing UNIX signals into a pipe for usage with - select() or poll() - -* An API for running subprocesses with STDOUT and STDERR redirected - to syslog - -APIs like these are used in most daemon software available. It is not -that simple to get it done right and code duplication is not a goal. - - - -Authors: --------- - Lennart Poettering +daemons. %package devel License: GPLv2+ -Summary: libdaemon is a lightweight C library that eases the writing of UNIX daemons. +Summary: Lightweight C library That Eases the Writing of UNIX Daemons Group: Development/Libraries/C and C++ -Requires: libdaemon0 = %{version} glibc-devel - -%description -libdaemon is a lightweight C library that eases the writing of UNIX -daemons. It consists of the following parts: - -* A wrapper around fork() that does the correct daemonization - procedure of a process - -* A wrapper around syslog() for simpler log output compatible with - syslog or STDERR - -* An API for writing PID files - -* An API for serializing UNIX signals into a pipe for usage with - select() or poll() - -* An API for running subprocesses with STDOUT and STDERR redirected - to syslog - -APIs like these are used in most daemon software available. It is not -that simple to get it done right and code duplication is not a goal. - - - -Authors: --------- - Lennart Poettering +Requires: libdaemon0 = %{version} +Requires: glibc-devel %description devel libdaemon is a lightweight C library that eases the writing of UNIX -daemons. It consists of the following parts: - -* A wrapper around fork() which does the correct daemonization - procedure of a process - -* A wrapper around syslog() for simpler and compatible log output to - Syslog or STDERR - -* An API for writing PID files - -* An API for serializing UNIX signals into a pipe for usage with - select() or poll() - -* An API for running subprocesses with STDOUT and STDERR redirected - to syslog. - -APIs like these are used in most daemon software available. It is not -that simple to get it done right and code duplication is not a goal. - - - -Authors: --------- - Lennart Poettering +daemons. %prep %setup -q -%patch2 -p1 -%patch3 -p1 %build -export CFLAGS="$RPM_OPT_FLAGS" -%configure --libdir=/%{_lib} --disable-lynx --disable-static --with-pic +%configure \ + --disable-static --with-pic \ + --libdir=/%{_lib} \ + --disable-lynx %{__make} %{?jobs:-j%jobs} %install -make install DESTDIR=$RPM_BUILD_ROOT +%makeinstall rm -f %{buildroot}/%{_lib}/libdaemon.la -%{__install} -d -m 0755 %{buildroot}%{_libdir}/pkgconfig +# We don't care about the HTML README +rm %{buildroot}%{_datadir}/doc/libdaemon/{README.html,style.css} +# Move back some files to /usr +%{__install} -d -m 0755 %{buildroot}%{_libdir}/pkgconfig %{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/%{name}.so) %{buildroot}%{_libdir}/%{name}.so %{__rm} -v %{buildroot}/%{_lib}/%{name}.so %{__mv} -v %{buildroot}/%{_lib}/pkgconfig/%{name}.pc %{buildroot}%{_libdir}/pkgconfig @@ -153,6 +87,7 @@ rm -rf $RPM_BUILD_ROOT %files -n libdaemon0 %defattr (-,root,root) +%doc LICENSE README /%{_lib}/libdaemon.so.0* %files devel