[scponly] RE: 3.1 configure scripts

Karl DeBisschop kdebisschop at alert.infoplease.com
Mon Sep 16 15:43:31 EDT 2002


>	Joe/all --

> 	I just tried out scponly-3.1 and am not having any luck with
> that configure script.  I have one of the 'naughty' rh 7.3
> systems mentioned below.
> 	Still need that workaround.
> 
> > - a hack to the configure script that adds a workaround for
> > /bin/sh interpreters that are not really the bourne shell.  a
> > couple people complained that configure could not find their
> > /bin/ls, /bin/whatever binaries.  the following workaround
> > got them through this:
> >
> > export PATH=3D$PATH:/bin
> > ./configure

I found that this type of substitution in configure.in allowed it to
build for me:

	SCPONLY_PATH_PROG_DEFINE([PROG_LS],    [ls], \  
	[/bin:/usr/bin:/sbin:/usr/sbin])

(as shippped, there's no default path).

But since that requires running autoconf again, I had to change several
other things (this all for RH73). Then it built, but did not compile.

I have attached my diff and RPM spec on the off chance it may be a
useful starting point

-- 
Karl DeBisschop <kdebisschop at alert.infoplease.com>
Director, Software Engineering & Development
Information Please (http://www.infoplease.com)
617.542.6500 x2332
-------------- next part --------------
%define name scponly
%define version 3.1
%define release 1

Summary: Allow scp only remote access
Name: %{name}
Version: %{version}
Release: %{release}
License: freely distributable
Group: Networking/Remote access
Source0: %{name}-%{version}.tgz
Patch0: configure.in.patch
Patch1: configure.patch
Url: http://sublimation.org/scponly
BuildRoot: %{_tmppath}/%{name}-root
Requires: openssh-server >= 2.9 openssh-clients >= 2.9

%description
"Sscponly" is an alternative 'shell' (of sorts) for system
administrators who would like to provide access to remote users to
both read and write local files without providing any remote
execution priviledges.  Functionally, it is best described as a
wrapper to the "tried and true" ssh suite of applications.

%prep
%setup
%patch0 -p1
%patch1 -p1

%build
%configure --disable-sftp --disable-rsync --disable-winscp-compat --disable-gftp-compat --disable-chrooted-binary
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sbindir} \
	$RPM_BUILD_ROOT%{_bindir} \
	$RPM_BUILD_ROOT%{_mandir}/man8 \
	$RPM_BUILD_ROOT%{_sysconfdir}/scponly
install -s scponly $RPM_BUILD_ROOT%{_sbindir}
install scponly.8 $RPM_BUILD_ROOT%{_mandir}/man8/
install scpyonly.8.alt $RPM_BUILD_ROOT%{_mandir}/man8/
install setup_chroot.sh $RPM_BUILD_ROOT%{_bindir}
echo 0>$RPM_BUILD_ROOT%{_sysconfdir}/scponly/debuglevel

%clean
rm -rf $RPM_BUILD_ROOT
						
%files
%defattr(-,root,root)
%doc AUTHOR CHANGELOG CONTRIB COPYING README INSTALL
%attr(755,root,root)  %{_sbindir}/scponly
%attr(644,root,root)  %{_sysconfdir}/scponly/debuglevel
%attr(755,root,root)  %{_mandir}/man8/scponly.8.gz
%attr(755,root,root)  %{_mandir}/man8/scpyonly.8.alt.gz

%changelog
* Mon Aug 13 2001 Giuseppe Ghibò <ghibo at mandrakesoft.com> 1.1-1mdk
- initial release.
- added Patch0.
-------------- next part --------------
--- scponly-3.1/configure.in	Tue Sep 10 13:53:07 2002
+++ ../SOURCES/configure.in	Mon Sep 16 13:03:12 2002
@@ -1,17 +1,24 @@
-# Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
 
-# stupid hack to properly parse $PATH for /bin
-# if this breaks your configure, delete it
-# all it does is append the first dir to the end
-first_part=`echo $PATH | cut -f1 -d\:`
-export PATH=$PATH:$first_part
-
-#
-# Say what we are:
-AC_INIT([scponly], [3.0], [joe at sublimation.org])
-AC_CONFIG_SRCDIR([helper.c])
-AC_CONFIG_HEADERS([config.h])
+dnl stupid hack to properly parse $PATH for /bin
+dnl if this breaks your configure, delete it
+dnl all it does is append the first dir to the end
+dnl first_part=`echo $PATH | cut -f1 -d\:`
+dnl export PATH=$PATH:$first_part
+
+dnl
+dnl Say what we are:
+AC_INIT([scponly.c])
+PACKAGE=scponly
+PACKAGE_NAME=scponly
+AC_DEFINE(PACKAGE_NAME)
+PACKAGE_VERSION=3.1
+AC_DEFINE(PACKAGE_VERSION)
+PACKAGE_BUGREPORT=joe at sublimation.org
+AC_DEFINE(PACKAGE_BUGREPORT)
+dnl AC_CONFIG_SRCDIR([helper.c])
+AC_CONFIG_HEADER([config.h])
 
 AC_CANONICAL_HOST
 
 if test "$host_os" = Solaris; then
@@ -20,9 +27,9 @@
 
 
 AC_DEFINE(HOST_OS,$host_os)
 
-# Checks for programs.
+dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PATH_PROG(PROG_CUT, cut)
@@ -31,9 +38,9 @@
 AC_PATH_PROG(PROG_LDD, ldd)
 AC_PATH_PROG(PROG_USERADD, useradd)
 AC_PATH_PROG(PROG_PWD_MKDB, pwd_mkdb)
 
-# Features wanted for this installation:
+dnl Features wanted for this installation:
 AC_ARG_ENABLE([wildcards-enabled],
 	[  --disable-wildcards	disable wildcard processing], ,
 	[AC_DEFINE([ENABLE_WILDCARDS])])
 
@@ -61,44 +68,39 @@
 	[  --enable-chrooted-binary	install chrooted binary 'scponlyc'], 
 	[AC_SUBST([CHROOTED_NAME], [scponlyc])
 	 AC_DEFINE([CHROOTED_NAME], ["scponlyc"]) ])
 
