update balance to 3.35 and take maintainership
help and ok aanriot@
This commit is contained in:
parent
38f0545b32
commit
157dceb237
@ -1,23 +1,22 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2004/12/16 00:31:20 alek Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2007/05/29 18:56:24 rui Exp $
|
||||
|
||||
COMMENT= "tcp proxy with load balancing and failover mechanisms"
|
||||
|
||||
VERSION= 2.33
|
||||
DISTNAME= balance-${VERSION}
|
||||
DISTNAME= balance-3.35
|
||||
CATEGORIES= net
|
||||
|
||||
HOMEPAGE= http://balance.sourceforge.net/
|
||||
HOMEPAGE= http://www.inlab.de/balance.html
|
||||
|
||||
MAINTAINER= Jason Peel <jsyn@openbsd.org>
|
||||
MAINTAINER= Rui Reis <rui@rui.cx>
|
||||
|
||||
# GPL
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
WANTLIB= c
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=balance/}
|
||||
MASTER_SITES= http://www.inlab.de/
|
||||
|
||||
MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS}"
|
||||
ALL_TARGET= balance
|
||||
@ -27,5 +26,7 @@ NO_REGRESS= Yes
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/balance ${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/balance.1 ${PREFIX}/man/man1
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/balance
|
||||
${INSTALL_DATA} ${WRKSRC}/balance.pdf ${PREFIX}/share/doc/balance
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (balance-2.33.tar.gz) = s42j4DIYqa21A1agDto7Bw==
|
||||
RMD160 (balance-2.33.tar.gz) = DNlgie5rXBn082DLeUZ4K0aEEw8=
|
||||
SHA1 (balance-2.33.tar.gz) = RgJyFZgv2p2wUmd2YIl8a8gxIhs=
|
||||
SHA256 (balance-2.33.tar.gz) = ylmvMaFHYV1oNenfQZu5jSTVge0SQmCqFAjwTH5dSjk=
|
||||
SIZE (balance-2.33.tar.gz) = 18102
|
||||
MD5 (balance-3.35.tar.gz) = dx+FI/ek7hGUYef3H4onXw==
|
||||
RMD160 (balance-3.35.tar.gz) = hnQeuV2MHoxm7NY5ahBKW2mTwtE=
|
||||
SHA1 (balance-3.35.tar.gz) = ZyuJE4NVkSeAM4M5idJewdBYFM0=
|
||||
SHA256 (balance-3.35.tar.gz) = GNxK/UcKoRWJH4u5vmdOkhYjFmYVLI8Fp36zoFuv6F0=
|
||||
SIZE (balance-3.35.tar.gz) = 32903
|
||||
|
@ -1,81 +1,51 @@
|
||||
$OpenBSD: patch-balance_c,v 1.6 2003/06/30 18:46:23 pvalchev Exp $
|
||||
--- balance.c.orig Sat Sep 15 16:34:56 2001
|
||||
+++ balance.c Tue Jun 24 11:35:55 2003
|
||||
@@ -673,11 +673,13 @@ static usage() {
|
||||
char* version;
|
||||
char* revision_copy;
|
||||
char* token;
|
||||
$OpenBSD: patch-balance_c,v 1.7 2007/05/29 18:56:24 rui Exp $
|
||||
--- balance.c.orig Sun May 27 18:49:46 2007
|
||||
+++ balance.c Sun May 27 18:55:58 2007
|
||||
@@ -809,11 +809,13 @@ void initialize_release_variables(void)
|
||||
char *version;
|
||||
char *revision_copy;
|
||||
char *token;
|
||||
+ size_t rev_len;
|
||||
|
||||
- if((revision_copy=(char*) malloc(strlen(revision)+1))==NULL) {
|
||||
- if ((revision_copy = (char *) malloc(strlen(revision) + 1)) == NULL) {
|
||||
+ rev_len = strlen(revision)+1;
|
||||
+ if((revision_copy=(char*) malloc(rev_len))==NULL) {
|
||||
fprintf(stderr,"malloc problem in usage()\n");
|
||||
+ if ((revision_copy = (char *) malloc(rev_len)) == NULL) {
|
||||
fprintf(stderr, "malloc problem in initialize_release_variables()\n");
|
||||
} else {
|
||||
- strcpy(revision_copy, revision);
|
||||
+ strlcpy(revision_copy, revision, rev_len);
|
||||
token=strtok(revision_copy," ");
|
||||
token=strtok(NULL," ");
|
||||
version=token!=NULL?token:"*undefined*";
|
||||
@@ -882,7 +884,8 @@ shell() {
|
||||
printf(" version show version id\n");
|
||||
|
||||
} else if(mycmp(command,"disable")) {
|
||||
- char* arg, n;
|
||||
+ char* arg;
|
||||
+ int n;
|
||||
if((arg=strtok(NULL," \t\n")) != NULL) {
|
||||
n=atoi(arg);
|
||||
if(n<0 || n >= grp_nchannels(common,currentgroup)) {
|
||||
@@ -900,7 +903,8 @@ shell() {
|
||||
token = strtok(revision_copy, " ");
|
||||
token = strtok(NULL, " ");
|
||||
version = token != NULL ? token : "0.0";
|
||||
@@ -1136,7 +1138,8 @@ int shell(char *argument)
|
||||
printf("syntax error\n");
|
||||
}
|
||||
} else if(mycmp(command,"group")) {
|
||||
- char* arg, n;
|
||||
+ char* arg;
|
||||
} else if (mycmp(command, "group")) {
|
||||
- char *arg, n;
|
||||
+ char *arg;
|
||||
+ int n;
|
||||
if((arg=strtok(NULL," \t\n")) != NULL) {
|
||||
n=atoi(arg);
|
||||
if(n>=MAXGROUPS || n<0) {
|
||||
@@ -913,7 +917,8 @@ shell() {
|
||||
}
|
||||
|
||||
} else if(mycmp(command,"reset")) { // reset channel counters
|
||||
- char* arg, n;
|
||||
+ char* arg;
|
||||
+ int n;
|
||||
|
||||
if((arg=strtok(NULL," \t\n")) != NULL) {
|
||||
n=atoi(arg);
|
||||
@@ -931,7 +936,8 @@ shell() {
|
||||
|
||||
} else if(mycmp(command,"enable")) {
|
||||
|
||||
- char* arg, n;
|
||||
+ char* arg;
|
||||
+ int n;
|
||||
if((arg=strtok(NULL," \t\n")) != NULL) {
|
||||
n=atoi(arg);
|
||||
if(n<0 || n >= grp_nchannels(common,currentgroup)) {
|
||||
@@ -1122,10 +1128,10 @@ char *argv[];
|
||||
serv_addr.sin_family = AF_INET;
|
||||
if(bindhost != NULL) {
|
||||
if ((arg = strtok(NULL, " \t\n")) != NULL) {
|
||||
n = atoi(arg);
|
||||
if (n >= MAXGROUPS || n < 0) {
|
||||
@@ -1472,10 +1475,10 @@ int main(int argc, char *argv[])
|
||||
serv_addr.sin_family = AF_INET;
|
||||
if (bindhost != NULL) {
|
||||
setipaddress(&serv_addr.sin_addr, bindhost);
|
||||
- sprintf(bindhost_address, inet_ntoa(serv_addr.sin_addr));
|
||||
+ snprintf(bindhost_address, sizeof(bindhost_address), inet_ntoa(serv_addr.sin_addr));
|
||||
} else {
|
||||
serv_addr.sin_addr.s_addr=htonl(INADDR_ANY);
|
||||
- sprintf(bindhost_address,"0.0.0.0");
|
||||
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
- sprintf(bindhost_address, "0.0.0.0");
|
||||
+ snprintf(bindhost_address, sizeof(bindhost_address), "0.0.0.0");
|
||||
}
|
||||
serv_addr.sin_port=htons(source_port);
|
||||
serv_addr.sin_port = htons(source_port);
|
||||
|
||||
@@ -1135,7 +1141,7 @@ char *argv[];
|
||||
struct stat buffer;
|
||||
int fd;
|
||||
@@ -1493,7 +1496,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
umask(old);
|
||||
}
|
||||
- sprintf(rendezvousfile, "%sbalance.%d.%s", SHMDIR, source_port,
|
||||
+ snprintf(rendezvousfile, sizeof(rendezvousfile), "%sbalance.%d.%s", SHMDIR, source_port,
|
||||
bindhost_address);
|
||||
|
||||
- sprintf(rendezvousfile,"%sbalance.%d.%s",SHMDIR,source_port,bindhost_address);
|
||||
+ snprintf(rendezvousfile, sizeof(rendezvousfile), "%sbalance.%d.%s", SHMDIR, source_port, bindhost_address);
|
||||
|
||||
if(stat(rendezvousfile, &buffer) == -1) {
|
||||
// File existiert (noch) nicht ...
|
||||
if (stat(rendezvousfile, &buffer) == -1) {
|
||||
|
12
net/balance/patches/patch-balance_h
Normal file
12
net/balance/patches/patch-balance_h
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-balance_h,v 1.1 2007/05/29 18:56:24 rui Exp $
|
||||
--- balance.h.orig Tue May 29 18:10:23 2007
|
||||
+++ balance.h Tue May 29 18:11:05 2007
|
||||
@@ -66,7 +66,7 @@
|
||||
* this should be a directory that isn't cleaned up periodically, or at
|
||||
* reboot of the machine (/tmp is cleaned at reboot on many OS versions)
|
||||
*/
|
||||
-#define SHMDIR "/var/run/balance/"
|
||||
+#define SHMDIR "/var/balance/"
|
||||
#define SHMFILESUFFIX ".shm"
|
||||
|
||||
#define MAXCHANNELS 16 /* max channels in group */
|
@ -1,3 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2004/09/15 18:17:38 espie Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2007/05/29 18:56:24 rui Exp $
|
||||
bin/balance
|
||||
@man man/man1/balance.1
|
||||
share/doc/balance/
|
||||
share/doc/balance/balance.pdf
|
||||
@mode 0711
|
||||
@sample /var/balance/
|
||||
|
Loading…
Reference in New Issue
Block a user