[fetchmail][PATCH] Re: Tried to install 6.2.9-rc8 --with-ssl

Sunil Shetye shetye@bombay.retortsoft.com
Sat, 19 Nov 2005 16:47:47 +0530


--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Quoting from Sunil Shetye's mail on Sat, Nov 12, 2005:
> Quoting from Peter Church's mail on Fri, Nov 11, 2005 at 02:42:05PM -0000:
> >   Like the title says :( I have tried to install this version and come up  
> > with the following
> > error. I had a previous version installed however I deleted the old  
> > binaries before I started...
> > 
> > bash-3.00# make install
> 
> ...
> 
> > test -z "" || /bin/sh ./mkinstalldirs ""
> >  ./install-sh -c -m 644 'fetchmailconf.py' '/fetchmailconf.py'
> 
> It is installing fetchmailconf.py on the root directory! This means
> that pythondir and/or pyexecdir are not set correctly.
> 
> > ./py-compile: Missing argument to --basedir.
> > *** Error code 1
> 
> Could you run these commands and tell the output?

If python is missing, "make install" gives the above errors. It seems
that the configure script accepts a missing python, but the Makefile
generated by configure cannot cope with a missing python.

This patch now avoids installing fetchmailconf* if python is missing.

This patch also fixes specgen.sh to handle the missing python. If
python is missing, with_python should be set to 0 manually and the
spec file should work. The spec file has been cleaned up too.

To check the patch, python needs to be removed from the system first
as there is no configure option to disable checking the location of
python.

-- 
Sunil Shetye.

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: attachment; filename="fetchmail-6.2.9-python.patch"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by alice.bombay.retortsoft.com id jAJBBnqf007664

Index: fetchmail/configure.ac
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- fetchmail/configure.ac	(revision 4465)
+++ fetchmail/configure.ac	(working copy)
@@ -18,6 +18,7 @@
=20
 dnl the : states that python is optional
 AM_PATH_PYTHON(2.0,,:)
+AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" !=3D :])
=20
 AC_PROG_AWK
 AC_PROG_CC
Index: fetchmail/specgen.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- fetchmail/specgen.sh	(revision 4465)
+++ fetchmail/specgen.sh	(working copy)
@@ -12,6 +12,8 @@
=20
 cat <<EOF
 # Note: Do not hack fetchmail.spec by hand -- it's generated by specgen.=
sh
+%define with_python 1
+
 Name:		fetchmail
 Version:	$1
 Release:	1
@@ -104,6 +106,7 @@
 eller mailx. Der medf=F8lger ogs=E5 et interaktivt GUI-baseret
 konfigurations-program, som kan bruges af almindelige brugere.
=20
+%if %{with_python}
 %package -n fetchmailconf
 Summary:	A GUI configurator for generating fetchmail configuration files
 Summary(de):	GUI-Konfigurator f=FCr fetchmail
@@ -136,6 +139,7 @@
=20
 %description -n fetchmailconf -l pl
 GUI konfigurator do fetchmaila napisany w pythonie.
+%endif
=20
 %prep
 %setup -q
@@ -143,23 +147,22 @@
 %build
 LDFLAGS=3D"-s"
 export CFLAGS LDFLAGS
-#./configure --prefix=3D/usr --disable-nls --without-kerberos --mandir=3D=
%{_mandir} --with-SSL --enable-inet6
-./configure --prefix=3D/usr --without-included-gettext --without-kerbero=
s --mandir=3D%{_mandir} --with-ssl --enable-inet6
-                         # Remove --disable-nls, add --without-included-=
gettext
-                         # for internationalization. Also look below.
+%configure --without-included-gettext --without-kerberos --with-ssl --en=
able-inet6
 make
=20
 %install
-if [ -d \$RPM_BUILD_ROOT ]; then rm -rf \$RPM_BUILD_ROOT; fi
-mkdir -p \$RPM_BUILD_ROOT/{etc/X11/wmconfig,usr/lib/rhs/control-panel}
-make install-strip prefix=3D\$RPM_BUILD_ROOT/usr mandir=3D\$RPM_BUILD_RO=
OT%{_mandir}
+rm -rf \$RPM_BUILD_ROOT
+make install-strip DESTDIR=3D\$RPM_BUILD_ROOT
+
+%if %{with_python}
+mkdir -p \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
 cp rh-config/*.{xpm,init} \$RPM_BUILD_ROOT/usr/lib/rhs/control-panel
-rm -rf contrib/RCS
-chmod 644 contrib/*
+mkdir -p \$RPM_BUILD_ROOT/etc/X11/wmconfig
 cp rh-config/fetchmailconf.wmconfig \$RPM_BUILD_ROOT/etc/X11/wmconfig/fe=
tchmailconf
-#cd \$RPM_BUILD_ROOT%{_mandir}/man1
-#ln -sf fetchmail.1 fetchmailconf.1
+%endif
=20
+chmod 644 contrib/*
+
 %clean
 rm -rf \$RPM_BUILD_ROOT
=20
@@ -171,18 +174,19 @@
 %doc fetchmail-features.html fetchmail-FAQ.html esrs-design-notes.html
 %doc design-notes.html
 %attr(644, root, man) %{_mandir}/man1/fetchmail.1*
-%attr(755, root, root) /usr/bin/fetchmail
-# Uncomment the following to support internationalization
-%attr(644,root,root) /usr/share/locale/*/LC_MESSAGES/fetchmail.mo
-# Uncomment the following to make split fetchmail and fetchmailconf pack=
ages
+%attr(755, root, root) %{_bindir}/fetchmail
+%attr(644,root,root) %{_datadir}/locale/*/LC_MESSAGES/fetchmail.mo
+
+%if %{with_python}
 %files -n fetchmailconf
 %defattr (644, root, root, 755)
 %attr(644,root,root) /etc/X11/wmconfig/fetchmailconf
-%attr(755,root,root) /usr/bin/fetchmailconf
+%attr(755,root,root) %{_bindir}/fetchmailconf
 %attr(644, root, man) %{_mandir}/man1/fetchmailconf.1*
 %attr(755,root,root) %{_prefix}/lib/python*/site-packages/fetchmailconf.=
py*
 /usr/lib/rhs/control-panel/fetchmailconf.xpm
 /usr/lib/rhs/control-panel/fetchmailconf.init
+%endif
=20
 %changelog
 * `date '+%a %b %d %Y'` <$email> ${version}
Index: fetchmail/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- fetchmail/Makefile.am	(revision 4465)
+++ fetchmail/Makefile.am	(working copy)
@@ -11,10 +11,15 @@
 BUILT_SOURCES=3D		rcfile_y.h
=20
 bin_PROGRAMS=3D		fetchmail
+
+dist_noinst_SCRIPTS=3D	specgen.sh
+dist_man1_MANS=3D		fetchmail.man
+
+if HAVE_PYTHON
 nodist_bin_SCRIPTS=3D	fetchmailconf
 python_PYTHON=3D		fetchmailconf.py
-dist_noinst_SCRIPTS=3D	specgen.sh
-dist_man1_MANS=3D		fetchmail.man fetchmailconf.man
+dist_man1_MANS+=3D	fetchmailconf.man
+endif
=20
 CLEANFILES=3D		$(nodist_bin_SCRIPTS)
=20
@@ -94,8 +99,10 @@
 	    trio/CHANGES trio/README strlcpy.3 \
 	    m4-local/ac-archive-license.txt m4-local/ac_ma_search_package.m4
=20
+if HAVE_PYTHON
 fetchmailconf:
 	( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py=
 "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
+endif
=20
 FAQ: fetchmail-FAQ.html
 	AWK=3D$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail=
-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }

--bp/iNruPH9dso1Pn--