All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@inai.de>
Cc: phil@nwl.cc, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] build: make `make distcheck` succeed in the face of absolute paths
Date: Wed, 27 Aug 2025 14:57:20 +0200	[thread overview]
Message-ID: <aK8AsLl6A_paracl@calendula> (raw)
In-Reply-To: <20250827124307.894879-1-jengelh@inai.de>

On Wed, Aug 27, 2025 at 02:43:07PM +0200, Jan Engelhardt wrote:
> `make distcheck` has an expectation that, if only --prefix is
> specified, all other potentially-configurable paths are somehow
> relative to '${prefix}', e.g. bindir defaults to '${prefix}/bin'.
> 
> We get an absolute path from $(pkg-config systemd ...) at all times
> in case systemd.pc is present, and an empty path in case it is not,
> which collides with the aforementioned expectation two ways. Add an
> internal --with-dcprefix configure option for the sake of distcheck.

Subtle internal detail is exposed:

nft configuration:
  cli support:                  editline
  enable debugging symbols:     yes
  use mini-gmp:                 no
  enable man page:              yes
  libxtables support:           no
  json output support:          no
  systemd unit:                 ${dcprefix}/lib/systemd/system
                                ^---------^

When running ./configure on the extracted tarball file.

I modified your patch to expose the systemd unit: file to provide a
hint that service file is being installed.

Any suggestion to refine this?

> ---
>  Makefile.am  | 1 +
>  configure.ac | 5 +++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index e292d3b9..52a3e6c4 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -23,6 +23,7 @@ libnftables_LIBVERSION = 2:0:1
>  ###############################################################################
>  
>  ACLOCAL_AMFLAGS = -I m4
> +AM_DISTCHECK_CONFIGURE_FLAGS = --with-dcprefix='$${prefix}'
>  
>  EXTRA_DIST =
>  BUILT_SOURCES =
> diff --git a/configure.ac b/configure.ac
> index 626c641b..198b3be8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -122,6 +122,11 @@ AC_ARG_WITH([unitdir],
>  		AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'])
>  	])
>  AC_SUBST([unitdir])
> +AC_ARG_WITH([dcprefix],
> +        [AS_HELP_STRING([Extra path inserted for distcheck])],
> +        [dcprefix="$withval"])
> +AC_SUBST([dcprefix])
> +AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'], [unitdir='${dcprefix}'"$unitdir"])
>  
>  
>  AC_CONFIG_FILES([					\
> -- 
> 2.51.0
> 

  reply	other threads:[~2025-08-27 12:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 17:06 [nft PATCH] Makefile: Fix for 'make distcheck' Phil Sutter
2025-08-26 19:41 ` Pablo Neira Ayuso
2025-08-27 12:22   ` Pablo Neira Ayuso
2025-08-27 12:40     ` Jan Engelhardt
2025-08-27 12:43       ` [PATCH] build: make `make distcheck` succeed in the face of absolute paths Jan Engelhardt
2025-08-27 12:57         ` Pablo Neira Ayuso [this message]
2025-08-27 21:40           ` Jan Engelhardt
2025-08-27 14:13         ` Phil Sutter
2025-08-26 21:07 ` [nft PATCH] Makefile: Fix for 'make distcheck' Phil Sutter

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=aK8AsLl6A_paracl@calendula \
    --to=pablo@netfilter.org \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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 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.