Bug 159745 - [libssh] [patch] Fix improperly specified dependency list for secure/lib/libssh
Summary: [libssh] [patch] Fix improperly specified dependency list for secure/lib/libssh
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Enji Cooper
URL:
Keywords:
: 174052 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-13 18:20 UTC by Enji Cooper
Modified: 2019-03-30 15:57 UTC (History)
0 users

See Also:
ngie: mfc-stable11+
ngie: mfc-stable10+
ngie: mfc-stable9-


Attachments
file.diff (674 bytes, patch)
2011-08-13 18:20 UTC, Enji Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2011-08-13 18:20:07 UTC
Running buildworld will fail if one invokes it like: make buildworld -DWITHOUT_GSSAPI -DWITH_KERBEROS

The problem is that the dependency list in Makefile.inc1 requires both GSSAPI and KERBEROS to be hardwired to no -- otherwise the build will fail looking for a non-existent dependency.

The attached patch describes what I mean, but might not be the correct solution. The correct solution might be to set WITHOUT_KERBEROS if WITHOUT_GSSAPI is set, because gssapi is a dependency of kerberos, and not the other way around.

Fix: Patch attached with submission follows:
How-To-Repeat: make buildworld -DWITHOUT_GSSAPI -DWITH_KERBEROS
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2015-10-24 23:40:53 UTC
Taking to RETEST the bug.
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2017-01-02 03:58:50 UTC
Still an issue:

$ script bw.ts  make buildworld -DWITHOUT_GSSAPI -DWITH_KERBEROS -j12
...
make[3]: make[3]: don't know how to make lib/libgssapi__L. Stop

make[3]: stopped in /scratch/tmp/ngie/svn
*** [libraries] Error code 2

make[2]: stopped in /scratch/tmp/ngie/svn
1 error

make[2]: stopped in /scratch/tmp/ngie/svn
*** [_libraries] Error code 2

make[1]: stopped in /scratch/tmp/ngie/svn
1 error

make[1]: stopped in /scratch/tmp/ngie/svn
*** [buildworld] Error code 2

make: stopped in /scratch/tmp/ngie/svn
1 error

make: stopped in /scratch/tmp/ngie/svn

Script done, output file is bw.ts
Comment 3 Enji Cooper freebsd_committer freebsd_triage 2017-01-02 17:42:57 UTC
This should do it (krb5_config.h contains "#define GSSAPI 1" in it).

It's a bit overkill (because MK_GSSAPI=no implies MK_KERBEROS=no), but for pedanticness, this is correct:

$ svn diff Makefile.inc1 secure/lib/libssh/Makefile
Index: Makefile.inc1
===================================================================
--- Makefile.inc1       (revision 310985)
+++ Makefile.inc1       (working copy)
@@ -2155,7 +2155,7 @@
 .if ${MK_LDNS} != "no"
 secure/lib/libssh__L: lib/libldns__L
 .endif
-.if ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
 secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \
     kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \
     lib/libmd__L kerberos5/lib/libroken__L
Index: secure/lib/libssh/Makefile
===================================================================
--- secure/lib/libssh/Makefile  (revision 310985)
+++ secure/lib/libssh/Makefile  (working copy)
@@ -46,7 +46,7 @@
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
 SRCS+=  ssh_namespace.h

-.if ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
 CFLAGS+= -include krb5_config.h
 SRCS+=  krb5_config.h
 .endif
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-02 19:56:01 UTC
A commit references this bug:

Author: ngie
Date: Mon Jan  2 19:55:19 UTC 2017
New revision: 311133
URL: https://svnweb.freebsd.org/changeset/base/311133

Log:
  Move the "MK_* options..." section before the "... MK_*_SUPPORT..." section

  For the case that someone set WITHOUT_GSSAPI=, now WITHOUT_KERBEROS_SUPPORT
  will be properly set.

  This will likely fix the issue for the default case noted in the PR I filed
  back in 2011. I am trying to fix the less obvious case documented in the PR
  still.

  MFC after:	2 weeks
  PR:		159745

Changes:
  head/share/mk/src.opts.mk
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-01-02 20:30:30 UTC
A commit references this bug:

Author: ngie
Date: Mon Jan  2 20:29:50 UTC 2017
New revision: 311140
URL: https://svnweb.freebsd.org/changeset/base/311140

Log:
  Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and
  MK_KERBEROS_SUPPORT != no

  This fixes the odd case where someone specified MK_GSSAPI=no and
  MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense,
  but the build system doesn't prevent this case today, and it didn't when
  I filed the bug back in 2011 either).

  MFC after:	2 weeks
  PR:		159745

Changes:
  head/Makefile.inc1
  head/secure/lib/libssh/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-01-16 07:11:03 UTC
A commit references this bug:

Author: ngie
Date: Mon Jan 16 07:10:42 UTC 2017
New revision: 312268
URL: https://svnweb.freebsd.org/changeset/base/312268

Log:
  MFC r311140:

  Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and
  MK_KERBEROS_SUPPORT != no

  This fixes the odd case where someone specified MK_GSSAPI=no and
  MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense,
  but the build system doesn't prevent this case today, and it didn't when
  I filed the bug back in 2011 either).

  PR:		159745

Changes:
_U  stable/11/
  stable/11/Makefile.inc1
  stable/11/secure/lib/libssh/Makefile
  stable/11/secure/usr.bin/ssh/Makefile
  stable/11/secure/usr.sbin/sshd/Makefile
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-01-16 07:11:05 UTC
A commit references this bug:

Author: ngie
Date: Mon Jan 16 07:10:46 UTC 2017
New revision: 312269
URL: https://svnweb.freebsd.org/changeset/base/312269

Log:
  MFC r311140:

  Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and
  MK_KERBEROS_SUPPORT != no

  This fixes the odd case where someone specified MK_GSSAPI=no and
  MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense,
  but the build system doesn't prevent this case today, and it didn't when
  I filed the bug back in 2011 either).

  PR:		159745

Changes:
_U  stable/10/
  stable/10/Makefile.inc1
  stable/10/secure/lib/libssh/Makefile
  stable/10/secure/usr.bin/ssh/Makefile
  stable/10/secure/usr.sbin/sshd/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-01-16 07:16:11 UTC
A commit references this bug:

Author: ngie
Date: Mon Jan 16 07:15:15 UTC 2017
New revision: 312272
URL: https://svnweb.freebsd.org/changeset/base/312272

Log:
  MFC r311133:

  Move the "MK_* options..." section before the "... MK_*_SUPPORT..." section

  For the case that someone set WITHOUT_GSSAPI=, now WITHOUT_KERBEROS_SUPPORT
  will be properly set.

  This will likely fix the issue for the default case noted in the PR I filed
  back in 2011. I am trying to fix the less obvious case documented in the PR
  still.

  PR:		159745

Changes:
_U  stable/11/
  stable/11/share/mk/src.opts.mk
Comment 9 Andriy Voskoboinyk freebsd_committer freebsd_triage 2019-03-30 15:57:46 UTC
*** Bug 174052 has been marked as a duplicate of this bug. ***