autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Various issues with AX_DIST_RPM


From: Thomas Petersen
Subject: Various issues with AX_DIST_RPM
Date: Thu, 18 Jan 2018 17:02:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.5.0

Hi

I am trying to use AX_DIST_RPM in my project to make it easy to build
rpm packages but doing so I have encountered various issues.

If this isn't the right place to discuss it please direct me elsewhere.
Also I'm not very skilled in the m4/autoconf/automake stuff so I will
probably not be able to produce a fully functioning patch.

Anyway this is my experiences:

1.
My project consists of several directories in multiple levels.
AX_DIST_RPM adds various rules using AX_ADD_AM_MACRO_STATIC and wants
those included in the toplevel Makefile.am file. It also uses
AX_INSTALL_FILES which also put rules into aminclude_static.am but these
seem to be required in all Makefile.am files. If it isn't included in
all files the do-mfstamp rule doesn't work recursively.
Now when including aminclude_static.am in all Makefile.am files it at
first seems to work but it copies the spec file to all subdirectories
which isn't supposed to happen. This is caused by the dist-hook:
dist-hook-ax-dist-rpm now present in all Makefiles. As a consequence
rpmbuild later fails because it somehow seems to merge all the spec
files together and finally complains about a second %prep.

For now I have made an ugly hack. I have made AX_DIST_RPM call a
modified version of AX_ADD_AM_MACRO_STATIC which adds to
aminclude_static_toplevel.am instead and then I only include this file
in the toplevel Makefile.am.
That does the trick but a more clean solution could be to add some
conditional stuff to the Makefile logic where AX_DIST_RPM_EXTRA_DIST is
set so it is only set in the toplevel Makefile.

2.
An RPMChangeLog file is build from ChangeLog and dates and times are
converted to an RPM compatible format using gawk and strftime. This
output however depends on the currently selected locale but rpmbuild
expects english formatted dates. Most other locales than english make
rpmbuild fail. Setting LC_ALL=C when calling gawk is a possible fix for
this.

3.
Lastly the macro uses the variable PLATFORM_SUFFIX as part of the name
of the resulting rpm file but the value of the variable is actually
substituted already when running aclocal and the value given when
running configure is ignored. Escaping it at various places makes it use
the value from configure which I guess is what was expected.

I can prepare a patch covering 2. and 3. and put it on the patch
tracker. I'm not sure about the first issue though. Would a condition
check in the makefile be okay or do you have any other suggestions?

Regards,
Thomas Petersen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]