#12 Remove nonexistent --without-winexe option from configure
Merged 3 years ago by abbra. Opened 3 years ago by merlinm.
rpms/ merlinm/samba master  into  master

file modified
+4 -4
@@ -8,7 +8,7 @@ 

  

  %define samba_requires_eq()  %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")

  

- %define main_release 0

+ %define main_release 1

  

  %define samba_version 4.12.5

  %define talloc_version 2.3.1
@@ -901,9 +901,6 @@ 

  %if %{with testsuite}

          --enable-selftest \

  %endif

- %if ! %with_winexe

-         --without-winexe \

- %endif

          --with-systemd \

          --systemd-install-services \

          --with-systemddir=/usr/lib/systemd/system \
@@ -3579,6 +3576,9 @@ 

  %endif

  

  %changelog

+ * Wed Jul 08 2020 Merlin Mathesius <mmathesi@redhat.com> - 4.12.5-1

+ - Remove nonexistent --without-winexe option from configure

+ 

  * Thu Jul 02 2020 Guenther Deschner <gdeschner@redhat.com> - 4.12.5-0

  - Update to Samba 4.12.5

  

The SPEC file currently attempts to pass the option --without-winexe to configure when the macro with_winexe is false--which it the case when building for ELN and RHEL. However, there is no such option--which is causing ELN builds to fail.

This PR simply removes the offending option so the build can succeed. It still won't attempt to package winexe for ELN or RHEL.

Failing ELN build without this fix: https://koji.fedoraproject.org/koji/taskinfo?taskID=46816185
Successful ELN scratch build with this fix: https://koji.fedoraproject.org/koji/taskinfo?taskID=46816572

The issue is actually quite different. Your patch can be used but I'll explain what happens here. In short, --with-winexe/--without-winexe wasn't backported to 4.12 release series, so both those options do not exist in the version of Samba you are trying to recompile.

Samba WAF code uses method samba_add_on_off_option to define configure option for any --with-something, like winexe. The method itself adds two options:

def samba_add_onoff_option(opt, option, help=(), dest=None, default=True,
                           with_name="with", without_name="without"):
    if default is None:
        default_str = "auto"
    elif default is True:
        default_str = "yes"
    elif default is False:
        default_str = "no"
    else:
        default_str = str(default)

    if help == ():
        help = ("Build with %s support (default=%s)" % (option, default_str))
    if dest is None:
        dest = "with_%s" % option.replace('-', '_')

    with_val = "--%s-%s" % (with_name, option)
    without_val = "--%s-%s" % (without_name, option)

    opt.add_option(with_val, help=help, action="store_true", dest=dest,
                   default=default)
    opt.add_option(without_val, help=SUPPRESS_HELP, action="store_false",
                   dest=dest)

Since samba 4.12.5 doesn't have this option defined and unconditionally try to test whether winexe is possible to use. It will eventually fail and wouldn't build it.

For any build before Samba 4.13, when we'll see the new option coming in, we need to avoid using --with-winexe and --without-winexe in the spec.

Once we start packaging 4.13, we need to get the reverted chunk back.

Pull-Request has been merged by abbra

3 years ago

@abbra Thank you for the detailed explanation. Considering the situation, I probably should have just commented out the offending conditional so it's there as a reminder.

Thank you for merging so ELN can move along!