rpms/ssmtp/F-10 ssmtp.spec,1.20,1.21

Manuel Wolfshant wolfy at fedoraproject.org
Fri Dec 26 15:28:24 UTC 2008


Author: wolfy

Update of /cvs/pkgs/rpms/ssmtp/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16674

Modified Files:
	ssmtp.spec 
Log Message:
previous spec was not the real one


Index: ssmtp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ssmtp/F-10/ssmtp.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ssmtp.spec	26 Dec 2008 15:22:53 -0000	1.20
+++ ssmtp.spec	26 Dec 2008 15:27:54 -0000	1.21
@@ -1,145 +1,230 @@
---- ssmtp-2.61/Makefile.in   2008-06-07 14:41:15.000000000 -0400
-+++ ssmtp-2.61.new/Makefile.in   2008-06-07 14:41:46.000000000 -0400
-@@ -17,6 +17,7 @@
- # Configuration files
- CONFIGURATION_FILE=$(SSMTPCONFDIR)/ssmtp.conf
- REVALIASES_FILE=$(SSMTPCONFDIR)/revaliases
-+ALIASES_FILE=/etc/aliases
- 
- INSTALLED_CONFIGURATION_FILE=$(CONFIGURATION_FILE)
- INSTALLED_REVALIASES_FILE=$(REVALIASES_FILE)
-@@ -34,6 +35,7 @@
- -DSSMTPCONFDIR=\"$(SSMTPCONFDIR)\" \
- -DCONFIGURATION_FILE=\"$(CONFIGURATION_FILE)\" \
- -DREVALIASES_FILE=\"$(REVALIASES_FILE)\" \
-+-DALIASES_FILE=\"$(ALIASES_FILE)\" \
- 
- 
- CFLAGS=@DEFS@ $(EXTRADEFS) @CFLAGS@
-diff -u -r -N ssmtp-2.61/ssmtp.c ssmtp-2.61.new/ssmtp.c
---- ssmtp-2.61/ssmtp.c   2008-06-07 14:41:15.000000000 -0400
-+++ ssmtp-2.61.new/ssmtp.c   2008-06-07 14:41:51.000000000 -0400
-@@ -429,6 +429,50 @@
- }
- 
- /* 
-+ * Eugene:
-+ *
-+ * simple aliases support:
-+ * lookup aliases file and remap rcpt
-+ */
-+char *aliases_lookup(char *str)
-+{
-+	char buf[(BUF_SZ + 1)], *p;
-+	char name[(BUF_SZ + 1)];
-+	FILE *fp;
-+	char *saveptr = NULL;
-+
-+	if((fp = fopen(ALIASES_FILE, "r"))) {
-+		strncpy(name, str, BUF_SZ);
-+		while(fgets(buf, sizeof(buf), fp)) {
-+			/* Make comments invisible */
-+			if((p = strchr(buf, '#'))) {
-+				*p = (char)NULL;
-+			}
-+
-+			/* Ignore malformed lines and comments */
-+			if(strchr(buf, ':') == (char *)NULL) {
-+				continue;
-+			}
-+
-+			/* Parse the alias */
-+			if( (p = strtok_r(buf, ": \t\r\n", &saveptr) ) && !strncmp(p, name, BUF_SZ) &&
-+				(p = strtok_r(NULL, ": \t\r\n", &saveptr) )) {
-+				if(log_level > 0) log_event(LOG_INFO, "Remapping: \"%s\" --> \"%s\"\n", name, p);
-+				strncpy(name, p, BUF_SZ);
-+			}
-+		}
-+
-+		fclose(fp);
-+		if( strcmp( str, name ) == 0 ) {
-+			return strdup(name);
-+		} else {
-+			return aliases_lookup(name);
-+		}
-+
-+	} else  return str; /* can't read aliases? it's not a problem */
-+}
-+
-+/*
- from_strip() -- Transforms "Name <login at host>" into "login at host" or "login at host (Real name)"
- */
- char *from_strip(char *str)
-@@ -654,9 +698,14 @@
- char *rcpt_remap(char *str)
- {
- 	struct passwd *pw;
--	if((root==NULL) || strlen(root)==0 || strchr(str, '@') ||
--		((pw = getpwnam(str)) == NULL) || (pw->pw_uid > MAXSYSUID)) {
--		return(append_domain(str));	/* It's not a local systems-level user */
-+	char *rcpt;
-+
-+	/* before all other mappings */
-+	rcpt = aliases_lookup(str);
-+
-+	if((root==NULL) || strlen(root)==0 || strchr(rcpt, '@') ||
-+		((pw = getpwnam(rcpt)) == NULL) || (pw->pw_uid > MAXSYSUID)) {
-+		return(append_domain(rcpt));   /* It's not a local systems-level user */
- 	}
- 	else {
- 		return(append_domain(root));
-diff -up ssmtp-2.61/README.old ssmtp-2.61/README
---- ssmtp-2.61/README.old	2008-12-26 16:38:31.000000000 +0200
-+++ ssmtp-2.61/README	2008-12-26 16:33:29.000000000 +0200
-@@ -3,12 +3,12 @@ Purpose and value:
-  send their mail via the departmental mailhub from which they pick up their
-  mail (via pop, imap, rsmtp, pop_fetch, NFS... or the like).  This program
-  accepts mail and sends it to the mailhub, optionally replacing the domain in
-- the From: line with a different one.
-+ the From: line with a different one and expanding aliases.
- 
-- WARNING: the above is all it does. It does not receive mail, expand aliases
-- or manage a queue.  That belongs on a mailhub with a system administrator.
-- The man page (ssmtp.8) and the program logic manual (ssmtp_plm) discuss the
-- limitations in more detail.
-+ WARNING: the above is all it does. It does not receive mail, or manage a
-+ queue.  That belongs on a mailhub with a system administrator.  The man page
-+ (ssmtp.8) and the program logic manual (ssmtp_plm) discuss the limitations in
-+ more detail. Expanding aliases is only available after release 2.61-11.8.
- 
-  It uses a minimum of external configuration information, and so can be
-  installed by copying the (right!) binary and an optional four-line config
-diff -up ssmtp-2.61/ssmtp.8.old ssmtp-2.61/ssmtp.8
---- ssmtp-2.61/ssmtp.8.old	2008-12-26 16:38:49.000000000 +0200
-+++ ssmtp-2.61/ssmtp.8	2008-12-26 16:46:33.000000000 +0200
-@@ -22,7 +22,8 @@ placed in dead.letter in the sender's ho
- .PP
- Config files allow one to specify the address to receive mail from
- root, daemon, etc.; a default mailhub; a default domain to be used in
--From: lines; and per-user From: addresses and mailhub names.
-+From: lines; per-user From: addresses and mailhub names; and aliases in the
-+traditional format used by sendmail for the /etc/aliases file.
- .sp
- .PP
- It does not attempt to provide all the functionality of sendmail: it is
-@@ -32,9 +33,8 @@ spool option for non-Sun machines, for m
- difficult (or various) to configure, for machines with known disfeatures in
- their sendmails or for ones where there are ``mysterious problems''. 
- .PP
--It does not do aliasing, which must be done either in the user agent
--or on the mailhub. Nor does it honor .forwards, which have to be done
--on the recieving host.  It especially does not deliver to pipelines.
-+It does not honor .forwards, which have to be done on the recieving host.  It
-+especially does not deliver to pipelines.
- 
- .SH OPTIONS
- Most sendmail options are irrelevent to sSMTP. Those marked ``ignored'' or
-@@ -271,6 +271,8 @@ through mail.isp.com.
-  /etc/ssmtp/ssmtp.conf - configuration file
- .br
-  /etc/ssmtp/revaliases - reverse aliases file
-+.br
-+ /etc/aliases - aliases file
- 
- .SH SEE ALSO
- RFC821, RFC822, ssmtp.conf(5).
+Name:		ssmtp
+Version:	2.61
+Release:	11.8%{?dist}
+Summary:	Extremely simple MTA to get mail off the system to a Mailhub
+Group:		Applications/Internet
+License:	GPLv2+
+URL:		http://packages.debian.org/stable/mail/ssmtp
+Source0:	ftp://ftp.debian.org/debian/pool/main/s/%{name}/%{name}_%{version}.orig.tar.gz
+#Patch0		http://ftp.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.61-9.diff.gz
+Patch0:		%{name}-%{version}.6.patch
+Patch1:		%{name}-2.50.3-maxsysuid.patch
+Patch2:		%{name}-defaultvalues.patch
+Patch3:		%{name}-ssl.certificate.nomatch.patch
+Patch4:		%{name}-password-leak.patch
+Patch5:		%{name}-bcc-fix.patch
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340803
+# replaces RSA's md5 with a GPL compatible implementation
+Patch6:		%{name}-md5auth-non-rsa
+Patch7:		%{name}-unitialized-strdup.patch
+Patch8:		%{name}-authpass.patch
+Patch9:		%{name}-aliases.patch
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+#hack around wrong requires for mutt and mdadm
+%if 0%{?rhel}
+Provides:	MTA smtpdaemon
+%endif
+%if 0%{?fedora} < 8
+Provides:	MTA smtpdaemon
+%endif
+Provides:	%{_sbindir}/sendmail 
+Requires(post):	%{_sbindir}/alternatives
+Requires(preun):	%{_sbindir}/alternatives
+BuildRequires:	openssl-devel
+
+
+%description
+A secure, effective and simple way of getting mail off a system to your mail
+hub. It contains no suid-binaries or other dangerous things - no mail spool
+to poke around in, and no daemons running in the background. Mail is simply
+forwarded to the configured mailhost. Extremely easy configuration.
+
+WARNING: the above is all it does; it does not receive mail, expand aliases
+or manage a queue. That belongs on a mail hub with a system administrator.
+
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+
+
+%build
+#on RHEL3 krb5 is somewhere else
+#test -e /usr/include/krb5.h || CPPFLAGS="-I/usr/kerberos/include"
+#CPPFLAGS=$(pkg-config --cflags-only-I openssl)
+%if "0%{?dist}" == "0.el3" 
+	%define cppflags -I/usr/kerberos/include
+%endif
+%configure --enable-ssl --enable-md5auth --enable-inet6
+%if "0%{?dist}" == "0.el3" 
+	make %{?_smp_mflags} CPPFLAGS=%{cppflags}
+%else
+	make %{?_smp_mflags}
+%endif
+%install 
+rm -rf %{buildroot}
+install -p -D -m 755 %{name} %{buildroot}%{_sbindir}/%{name}
+#install -p -D -m 755 generate_config_alt %{buildroot}%{_bindir}/generate_config_alt
+mkdir %{buildroot}%{_bindir}/
+install -p -D -m 644 revaliases %{buildroot}%{_sysconfdir}/ssmtp/revaliases
+install -p -m 644 ssmtp.conf %{buildroot}%{_sysconfdir}/ssmtp/ssmtp.conf
+install -p -D -m 644 ssmtp.8 %{buildroot}%{_mandir}/man8/ssmtp.8
+install -p -D -m 644 debian/mailq.8 %{buildroot}%{_mandir}/man1/mailq.ssmtp.1
+install -p -m 644 debian/newaliases.8 %{buildroot}%{_mandir}/man1/newaliases.ssmtp.1
+install -p -D -m 644 ssmtp.conf.5 %{buildroot}%{_mandir}/man5/ssmtp.conf.5
+ln -s %{_sbindir}/%{name} %{buildroot}%{_sbindir}/sendmail.ssmtp
+ln -s %{_sbindir}/%{name} %{buildroot}%{_bindir}/newaliases.ssmtp
+ln -s %{_sbindir}/%{name} %{buildroot}%{_bindir}/mailq.ssmtp
+
+
+%clean
+rm -rf %{buildroot}
+
+%post
+%{_sbindir}/alternatives  --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.ssmtp 30 \
+	--slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.ssmtp \
+	--slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.ssmtp \
+	--slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/mailq.ssmtp.1.gz \
+	--slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.ssmtp.1.gz \
+	--slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man8/ssmtp.8.gz 
+
+
+%preun
+#only remove in case of erase (but not at upgrade)
+if [ $1 -eq 0 ] ; then
+	%{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.ssmtp
+fi
+exit 0
+
+#%postun
+#if [ $1 -eq 0 ] ; then
+#	/usr/sbin/alternatives --auto mta
+#fi
+#exit 0
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING INSTALL README TLS CHANGELOG_OLD debian/changelog
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+%{_mandir}/man1/*
+%{_sbindir}/%{name}
+#%{_bindir}/generate_config_alt
+%{_sbindir}/sendmail.ssmtp
+%{_bindir}/newaliases.ssmtp
+%{_bindir}/mailq.ssmtp
+%dir %{_sysconfdir}/ssmtp/
+%config(noreplace) %{_sysconfdir}/ssmtp/revaliases
+%config(noreplace) %{_sysconfdir}/ssmtp/ssmtp.conf
+
+
+%changelog
+* Fri Dec 26 2008 Manuel "lonely wolf" Wolfshant <wolfy at nobugconsulting.ro> 2.61-11.8
+- integrate patch adding support for aliases; initial version received from Tako 
+  Schotanus <tako at codejive.org>, who adapted it from "eatnumber1"
+- README and the man page now reflect that aliases are expanded and used
+
+* Wed Nov 26 2008 Manuel "lonely wolf" Wolfshant <wolfy at nobugconsulting.ro> 2.61-11.7
+- integrate patch from Andreas Dilger, fixes https://bugzilla.redhat.com/show_bug.cgi?id=430608
+
+* Fri Sep 12 2008 Manuel "lonely wolf" Wolfshant <wolfy at nobugconsulting.ro> 2.61-11.6.1
+- use conditionals to consolidate specs for Fedora and EPEL
+
+* Thu Sep 11 2008 Manuel "lonely wolf" Wolfshant <wolfy at nobugconsulting.ro> 2.61-11.6
+- patch to fix CVE-2008-3962 (courtesy https://bugs.gentoo.org/127592)
+- cleanup of other patches, make build with fuzz=0
+
+* Sat Aug 02 2008 Manuel "lonely wolf" Wolfshant <wolfy at nobugconsulting.ro> 2.61-11.5.4
+- work around rpmbuild more strict syntax checker
+
+* Tue Feb 12 2008 Manuel "lonely wolf" Wolfshant <wolfy at nobugconsulting.ro> 2.61-11.5.3
+- rebuilt for gcc 4.3.0
+
+* Wed Dec 5 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.5.2
+- rebuilt for newer openssl
+- fix usage of disttag for compatibility with mock + el3
+
+* Wed Oct 24 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.5.1
+- adds back /usr/sbin/sendmail provides, rpmbuild by default does not add it
+
+* Wed Oct 24 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.5
+- fixes https://bugzilla.redhat.com/show_bug.cgi?id=235594 by removing MTA
+  and smtpdaemon provides, as the packages which required those were fixed
+
+* Tue Oct 16 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.4
+- includes patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340803
+  replacing md5 from RSA with a version released under GPLv2+
+- fix URL for upstream
+
+* Fri Aug 22 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.3.1
+- rebuilt
+
+* Fri Aug 10 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.3
+- fix release tag, previous one did not match the changelog
+
+* Fri Aug 3 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.2
+- license clarification
+
+* Sun Dec 10 2006 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.1
+- fix double %%changelog entry
+
+* Fri Dec 08 2006 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11
+- fix security leak (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=369542 )
+- include more patches from debian (report an error in treating Bcc: addresses and if the SSL certificate does not match )
+
+* Tue Nov 28 2006 lonely wolf <wolfy at nobugconsulting.ro> 2.61-10
+- fix silly typo in changelog
+
+* Tue Nov 28 2006 lonely wolf <wolfy at nobugconsulting.ro> 2.61-9
+- included Ville Skyttä's patch for saner default values in ssmtp.conf (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217270)
+
+* Mon Oct 10 2006 lonely wolf <wolfy at pcnet.ro> 2.61-8
+- enabled IPv6 (just added this option to %%configure, the capability was already there)
+- removed yet another man page from %%Provides
+- cosmetic fixes - consistent use of macros
+- added a missing Require
+- I have also included a [commented] URL to the current patch (v9) provided by Debian. Because starting with version 8 the patch modifies the SSL libraries used. I will include this modification once I can perform more tests. 
+
+* Mon Oct 10 2006 lonely wolf <wolfy at pcnet.ro> 2.61-7
+- removed man pages and stubs from %%Provides
+
+* Fri Sep 22 2006 lonely wolf <wolfy at pcnet.ro> 2.61-6
+- cosmetic fixes
+
+* Tue Apr 11 2006 lonely wolf <wolfy at pcnet.ro> 2.61-5
+- cleaner hack for RHEL 3
+- added back Provides: smtpdaemon
+- correct typo in Provides
+ 
+* Tue Apr 11 2006 lonely wolf <wolfy at pcnet.ro> 2.61-4
+- hack for RHEL 3 which has krb5.h in a different place
+ 
+* Mon Apr 10 2006 lonely wolf <wolfy at pcnet.ro> 2.61-3
+- removed Requires: openssl
+- removed Provides: smtpdaemon
+- cleaning of %%files
+- correct typos in version numbers in changelog
+- disabled "alternatives --auto mta" in postrun macro, pending more tests
+
+* Sat Apr 8 2006 lonely wolf <wolfy at pcnet.ro> 2.61-2
+- fix spec file: consistent use of buildroot macro, no double "ssmtp" in files' name, switch back the name of the main patch to the one used by Debian
+- removed the generate_config_alt script; it is ugly, buggy and completely replaces the default provided configuration file, including the comments (which are useful)
+- add openssl to requires and openssl-devel to buildrequires
+- fix pre/post install scriptlets (upgrade would have removed the files from the alternatives system)
+- remove two unneeded files from the alternatives call; man sendmail will default to the page provided by ssmtp
+
+* Thu Apr 6 2006 lonely wolf <wolfy at pcnet.ro> 2.61-1
+- Initial rpm version, based on Debian sources & patch
+- Includes patch from Mandrake to lower the default system UIDs from 1000 to 500
+- Includes generate_config_alt, a small script to generate a customized ssmtp.conf (thus overriding the default one); beware that this script will completely replace the default ssmtp.conf.
+- Customized to play nice in the alternatives environment




More information about the fedora-extras-commits mailing list