Linux DTrace development list
 help / color / mirror / Atom feed
* [PATCH 0/9] relocatable DTrace
@ 2024-05-31 18:59 Nick Alcock
  2024-05-31 18:59 ` [PATCH 1/9] spec: install sdt*.h in /usr/lib64/dtrace/include/sys Nick Alcock
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Nick Alcock @ 2024-05-31 18:59 UTC (permalink / raw)
  To: dtrace, dtrace-devel

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.)

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
  tests: delete the kernel build dir stuff
  build: make dtrace and dtprobed relocatable
  test: work when relocated

 Build                                         |  1 +
 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                                    | 33 +++--------------
 test/unittest/usdt/tst.manyprocs.sh           |  2 +-
 test/unittest/usdt/tst.multitrace.sh          |  2 +-
 uts/Build                                     | 16 ++++++++-
 uts/dtrace.pc.in                              |  8 +++++
 uts/dtrace_sdt.pc.in                          |  6 ++++
 15 files changed, 87 insertions(+), 76 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


base-commit: 454c6d47bf408415f7eb52ea701779f041aa6957
-- 
2.45.1.275.g567cb0950c


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

end of thread, other threads:[~2024-08-01 16:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 18:59 [PATCH 0/9] relocatable DTrace Nick Alcock
2024-05-31 18:59 ` [PATCH 1/9] spec: install sdt*.h in /usr/lib64/dtrace/include/sys Nick Alcock
2024-05-31 18:59 ` [PATCH 2/9] build: initial pkg-config support Nick Alcock
2024-05-31 18:59 ` [PATCH 3/9] build: track configured vars Nick Alcock
2024-05-31 18:59 ` [PATCH 4/9] build: --bindir is supposed to be equivalent to --sbindir Nick Alcock
2024-05-31 18:59 ` [PATCH 5/9] build: the TESTDIR is relative to the LIBDIR by default Nick Alcock
2024-05-31 18:59 ` [PATCH 6/9] build: add a pkg-config file for dtrace consumers: use it Nick Alcock
2024-05-31 18:59 ` [PATCH 7/9] tests: delete the kernel build dir stuff Nick Alcock
2024-07-31 19:22   ` [DTrace-devel] " Kris Van Hees
2024-07-31 19:32     ` Nick Alcock
2024-05-31 18:59 ` [PATCH 8/9] build: make dtrace and dtprobed relocatable Nick Alcock
2024-05-31 19:46   ` [DTrace-devel] " Nick Alcock
2024-05-31 18:59 ` [PATCH 9/9] test: work when relocated Nick Alcock
2024-07-31 19:21 ` [DTrace-devel] [PATCH 0/9] relocatable DTrace Kris Van Hees
2024-07-31 19:54   ` Nick Alcock
2024-07-31 20:11     ` Kris Van Hees
2024-08-01 16:45       ` Nick Alcock

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