All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] *** uuidd: refactoring & systemd support + build-sys fixes ***
@ 2012-03-29 16:45 Petr Uzel
  2012-03-29 16:45 ` [PATCH 01/20] uuidd: use UUIDD_OP_GETPID instead of magic number Petr Uzel
                   ` (19 more replies)
  0 siblings, 20 replies; 35+ messages in thread
From: Petr Uzel @ 2012-03-29 16:45 UTC (permalink / raw)
  To: util-linux

Hi all.

The primary goal of the patch series below was to implement systemd support in
for uuidd as it was one of the items on Karel's wish list for util-linux-2.22 [1].

First two patches are just minor cleanups I came across while working on the code.

Then I added --no-pid, --no-fork, --socket-activation and --keep-privs options
to make uuidd play nicely with systemd (or any compatible init system should
there be any).  Note that --socket-activation automatically implies all other
mentioned options. With the socket activation mode [2], uuidd is started on
demand when the first request comes to its request socket and quits after 60
seconds of inactivity (can be overridden in the provided unit files).

To make socket-activation work, the uuidd has to be compiled with the
sd-daemon.c files.  This is controlled via the --enable-uuidd-socket-activation
configure option. The second alternative would be to link with libsystemd
shared library, but after discussion with Karel I decided not to do it to avoid
some build dependency cycles between systemd and util-linux (to make life
easier for distributions).

I tried not to break or change the behavior of any existing uuidd options.

Next, there is new configure option for libuuid, the
--disable-libuuid-exec-uuidd, which prevents uuidd daemon to be executed
from the libuuid library, as it does not make sense with socket-activated
uuidd. I did not change the former libuuid behavior (exec the daemon), but when
building for systemd-based systems, it should be configured with 
--disable-libuuid-exec-uuidd.

Lastly, in order to make 'make distcheck' work (and verify the changes I did), I
fixed some minor issues in the build system.

I'd very much welcome any feedback/comments.

Thanks,

	Petr

[1] http://www.spinics.net/lists/util-linux-ng/msg05793.html
[2] http://0pointer.de/blog/projects/socket-activation.html



Petr Uzel (20):
  uuidd: use UUIDD_OP_GETPID instead of magic number
  uuidd: remove useless initialization of cleanup_socket
  uuidd: factor out pidfile creation into separate function
  uuidd: implement --no-pid option
  uuidd: implement --no-fork option
  uuidd: factor out socket creation into separate function
  uuidd: implement --socket-activation option
  uuidd: print all debugging information to stderr
  uuidd: factor out dropping of privileges into separate function
  uuidd: make drop_privs true by default in main()
  uuidd: introduce --keep-privs option
  uuidd: --socket-activation implies --keep-privs
  uuidd: add systemd unit files
  libuuid: use EXIT_FAILURE
  libuuid: implement --disable-libuuid-exec-uuidd configure option
  libuuid: fix typo in uuid_compare manpage
  build-sys: run distcheck with verbose make rules
  build-sys: add ttyutils.h to dist
  build-sys: add fsprobe.h to dist
  build-sys: fix installation of uuidd units with make distcheck

 Makefile.am                 |    4 +-
 configure.ac                |   35 +++
 include/Makefile.am         |    1 +
 libuuid/man/uuid_compare.3  |    2 +-
 libuuid/src/gen_uuid.c      |   11 +-
 misc-utils/.gitignore       |    2 +-
 misc-utils/Makefile.am      |   17 ++-
 misc-utils/sd-daemon.c      |  530 +++++++++++++++++++++++++++++++++++++++++++
 misc-utils/sd-daemon.h      |  282 +++++++++++++++++++++++
 misc-utils/uuidd.8          |   17 ++
 misc-utils/uuidd.c          |  295 +++++++++++++++++-------
 misc-utils/uuidd.service.in |    9 +
 misc-utils/uuidd.socket     |    8 +
 mount/Makefile.am           |    2 +-
 14 files changed, 1121 insertions(+), 94 deletions(-)
 create mode 100644 misc-utils/sd-daemon.c
 create mode 100644 misc-utils/sd-daemon.h
 create mode 100644 misc-utils/uuidd.service.in
 create mode 100644 misc-utils/uuidd.socket

-- 
1.7.7


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2012-04-05  8:23 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 16:45 [PATCH 00/20] *** uuidd: refactoring & systemd support + build-sys fixes *** Petr Uzel
2012-03-29 16:45 ` [PATCH 01/20] uuidd: use UUIDD_OP_GETPID instead of magic number Petr Uzel
2012-03-29 16:45 ` [PATCH 02/20] uuidd: remove useless initialization of cleanup_socket Petr Uzel
2012-03-29 16:45 ` [PATCH 03/20] uuidd: factor out pidfile creation into separate function Petr Uzel
2012-03-29 16:45 ` [PATCH 04/20] uuidd: implement --no-pid option Petr Uzel
2012-04-03 12:51   ` Karel Zak
2012-04-05  7:36     ` Petr Uzel
2012-03-29 16:45 ` [PATCH 05/20] uuidd: implement --no-fork option Petr Uzel
2012-03-29 16:45 ` [PATCH 06/20] uuidd: factor out socket creation into separate function Petr Uzel
2012-03-29 16:45 ` [PATCH 07/20] uuidd: implement --socket-activation option Petr Uzel
2012-04-03 13:03   ` Karel Zak
2012-04-05  7:46     ` Petr Uzel
2012-03-29 16:45 ` [PATCH 08/20] uuidd: print all debugging information to stderr Petr Uzel
2012-03-29 16:45 ` [PATCH 09/20] uuidd: factor out dropping of privileges into separate function Petr Uzel
2012-03-29 16:45 ` [PATCH 10/20] uuidd: make drop_privs true by default in main() Petr Uzel
2012-03-29 21:29   ` Ted Ts'o
2012-03-31 16:38     ` Petr Uzel
2012-03-29 16:45 ` [PATCH 11/20] uuidd: introduce --keep-privs option Petr Uzel
2012-04-03 13:32   ` Karel Zak
2012-04-05  7:48     ` Petr Uzel
2012-03-29 16:45 ` [PATCH 12/20] uuidd: --socket-activation implies --keep-privs Petr Uzel
2012-04-03 13:38   ` Karel Zak
2012-04-05  7:49     ` Petr Uzel
2012-03-29 16:45 ` [PATCH 13/20] uuidd: add systemd unit files Petr Uzel
2012-04-03 14:01   ` Karel Zak
2012-04-03 14:47     ` Tom Gundersen
2012-04-05  7:52       ` Petr Uzel
2012-04-05  8:23         ` Karel Zak
2012-03-29 16:45 ` [PATCH 14/20] libuuid: use EXIT_FAILURE Petr Uzel
2012-03-29 16:45 ` [PATCH 15/20] libuuid: implement --disable-libuuid-exec-uuidd configure option Petr Uzel
2012-03-29 16:45 ` [PATCH 16/20] libuuid: fix typo in uuid_compare manpage Petr Uzel
2012-03-29 16:45 ` [PATCH 17/20] build-sys: run distcheck with verbose make rules Petr Uzel
2012-03-29 16:45 ` [PATCH 18/20] build-sys: add ttyutils.h to dist Petr Uzel
2012-03-29 16:45 ` [PATCH 19/20] build-sys: add fsprobe.h " Petr Uzel
2012-03-29 16:45 ` [PATCH 20/20] build-sys: fix installation of uuidd units with make distcheck Petr Uzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.