pkgsrc-Users archive

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

Re: Problem installing security/heimdal on Ubuntu 18.04 (WSL)



* Benny Siegert <bsiegert%gmail.com@localhost> [2018-12-05 05:22 -0500]:
However, that results in the failure I experience with the unmodified
Makefile. Does anyone know how to properly check for the "Microsoft"
string in the output of `uname -r` so that I can set the
PLIST.hcrypto only on WSL installations? If so, please let me know,
because I'd like to submit an update to the package once I figure it
out.

First of all, use the != operator to run the shell command:

OSV!= ${UNAME} -r

Thanks, I'll remember that.

Second of all, I would add that logic in mk/bsd.prefs.mk, around line
210. There is already an OS_VERSION defined at that point, so perhaps
you could grep the "Microsoft" in there and set LOWER_VENDOR and/or
OS_VARIANT.

I was trying to keep any changes to a single package, as I've never used
pkgsrc before, but thanks for the tip. I looked into bsd.prefs.mk, and
tried various methods of using OS_VERSION to make OS_VARIANT, but was
unable to succeed.

However, I *was* able to use `uname -r` to create OS_VARIANT, then get
the desired behavior using that.

The two diffs attached to this message are for pkgsrc/mk/bsd.prefs.mk
and pkgsrc/security/heimdal/Makefile.

The patch to bsd.prefs.mk sets OS_VARIANT to "Microsoft" if the string
"Microsoft" exists in the output of `uname -r` *and* the OPSYS is
"Linux". Otherwise, it sets OS_VARIANT to the value to which it was set
unconditionally for "Linux", which is the value contained in
LOWER_VENDOR.

The patch to heimdal/Makefile sets PLIST.hcrypto to yes if OS_VARIANT
contains the value "Microsoft".

Please let me know if you see anything that should be changed in these
patches. Also, what else should I do to get these committed to the
pkgsrc tree?

Regards,
 -dave
Index: bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.402
diff -u -p -r1.402 bsd.prefs.mk
--- bsd.prefs.mk	12 Nov 2018 14:22:58 -0000	1.402
+++ bsd.prefs.mk	7 Dec 2018 02:29:30 -0000
@@ -226,7 +226,11 @@ LOWER_VENDOR?=		chromeos
 LOWER_VENDOR?=          pc
 .  endif
 LOWER_VENDOR?=          unknown
+OS_VARIANT!=		${UNAME} -r
+OS_VARIANT:=		${OS_VARIANT:C/^.*-//}
+.  if ${OS_VARIANT} != "Microsoft"
 OS_VARIANT=		${LOWER_VENDOR}
+.  endif
 .  if !defined(HOST_MACHINE_ARCH)
 HOST_MACHINE_ARCH!=	${UNAME} -m
 MAKEFLAGS+=		HOST_MACHINE_ARCH=${HOST_MACHINE_ARCH:Q}
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/heimdal/Makefile,v
retrieving revision 1.128
diff -u -p -r1.128 Makefile
--- Makefile	27 Nov 2018 23:36:00 -0000	1.128
+++ Makefile	7 Dec 2018 02:25:31 -0000
@@ -73,15 +73,21 @@ PLIST.vis=	yes
 PLIST.glob=	yes
 .endif
 
+PLIST_VARS+=		hcrypto
 # Linux does not have include/vis.h and expected include/glob.h.
 .if ${OPSYS} == "Linux"
 PLIST.vis=	yes
 PLIST.glob=	yes
 # Without this I get undefined references to pthread_getspecific
 PTHREAD_AUTO_VARS=	yes
+.if ${OS_VARIANT} == "Microsoft"
+# On Ubuntu hosted via WSL this is needed to avoid a DESTDIR/PLIST
+# conflict error.
+PLIST.hcrypto=	yes
+.endif
 .endif
 
-PLIST_VARS+=		afskauth hcrypto
+PLIST_VARS+=		afskauth
 .if ${OPSYS} == "IRIX"
 PLIST.afskauth=		yes
 .endif

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index