[RFC] %configure macro when missing a ./configure script

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

 



I seem to recall discussion on this in the ancient past, but I couldn't find anything in the archive, nor on the current Fedora Packaging Guidelines docs.

There exist upstreams out there that are written in C/C++ but don't ship with a "configure" script. In some cases, I've seen this addressed by simply not running the %configure macro and then make-ing as normal, or by manually using %optflags somewhere. This is the suggestion in some tutorials for addressing this, e.g.: https://rpm-packaging-guide.github.io/#cello-working-with-spec-files

The %build section is where we tell the system how to actually build the software we are packaging. Since wrote a simple Makefile for our C implementation, we can simply use the GNU make command provided by rpmdev-newspec. However, we need to remove the call to %configure because we did not provide a configure script

I'd like to propose the addition of a "Configuration" section in the FPG (probably right under https://docs.fedoraproject.org/en-US/packaging-guidelines/#compiler ) that addresses the importance of using %configure. It ensures flags are properly exported into the environment, but could also do other arbitrary, distro-dependent things at some point, so it's still better to run the macro than not. There are two possible workarounds, depending on the whether %_configure (with underscore) is available, or if more control is needed for simulating a script.

Safer:

%build
# source has no configure script; use macro anyway
echo "#!/bin/sh" > configure ; chmod +x configure

%configure
make %{?_smp_mflags}

Recent versions; simple case:

%build
# source has no configure script; use macro anyway
%define _configure /bin/true

%configure
make %{?_smp_mflags}

I submitted https://github.com/redhat-developer/rpm-packaging-guide/issues/75 for that doc, but it seems like something about whether/how to work around this should be in these guidelines too, since they're used so much as a general reference.

Regards,
-jc
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux