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
This commit is contained in:
OBS User autobuild 2010-10-07 23:20:38 +00:00 committed by Git OBS Bridge
parent 6a8ed933fd
commit 76698758ba
6 changed files with 41 additions and 143 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a0ebf11385280114b210ee056382f8f39fd11b786560116573602fa90ae1010
size 272570

3
libdaemon-0.14.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ca0c90323192503f5289e074f84d72d66091b87ea1ecad04f3f97b938d30cbf
size 278637

View File

@ -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

View File

@ -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 <mzqnrzba (at) 0pointer (dot) de>
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 <mzqnrzba (at) 0pointer (dot) de>
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 <mzqnrzba (at) 0pointer (dot) de>
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