Linux DTrace development list
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com,
	kris.van.hees@oracle.com
Subject: Re: [PATCH v2 1/9] spec: install sdt*.h in /usr/lib64/dtrace/include/sys
Date: Fri, 2 Aug 2024 01:23:38 -0400	[thread overview]
Message-ID: <ZqxtWn7e2uEhEKog@oracle.com> (raw)
In-Reply-To: <20240801132156.286780-2-nick.alcock@oracle.com>

On Thu, Aug 01, 2024 at 02:21:48PM +0100, Nick Alcock wrote:
> This is the specfile part of the sdt.h move, rendered more
> complex by the need to clean up the mess left behind by the
> old sdt.h renaming.
> 
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
>  dtrace.spec | 22 +++++++---------------
>  1 file changed, 7 insertions(+), 15 deletions(-)
> 
> diff --git a/dtrace.spec b/dtrace.spec
> index 42ea9bc33958..28eeaa478376 100644
> --- a/dtrace.spec
> +++ b/dtrace.spec
> @@ -86,8 +86,6 @@ BuildRequires: binutils-devel >= 2.30-58.0.8
>  Requires:     libdtrace-ctf >= 1.1.0
>  BuildRequires: libdtrace-ctf-devel >= 1.1.0
>  %endif
> -Conflicts:    systemtap-sdt-devel
> -Provides:     systemtap-sdt-devel
>  Summary:      DTrace user interface.
>  Version:      2.0.1
>  Release:      0%{?dist}
> @@ -194,11 +192,6 @@ make DESTDIR=$RPM_BUILD_ROOT VERSION=%{version} \
>  sed -i '/^ProtectSystem=/d; /^ProtectControlGroups=/d; /^RuntimeDirectory/d;' $RPM_BUILD_ROOT/usr/lib/systemd/system/dtprobed.service
>  %endif
>  
> -# Because systemtap creates a sdt.h header file we have to rename
> -# ours and then shift theirs out of the way.
> -mv $RPM_BUILD_ROOT/usr/include/sys/sdt.h \
> -   $RPM_BUILD_ROOT/usr/include/sys/sdt-dtrace.h
> -
>  %clean
>  [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
>  rm -rf $RPM_BUILD_DIR/%{name}-%{version}
> @@ -222,13 +215,14 @@ if [ $1 -ge 2 ] ; then
>      %systemd_postun_with_restart dtprobed.service
>  fi
>  
> -# if sdt-systemtap.h doesn't exist then we can move the existing dtrace sdt.h
> +# Clean up the mess left behind by previous installations' overwriting
> +# of systemtap's sdt.h: if an sdt-systemtap.h exists and is a regular
> +# file, move it back to sdt.h.  (RPM itself will identify and delete
> +# all the other debris.)
> +
>  SYSINCDIR=/usr/include/sys
> -if [ -e $SYSINCDIR/sdt.h -a ! -e $SYSINCDIR/sdt-systemtap.h ]; then
> -    mv $SYSINCDIR/sdt.h $SYSINCDIR/sdt-systemtap.h
> -    ln -s $SYSINCDIR/sdt-dtrace.h $SYSINCDIR/sdt.h
> -elif [ ! -e $SYSINCDIR/sdt.h ]; then
> -    ln -s $SYSINCDIR/sdt-dtrace.h $SYSINCDIR/sdt.h
> +if [ -f $SYSINCDIR/sdt-systemtap.h ]; then
> +    mv -f $SYSINCDIR/sdt-systemtap.h $SYSINCDIR/sdt.h
>  fi
>  
>  %preun
> @@ -253,8 +247,6 @@ systemctl start dtprobed || :
>  %{_sbindir}/dtrace
>  %{_sbindir}/dtprobed
>  %{_mandir}/man8/dtrace.8.gz
> -%{_includedir}/sys/sdt-dtrace.h
> -%{_includedir}/sys/sdt_internal.h
>  %doc %{_docdir}/dtrace-%{version}/*
>  %{_unitdir}/dtprobed.service
>  %{_unitdir}/dtrace-usdt.target
> -- 
> 2.46.0.277.ge12b8151ed

  reply	other threads:[~2024-08-02  5:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZqxtWn7e2uEhEKog@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=nick.alcock@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox