This commit is contained in:
committed by
Git OBS Bridge
parent
514cb9eac8
commit
e80f890af7
188
nmh-64bit.patch
Normal file
188
nmh-64bit.patch
Normal file
@@ -0,0 +1,188 @@
|
||||
#! /bin/sh -e
|
||||
## 04-fix-64bit-issues-399271.dpatch by dean gaudet <dean@arctic.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: This fixes amd64-specific build warnings due to sizeof(int) !=
|
||||
## DP: sizeof(void *).
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@DPATCH@
|
||||
================================================================================
|
||||
--- nmh-1.2/sbr/fmt_scan.c
|
||||
+++ nmh-1.2/sbr/fmt_scan.c
|
||||
@@ -255,7 +255,7 @@
|
||||
|| !(cp = strchr(mbox += idx + strlen (key), '/')))
|
||||
return 0;
|
||||
|
||||
- snprintf (buffer, buffer_len, "%*.*s", cp - mbox, cp - mbox, mbox);
|
||||
+ snprintf (buffer, buffer_len, "%*.*s", (int)(cp - mbox), (int)(cp - mbox), mbox);
|
||||
return 1;
|
||||
}
|
||||
|
||||
--- nmh-1.2/sbr/lock_file.c
|
||||
+++ nmh-1.2/sbr/lock_file.c
|
||||
@@ -493,7 +493,7 @@
|
||||
bplen += tmplen;
|
||||
#else
|
||||
if (cp != file) {
|
||||
- snprintf (bp, sizeof(li->curlock), "%.*s", cp - file, file);
|
||||
+ snprintf (bp, sizeof(li->curlock), "%.*s", (int)(cp - file), file);
|
||||
tmplen = strlen (bp);
|
||||
bp += tmplen;
|
||||
bplen += tmplen;
|
||||
--- nmh-1.2/sbr/m_backup.c
|
||||
+++ nmh-1.2/sbr/m_backup.c
|
||||
@@ -22,7 +22,7 @@
|
||||
snprintf(buffer, sizeof(buffer), "%s%s",
|
||||
BACKUP_PREFIX, cp);
|
||||
else
|
||||
- snprintf(buffer, sizeof(buffer), "%.*s%s%s", cp - file, file,
|
||||
+ snprintf(buffer, sizeof(buffer), "%.*s%s%s", (int)(cp - file), file,
|
||||
BACKUP_PREFIX, cp);
|
||||
|
||||
unlink(buffer);
|
||||
--- nmh-1.2/sbr/m_getfld.c
|
||||
+++ nmh-1.2/sbr/m_getfld.c
|
||||
@@ -699,10 +699,10 @@
|
||||
if (cp) {
|
||||
/* return path for UUCP style addressing */
|
||||
dp = strchr (++cp, '\n');
|
||||
- snprintf (rp, rplen, "%.*s!%.*s\n", dp - cp, cp, bp - ap, ap);
|
||||
+ snprintf (rp, rplen, "%.*s!%.*s\n", (int)(dp - cp), cp, (int)(bp - ap), ap);
|
||||
} else {
|
||||
/* return path for standard domain addressing */
|
||||
- snprintf (rp, rplen, "%.*s\n", bp - ap, ap);
|
||||
+ snprintf (rp, rplen, "%.*s\n", (int)(bp - ap), ap);
|
||||
}
|
||||
|
||||
/*
|
||||
--- nmh-1.2/sbr/m_scratch.c
|
||||
+++ nmh-1.2/sbr/m_scratch.c
|
||||
@@ -33,7 +33,7 @@
|
||||
if ((cp = r1bindex (file, '/')) == file)
|
||||
strncpy (buffer, tmpfil, sizeof(buffer));
|
||||
else
|
||||
- snprintf (buffer, sizeof(buffer), "%.*s%s", cp - file, file, tmpfil);
|
||||
+ snprintf (buffer, sizeof(buffer), "%.*s%s", (int)(cp - file), file, tmpfil);
|
||||
unlink (buffer);
|
||||
|
||||
return buffer;
|
||||
--- nmh-1.2/sbr/mf.c
|
||||
+++ nmh-1.2/sbr/mf.c
|
||||
@@ -433,7 +433,7 @@
|
||||
while (isspace (*ap))
|
||||
ap++;
|
||||
if (cp)
|
||||
- sprintf (adr, "%.*s", cp - ap, ap);
|
||||
+ sprintf (adr, "%.*s", (int)(cp - ap), ap);
|
||||
else
|
||||
strcpy (adr, ap);
|
||||
bp = adr + strlen (adr) - 1;
|
||||
--- nmh-1.2/sbr/path.c
|
||||
+++ nmh-1.2/sbr/path.c
|
||||
@@ -85,7 +85,7 @@
|
||||
name += NCWD;
|
||||
|
||||
if (strcmp (name, DOTDOT) == 0 || strcmp (name, PWD) == 0) {
|
||||
- snprintf (buffer, sizeof(buffer), "%.*s", cp - pwds, pwds);
|
||||
+ snprintf (buffer, sizeof(buffer), "%.*s", (int)(cp - pwds), pwds);
|
||||
return getcpy (buffer);
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
else
|
||||
cp = ep;
|
||||
|
||||
- snprintf (buffer, sizeof(buffer), "%.*s/%s", cp - pwds, pwds, name);
|
||||
+ snprintf (buffer, sizeof(buffer), "%.*s/%s", (int)(cp - pwds), pwds, name);
|
||||
return getcpy (buffer);
|
||||
}
|
||||
|
||||
--- nmh-1.2/uip/annosbr.c
|
||||
+++ nmh-1.2/uip/annosbr.c
|
||||
@@ -384,7 +384,7 @@
|
||||
while (*cp && *cp++ != '\n')
|
||||
continue;
|
||||
if (cp - sp)
|
||||
- fprintf (tmp, "%s: %*.*s", comp, cp - sp, cp - sp, sp);
|
||||
+ fprintf (tmp, "%s: %*.*s", comp, (int)(cp - sp), (int)(cp - sp), sp);
|
||||
} while (*cp);
|
||||
if (cp[-1] != '\n' && cp != text)
|
||||
putc ('\n', tmp);
|
||||
--- nmh-1.2/uip/dropsbr.c
|
||||
+++ nmh-1.2/uip/dropsbr.c
|
||||
@@ -387,7 +387,7 @@
|
||||
fp = strchr(ep + 1, '\n');
|
||||
tp = dctime(dlocaltimenow());
|
||||
snprintf (buffer, sizeof(buffer), "From %.*s %s",
|
||||
- fp - ep, ep, tp);
|
||||
+ (int)(fp - ep), ep, tp);
|
||||
} else if (!strncmp (buffer, "X-Envelope-From:", 16)) {
|
||||
/*
|
||||
* Change the "X-Envelope-From:" field
|
||||
@@ -499,10 +499,10 @@
|
||||
if ((dp = strchr(cp = r1bindex (file, '/'), '.')) == NULL)
|
||||
dp = cp + strlen (cp);
|
||||
if (cp == file)
|
||||
- snprintf (buffer, sizeof(buffer), ".%.*s%s", dp - cp, cp, ".map");
|
||||
+ snprintf (buffer, sizeof(buffer), ".%.*s%s", (int)(dp - cp), cp, ".map");
|
||||
else
|
||||
snprintf (buffer, sizeof(buffer), "%.*s.%.*s%s",
|
||||
- cp - file, file, dp - cp, cp, ".map");
|
||||
+ (int)(cp - file), file, (int)(dp - cp), cp, ".map");
|
||||
|
||||
return buffer;
|
||||
}
|
||||
--- nmh-1.2/uip/mhbuildsbr.c
|
||||
+++ nmh-1.2/uip/mhbuildsbr.c
|
||||
@@ -4213,7 +4213,7 @@
|
||||
while (*cp)
|
||||
cp++;
|
||||
fprintf (stderr, "invalid MD5 digest (got %d octets)\n",
|
||||
- cp - bp);
|
||||
+ (int)(cp - bp));
|
||||
}
|
||||
|
||||
return NOTOK;
|
||||
--- nmh-1.2/uip/mhparse.c
|
||||
+++ nmh-1.2/uip/mhparse.c
|
||||
@@ -2676,7 +2676,7 @@
|
||||
while (*cp)
|
||||
cp++;
|
||||
fprintf (stderr, "invalid MD5 digest (got %d octets)\n",
|
||||
- cp - bp);
|
||||
+ (int)(cp - bp));
|
||||
}
|
||||
|
||||
return NOTOK;
|
||||
--- nmh-1.2/uip/slocal.c
|
||||
+++ nmh-1.2/uip/slocal.c
|
||||
@@ -1372,11 +1372,11 @@
|
||||
/* return path for UUCP style addressing */
|
||||
ep = strchr(++hp, '\n');
|
||||
snprintf (buffer, sizeof(buffer), "Return-Path: %.*s!%.*s\n",
|
||||
- ep - hp, hp, cp - fp, fp);
|
||||
+ (int)(ep - hp), hp, (int)(cp - fp), fp);
|
||||
} else {
|
||||
/* return path for standard domain addressing */
|
||||
snprintf (buffer, sizeof(buffer), "Return-Path: %.*s\n",
|
||||
- cp - fp, fp);
|
||||
+ (int)(cp - fp), fp);
|
||||
}
|
||||
|
||||
/* Add Return-Path header to message */
|
11
nmh-strcasecmp.patch
Normal file
11
nmh-strcasecmp.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- h/nmh.h
|
||||
+++ h/nmh.h
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
+# define strcasecmp my_strcasecmp
|
||||
+# define strncasecmp my_strncasecmp
|
||||
/* An ANSI string.h and pre-ANSI memory.h might conflict. */
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
@@ -14,6 +14,25 @@
|
||||
|
||||
#ifdef HAVE_KILLPG
|
||||
# define KILLPG(pgrp,sig) killpg(pgrp,sig);
|
||||
--- sbr/addrsbr.c
|
||||
+++ sbr/addrsbr.c
|
||||
@@ -105,6 +105,7 @@
|
||||
note = ap->note;
|
||||
if (ap->err && *ap->err)
|
||||
strncpy (err, ap->err, sizeof(err));
|
||||
+ err[sizeof(err)-1] = '\0';
|
||||
|
||||
return adr;
|
||||
}
|
||||
@@ -119,7 +120,7 @@
|
||||
char *dp;
|
||||
#endif /* not DUMB */
|
||||
|
||||
- if (err && err[0]) {
|
||||
+ if (err[0]) {
|
||||
if (eresult)
|
||||
strcpy (eresult, err);
|
||||
else
|
||||
--- sbr/getans.c
|
||||
+++ sbr/getans.c
|
||||
@@ -30,9 +30,8 @@
|
||||
|
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 15 17:11:55 CEST 2008 - max@suse.de
|
||||
|
||||
- Adopted two patches from Debian to fix a segfault and several
|
||||
64bit problems (bnc#334176, bnc#347684).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 2 14:06:24 CEST 2007 - max@suse.de
|
||||
|
||||
|
52
nmh.spec
52
nmh.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package nmh (Version 1.2)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: nmh
|
||||
BuildRequires: gdbm-devel ncurses-devel postfix
|
||||
License: BSD 3-Clause
|
||||
@@ -17,13 +18,15 @@ Group: Productivity/Networking/Email/Clients
|
||||
Requires: smtp_daemon, less
|
||||
Provides: mh
|
||||
Obsoletes: mh
|
||||
Autoreqprov: on
|
||||
AutoReqProv: on
|
||||
Version: 1.2
|
||||
Release: 25
|
||||
Release: 117
|
||||
Summary: Unix Mail Handler
|
||||
URL: http://www.mhost.com/nmh/
|
||||
Url: http://www.mhost.com/nmh/
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Patch0: nmh-warnings.patch
|
||||
Patch1: nmh-strcasecmp.patch
|
||||
Patch2: nmh-64bit.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@@ -53,6 +56,8 @@ Authors:
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2 -p 1
|
||||
|
||||
%build
|
||||
libtoolize --copy --force
|
||||
@@ -83,42 +88,45 @@ make CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT install
|
||||
%doc docs/TODO docs/README* COPYRIGHT
|
||||
|
||||
%changelog
|
||||
* Mon Jul 02 2007 - max@suse.de
|
||||
* Tue Jul 15 2008 max@suse.de
|
||||
- Adopted two patches from Debian to fix a segfault and several
|
||||
64bit problems (bnc#334176, bnc#347684).
|
||||
* Mon Jul 02 2007 max@suse.de
|
||||
- Mark /etc/nmh/* as config files (#285015).
|
||||
* Wed Mar 28 2007 - max@suse.de
|
||||
* Wed Mar 28 2007 max@suse.de
|
||||
- Update to version 1.2, which fixes a crash (#230763) and a
|
||||
performance problem (#230764).
|
||||
- Fixed several compiler warnings (#232416).
|
||||
* Fri Mar 23 2007 - rguenther@suse.de
|
||||
* Fri Mar 23 2007 rguenther@suse.de
|
||||
- add gdbm-devel and ncurses-devel BuildRequires
|
||||
* Fri Jan 26 2007 - ro@suse.de
|
||||
* Fri Jan 26 2007 ro@suse.de
|
||||
- silence a compiler warning
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
* Wed Jan 25 2006 mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Mon Oct 03 2005 - mmj@suse.de
|
||||
* Mon Oct 03 2005 mmj@suse.de
|
||||
- Update to RC4
|
||||
* Fri Jun 10 2005 - meissner@suse.de
|
||||
* Fri Jun 10 2005 meissner@suse.de
|
||||
- Use RPM_OPT_FLAGS.
|
||||
* Tue Jul 06 2004 - mmj@suse.de
|
||||
* Tue Jul 06 2004 mmj@suse.de
|
||||
- Install libexec helper binaries in /usr/lib/nmh [#42774]
|
||||
* Fri Mar 26 2004 - mmj@suse.de
|
||||
* Fri Mar 26 2004 mmj@suse.de
|
||||
- Add postfix to # neededforbuild
|
||||
* Wed Oct 15 2003 - mmj@suse.de
|
||||
* Wed Oct 15 2003 mmj@suse.de
|
||||
- Don't build as root
|
||||
* Tue May 13 2003 - mmj@suse.de
|
||||
* Tue May 13 2003 mmj@suse.de
|
||||
- Use %%defattr
|
||||
* Tue Feb 11 2003 - mmj@suse.de
|
||||
* Tue Feb 11 2003 mmj@suse.de
|
||||
- Obsoletes and Provides mh -- not conflicts.
|
||||
* Tue Jan 21 2003 - meissner@suse.de
|
||||
* Tue Jan 21 2003 meissner@suse.de
|
||||
- make it build on ppc64.
|
||||
* Thu Nov 28 2002 - mmj@suse.de
|
||||
* Thu Nov 28 2002 mmj@suse.de
|
||||
- Update to 1.1-RC1
|
||||
- Use BuildRoot
|
||||
* Tue Sep 17 2002 - ro@suse.de
|
||||
* Tue Sep 17 2002 ro@suse.de
|
||||
- removed bogus self-provides
|
||||
* Tue Apr 16 2002 - mmj@suse.de
|
||||
* Tue Apr 16 2002 mmj@suse.de
|
||||
- Fix it correctly.
|
||||
* Mon Apr 15 2002 - mmj@suse.de
|
||||
* Mon Apr 15 2002 mmj@suse.de
|
||||
- Fixed specfile to own /etc/nmh
|
||||
* Mon Jul 16 2001 - mmj@suse.de
|
||||
* Tue Jul 17 2001 mmj@suse.de
|
||||
- Initial package. Hopefully Maddog is happy now :)
|
||||
|
Reference in New Issue
Block a user