Bug 231160 - devel/libsoup: add options for mit/heimdal/base GSSAPI
Summary: devel/libsoup: add options for mit/heimdal/base GSSAPI
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-09-04 19:30 UTC by Sergey Akhmatov
Modified: 2021-05-17 14:06 UTC (History)
3 users (show)

See Also:


Attachments
GSSAPI options (1.69 KB, patch)
2018-09-04 19:30 UTC, Sergey Akhmatov
no flags Details | Diff
GSSAPI options (1.75 KB, patch)
2018-09-05 15:37 UTC, Sergey Akhmatov
no flags Details | Diff
GSSAPI options (1.41 KB, patch)
2018-09-05 16:00 UTC, Sergey Akhmatov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Akhmatov 2018-09-04 19:30:04 UTC
Created attachment 196870 [details]
GSSAPI options

The attached patch adds options to build devel/libsoup with different GSSAPI implementations: base, security/heimdal, security/krb5 and without GSSAPI.

QA:
poudriere testport on 11.2-RELEASE with all options.
Comment 1 Ting-Wei Lan 2018-09-05 14:27:12 UTC
Comment on attachment 196870 [details]
GSSAPI options

>Index: devel/libsoup/Makefile
>===================================================================
>--- devel/libsoup/Makefile	(revision 478960)
>+++ devel/libsoup/Makefile	(working copy)
>@@ -3,7 +3,7 @@
> 
> PORTNAME=	libsoup
> PORTVERSION=	2.54.1
>-PORTREVISION=	0
>+PORTREVISION=	1
> CATEGORIES=	devel gnome
> MASTER_SITES=	GNOME
> DIST_SUBDIR=	gnome2
>@@ -11,6 +11,9 @@
> MAINTAINER=	gnome@FreeBSD.org
> COMMENT=	SOAP (Simple Object Access Protocol) implementation in C
> 
>+LICENSE=	GPLv2
>+LICENSE_FILE=	${WRKSRC}/COPYING
>+

libsoup is licensed under LGPLv2+, not GPLv2.

>@@ -43,6 +46,27 @@
> CONFIGURE_ARGS+=--without-gnome
> .endif
> 
>+OPTIONS_SINGLE=	GSSAPI
>+OPTIONS_SINGLE_GSSAPI=	GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
>+OPTIONS_DEFAULT=	GSSAPI_${${SSL_DEFAULT} == base :?BASE :NONE}
>+
>+GSSAPI_BASE_CONFIGURE_ON=	--with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
>+GSSAPI_BASE_CPPFLAGS=	${GSSAPICPPFLAGS}
>+GSSAPI_BASE_LDFLAGS=	${GSSAPILDFLAGS}
>+GSSAPI_BASE_LIBS=	${GSSAPILIBS}
>+GSSAPI_BASE_USES=	gssapi

Does --with-gssapi work in this way? By searching for the usage of 'with_gssapi' variable in configure.ac, the only two special values of it are 'yes' and 'no'. I think you probably want to use --with-krb5-config here.
Comment 2 Sergey Akhmatov 2018-09-05 15:37:36 UTC
Created attachment 196887 [details]
GSSAPI options

Fixed LICENSE
Fixed configure args
Comment 3 Sergey Akhmatov 2018-09-05 15:51:42 UTC
(In reply to Ting-Wei Lan from comment #1)
Thanks for the review! I've updated the patch.

My bad with the license, fixed it.
As for configure args, it worked somehow, but approach you've proposed seems to be the right one, we should not rely on magic.
Comment 4 Sergey Akhmatov 2018-09-05 16:00:29 UTC
Created attachment 196889 [details]
GSSAPI options

Cleanup further: (LD|CP)FLAGS are detected by krb5-config
Comment 5 Ting-Wei Lan 2018-09-09 14:29:50 UTC
I am not a maintainer and I haven't tested your patch, but the new version looks much better to me.
Comment 6 commit-hook freebsd_committer 2021-05-17 14:02:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0e94a54ee19481e569344e95d5d28732ce3a86ef

commit 0e94a54ee19481e569344e95d5d28732ce3a86ef
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2021-05-17 13:25:45 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2021-05-17 14:01:43 +0000

    devel/libsoup: Massage features and options

    - From PR 235207 comes a patch from mi@ to use NTLM if it's there.
      Unfortunately, the switch to Meson has made this run-time-option
      a build-time-check, so the original patch isn't directly useful.
      Make samba a build-time dep, so that the code is enabled; there
      is a run-time check if the NTLM executable is available.
    - From PR 231160 comes a patch to configure different kinds of
      GSSAPI. That too doesn't apply with the current Meson build,
      but the general idea does.

    Build-tested in 8 configurations (but libsoup is nice that everything
    is #ifdeffed internally, so there's no plist or other visible changes)

    While here, add WWW line.

    PR:             235207 231160
    Reported by:    mi
    Reported by:    Sergey Akhmatov

 devel/libsoup/Makefile  | 20 ++++++++++++++++++--
 devel/libsoup/pkg-descr |  2 ++
 2 files changed, 20 insertions(+), 2 deletions(-)