summaryrefslogtreecommitdiff
path: root/security/ssh2/patches/patch-ab
blob: e472e95b4110996c4abe7734bddb3e2150bde660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
$NetBSD: patch-ab,v 1.3 2003/08/12 19:08:56 seb Exp $

--- apps/ssh/Makefile.am.orig	2003-06-30 12:22:11.000000000 +0000
+++ apps/ssh/Makefile.am
@@ -18,7 +18,8 @@ WINCONF_OPTIONS = maintainer=sjl@ssh.com
 etcdir = @ETCDIR@
 known_hosts_dir = $(etcdir)/knownhosts
 host_keys_dir = $(etcdir)/hostkeys
-subconfig_dir = $(etcdir)/subconfig
+egdir = $(prefix)/share/examples/${PKGBASE}
+subconfig_dir = $(egdir)/subconfig
 STATIC_FLAG = @STATIC_FLAG@
 
 #
@@ -569,13 +570,13 @@ COMPILE = $(CC) $(KERBEROS_INCS) $(INCLU
 #
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
 #
+INSTALL_DATA_DIR=	$(BSD_INSTALL_DATA_DIR)
+#
 includes:
 
 make-install-dirs:
-	-if test '!' -d $(DESTDIR)$(etcdir); then mkdir -p $(DESTDIR)$(etcdir); fi
-	-if test '!' -d $(DESTDIR)$(known_hosts_dir); then mkdir -p $(DESTDIR)$(known_hosts_dir); fi
-	-if test '!' -d $(DESTDIR)$(host_keys_dir); then mkdir -p $(DESTDIR)$(host_keys_dir); fi
-	-if test '!' -d $(DESTDIR)$(subconfig_dir); then mkdir -p $(DESTDIR)$(subconfig_dir); fi
+	$(INSTALL_DATA_DIR) $(DESTDIR)$(egdir)
+	$(INSTALL_DATA_DIR) $(DESTDIR)$(subconfig_dir)
 
 generate-host-key:
 	-@if test -f $(DESTDIR)$(etcdir)/hostkey; \
@@ -586,36 +587,20 @@ generate-host-key:
 	  fi
 
 install-symlinks:
-	-mv -f $(DESTDIR)$(bindir)/ssh $(DESTDIR)$(bindir)/ssh.old
-	-mv -f $(DESTDIR)$(bindir)/ssh-agent $(DESTDIR)$(bindir)/ssh-agent.old
-	-mv -f $(DESTDIR)$(bindir)/ssh-add $(DESTDIR)$(bindir)/ssh-add.old
-	-mv -f $(DESTDIR)$(bindir)/ssh-askpass $(DESTDIR)$(bindir)/ssh-askpass.old
-	-mv -f $(DESTDIR)$(bindir)/ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen.old
-	-mv -f $(DESTDIR)$(bindir)/scp $(DESTDIR)$(bindir)/scp.old
-	-mv -f $(DESTDIR)$(bindir)/sftp $(DESTDIR)$(bindir)/sftp.old
-	-mv -f $(DESTDIR)$(bindir)/sftp-server $(DESTDIR)$(bindir)/sftp-server.old
-	-mv -f $(DESTDIR)$(bindir)/ssh-signer $(DESTDIR)$(bindir)/ssh-signer.old
-	-mv -f $(DESTDIR)$(bindir)/ssh-probe $(DESTDIR)$(bindir)/ssh-probe.old
-
 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh2 ssh)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-agent2 ssh-agent)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-add2 ssh-add)
-	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-askpass2 ssh-askpass)
+	case x"@CONFPROGRAMS@" in 					\
+	x*askpass*)							\
+	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-askpass2 ssh-askpass) ;;	\
+	esac
 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-keygen2 ssh-keygen)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) scp2 scp)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) sftp2 sftp)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) sftp-server2 sftp-server)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-signer2 ssh-signer)
 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-probe2 ssh-probe)
-	-mv -f $(DESTDIR)$(sbindir)/sshd $(DESTDIR)$(sbindir)/sshd.old
 	(cd $(DESTDIR)$(sbindir) && $(LN_S) sshd2 sshd)
