From ed9cebc153ee4ceecaeb174a92a1ccf18bd4de9f Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Nov 30 2007 01:55:56 +0000 Subject: bump for EVR. --- diff --git a/driftnet-0.1.6-no-makedepend.patch b/driftnet-0.1.6-no-makedepend.patch index 99f53c8..ed5b887 100644 --- a/driftnet-0.1.6-no-makedepend.patch +++ b/driftnet-0.1.6-no-makedepend.patch @@ -1,11 +1,51 @@ +diff -urN driftnet-0.1.6.old/endian.c driftnet-0.1.6/endian.c +--- driftnet-0.1.6.old/endian.c 2002-07-09 20:26:41.000000000 +0100 ++++ driftnet-0.1.6/endian.c 1970-01-01 01:00:00.000000000 +0100 +@@ -1,37 +0,0 @@ +-/* +- * endian.c: +- * Determine platform endianness. +- * +- * Copyright (c) 2002 . All rights reserved. +- * Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/ +- * +- */ +- +-static const char rcsid[] = "$Id: endian.c,v 1.5 2002/06/10 21:25:48 chris Exp $"; +- +-#include +-#ifdef USE_SYS_TYPES_H +-# include /* Solaris etc. */ +-#else +-# include /* C99 standard. */ +-#endif +- +-int main(void) { +-#if defined(LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN) +- printf("-DDRIFTNET_LITTLE_ENDIAN\n"); +- return 0; +-#elif defined(BIG_ENDIAN) || defined(_BIG_ENDIAN) +- printf("-DDRIFTNET_BIG_ENDIAN\n"); +- return 0; +-#else +- uint32_t a = 0; +- *((uint8_t*)&a) = 0xff; +- if (a == 0xff000000) +- printf("-DDRIFTNET_BIG_ENDIAN\n"); +- else if (a == 0x000000ff) +- printf("-DDRIFTNET_LITTLE_ENDIAN\n"); +- else +- return -1; /* don't know. */ +-#endif /* endianness test */ +- return 0; +-} diff -urN driftnet-0.1.6.old/img.h driftnet-0.1.6/img.h --- driftnet-0.1.6.old/img.h 2002-07-09 20:26:41.000000000 +0100 -+++ driftnet-0.1.6/img.h 2007-10-22 17:13:58.000000000 -0400 -@@ -22,13 +22,13 @@ ++++ driftnet-0.1.6/img.h 2006-04-03 13:05:04.000000000 +0100 +@@ -21,12 +21,13 @@ + #endif #include - --#include "endianness.h" +#include typedef uint8_t chan; @@ -17,7 +57,7 @@ diff -urN driftnet-0.1.6.old/img.h driftnet-0.1.6/img.h # define PEL(r, g, b) ((pel)((chan)(r) | ((chan)(g) << 8) | ((chan)(b) << 16))) # define PELA(r, g, b, a) ((pel)((chan)(r) | ((chan)(g) << 8) | ((chan)(b) << 16) | ((chan)(a) << 24))) -@@ -36,7 +36,7 @@ +@@ -34,7 +35,7 @@ # define GETG(p) ((chan)(((p) & (pel)0x0000ff00) >> 8)) # define GETB(p) ((chan)(((p) & (pel)0x00ff0000) >> 16)) # define GETA(p) ((chan)(((p) & (pel)0xff000000) >> 24)) @@ -25,11 +65,20 @@ diff -urN driftnet-0.1.6.old/img.h driftnet-0.1.6/img.h +#elif (G_BYTE_ORDER == G_BIG_ENDIAN) # define PEL(r, g, b) ((pel)(((chan)(r) << 24) | ((chan)(g) << 16) | ((chan)(b) << 8))) # define PELA(r, g, b, a) ((pel)(((chan)(r) << 24) | ((chan)(g) << 16) | ((chan)(b) << 8) | ((chan)(a)))) - + diff -urN driftnet-0.1.6.old/Makefile driftnet-0.1.6/Makefile --- driftnet-0.1.6.old/Makefile 2006-04-03 13:02:13.000000000 +0100 -+++ driftnet-0.1.6/Makefile 2007-10-21 22:33:35.000000000 -0400 -@@ -76,41 +76,25 @@ ++++ driftnet-0.1.6/Makefile 2006-04-03 13:06:00.000000000 +0100 +@@ -67,7 +67,7 @@ + + SUBDIRS = + +-TXTS = README TODO COPYING CHANGES CREDITS driftnet.1 driftnet.1.in endian.c ++TXTS = README TODO COPYING CHANGES CREDITS driftnet.1 driftnet.1.in + SRCS = audio.c mpeghdr.c gif.c img.c jpeg.c png.c driftnet.c image.c \ + display.c playaudio.c connection.c media.c + HDRS = img.h driftnet.h mpeghdr.h +@@ -77,41 +77,26 @@ default: driftnet driftnet.1 @@ -40,21 +89,22 @@ diff -urN driftnet-0.1.6.old/Makefile driftnet-0.1.6/Makefile driftnet.1: driftnet.1.in Makefile ( echo '.\" DO NOT EDIT THIS FILE-- edit driftnet.1.in instead' ; sed s/@@@VERSION@@@/$(VERSION)/ ) < driftnet.1.in > driftnet.1 --endianness.h: endian -- ./endian > endianness.h -- +-endianness: endian +- ./endian > endianness ++%.o: %.c Makefile ++ $(CC) $(CFLAGS) -c -o $@ $< + -endian: endian.c - $(CC) $(CFLAGS) -o endian endian.c - --%.o: %.c Makefile endianness.h -+%.o: %.c Makefile - $(CC) $(CFLAGS) -c -o $@ $< - --clean: nodepend -- rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 endian endianness.h +-%.o: %.c Makefile endianness +- $(CC) $(CFLAGS) `cat endianness` -c -o $@ $< - +-clean: nodepend +- rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 endian endianness +clean: + rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 + tags: etags *.c *.h @@ -66,7 +116,7 @@ diff -urN driftnet-0.1.6.old/Makefile driftnet-0.1.6/Makefile rm -rf driftnet-$(VERSION) mv driftnet-$(VERSION).tar.gz .. --depend: endianness.h +-depend: endianness - makedepend -- $(CFLAGS) `cat endianness` -- $(SRCS) - touch depend - rm -f Makefile.bak diff --git a/driftnet-dont-use-tmpnam.patch b/driftnet-dont-use-tmpnam.patch index bbae698..a23ae9d 100644 --- a/driftnet-dont-use-tmpnam.patch +++ b/driftnet-dont-use-tmpnam.patch @@ -1,21 +1,30 @@ diff -urp driftnet-0.1.6.old/driftnet.c driftnet-0.1.6/driftnet.c --- driftnet-0.1.6.old/driftnet.c 2002-07-09 20:26:41.000000000 +0100 +++ driftnet-0.1.6/driftnet.c 2005-12-13 16:52:04.000000000 +0000 +@@ -11,6 +11,8 @@ static const char rcsid[] = "$Id: driftn + + #undef NDEBUG + ++#include ++ + #include + #include + #include @@ -585,10 +587,15 @@ int main(int argc, char *argv[]) { } else { /* need to make a temporary directory. */ for (;;) { -- tmpdir = strdup(tmpnam(NULL)); /* may generate a warning, but this is safe because we create a directory not a file */ +- tmpdir = strdup(tmpnam(NULL)); - if (mkdir(tmpdir, 0700) == 0) - break; -- xfree(tmpdir); +- free(tmpdir); + const char *tmp; + char *template; + + tmp = g_get_tmp_dir(); + template = g_build_filename(tmp, "drifnet-XXXXXX", NULL); + tmpdir = mkdtemp (template); -+ /* Paul: not sure why but this breaks tmpdir: g_free (template); */ ++ g_free (template); + if (tmpdir) + break; } diff --git a/driftnet.spec b/driftnet.spec index 1c0de9d..3245f70 100644 --- a/driftnet.spec +++ b/driftnet.spec @@ -2,7 +2,7 @@ Name: driftnet License: GPL Group: Applications/Internet Version: 0.1.6 -Release: 17.20040426cvs%{?dist} +Release: 18.20040426cvs%{?dist} Summary: Network image sniffer URL: http://www.ex-parrot.com/~chris/driftnet/ Source0: driftnet-0.1.6-20040426cvs.tar.gz @@ -55,6 +55,9 @@ install -Dpm 644 %{SOURCE2} \ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Nov 29 2007 Paul Wouters - 0.1.6-18.20040426cvs +- Bump for EVR + * Thu Nov 29 2007 Paul Wouters - 0.1.6-17.20040426cvs - fix untar path