summaryrefslogtreecommitdiff
path: root/sysutils/cfengine
diff options
context:
space:
mode:
authorabs <abs>1999-11-05 13:52:50 +0000
committerabs <abs>1999-11-05 13:52:50 +0000
commit51bb1f7ca9b86a16f34706653a831baf551bfc72 (patch)
tree30702d0e9265ad6c8a8a1d38b686032b88334584 /sysutils/cfengine
parent12a89f66727336cf9bbd3567f65cf7ef55812756 (diff)
downloadpkgsrc-51bb1f7ca9b86a16f34706653a831baf551bfc72.tar.gz
Add cfengine to sysutils SUBDIRS
Add patches to set the correct Class based on the netmask (in the process of submitting all patches back to the maintainer)
Diffstat (limited to 'sysutils/cfengine')
-rw-r--r--sysutils/cfengine/Makefile3
-rw-r--r--sysutils/cfengine/files/patch-sum4
-rw-r--r--sysutils/cfengine/patches/patch-ac11
-rw-r--r--sysutils/cfengine/patches/patch-ad44
4 files changed, 60 insertions, 2 deletions
diff --git a/sysutils/cfengine/Makefile b/sysutils/cfengine/Makefile
index cf0e4b099a3..b27339d8397 100644
--- a/sysutils/cfengine/Makefile
+++ b/sysutils/cfengine/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 1999/10/10 23:13:06 abs Exp $
+# $NetBSD: Makefile,v 1.2 1999/11/05 13:52:51 abs Exp $
#
DISTNAME= cfengine-1.5.2
+PKGNAME= cfengine-1.5.2p1
CATEGORIES= sysutils net
MASTER_SITES= ftp://ftp.iu.hioslo.no/pub/cfengine/ \
ftp://ftp.cfengine.webmotion.net/pub/cfengine/
diff --git a/sysutils/cfengine/files/patch-sum b/sysutils/cfengine/files/patch-sum
index 91801fe73d5..c28af38e629 100644
--- a/sysutils/cfengine/files/patch-sum
+++ b/sysutils/cfengine/files/patch-sum
@@ -1,4 +1,6 @@
-$NetBSD: patch-sum,v 1.1.1.1 1999/10/10 23:13:07 abs Exp $
+$NetBSD: patch-sum,v 1.2 1999/11/05 13:52:52 abs Exp $
MD5 (patch-aa) = ebd4b9f4a796be4616eb8e7dfcd94ff1
MD5 (patch-ab) = b77512ca82715104b944d2b3e097f481
+MD5 (patch-ac) = 8e21f9df160a1c36d7e8da66445bd792
+MD5 (patch-ad) = 92441253e24f78b9658c6a3a975cf245
diff --git a/sysutils/cfengine/patches/patch-ac b/sysutils/cfengine/patches/patch-ac
new file mode 100644
index 00000000000..62b7cd50ffb
--- /dev/null
+++ b/sysutils/cfengine/patches/patch-ac
@@ -0,0 +1,11 @@
+$NetBSD: patch-ac,v 1.1 1999/11/05 13:52:52 abs Exp $
+--- src/install.c.orig Fri Nov 5 06:44:50 1999
++++ src/install.c Fri Nov 5 10:38:31 1999
+@@ -153,6 +153,7 @@
+ FatalError("Redefinition of basic system variable");
+ }
+ strcpy(VNETMASK,value);
++ AddNetworkClass(VNETMASK);
+ break;
+
+
diff --git a/sysutils/cfengine/patches/patch-ad b/sysutils/cfengine/patches/patch-ad
new file mode 100644
index 00000000000..b4e45c6d49b
--- /dev/null
+++ b/sysutils/cfengine/patches/patch-ad
@@ -0,0 +1,44 @@
+$NetBSD: patch-ad,v 1.1 1999/11/05 13:52:52 abs Exp $
+--- src/misc.c.orig Fri Nov 5 06:44:40 1999
++++ src/misc.c Fri Nov 5 10:37:17 1999
+@@ -652,3 +652,40 @@
+
+ AddClassToHeap(CanonifyName(VDOMAIN));
+ }
++
++/*********************************************************************/
++
++AddNetworkClass(netmask)
++
++const char *netmask;
++
++{
++struct in_addr ip,
++ nm;
++char *sp,
++ nmbuf[maxvarsize],
++ ipbuf[maxvarsize];
++
++ /*
++ * Has to differentiate between cases such as:
++ * 192.168.101.1/24 -> 192.168.101 and
++ * 192.168.101.1/26 -> 192.168.101.0
++ * We still have the, um... 'interesting' Class C default Network Class
++ * set by GetNameInfo()
++ */
++
++ /* This is also a convenient method to ensure valid dotted quad */
++if (inet_aton(netmask,&nm) && inet_aton(VIPADDRESS,&ip))
++ {
++ ip.s_addr &= nm.s_addr; /* Will not work with IPv6 */
++ strcpy(ipbuf,inet_ntoa(ip));
++
++ strcpy(nmbuf,inet_ntoa(nm));
++ while( (sp = strrchr(nmbuf,'.')) && strcmp(sp,".0") == 0 )
++ {
++ *sp = 0;
++ *strrchr(ipbuf,'.') = 0;
++ }
++ AddClassToHeap(CanonifyName(ipbuf));
++ }
++}