-	-mv -f $(DESTDIR)$(mandir)/man1/ssh.1 $(DESTDIR)$(mandir)/man1/ssh.old.1
-	-mv -f $(DESTDIR)$(mandir)/man1/ssh-add.1 $(DESTDIR)$(mandir)/man1/ssh-add.old.1
-	-mv -f $(DESTDIR)$(mandir)/man1/ssh-agent.1 $(DESTDIR)$(mandir)/man1/ssh-agent.old.1
-	-mv -f $(DESTDIR)$(mandir)/man1/ssh-keygen.1 $(DESTDIR)$(mandir)/man1/ssh-keygen.old.1
-	-mv -f $(DESTDIR)$(mandir)/man1/scp.1 $(DESTDIR)$(mandir)/man1/scp.old.1
-	-mv -f $(DESTDIR)$(mandir)/man1/sftp.1 $(DESTDIR)$(mandir)/man1/sftp.old.1
-	-mv -f $(DESTDIR)$(mandir)/man1/ssh-probe.1 $(DESTDIR)$(mandir)/man1/ssh-probe.old.1
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh2.1 ssh.1)
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-add2.1 ssh-add.1)
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-agent2.1 ssh-agent.1)
@@ -623,7 +608,6 @@ install-symlinks:
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) scp2.1 scp.1)
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) sftp2.1 sftp.1)
 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-probe2.1 ssh-probe.1)
-	-mv -f $(DESTDIR)$(mandir)/man8/sshd.8 $(DESTDIR)$(mandir)/man8/sshd.old.8
 	(cd $(DESTDIR)$(mandir)/man8 && $(LN_S) sshd2.8 sshd.8)
 
 clean-up-old:
@@ -642,23 +626,13 @@ install-exec-hook:
 	-chown root $(DESTDIR)$(bindir)/ssh-signer2
 	-chmod $(SSH_SIGNER_INSTALL_MODE) $(DESTDIR)$(bindir)/ssh-signer2
 
-install-data-hook: make-install-dirs generate-host-key install-symlinks
-	-@if test '!' -f $(DESTDIR)$(etcdir)/sshd2_config ; then \
-	 echo Installing $(DESTDIR)$(etcdir)/sshd2_config ; \
+install-data-hook: make-install-dirs install-symlinks
+	 echo Installing $(DESTDIR)$(egdir)/sshd2_config ; \
 	 $(INSTALL_DATA) $(srcdir)/sshd2_config \
-                         $(DESTDIR)$(etcdir)/sshd2_config ; \
-	fi
-	 echo Updating $(DESTDIR)$(etcdir)/sshd2_config.example ;
-	 $(INSTALL_DATA) $(srcdir)/sshd2_config \
-                         $(DESTDIR)$(etcdir)/sshd2_config.example ;
-	-@if test '!' -f $(DESTDIR)$(etcdir)/ssh2_config ; then \
-	 echo Installing $(DESTDIR)$(etcdir)/ssh2_config ; \
-	 $(INSTALL_DATA) $(srcdir)/ssh2_config \
-                         $(DESTDIR)$(etcdir)/ssh2_config ; \
-	fi
-	 echo Updating $(DESTDIR)$(etcdir)/ssh2_config.example ;
+                         $(DESTDIR)$(egdir)/sshd2_config ;
+	 echo Installing $(DESTDIR)$(egdir)/ssh2_config ; \
 	 $(INSTALL_DATA) $(srcdir)/ssh2_config \
-                         $(DESTDIR)$(etcdir)/ssh2_config.example ;
+                         $(DESTDIR)$(egdir)/ssh2_config ;
 	 echo Updating $(DESTDIR)$(subconfig_dir)/host_ext.example ;
 	 $(INSTALL_DATA) $(srcdir)/subconfig/host_ext.example \
                          $(DESTDIR)$(subconfig_dir)/host_ext.example ;
@@ -671,8 +645,6 @@ install-data-hook: make-install-dirs gen
 	 echo Updating $(DESTDIR)$(subconfig_dir)/user.example ;
 	 $(INSTALL_DATA) $(srcdir)/subconfig/user.example \
                          $(DESTDIR)$(subconfig_dir)/user.example ;
-	-@if test '!' -f $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; then \
-	 echo Installing $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; \
+	 echo Installing $(DESTDIR)$(egdir)/ssh_dummy_shell.out ; \
 	 $(INSTALL_DATA) $(srcdir)/ssh_dummy_shell.out \
-                         $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; \
-	fi
+                         $(DESTDIR)$(egdir)/ssh_dummy_shell.out ;