From f1b0f2c40b09b0a280b097b6ce39a5767e6f6edd Mon Sep 17 00:00:00 2001
From: oracle <solaris@oracle.com>
Date: Mon, 3 Aug 2015 14:31:53 -0700
Subject: [PATCH 01/34] Skip config check

#
# This change is to remove some misleading error messages when running
# "gmake install". OpenSSH mixes the building and running together. Some
# system setup checking for running the program needs to be removed, because
# they are not suitable in a build system.  This is for Solaris only, so we
# will not contribute back this change to the upstream community.
#
--- openssh-10.0p1/Makefile.in.orig
+++ openssh-10.0p1/Makefile.in
@@ -425,7 +425,16 @@
 install-nosysconf: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
 
 check-config:
-	-$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
+# On Solaris, to workaround OpenSSH's unlucky mixing of 'building ssh' and
+# 'running ssh', on build machine the following requisites shouldn't be
+# enforced:
+#     1) existence of privsep user sshd
+#     2) existence of privsep directory /var/empty
+#     3) read permissions for /etc/ssh/ssh_host_[rsa,dsa]_key 
+#
+#	-$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
+#
+	@echo 'Oracle Solaris: skipping check-config'
 
 install-files:
 	$(MKDIR_P) $(DESTDIR)$(bindir)