Browse Source

upgrading package: qpopper 4.0.19 -> 4.1.0

master
parent
commit
585c58c20b
  1. 151
      qpopper/qpopper.patch
  2. 4
      qpopper/qpopper.spec

151
qpopper/qpopper.patch

@ -1,117 +1,25 @@
Index: popper/Makefile.in
--- popper/Makefile.in.orig 2006-03-09 23:32:37 +0100
+++ popper/Makefile.in 2006-03-21 09:44:34 +0100
@@ -192,11 +192,10 @@
popper: ${OBJS} mangler_library common_library
${CC} ${OBJS} -o popper ${mmangle_dir}/libmangle.a \
--- popper/Makefile.in.orig 2011-05-30 21:13:39.000000000 +0200
+++ popper/Makefile.in 2011-07-01 22:53:50.000000000 +0200
@@ -210,12 +210,10 @@
${CC} ${OBJS} ${MISSING_OBJS} -o popper \
${mmangle_dir}/libmangle.a \
-I${common_srcdir} ${common_dir}/libcommon.a \
- ${LIBS} ${LDFLAGS}
+ ${LDFLAGS} ${LIBS}
popauth: ${POPAUTHOBJS}
- ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} ${DBM_LIBS} \
popauth: ${POPAUTHOBJS} ${MISSING_OBJS}
- ${CC} -o popauth ${POPAUTHOBJS} ${NETWORK_LIBS} \
- ${DBM_LIBS} ${MISSING_OBJS} \
- ${common_dir}/libcommon.a
+ ${CC} -o popauth ${POPAUTHOBJS} ${common_dir}/libcommon.a ${LDFLAGS} ${NETWORK_LIBS} ${DBM_LIBS} ${LIBS}
+ ${CC} -o popauth ${POPAUTHOBJS} ${common_dir}/libcommon.a ${NETWORK_LIBS} ${DBM_LIBS} ${MISSING_OBJS}
poppassd: common_library
cd ${password_dir} && ${MAKE} all
Index: popper/main.c
--- popper/main.c.orig 2006-03-09 23:32:37 +0100
+++ popper/main.c 2006-03-21 09:44:34 +0100
@@ -277,12 +277,6 @@
err_out = msg_out = fopen ( "/dev/null", "w+" ); /* until we get set up */
/*
- * Ensure default port & address is in network order
- */
- addr = htonl ( addr );
- port = htons ( port );
-
- /*
* Set defaults for Qargc and Qargv
*/
Qargc = argc;
@@ -307,46 +301,35 @@
ptr = argv [ 1 ];
if ( argc >= 2 && ( *ptr == ':' || isdigit ( (int) *ptr ) ) )
{
- int j = 0;
- unsigned long a = addr;
- unsigned short n = port;
- char b [ 25 ] = "";
- char *q = b;
-
- /*
- * We might have an ip address first
- */
- if ( strchr ( ptr, '.' ) != NULL )
- while ( *ptr == '.' || isdigit ( (int) *ptr ) )
- *q++ = *ptr++;
-
- if ( *b != '\0' )
- {
- a = inet_addr ( b );
- ptr = strchr ( ptr, ':' );
- if ( ptr != NULL )
- ptr++;
+ char *cpIp = NULL;
+ char *cpPort = NULL;
+ char *cpDup;
+ char *cp;
+
+ if ((cpDup = strdup(ptr)) == NULL)
+ err_dump ( HERE, "unable to allocate memory to examine first argument" );
+ if ((cp = strchr(cpDup, ':')) != NULL) {
+ *cp++ = '\0'; /* a colon means both ip and port are given, split them */
+ if (*cpDup != '\0') /* do not accept empty strings */
+ cpIp = cpDup;
+ if (*cp != '\0') /* do not accept empty strings */
+ cpPort = cp;
}
- else
- {
- ptr = argv [ 1 ];
- if ( *ptr == ':' )
- ptr++;
+ else {
+ if (strchr (ptr, '.') != NULL)
+ cpIp = cpDup; /* no colon but a dot means a ip is given */
+ else
+ cpPort = cpDup; /* no colon and no dot means a port is given */
}
+ if (cpIp != NULL )
+ addr = inet_addr(cpIp);
+ if (cpPort != NULL )
+ port = atoi(cpPort);
+ free(cpDup);
- /*
- * We might have a port number
- */
- if ( ptr != NULL )
- j = atoi ( ptr );
-
- if ( a == BAD_ADDR || j == 0 || j > USHRT_MAX )
+ if ( addr == BAD_ADDR || port == 0 || port > USHRT_MAX )
err_dump ( HERE, "invalid address and/or port: \"%s\"", argv[1] );
- n = j;
- port = htons ( n );
- addr = a;
-
/*
* Since we consumed the first specified parameter,
* create our own argv that omits it, to pass on to
@@ -363,6 +346,8 @@
Qargv [ rslt - 1 ] = argv [ rslt ];
Qargc = argc - 1;
}
+ /* Ensure address remains and default port becomes network byte order */
+ port = htons ( port );
/*
* Open the log
@@ -559,6 +544,22 @@
--- popper/main.c.orig 2011-05-30 21:13:39.000000000 +0200
+++ popper/main.c 2011-07-01 22:52:54.000000000 +0200
@@ -655,6 +655,22 @@
#endif /* not _DEBUG */
@ -131,34 +39,13 @@ Index: popper/main.c
+ }
+#endif
+
/*
* Set up the socket on which we listen
*/
@@ -596,17 +597,9 @@
rslt = bind ( sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr) );
if ( rslt < 0 )
{
- if ( errno == EADDRINUSE )
- {
- fprintf ( stderr, "%s:%d in use\n",
- inet_ntoa ( serv_addr.sin_addr ),
- ntohs ( serv_addr.sin_port ) );
- return 1;
- }
- else
- err_dump ( HERE, "Can't bind local address %s:%d",
- inet_ntoa ( serv_addr.sin_addr ),
- ntohs ( serv_addr.sin_port ) );
+ err_dump ( HERE, "Can't bind local address %s:%d",
+ inet_ntoa ( serv_addr.sin_addr ),
+ ntohs ( serv_addr.sin_port ) );
}
TRACE ( trace_file, POP_DEBUG, HERE,
memset ( &hints, 0, sizeof(hints) );
hints.ai_socktype = SOCK_STREAM;
#ifdef INET6
Index: popper/pop_dropcopy.c
--- popper/pop_dropcopy.c.orig 2006-03-09 23:32:37 +0100
+++ popper/pop_dropcopy.c 2006-03-21 09:44:34 +0100
@@ -1232,6 +1232,10 @@
--- popper/pop_dropcopy.c.orig 2011-05-30 21:13:39.000000000 +0200
+++ popper/pop_dropcopy.c 2011-07-01 22:51:43.000000000 +0200
@@ -1245,6 +1245,10 @@
return pop_msg ( p, POP_FAILURE, HERE,
"[SYS/TEMP] Unable to get temp drop name" );
@ -169,7 +56,7 @@ Index: popper/pop_dropcopy.c
if ( stat ( p->temp_drop, &mybuf ) == -1 || mybuf.st_size <= 0 ) {
if ( genpath ( p,
p->temp_drop,
@@ -1240,6 +1244,7 @@
@@ -1253,6 +1257,7 @@
return pop_msg ( p, POP_FAILURE, HERE,
"[SYS/TEMP] Unable to get temp drop name" );
}

4
qpopper/qpopper.spec

@ -31,8 +31,8 @@ Distribution: OpenPKG Community
Class: BASE
Group: Mail
License: GPL
Version: 4.0.19
Release: 20091018
Version: 4.1.0
Release: 20110701
# package options
%option with_fsl yes

Loading…
Cancel
Save