-# Check for binaries which will be launched by scponly
-SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER], [sftp-server],
-                         [/usr/lib:/usr/libexec/openssh])
-			 # Debian uses /usr/lib
-			 # Red Hat uses /usr/libexec/openssh
-			 # Many a *BSD uses $PATH itself
-SCPONLY_PATH_PROG_DEFINE([PROG_LS],    [ls])
-SCPONLY_PATH_PROG_DEFINE([PROG_SCP],   [scp])
-SCPONLY_PATH_PROG_DEFINE([PROG_RM],    [rm])
-SCPONLY_PATH_PROG_DEFINE([PROG_LN],    [ln])
-SCPONLY_PATH_PROG_DEFINE([PROG_MV],    [mv])
-SCPONLY_PATH_PROG_DEFINE([PROG_CHMOD], [chmod])
-SCPONLY_PATH_PROG_DEFINE([PROG_CHOWN], [chown])
-SCPONLY_PATH_PROG_DEFINE([PROG_MKDIR], [mkdir])
-SCPONLY_PATH_PROG_DEFINE([PROG_RMDIR], [rmdir])
-
-# Check for binaries required by the WinSCP compatibility mode
-SCPONLY_PATH_PROG_DEFINE([PROG_PWD],    [pwd])
-SCPONLY_PATH_PROG_DEFINE([PROG_GROUPS], [groups])
-SCPONLY_PATH_PROG_DEFINE([PROG_ECHO],   [echo])
+SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER], [sftp-server],[/usr/lib:/usr/libexec/openssh])
+SCPONLY_PATH_PROG_DEFINE([PROG_LS],    [ls],    [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_SCP],   [scp],   [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_RM],    [rm],    [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_LN],    [ln],    [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_MV],    [mv],    [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_CHMOD], [chmod], [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_CHOWN], [chown], [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_MKDIR], [mkdir], [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_RMDIR], [rmdir], [/bin:/usr/bin:/sbin:/usr/sbin])
+
+dnl Check for binaries required by the WinSCP compatibility mode
+SCPONLY_PATH_PROG_DEFINE([PROG_PWD],    [pwd],    [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_GROUPS], [groups], [/bin:/usr/bin:/sbin:/usr/sbin])
+SCPONLY_PATH_PROG_DEFINE([PROG_ECHO],   [echo],   [/bin:/usr/bin:/sbin:/usr/sbin])
 
 if test "${enable_rsync+set}" = set; then
-	SCPONLY_PATH_PROG_DEFINE([PROG_RSYNC],   [rsync])
+	SCPONLY_PATH_PROG_DEFINE([PROG_RSYNC],   [rsync], [/bin:/usr/bin:/sbin:/usr/sbin])
 fi	
 
-# Checks for libraries.
-# Checks for header files.
+dnl Checks for libraries.
+dnl Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([stdlib.h string.h syslog.h unistd.h wordexp.h glob.h libgen.h])
 
-# Checks for typedefs, structures, and compiler characteristics.
+dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
 
-# Checks for library functions.
-AC_FUNC_MALLOC
-AC_CHECK_FUNCS([atexit bzero strchr strerror glob wordexp strspn basename])
+dnl Checks for library functions.
+AC_FUNC_ALLOCA
+AC_CHECK_FUNCS([malloc atexit bzero strchr strerror glob wordexp strspn basename])
 
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT([setup_chroot.sh])
+dnl AC_CONFIG_FILES([Makefile])
+AC_OUTPUT([Makefile setup_chroot.sh])


More information about the scponly mailing list