Patch to change installation of ssh_config and sshd_config
David Rankin
drankin at bohemians.lexington.ky.us
Wed Jan 19 03:44:16 EST 2000
The NetBSD packages system "forbids" packages from installing stuff outside
of the package tree (typically "/usr/pkg"). OpenSSH installs ssh*_config
into $sysconfdir by default, which violates that rule. Christos Zoulas
reworked Makefile.in to seperate the install from sysconfdir, and I added
some logic to configure.in to add --with-example-dir.
NetBSD's package would install this by default in
$prefix/share/examples/openssh rather than $sysconfdir. I personally like
that approach, but I don't know if it'd be appropriate for the base install
to take that approach.
Thanks,
David
Index: Makefile.in
===================================================================
RCS file: /usr/local/cvs/openssh/Makefile.in,v
retrieving revision 1.18
diff -u -r1.18 Makefile.in
--- Makefile.in 2000/01/17 19:23:49 1.18
+++ Makefile.in 2000/01/18 16:32:21
@@ -5,6 +5,7 @@
libexecdir=@libexecdir@
mandir=@mandir@
sysconfdir=@sysconfdir@
+examplesdir=@examplesdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -137,16 +138,16 @@
$(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_LOCATION} ; \
fi
- if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
- $(INSTALL) -d $(sysconfdir); \
- $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \
- $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \
+ if [ ! -f $(examplesdir)/ssh_config -a ! -f $(examplesdir)/sshd_config ]; then \
+ $(INSTALL) -d $(examplesdir); \
+ $(INSTALL) -m 644 ssh_config $(examplesdir)/ssh_config; \
+ $(INSTALL) -m 644 sshd_config $(examplesdir)/sshd_config; \
fi
uninstallall: uninstall
- -rm -f $(sysconfdir)/ssh_config
- -rm -f $(sysconfdir)/sshd_config
- -rmdir $(sysconfdir)
+ -rm -f $(examplesdir)/ssh_config
+ -rm -f $(examplesdir)/sshd_config
+ -rmdir $(examplesdir)
-rmdir $(bindir)
-rmdir $(sbindir)
-rmdir $(mandir)/man1
Index: configure.in
===================================================================
RCS file: /usr/local/cvs/openssh/configure.in,v
retrieving revision 1.22
diff -u -r1.22 configure.in
--- configure.in 2000/01/17 19:34:14 1.22
+++ configure.in 2000/01/18 16:28:52
@@ -524,6 +524,23 @@
]
)
+dnl Check to see where config examples get installed
+AC_ARG_WITH(example-dir,
+ [ --with-example-dir=DIR Install directory for config examples],
+ [
+ if test "x$withval" != "$xno" ; then
+ if test "x$withval" != "$xyes" ; then
+ examplesdir=$withval
+ fi
+ fi
+ ],
+ [
+ examplesdir="${sysconfdir}"
+ ]
+)
+
+AC_SUBST(examplesdir)
+
dnl Check whether user wants Kerberos support
AC_ARG_WITH(kerberos4,
[ --with-kerberos4=PATH Enable Kerberos 4 support],
More information about the openssh-unix-dev
mailing list