Mailing List Archive

Patch to change installation of ssh_config and sshd_config
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],
Re: Patch to change installation of ssh_config and sshd_config [ In reply to ]
On Tue, 18 Jan 2000, David Rankin wrote:

> 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.

Can you get away with something like:

make install sysconfdir=/usr/share/examples/openssh

?

Regards,
Damien

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)
Re: Patch to change installation of ssh_config and sshd_config [ In reply to ]
On Jan 20, 11:26pm, djm@mindrot.org (Damien Miller) wrote:
-- Subject: Re: Patch to change installation of ssh_config and sshd_config

| On Tue, 18 Jan 2000, David Rankin wrote:
|
| > 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.
|
| Can you get away with something like:
|
| make install sysconfdir=/usr/share/examples/openssh
|

Not really, because I want openssh to look in /etc for its config file.
I just don't want them installed when I build it, because the drain-bamaged
package system does not allow me to do it.

christos