Subject: [alpine-devel] [PATCH] testing/ssmtp: hostname fix

From: Leonardo Arena <[email-masked]>
Date: Tue, 27 Jan 2009 11:28:43 +0100

Please review attached patch
leo
From d09834d236335b9947772a5b627f28f2d1bb2049 Mon Sep 17 00:00:00 2001
From: Leonardo Arena <[email-masked]>
Date: Tue, 27 Jan 2009 10:26:45 +0000
Subject: [PATCH] testing/ssmtp: hostname fix

---
 testing/ssmtp/APKBUILD              |    9 ++--
 testing/ssmtp/generate_config.patch |   76 ++++++++++++++++++++++------------
 2 files changed, 53 insertions(+), 32 deletions(-)

diff --git a/testing/ssmtp/APKBUILD b/testing/ssmtp/APKBUILD
index be2f4de..2f63b68 100644
--- a/testing/ssmtp/APKBUILD
+++ b/testing/ssmtp/APKBUILD
@@ -11,12 +11,11 @@ depends="uclibc"
 makedepends="openssl-dev"
 install=
 source="http://ftp.debian.org/debian/pool/main/s/$pkgname/${pkgname}_${pkgver}.orig.tar.gz
-        generate_config.patch
-        CVE-2008-3962.patch"
+        CVE-2008-3962.patch
+        generate_config.patch"
 
 build() {
 	cd "$srcdir/$pkgname"
-	sed -i -e 's/hostname --fqdn/hostname -f/g' generate_config
 	patch generate_config ../../generate_config.patch
 	sed -i -e 's:$(CC) -o:$(CC) @LDFLAGS@ -o:' Makefile.in
 	patch -p1 ssmtp.c ../../CVE-2008-3962.patch
@@ -29,5 +28,5 @@ build() {
 	make prefix="$pkgdir"/usr etcdir="$pkgdir"/etc mandir="$pkgdir"/usr/share/man install
 }
 md5sums="257ac04e62ab7e3616e220333a1140cb  ssmtp_2.62.orig.tar.gz
-d799575f8edefaa279b4cef4df55f874  generate_config.patch
-18f0686f1b8888d187f06dcff3b6212a  CVE-2008-3962.patch"
+18f0686f1b8888d187f06dcff3b6212a  CVE-2008-3962.patch
+c70c395fe71589ca8b10b666455d5071  generate_config.patch"
diff --git a/testing/ssmtp/generate_config.patch b/testing/ssmtp/generate_config.patch
index e154310..dd4baf9 100644
--- a/testing/ssmtp/generate_config.patch
+++ b/testing/ssmtp/generate_config.patch
@@ -1,27 +1,49 @@
-18,34c18
-< echo "Please enter the mail name of your system."
-< echo "This is the hostname portion of the address to be shown"
-< echo "on outgoing news and mail messages headers."
-< echo "The default is $syshostname, your system's host name."
-< echo
-< echo -n "Mail name [$syshostname]: "
-< read mailname
-< echo
-< 
-< echo -n "Please enter the SMTP port number [25]: "
-< read smtpport
-< if test -z "$smtpport"
-< then
-< 	mailhub=$mailhub
-< else
-< 	mailhub="$mailhub:$smtpport"
-< fi
----
-> mailhub="$mailhub:25"
-61,66d44
-< 
-< echo
-< echo
-< echo "Please check the configuration file $1 for correctness."
-< echo
-< echo
+--- src/ssmtp/generate_config	2004-07-23 05:58:48.000000000 +0000
++++ generate_config	2009-01-27 10:09:11.000000000 +0000
+@@ -4,7 +4,7 @@
+ # Figure out the system's mailname
+ #
+ 
+-syshostname=`hostname --fqdn`
++syshostname="localhost"
+ if test -f /etc/mailname
+ then
+ 	mailname="`head -1 /etc/mailname`"
+@@ -15,23 +15,7 @@
+ 	mailname=$syshostname
+ fi
+ 
+-echo "Please enter the mail name of your system."
+-echo "This is the hostname portion of the address to be shown"
+-echo "on outgoing news and mail messages headers."
+-echo "The default is $syshostname, your system's host name."
+-echo
+-echo -n "Mail name [$syshostname]: "
+-read mailname
+-echo
+-
+-echo -n "Please enter the SMTP port number [25]: "
+-read smtpport
+-if test -z "$smtpport"
+-then
+-	mailhub=$mailhub
+-else
+-	mailhub="$mailhub:$smtpport"
+-fi
++mailhub="$mailhub:$smtpport"
+ 
+ #
+ # Generate configuration file
+@@ -56,11 +40,5 @@
+ # Where will the mail seem to come from?
+ #rewriteDomain=`echo -n $mailname`
+ # The full hostname
+-hostname=`hostname --fqdn`
++#hostname="localhost"
+ EOF
+-
+-echo
+-echo
+-echo "Please check the configuration file $1 for correctness."
+-echo
+-echo
-- 
1.6.1

---

From: Natanael Copa <[email-masked]>
Date: Tue, 27 Jan 2009 14:13:36 +0100

> Please review attached patch

applied and moved from testing to extra.

thanks!

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---