Linux DTrace development list
 help / color / mirror / Atom feed
* [PATCH v2 0/9] relocatable DTrace
@ 2024-08-01 13:21 Nick Alcock
  2024-08-01 13:21 ` [PATCH v2 1/9] spec: install sdt*.h in /usr/lib64/dtrace/include/sys Nick Alcock
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Nick Alcock @ 2024-08-01 13:21 UTC (permalink / raw)
  To: dtrace, dtrace-devel; +Cc: kris.van.hees

This relatively simple patch series makes DTrace work with non-default
(s)bindir, libdir, includedir (changing the other installation-directory
variables largely worked already).

We add a pkg-config file named dtrace.pc for the consumer headers
<dtrace.h> and <sys/dtrace.h> and for libdtrace.so: I expect there are
no users of these outside DTrace proper at all right now, but providing
this means we can point future users at a suitable pkg-config file so
they can automatically adapt to dtraces installed wherever you please.

There is one wrinkle, which is that the udev and (especially) systemd
service files for dtprobed have to be installed somewhere where udev and
systemd can see them.  We emit a warning if they don't end up in either
of the two fixed locations where systemd looks for such things, unless
the user has explicitly passed in --with-systemd-unit-dir=, in which
case we presume that the user is doing that because they know that their
systemd is looking somewhere else too and is pointing the DTrace build
system at it.

(We add an extra makefile target to allow users to forcibly install the
systemd service file even if we have not installed it by default because
we think that it won't be used. Users/distributors installing DTrace in
--prefix=/usr or --prefix=/usr/local will never need to worry about any
of this: in these cases we install the service file as before because we
know that systemd will find it).

(The first of these patches has already been submitted on its own,
but this series relies on it so I thought it might be clearest to
resubmit it as part of this series too.)

(Multiple test runs with non-default values of prefix, sbindir, libdir,
includedir, and systemd-unit-dir passed OK with no failures I can
attribute to relocating things.)

Changes since v1:
  As requested by reviews: in particular, runtest.conf is gone,
  and we rely on pkg-config to find the dtrace binary when the
  installed testsuite is run.

Nick Alcock (9):
  spec: install sdt*.h in /usr/lib64/dtrace/include/sys
  build: initial pkg-config support
  build: track configured vars
  build: --bindir is supposed to be equivalent to --sbindir
  build: the TESTDIR is relative to the LIBDIR by default
  build: add a pkg-config file for dtrace consumers: use it
  runtest: remove obsolete kernel coverage data collection
  build: make dtrace and dtprobed relocatable
  test: work when relocated

 GNUmakefile                                   |  6 +--
 Maketargets                                   |  3 ++
 cmd/Build                                     |  4 +-
 configure                                     | 11 ++---
 dtprobed/Build                                | 36 ++++++++++++----
 .../{dtprobed.service => dtprobed.service.in} |  2 +-
 dtrace.spec                                   | 23 ++++------
 runtest.conf.example                          | 10 -----
 runtest.sh                                    | 43 ++++++-------------
 test/unittest/usdt/tst.manyprocs.sh           |  2 +-
 test/unittest/usdt/tst.multitrace.sh          |  2 +-
 uts/Build                                     | 17 +++++++-
 uts/dtrace.pc.in                              |  9 ++++
 uts/dtrace_sdt.pc.in                          |  7 +++
 14 files changed, 97 insertions(+), 78 deletions(-)
 rename dtprobed/{dtprobed.service => dtprobed.service.in} (95%)
 delete mode 100644 runtest.conf.example
 create mode 100644 uts/dtrace.pc.in
 create mode 100644 uts/dtrace_sdt.pc.in

-- 
2.46.0.277.ge12b8151ed


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

end of thread, other threads:[~2024-08-02  5:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 13:21 [PATCH v2 0/9] relocatable DTrace Nick Alcock
2024-08-01 13:21 ` [PATCH v2 1/9] spec: install sdt*.h in /usr/lib64/dtrace/include/sys Nick Alcock
2024-08-02  5:23   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 2/9] build: initial pkg-config support Nick Alcock
2024-08-02  5:24   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 3/9] build: track configured vars Nick Alcock
2024-08-02  5:28   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 4/9] build: --bindir is supposed to be equivalent to --sbindir Nick Alcock
2024-08-02  5:28   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 5/9] build: the TESTDIR is relative to the LIBDIR by default Nick Alcock
2024-08-02  5:29   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 6/9] build: add a pkg-config file for dtrace consumers: use it Nick Alcock
2024-08-02  5:30   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 7/9] runtest: remove obsolete kernel coverage data collection Nick Alcock
2024-08-02  5:31   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 8/9] build: make dtrace and dtprobed relocatable Nick Alcock
2024-08-02  5:31   ` Kris Van Hees
2024-08-01 13:21 ` [PATCH v2 9/9] test: work when relocated Nick Alcock
2024-08-02  5:32   ` Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox