packages: cancd/cancd.spec, cancd/TODO (NEW), cancd/cancd-c_cleanup.patch (...

blues blues at pld-linux.org
Mon Aug 24 16:20:32 CEST 2009


Author: blues                        Date: Mon Aug 24 14:20:32 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel.2 - c_cleanup and limits patches from gentoo

---- Files affected:
packages/cancd:
   cancd.spec (1.10 -> 1.11) , TODO (NONE -> 1.1)  (NEW), cancd-c_cleanup.patch (NONE -> 1.1)  (NEW), cancd-limits.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/cancd/cancd.spec
diff -u packages/cancd/cancd.spec:1.10 packages/cancd/cancd.spec:1.11
--- packages/cancd/cancd.spec:1.10	Mon Sep 29 17:07:43 2008
+++ packages/cancd/cancd.spec	Mon Aug 24 16:20:27 2009
@@ -1,15 +1,9 @@
 # $Revision$, $Date$
-# TODO
-# - fix alpha build:
-#  alpha-pld-linux-gcc -Wall -O2 -mieee  -DVERSION="\"0.1.0\""   -c -o cancd.o cancd.c
-#  cancd.c: In function `setup_signals':
-#  cancd.c:95: error: structure has no member named `sa_restorer'
-#  make: *** [cancd.o] Error 1
 Summary:	The CA NetConsole Daemon
 Summary(pl.UTF-8):	Demon CA NetConsole
 Name:		cancd
 Version:	0.1.0
-Release:	1
+Release:	2
 License:	GPL
 Group:		Applications/File
 Source0:	http://oss.oracle.com/projects/cancd/dist/files/source/%{name}-%{version}.tar.gz
@@ -18,6 +12,8 @@
 Source2:	%{name}.sysconfig
 Patch0:		%{name}-make.patch
 Patch1:		%{name}-nullterminate.patch
+Patch2:		%{name}-c_cleanup.patch
+Patch3:		%{name}-limits.patch
 URL:		http://oss.oracle.com/projects/cancd/
 BuildRequires:	rpmbuild(macros) >= 1.228
 Requires(post,preun):	/sbin/chkconfig
@@ -46,6 +42,8 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p0
 
 %build
 %{__make} \
@@ -97,6 +95,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.11  2009/08/24 14:20:27  blues
+- rel.2 - c_cleanup and limits patches from gentoo
+
 Revision 1.10  2008/09/29 15:07:43  glen
 - alpha does not build
 

================================================================
Index: packages/cancd/TODO
diff -u /dev/null packages/cancd/TODO:1.1
--- /dev/null	Mon Aug 24 16:20:32 2009
+++ packages/cancd/TODO	Mon Aug 24 16:20:27 2009
@@ -0,0 +1,6 @@
+# TODO:
+- fix alpha build:
+  alpha-pld-linux-gcc -Wall -O2 -mieee  -DVERSION="\"0.1.0\""   -c -o cancd.o cancd.c
+  cancd.c: In function `setup_signals':
+  cancd.c:95: error: structure has no member named `sa_restorer'
+  make: *** [cancd.o] Error 1

================================================================
Index: packages/cancd/cancd-c_cleanup.patch
diff -u /dev/null packages/cancd/cancd-c_cleanup.patch:1.1
--- /dev/null	Mon Aug 24 16:20:33 2009
+++ packages/cancd/cancd-c_cleanup.patch	Mon Aug 24 16:20:27 2009
@@ -0,0 +1,65 @@
+diff -Nuar --exclude '*~' --exclude '*.orig' --exclude Makefile cancd-0.1.0/cancd.c cancd-0.1.0.new/cancd.c
+--- cancd-0.1.0/cancd.c	2005-08-18 11:47:48.000000000 -0700
++++ cancd-0.1.0.new/cancd.c	2006-03-17 17:09:46.402025517 -0800
+@@ -199,7 +199,7 @@
+     char *path;
+ };
+ 
+-static int make_tree(const char *path, int mode)
++static int make_tree(const char *path, mode_t mode)
+ {
+     struct stat stat_buf;
+     char *ptr, *tmp;
+@@ -319,7 +319,7 @@
+ static int open_socket()
+ {
+     int rc;
+-    struct sockaddr_in servaddr = {0, };
++    struct sockaddr_in servaddr;
+ 
+     sock_fd = socket(PF_INET, SOCK_DGRAM, 0);
+     if (sock_fd < 0)
+@@ -438,7 +438,7 @@
+     int rc;
+     static int block = 1;
+ 
+-    rc = recvfrom(sock_fd, buf, bufsize, 0,
++    rc = recvfrom(fd, buf, bufsize, 0,
+                   (struct sockaddr *)from, fromlen);
+     if (rc < 0)
+     {
+@@ -569,7 +569,7 @@
+ 
+ static int valid_format()
+ {
+-    struct in_addr addr = {0, };
++    struct in_addr addr;
+     char *name;
+     int rc;
+ 
+@@ -599,9 +599,11 @@
+     exit(rc);
+ }
+ 
++/*
+ extern char *optarg;
+ extern int optopt;
+ extern int opterr;
++*/
+ static int parse_options(int argc, char *argv[])
+ {
+     int c;
+@@ -641,11 +643,11 @@
+                             optarg);
+                     print_usage(-EINVAL);
+                 }
+-                log_prefix = optarg;
++                log_prefix = strdup(optarg);
+                 break;
+ 
+             case 'o':
+-                log_format = optarg;
++                log_format = strdup(optarg);
+                 if (!log_format || !*log_format || !valid_format())
+                 {
+                     fprintf(stderr,

================================================================
Index: packages/cancd/cancd-limits.patch
diff -u /dev/null packages/cancd/cancd-limits.patch:1.1
--- /dev/null	Mon Aug 24 16:20:33 2009
+++ packages/cancd/cancd-limits.patch	Mon Aug 24 16:20:27 2009
@@ -0,0 +1,14 @@
+fix building with newer glibc
+
+http://bugs.gentoo.org/246734
+
+--- cancd.c
++++ cancd.c
+@@ -36,6 +36,7 @@
+ #include <libgen.h>
+ #include <getopt.h>
+ #include <stdarg.h>
++#include <limits.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cancd/cancd.spec?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list