shaperd.2.spec
Jan Palus
jan.palus at student.put.poznan.pl
Fri Nov 4 23:40:14 CET 2005
Few patches to shaperd.2:
- updated to the latest snap
- changed versioning scheme to enable updates (DDMMYY->YYMMDD)
- passing and respecting CC and CFLAGS by make
- fixed bug causing random crashes of shaperd (uninitialized var) -
should be fixed in next realese.
Please review the patches and if good enough add them. Thanks.
--
atler
-------------- next part --------------
Index: shaperd.2.spec
===================================================================
RCS file: /cvsroot/SPECS/shaperd.2.spec,v
retrieving revision 1.28.2.1
diff -u -r1.28.2.1 shaperd.2.spec
--- shaperd.2.spec 27 Jun 2005 14:46:58 -0000 1.28.2.1
+++ shaperd.2.spec 29 Oct 2005 12:44:36 -0000
@@ -2,8 +2,8 @@
Summary: Shaperd - bandwidth limiting
Summary(pl): Shaperd - dzielenie łącza
Name: shaperd.2
-%define snap 060505
-Version: 2.24
+%define snap 050805
+Version: 2.25
Release: 0.%{snap}.1
License: GPL
Group: Networking/Admin
@@ -11,11 +11,13 @@
# Changed source to decrease traffic at republika.pl
#Source0: http://www.cbq.trzepak.net/prg/%{name}.%{version}.tar.gz
Source0: http://www.cbq.trzepak.net/prg/shaperd_snapshot.tar.gz
-# Source0-md5: 5695ba2968d40fd7045eb5859f31597f
+# Source0-md5: 94ab3a29a74c97ad830a4cb3a581dc8f
Source1: %{name}.init
Source2: %{name}.conf
Patch0: %{name}-fhs.patch
Patch1: %{name}-iptables_path.patch
+Patch2: %{name}-makefile.patch
+Patch3: %{name}-crash_fix.patch
#URL: http://sp9wun.republika.pl/linux/shaperd_cbq.html
URL: http://www.cbq.trzepak.net/linux/shaperd_cbq.html
PreReq: rc-scripts
@@ -55,13 +57,13 @@
%setup -q -n shaperd
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
-%{__make}
-
-#{__make} \
-#CC=%{__cc} \
-#CFLAGS="%{rpmcflags} -Wall"
+%{__make} \
+ CC=%{__cc} \
+ CFLAGS="%{rpmcflags} -Wall"
%install
rm -rf $RPM_BUILD_ROOT
-------------- next part --------------
diff -Nur shaperd.old/Makefile shaperd/Makefile
--- shaperd.old/Makefile 2005-10-29 13:47:51.000000000 +0200
+++ shaperd/Makefile 2005-10-29 14:52:22.000000000 +0200
@@ -10,7 +10,9 @@
MAKE=make
INSTALL=install
-SYS_CC=gcc
+ifndef $(CC)
+ CC=gcc
+endif
All: sources
diff -Nur shaperd.old/src/Makefile shaperd/src/Makefile
--- shaperd.old/src/Makefile 2005-10-29 13:47:51.000000000 +0200
+++ shaperd/src/Makefile 2005-10-29 14:52:38.000000000 +0200
@@ -13,24 +13,28 @@
CFLAGS += -Wall
-CC = $(SYS_CC) $(DEFINES)
-
shaperd: $(OBJS)
shaperd.o: shaperd.c shaperd.h
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
shaperd_old.o: shaperd_old.c shaperd_config.h shaperd_old.h read_config.h read_iplist.h firewall.h
- $(CC) -c shaperd_old.c
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
read_config.o: read_config.c read_config.h read_iplist.h firewall.h shaperd_old.h
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
read_iplist.o: read_iplist.c read_iplist.h firewall.h shaperd_old.h
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
firewall.o: firewall.c shaperd_config.h shaperd_old.h read_iplist.h
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
shaperd_cmdline.o: shaperd_cmdline.c shaperd_config.h shaperd.h
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
shaperd_helpers.o: shaperd_helpers.c
+ $(CC) $(CFLAGS) $(DEFINES) -c $<
clean-all:
rm -f $(OBJS)
-------------- next part --------------
--- shaperd/src/shaperd_old.c.orig 2005-10-29 14:38:34.000000000 +0200
+++ shaperd/src/shaperd_old.c 2005-10-29 14:38:40.000000000 +0200
@@ -3150,7 +3150,7 @@
int f1,m,n;
struct stat stbuf;
unsigned long int cnt1,cnt2;
- unsigned long int dd1,dd2,dd3,dd4;
+ unsigned long int dd1,dd2 = 0,dd3,dd4;
char aa[12][20];
char *src;
char buf[30];
More information about the pld-devel-en
mailing list