Is fixpaths the only perl dependency?
Mo DeJong
mdejong at cygnus.com
Mon Dec 4 15:29:13 EST 2000
On Sat, 2 Dec 2000, Damien Miller wrote:
> On Fri, 1 Dec 2000, Mo DeJong wrote:
>
> > I took a quick peek at the fixpaths script
> > and it does not look too complex, seems
> > like something an AWK script would be
> > able to handle. The fixprogs looks
> > more complex, it is used during the
> > build process or just for testing
> > ala "make check" ?
>
> It is used for building if you are using the builtin random number
> collection routines.
Ok, I will have to look at that one later. It looks a lot
more complex than fixpaths.
> > I am willing to hack up an awk script
> > to take the place of fixpaths if it
> > will be accepted into the next release.
>
> I am not really that keen on fixing what isn't broken. If you need to
> do it for other reasons then sure - go ahead, but IMO you energy would
> be better spent on one of the TODO items :)
Woops, did I say awk, I meant sed. I am sure from your point
of view it is "not broken", but it does not build under
the default Cygwin install so that is broken in my book.
It is fine to require a bunch of installed programs on
a developers box, but if someone just wants to build
openssh they should not need to have everything installed.
At any rate, I have attached a patch that replaces the
fixpaths script with an inlined sed script. I ran it
on my Linux box and it worked there, so it should
work fine under Cygwin. Of course, I will not be able
to test that until tomorrow. I guess you could use
this for a ChangeLog entry.
20001203
- (mdejong at redhat.com) Replace fixpaths with a sed script.
While writing this up, I noticed something strange.
I don't get why paths are replaced in the ssh_config
and primes files. There are paths in sshd_config
that need replacing but I don't see any in ssh_config
or primes. Does anyone know what is up with that?
My patch does not change how it currently works,
I just thought I might point it out.
Mo DeJong
Red Hat Inc
-------------- next part --------------
diff -u -r old/openssh/Makefile.in openssh/Makefile.in
--- old/openssh/Makefile.in Tue Nov 28 18:28:50 2000
+++ openssh/Makefile.in Sun Dec 3 18:48:44 2000
@@ -26,6 +26,7 @@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
PERL=@PERL@
+SED=@SED@
ENT=@ENT@
XAUTH_PATH=@XAUTH_PATH@
LDFLAGS=-L. @LDFLAGS@
@@ -51,20 +52,20 @@
CONFIGFILES=sshd_config ssh_config primes
PATHSUBS = \
- -D/etc/ssh_config=$(sysconfdir)/ssh_config \
- -D/etc/ssh_known_hosts=$(sysconfdir)/ssh_known_hosts \
- -D/etc/sshd_config=$(sysconfdir)/sshd_config \
- -D/usr/libexec=$(libexecdir) \
- -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv \
- -D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key \
- -D/etc/ssh_host_dsa_key=$(sysconfdir)/ssh_host_dsa_key \
- -D/etc/ssh_host_rsa_key=$(sysconfdir)/ssh_host_rsa_key \
- -D/var/run/sshd.pid=$(piddir)/sshd.pid \
- -D/etc/primes=$(sysconfdir)/primes \
- -D/etc/sshrc=$(sysconfdir)/sshrc \
- -D/usr/X11R6/bin/xauth=$(XAUTH_PATH)
+ -e 's|/etc/ssh_config|$(sysconfdir)/ssh_config|g' \
+ -e 's|/etc/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \
+ -e 's|/etc/sshd_config|$(sysconfdir)/sshd_config|g' \
+ -e 's|/usr/libexec|$(libexecdir)|g' \
+ -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \
+ -e 's|/etc/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \
+ -e 's|/etc/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \
+ -e 's|/etc/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \
+ -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \
+ -e 's|/etc/primes|$(sysconfdir)/primes|g' \
+ -e 's|/etc/sshrc|$(sysconfdir)/sshrc|g' \
+ -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g'
-FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
+FIXPATHSCMD = $(SED) $(PATHSUBS)
all: $(TARGETS) $(CONFIGFILES)
@@ -108,7 +109,7 @@
$(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh log-client.o $(LIBS)
$(MANPAGES) $(CONFIGFILES)::
- $(FIXPATHSCMD) $(srcdir)/$@
+ $(FIXPATHSCMD) $(srcdir)/$@ > $@.out
clean:
rm -f *.o *.a $(TARGETS) logintest config.cache config.log
diff -u -r old/openssh/configure.in openssh/configure.in
--- old/openssh/configure.in Tue Nov 28 18:28:50 2000
+++ openssh/configure.in Sun Dec 3 19:02:10 2000
@@ -10,6 +10,7 @@
AC_PROG_INSTALL
AC_CHECK_PROG(AR, ar, ar)
AC_PATH_PROG(PERL, perl)
+AC_PATH_PROG(SED, sed)
AC_SUBST(PERL)
AC_PATH_PROG(ENT, ent)
AC_SUBST(ENT)
More information about the openssh-unix-dev
mailing list