diff mbox series

[1/2] debian: fix package configuration after removing platform_defs.h.in

Message ID 171338841094.1852814.10756994414036094487.stgit@frogsfrogsfrogs (mailing list archive)
State Accepted
Headers show
Series [1/2] debian: fix package configuration after removing platform_defs.h.in | expand

Commit Message

Darrick J. Wong April 17, 2024, 9:18 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

In commit 0fa9dcb61b4f, we made platform_defs.h a static header file
instead of generating it from platform_defs.h.in.  Unfortunately, it
turns out that the debian packaging rules use "make
include/platform_defs.h" to run configure with the build options
set via LOCAL_CONFIGURE_OPTIONS.

Since platform_defs.h is no longer generated, the make command in
debian/rules does nothing, which means that the binaries don't get built
the way the packaging scripts specify.  This breaks multiarch for
libhandle.so, as well as libeditline and libblkid support for
xfs_db/io/spaceman.

Fix this by correcting debian/rules to make include/builddefs, which
will start ./configure with the desired options.

Fixes: 0fa9dcb61b4f ("include: stop generating platform_defs.h")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 debian/rules |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Bill O'Donnell May 1, 2024, 6 p.m. UTC | #1
On Wed, Apr 17, 2024 at 02:18:22PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> In commit 0fa9dcb61b4f, we made platform_defs.h a static header file
> instead of generating it from platform_defs.h.in.  Unfortunately, it
> turns out that the debian packaging rules use "make
> include/platform_defs.h" to run configure with the build options
> set via LOCAL_CONFIGURE_OPTIONS.
> 
> Since platform_defs.h is no longer generated, the make command in
> debian/rules does nothing, which means that the binaries don't get built
> the way the packaging scripts specify.  This breaks multiarch for
> libhandle.so, as well as libeditline and libblkid support for
> xfs_db/io/spaceman.
> 
> Fix this by correcting debian/rules to make include/builddefs, which
> will start ./configure with the desired options.
> 
> Fixes: 0fa9dcb61b4f ("include: stop generating platform_defs.h")
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>

> ---
>  debian/rules |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/debian/rules b/debian/rules
> index 7e4b83e2b..0c1cef92d 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -61,15 +61,17 @@ config: .gitcensus
>  	$(checkdir)
>  	AUTOHEADER=/bin/true dh_autoreconf
>  	dh_update_autotools_config
> -	$(options) $(MAKE) $(PMAKEFLAGS) include/platform_defs.h
> +	# runs configure with $(options)
> +	$(options) $(MAKE) $(PMAKEFLAGS) include/builddefs
>  	cp -f include/install-sh .
>  	touch .gitcensus
>  
>  dibuild:
>  	$(checkdir)
>  	@echo "== dpkg-buildpackage: installer" 1>&2
> +	# runs configure with $(options)
>  	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
> -		$(diopts) $(MAKE) include/platform_defs.h; \
> +		$(diopts) $(MAKE) include/builddefs; \
>  		mkdir -p include/xfs; \
>  		for dir in include libxfs; do \
>  			$(MAKE) $(PMAKEFLAGS) -C $$dir NODEP=1 install-headers; \
> 
>
Bill O'Donnell May 1, 2024, 6:06 p.m. UTC | #2
On Wed, May 01, 2024 at 01:00:30PM -0500, Bill O'Donnell wrote:
> On Wed, Apr 17, 2024 at 02:18:22PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > In commit 0fa9dcb61b4f, we made platform_defs.h a static header file
> > instead of generating it from platform_defs.h.in.  Unfortunately, it
> > turns out that the debian packaging rules use "make
> > include/platform_defs.h" to run configure with the build options
> > set via LOCAL_CONFIGURE_OPTIONS.
> > 
> > Since platform_defs.h is no longer generated, the make command in
> > debian/rules does nothing, which means that the binaries don't get built
> > the way the packaging scripts specify.  This breaks multiarch for
> > libhandle.so, as well as libeditline and libblkid support for
> > xfs_db/io/spaceman.
> > 
> > Fix this by correcting debian/rules to make include/builddefs, which
> > will start ./configure with the desired options.
> > 
> > Fixes: 0fa9dcb61b4f ("include: stop generating platform_defs.h")
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>

derp. Just noticed it's already merged. ;)

> 
> > ---
> >  debian/rules |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > 
> > diff --git a/debian/rules b/debian/rules
> > index 7e4b83e2b..0c1cef92d 100755
> > --- a/debian/rules
> > +++ b/debian/rules
> > @@ -61,15 +61,17 @@ config: .gitcensus
> >  	$(checkdir)
> >  	AUTOHEADER=/bin/true dh_autoreconf
> >  	dh_update_autotools_config
> > -	$(options) $(MAKE) $(PMAKEFLAGS) include/platform_defs.h
> > +	# runs configure with $(options)
> > +	$(options) $(MAKE) $(PMAKEFLAGS) include/builddefs
> >  	cp -f include/install-sh .
> >  	touch .gitcensus
> >  
> >  dibuild:
> >  	$(checkdir)
> >  	@echo "== dpkg-buildpackage: installer" 1>&2
> > +	# runs configure with $(options)
> >  	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
> > -		$(diopts) $(MAKE) include/platform_defs.h; \
> > +		$(diopts) $(MAKE) include/builddefs; \
> >  		mkdir -p include/xfs; \
> >  		for dir in include libxfs; do \
> >  			$(MAKE) $(PMAKEFLAGS) -C $$dir NODEP=1 install-headers; \
> > 
> > 
> 
>
diff mbox series

Patch

diff --git a/debian/rules b/debian/rules
index 7e4b83e2b..0c1cef92d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,15 +61,17 @@  config: .gitcensus
 	$(checkdir)
 	AUTOHEADER=/bin/true dh_autoreconf
 	dh_update_autotools_config
-	$(options) $(MAKE) $(PMAKEFLAGS) include/platform_defs.h
+	# runs configure with $(options)
+	$(options) $(MAKE) $(PMAKEFLAGS) include/builddefs
 	cp -f include/install-sh .
 	touch .gitcensus
 
 dibuild:
 	$(checkdir)
 	@echo "== dpkg-buildpackage: installer" 1>&2
+	# runs configure with $(options)
 	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
-		$(diopts) $(MAKE) include/platform_defs.h; \
+		$(diopts) $(MAKE) include/builddefs; \
 		mkdir -p include/xfs; \
 		for dir in include libxfs; do \
 			$(MAKE) $(PMAKEFLAGS) -C $$dir NODEP=1 install-headers; \