libc-client added

This commit is contained in:
suvari
2016-02-27 17:07:51 +02:00
parent ef1925331e
commit 0bfaac7352
16 changed files with 462 additions and 2 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
pisitools.dosed("src/osdep/unix/Makefile","SSLDIR=/usr/local/ssl","SSLDIR=/usr/")
pisitools.dosed("src/osdep/unix/Makefile","SSLCERTS=$(SSLDIR)/certs","SSLCERTS=/etc/pki/tls/certs/")
def build():
autotools.make("lnp EXTRAAUTHENTICATORS=gss SSLTYPE=unix.nopwd \
EXTRACFLAGS=\"%s\" " %get.CFLAGS())
def install():
pisitools.dolib("c-client/libc-client.so.1.0.0")
pisitools.dosym("/usr/lib/libc-client.so.1.0.0", "/usr/lib/libc-client.so.1")
pisitools.dosym("libc-client.so.1.0.0","/usr/lib/libc-client.so")
pisitools.dodir("/usr/include/imap")
pisitools.insinto("/usr/include/imap", "src/c-client/*.h")
pisitools.insinto("/usr/include/imap", "c-client/linkage.c")
pisitools.insinto("/usr/include/imap", "c-client/linkage.h")
pisitools.insinto("/usr/include/imap", "c-client/osdep.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/dummy.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/env_unix.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/f*.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/pseudo.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/tcp_unix.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/unix.h")
pisitools.insinto("/usr/include/imap", "src/osdep/unix/os_slx.h")
#pisitools.remove("/usr/include/imap/os_*.h")
@@ -0,0 +1,24 @@
diff -Naur imap-2007e/Makefile imap-2007e.oden/Makefile
--- imap-2007e/Makefile 2008-06-04 20:43:35.000000000 +0200
+++ imap-2007e.oden/Makefile 2009-01-13 23:59:31.000000000 +0100
@@ -144,7 +144,7 @@
# mbox if file "mbox" exists on the home directory, automatically moves mail
# from the spool directory to "mbox" and uses "mbox" as INBOX.
-EXTRADRIVERS=mbox
+EXTRADRIVERS=
# Plaintext password type. Defines how plaintext password authentication is
diff -Naur imap-2007e/src/osdep/unix/Makefile imap-2007e.oden/src/osdep/unix/Makefile
--- imap-2007e/src/osdep/unix/Makefile 2009-01-13 23:59:14.000000000 +0100
+++ imap-2007e.oden/src/osdep/unix/Makefile 2009-01-13 23:59:31.000000000 +0100
@@ -27,7 +27,7 @@
# Command line build parameters
EXTRAAUTHENTICATORS=
-EXTRADRIVERS=mbox
+EXTRADRIVERS=
PASSWDTYPE=std
SSLTYPE=nopwd
IP=4
@@ -0,0 +1,12 @@
--- imap-2001a/src/c-client/rfc822.c.overflow Wed Apr 17 22:39:13 2002
+++ imap-2001a/src/c-client/rfc822.c Wed Apr 17 22:40:25 2002
@@ -610,6 +610,9 @@
if (CHR (bs) == '\012'){/* following LF? */
c = SNX (bs); i--; /* yes, slurp it */
}
+ if (!i) /* Make sure we don't get an overflow for */
+ break; /* messages ending on \015 (or the following */
+ /* i-- will cause i to be MAXINT. Not good.) */
case '\012': /* at start of a line, start with -- ? */
if (i-- && ((c = SNX (bs)) == '-') && i-- && ((c = SNX (bs)) == '-')) {
/* see if cookie matches */
@@ -0,0 +1,30 @@
Patch by Robert Scheck <redhat@linuxnetz.de> for uw-imap >= 2004a, which corrects
paths to imapd, ipop2d and ipop3d in the man pages.
This patch is based on Red Hat Bugzilla ID #127271 and solves ID #229781.
--- imap-2004a/src/imapd/imapd.8 2004-05-18 19:46:54.000000000 +0200
+++ imap-2004a/src/imapd/imapd.8.doc 2004-07-23 15:24:17.000000000 +0200
@@ -3,7 +3,7 @@
.SH NAME
IMAPd \- Internet Message Access Protocol server
.SH SYNOPSIS
-.B /usr/etc/imapd
+.B /usr/sbin/imapd
.SH DESCRIPTION
.I imapd
is a server which supports the
--- imap-2004a/src/ipopd/ipopd.8 2004-05-18 19:50:05.000000000 +0200
+++ imap-2004a/src/ipopd/ipopd.8.doc 2004-07-23 15:23:38.000000000 +0200
@@ -3,9 +3,9 @@
.SH NAME
IPOPd \- Post Office Protocol server
.SH SYNOPSIS
-.B /usr/etc/ipop2d
+.B /usr/sbin/ipop2d
.PP
-.B /usr/etc/ipop3d
+.B /usr/sbin/ipop3d
.SH DESCRIPTION
.I ipop2d
and
@@ -0,0 +1,60 @@
diff -Naurp imap-2007e/src/osdep/unix/env_unix.c imap-2007e.oden/src/osdep/unix/env_unix.c
--- imap-2007e/src/osdep/unix/env_unix.c 2008-06-04 20:46:10.000000000 +0200
+++ imap-2007e.oden/src/osdep/unix/env_unix.c 2009-01-14 00:01:54.000000000 +0100
@@ -24,6 +24,7 @@
* Last Edited: 15 May 2008
*/
+#include <time.h>
#include <grp.h>
#include <signal.h>
#include <sys/wait.h>
diff -Naurp imap-2007e/src/osdep/unix/mh.c imap-2007e.oden/src/osdep/unix/mh.c
--- imap-2007e/src/osdep/unix/mh.c 2008-06-04 20:18:34.000000000 +0200
+++ imap-2007e.oden/src/osdep/unix/mh.c 2009-01-14 00:01:54.000000000 +0100
@@ -36,11 +36,11 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
-
/* Build parameters */
#define MHINBOX "#mhinbox" /* corresponds to namespace in env_unix.c */
diff -Naurp imap-2007e/src/osdep/unix/mx.c imap-2007e.oden/src/osdep/unix/mx.c
--- imap-2007e/src/osdep/unix/mx.c 2008-06-04 20:18:34.000000000 +0200
+++ imap-2007e.oden/src/osdep/unix/mx.c 2009-01-14 00:01:54.000000000 +0100
@@ -36,6 +36,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include "misc.h"
#include "dummy.h"
#include "fdstring.h"
diff -Naurp imap-2007e/src/osdep/unix/news.c imap-2007e.oden/src/osdep/unix/news.c
--- imap-2007e/src/osdep/unix/news.c 2008-06-04 20:18:34.000000000 +0200
+++ imap-2007e.oden/src/osdep/unix/news.c 2009-01-14 00:01:54.000000000 +0100
@@ -35,6 +35,7 @@ extern int errno; /* just in case */
#include "osdep.h"
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include "misc.h"
#include "newsrc.h"
#include "fdstring.h"
diff -Naurp imap-2007e/src/osdep/unix/phile.c imap-2007e.oden/src/osdep/unix/phile.c
--- imap-2007e/src/osdep/unix/phile.c 2008-06-04 20:18:34.000000000 +0200
+++ imap-2007e.oden/src/osdep/unix/phile.c 2009-01-14 00:01:54.000000000 +0100
@@ -37,6 +37,7 @@ extern int errno; /* just in case */
#include <pwd.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include "rfc822.h"
#include "misc.h"
#include "dummy.h"
@@ -0,0 +1,11 @@
--- src/osdep/unix/Makefile.gss 2006-08-31 03:32:16.000000000 +0200
+++ src/osdep/unix/Makefile.gss.oden 2006-10-26 16:40:37.000000000 +0200
@@ -26,7 +26,7 @@
# Extended flags needed for additional authenticators. You may need to modify.
-GSSDIR=/usr/local
+GSSDIR=/usr
GSSINCLUDE=$(GSSDIR)/include
GSSLIB=$(GSSDIR)/lib
GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name
@@ -0,0 +1,39 @@
--- src/osdep/unix/Makefile 2007-12-17 23:10:24.000000000 +0100
+++ src/osdep/unix/Makefile.oden 2008-05-18 19:06:50.000000000 +0200
@@ -42,7 +42,7 @@
# -O3 seems to be safe, but empirical observation from our local expert
# indicates that in some (many?) cases -O3 code runs slower than -O2.
-GCCOPTLEVEL= -O2
+GCCOPTLEVEL=
# Try to have some consistency in GCC builds. We want optimization, but we
@@ -96,19 +96,18 @@
LOGINPW=std
SIGTYPE=bsd
CRXTYPE=std
-ACTIVEFILE=/usr/lib/news/active
-SPOOLDIR=/usr/spool
+ACTIVEFILE=/var/lib/news/active
+SPOOLDIR=/var/spool
MAILSPOOL=$(SPOOLDIR)/mail
NEWSSPOOL=$(SPOOLDIR)/news
-RSHPATH=/usr/ucb/rsh
+RSHPATH=/usr/bin/rsh
MD5PWD=/etc/cram-md5.pwd
# Tries one of the test alternatives below if not specified.
-LOCKPGM=
+#LOCKPGM=/etc/mlock
# Test alternatives if LOCKPGM not specified
-LOCKPGM1=/usr/libexec/mlock
-LOCKPGM2=/usr/sbin/mlock
-LOCKPGM3=/etc/mlock
-
+#LOCKPGM1=/usr/libexec/mlock
+#LOCKPGM2=/usr/sbin/mlock
+#LOCKPGM3=/etc/mlock
# Default formats for creating new mailboxes and for empty mailboxes in the
# default namespace; must be set to the associated driver's prototype.
@@ -0,0 +1,29 @@
diff -up imap-2007e/src/c-client/auth_md5.c.authmd5 imap-2007e/src/c-client/auth_md5.c
--- imap-2007e/src/c-client/auth_md5.c.authmd5 2008-06-04 13:18:34.000000000 -0500
+++ imap-2007e/src/c-client/auth_md5.c 2009-07-07 19:24:12.348005485 -0500
@@ -42,17 +42,17 @@ typedef struct {
/* Prototypes */
-long auth_md5_valid (void);
-long auth_md5_client (authchallenge_t challenger,authrespond_t responder,
+static long auth_md5_valid (void);
+static long auth_md5_client (authchallenge_t challenger,authrespond_t responder,
char *service,NETMBX *mb,void *stream,
unsigned long *trial,char *user);
-char *auth_md5_server (authresponse_t responder,int argc,char *argv[]);
-char *auth_md5_pwd (char *user);
+static char *auth_md5_server (authresponse_t responder,int argc,char *argv[]);
+static char *auth_md5_pwd (char *user);
char *apop_login (char *chal,char *user,char *md5,int argc,char *argv[]);
-char *hmac_md5 (char *text,unsigned long tl,char *key,unsigned long kl);
-void md5_init (MD5CONTEXT *ctx);
-void md5_update (MD5CONTEXT *ctx,unsigned char *data,unsigned long len);
-void md5_final (unsigned char *digest,MD5CONTEXT *ctx);
+static char *hmac_md5 (char *text,unsigned long tl,char *key,unsigned long kl);
+static void md5_init (MD5CONTEXT *ctx);
+static void md5_update (MD5CONTEXT *ctx,unsigned char *data,unsigned long len);
+static void md5_final (unsigned char *digest,MD5CONTEXT *ctx);
static void md5_transform (unsigned long *state,unsigned char *block);
static void md5_encode (unsigned char *dst,unsigned long *src,int len);
static void md5_decode (unsigned long *dst,unsigned char *src,int len);
@@ -0,0 +1,74 @@
diff -up imap-2007e/src/osdep/unix/Makefile.shared imap-2007e/src/osdep/unix/Makefile
--- imap-2007e/src/osdep/unix/Makefile.shared 2009-07-07 19:28:02.909755512 -0500
+++ imap-2007e/src/osdep/unix/Makefile 2009-07-07 19:29:35.870006799 -0500
@@ -170,6 +170,10 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
EXTRADRIVERS='$(EXTRADRIVERS)' EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
+# Need this for the shared library rule to work correctly
+.SUFFIXES: .o .so
+SOFILES=${BINARIES:.o=.so}
+
# Here if no make argument established
@@ -845,18 +849,24 @@ vu2: # VAX Ultrix 2.3, etc.
# Build it!
-build: clean once $(ARCHIVE)
+build: clean once $(ARCHIVE) $(SHLIBNAME)
-all: $(ARCHIVE)
+all: $(ARCHIVE) $(SHLIBNAME)
$(ARCHIVE): $(BINARIES)
sh -c '$(RM) $(ARCHIVE) || true'
@$(CAT) ARCHIVE
@$(SH) ARCHIVE
-.c.o:
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
+$(SHLIBNAME): $(SOFILES)
+ gcc -shared -Wl,-soname,$(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS`
+ ln -s $(SHLIBNAME) lib$(SHLIBBASE).so
+.c.so: osdep.h
+ $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` ${@:.so=.c} -o $@
+
+.c.o:
+ $(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` $*.c
# Cleanup
@@ -895,8 +905,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
# OS-dependent
-
-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
osdep.h env_unix.h tcp_unix.h \
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
@@ -910,12 +919,19 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
write.c sslstdio.c \
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
OSCFLAGS
+
+osdep.o: $(OSDEPS)
+ $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
+ @echo ========================================================================
@echo Building OS-dependent module
@echo If you get No such file error messages for files x509.h, ssl.h,
@echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
@echo is not installed on your system. Either install OpenSSL first
@echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
+ @echo ========================================================================
+
+osdep.so: $(OSDEPS)
+ $(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `cat OSCFLAGS` -c osdep.c -o $@
osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
@@ -0,0 +1,13 @@
diff -Naur imap-2007e.orig/src/osdep/unix/Makefile imap-2007e/src/osdep/unix/Makefile
--- imap-2007e.orig/src/osdep/unix/Makefile 2011-02-01 10:25:01.865074982 +0200
+++ imap-2007e/src/osdep/unix/Makefile 2011-02-01 10:23:35.650187032 +0200
@@ -985,6 +985,9 @@
-DLOCKPGM3=\"$(LOCKPGM3)\" > OSCFLAGS
echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS
echo "$(ARRC) $(ARCHIVE) $(BINARIES);$(RANLIB) $(ARCHIVE)" > ARCHIVE
+ echo "`$(CAT) CCTYPE` `$(CAT) CFLAGS` `$(CAT) OSFLAGS` -shared \
+ -Wl,-soname,libc-client.so.1 -o libc-client.so.1.0.0 $(BINARIES)" \
+ >> ARCHIVE
echo $(OS) > OSTYPE
./drivers $(EXTRADRIVERS) $(DEFAULTDRIVERS) dummy
./mkauths $(EXTRAAUTHENTICATORS) $(DEFAULTAUTHENTICATORS)
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>libc-client</Name>
<Homepage>http://www.washington.edu/imap/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>Apache-2.0</License>
<IsA>service</IsA>
<Summary>C-client mail access routines for IMAP and POP protocols</Summary>
<Description>The c-client library is a common API for accessing mailboxes developed at the University of Washington. It is used mainly by php</Description>
<Archive sha1sum="7a82ebd5aae57a5dede96ac4923b63f850ff4fa7" type="targz">ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz</Archive>
<BuildDependencies>
<Dependency>pam-devel</Dependency>
<Dependency>openssl-devel</Dependency>
<Dependency>mit-kerberos</Dependency>
</BuildDependencies>
<Patches>
<Patch level="0">imap-2007a-linux.diff</Patch>
<Patch level="1">imap-2006c1-glibc-2.2.2.diff</Patch>
<Patch level="0">imap-2006c1-krbpath.diff</Patch>
<Patch level="1">imap-2001a-disable-mbox.patch</Patch>
<Patch level="1">imap-2001a-overflow.patch</Patch>
<Patch level="1">imap-2004a-doc.patch</Patch>
<!--Patch level="1">imap-2007-paths.patch</Patch-->
<Patch level="1">imap-2007e-authmd5.patch</Patch>
<Patch level="1">imap-2007e-shared.patch</Patch>
<Patch level="1">uw-imap-2004c-amd64-so-fix.patch</Patch>
</Patches>
</Source>
<Package>
<Name>libc-client</Name>
<RuntimeDependencies>
<Dependency>mit-kerberos</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib</Path>
</Files>
</Package>
<History>
<Update release="2">
<Date>2016-02-27</Date>
<Version>2007f</Version>
<Comment>Version bump.</Comment>
<Name>Stefan Gronewold(groni)</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2011-03-17</Date>
<Version>2007e</Version>
<Comment>First release</Comment>
<Type package="libc-client">critical</Type>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>libc-client</Name>
<Summary xml:lang="tr">İmap protokolü için kitaplık</Summary>
<Description xml:lang="tr">Washington üniversitesi tarafından, POP ve IMAP protokolleri için geliştirilmiş genel kitaplıklar. Temel olarak php tarafından kullanılır.</Description>
</Source>
</PISI>
+62
View File
@@ -88052,6 +88052,68 @@
</Update>
</History>
</SpecFile>
<SpecFile>
<Source>
<Name>libc-client</Name>
<Homepage>http://www.washington.edu/imap/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>Apache-2.0</License>
<IsA>service</IsA>
<PartOf>network.misc</PartOf>
<Summary xml:lang="en">C-client mail access routines for IMAP and POP protocols</Summary>
<Summary xml:lang="tr">İmap protokolü için kitaplık</Summary>
<Description xml:lang="en">The c-client library is a common API for accessing mailboxes developed at the University of Washington. It is used mainly by php</Description>
<Description xml:lang="tr">Washington üniversitesi tarafından, POP ve IMAP protokolleri için geliştirilmiş genel kitaplıklar. Temel olarak php tarafından kullanılır.</Description>
<Archive type="targz" sha1sum="7a82ebd5aae57a5dede96ac4923b63f850ff4fa7">ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz</Archive>
<BuildDependencies>
<Dependency>pam-devel</Dependency>
<Dependency>openssl-devel</Dependency>
<Dependency>mit-kerberos</Dependency>
</BuildDependencies>
<Patches>
<Patch level="0">imap-2007a-linux.diff</Patch>
<Patch level="1">imap-2006c1-glibc-2.2.2.diff</Patch>
<Patch level="0">imap-2006c1-krbpath.diff</Patch>
<Patch level="1">imap-2001a-disable-mbox.patch</Patch>
<Patch level="1">imap-2001a-overflow.patch</Patch>
<Patch level="1">imap-2004a-doc.patch</Patch>
<Patch level="1">imap-2007e-authmd5.patch</Patch>
<Patch level="1">imap-2007e-shared.patch</Patch>
<Patch level="1">uw-imap-2004c-amd64-so-fix.patch</Patch>
</Patches>
<SourceURI>network/misc/libc-client/pspec.xml</SourceURI>
</Source>
<Package>
<Name>libc-client</Name>
<RuntimeDependencies>
<Dependency>mit-kerberos</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib</Path>
</Files>
</Package>
<History>
<Update release="2">
<Date>2016-02-27</Date>
<Version>2007f</Version>
<Comment>Version bump.</Comment>
<Name>Stefan Gronewold(groni)</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="1">
<Type package="libc-client">critical</Type>
<Date>2011-03-17</Date>
<Version>2007e</Version>
<Comment>First release</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</SpecFile>
<SpecFile>
<Source>
<Name>iputils</Name>
+1 -1
View File
@@ -1 +1 @@
01179d53615207bdc5a3a169f4609765171454fc
faee4639c6dddcb6fc1c1a9b1d67f20365e7160b
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
6b514aec897825bcc9aa32b4ba346a4a19694578
ae488fb6d319f5dcf200fb8599e40e06c38c1671