2024-02-26 12:15:49 +00:00
|
|
|
|
#
|
|
|
|
|
|
# spec file for package daemonize
|
|
|
|
|
|
#
|
2024-02-26 16:47:59 +00:00
|
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2024-02-26 12:15:49 +00:00
|
|
|
|
#
|
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
2024-02-26 16:47:59 +00:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2024-02-26 12:15:49 +00:00
|
|
|
|
#
|
|
|
|
|
|
|
2024-02-26 16:47:59 +00:00
|
|
|
|
|
|
|
|
|
|
Name: daemonize
|
|
|
|
|
|
Version: 1.7.8
|
|
|
|
|
|
Release: 0
|
|
|
|
|
|
Summary: Command line utility to run any program as a Unix daemon
|
2024-02-27 13:55:00 +00:00
|
|
|
|
License: BSD-3-Clause
|
2024-02-27 14:37:27 +00:00
|
|
|
|
Group: System/Console
|
2024-02-26 16:47:59 +00:00
|
|
|
|
URL: https://github.com/bmc/daemonize
|
|
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
2025-07-09 08:42:29 +00:00
|
|
|
|
# https://github.com/bmc/daemonize/commit/eaf4746d47e171e7b8655690eb1e91fc216f2866
|
|
|
|
|
|
Patch0: daemonize-gcc15.patch
|
2024-02-26 12:15:49 +00:00
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
daemonize runs a command as a Unix daemon. As defined in W. Richard Stevens'
|
|
|
|
|
|
1990 book, Unix Network Programming (Addison-Wesley, 1990), a daemon is "a
|
|
|
|
|
|
process that executes 'in the background' (i.e., without an associated
|
|
|
|
|
|
terminal or login shell) either waiting for some event to occur, or waiting
|
|
|
|
|
|
to perform some specified task on a periodic basis." Upon startup, a typical
|
|
|
|
|
|
daemon program will:
|
|
|
|
|
|
|
|
|
|
|
|
- Close all open file descriptors (especially standard input, standard output
|
|
|
|
|
|
and standard error)
|
|
|
|
|
|
- Change its working directory to the root filesystem, to ensure that it
|
|
|
|
|
|
doesn’t tie up another filesystem and prevent it from being unmounted
|
|
|
|
|
|
- Reset its umask value
|
|
|
|
|
|
- Run in the background (i.e., fork)
|
|
|
|
|
|
- Disassociate from its process group (usually a shell), to insulate itself
|
|
|
|
|
|
from signals (such as HUP) sent to the process group
|
|
|
|
|
|
- Ignore all terminal I/O signals
|
|
|
|
|
|
- Disassociate from the control terminal (and take steps not to reacquire one)
|
|
|
|
|
|
- Handle any SIGCLD signals
|
|
|
|
|
|
|
|
|
|
|
|
Most programs that are designed to be run as daemons do that work for
|
|
|
|
|
|
themselves. However, you’ll occasionally run across one that does not.
|
|
|
|
|
|
When you must run a daemon program that does not properly make itself into a
|
|
|
|
|
|
true Unix daemon, you can use daemonize to force it to run as a true daemon.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2025-07-09 08:42:29 +00:00
|
|
|
|
%autosetup -p1
|
2024-02-26 12:15:49 +00:00
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
sed -i -e 's|/sbin|/bin|' Makefile.in
|
|
|
|
|
|
%configure
|
2024-02-26 16:47:59 +00:00
|
|
|
|
%make_build
|
2024-02-26 12:15:49 +00:00
|
|
|
|
|
|
|
|
|
|
%install
|
2024-02-26 16:47:59 +00:00
|
|
|
|
%make_install
|
2024-02-26 12:15:49 +00:00
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
|
%license LICENSE.md
|
|
|
|
|
|
%{_bindir}/%{name}
|
2024-02-26 16:47:59 +00:00
|
|
|
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
2024-02-26 12:15:49 +00:00
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
|
|