[Glibc-bsd-commits] r1862 - in trunk/freebsd-utils/debian: . patches

Petr Salinger ps-guest at alioth.debian.org
Thu Jan 11 16:25:54 CET 2007


Author: ps-guest
Date: 2007-01-11 16:25:53 +0100 (Thu, 11 Jan 2007)
New Revision: 1862

Added:
   trunk/freebsd-utils/debian/patches/015_pf.diff
Modified:
   trunk/freebsd-utils/debian/changelog
   trunk/freebsd-utils/debian/control
   trunk/freebsd-utils/debian/rules
Log:
* build pfctl and authpf, but don't install them for now



Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog	2007-01-11 15:23:54 UTC (rev 1861)
+++ trunk/freebsd-utils/debian/changelog	2007-01-11 15:25:53 UTC (rev 1862)
@@ -1,8 +1,12 @@
 freebsd-utils (6.1-8) UNRELEASED; urgency=low
 
+  [ Aurelien Jarno ]
   * Remove /etc/init.d/kldutils and /etc/init.d/kfreebsd-common before
     removing the symlinks.
 
+  [ Petr Salinger ]
+  * build pfctl and authpf, but don't install them for now
+
  -- Aurelien Jarno <aurel32 at debian.org>  Wed, 20 Dec 2006 10:03:56 +0100
 
 freebsd-utils (6.1-7) unreleased; urgency=low

Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control	2007-01-11 15:23:54 UTC (rev 1861)
+++ trunk/freebsd-utils/debian/control	2007-01-11 15:25:53 UTC (rev 1862)
@@ -3,7 +3,7 @@
 Priority: important
 Maintainer: GNU/kFreeBSD Maintainers <debian-bsd at lists.debian.org>
 Uploaders: Aurelien Jarno <aurel32 at debian.org>, Guillem Jover <guillem at debian.org>
-Build-Depends: cdbs, debhelper (>= 4.1.0), freebsd6-buildutils, libkvm-dev (>= 6.1), libbsd-dev (>= 0.0-1.2), libc0.1-dev (>= 2.3.6.ds1-9), flex | flex-old, kfreebsd-kernel-headers (>= 0.20), libfreebsd-dev (>= 0.0-5), libipx-dev, libkiconv-dev, libgeom-dev
+Build-Depends: cdbs, debhelper (>= 4.1.0), freebsd6-buildutils, libkvm-dev (>= 6.1), libbsd-dev (>= 0.0-1.2), libc0.1-dev (>= 2.3.6.ds1-9), flex | flex-old, kfreebsd-kernel-headers (>= 0.26), libfreebsd-dev (>= 0.0-5), libipx-dev, libkiconv-dev, libgeom-dev
 # libkvm-dev: dmesg
 # libgeom-dev : ccdconfig
 # libfreebsd (>= 0.0-5): ifconfig

Added: trunk/freebsd-utils/debian/patches/015_pf.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/015_pf.diff	2007-01-11 15:23:54 UTC (rev 1861)
+++ trunk/freebsd-utils/debian/patches/015_pf.diff	2007-01-11 15:25:53 UTC (rev 1862)
@@ -0,0 +1,167 @@
+diff -urN src/contrib/pf/authpf/authpf.c src/contrib/pf/authpf/authpf.c
+--- src/contrib/pf/authpf/authpf.c	2007-01-09 11:00:24.000000000 +0100
++++ src/contrib/pf/authpf/authpf.c	2007-01-09 09:52:19.000000000 +0100
+@@ -44,7 +44,8 @@
+
+ #include <err.h>
+ #include <errno.h>
+-#include <login_cap.h>
++//#include <login_cap.h>
++#include <bsd/string.h>
+ #include <pwd.h>
+ #include <signal.h>
+ #include <stdio.h>
+@@ -103,8 +103,9 @@
+ 	char		*cp;
+ 	uid_t		 uid;
+ 	char		*shell;
++#if 0	
+ 	login_cap_t	*lc;
+-
++#endif
+ 	config = fopen(PATH_CONFFILE, "r");
+ 
+ 	if ((cp = getenv("SSH_TTY")) == NULL) {
+@@ -147,15 +148,16 @@
+ 		syslog(LOG_ERR, "cannot find user for uid %u", uid);
+ 		goto die;
+ 	}
+-
++#if 0
+ 	if ((lc = login_getclass(pw->pw_class)) != NULL)
+ 		shell = (char *)login_getcapstr(lc, "shell", pw->pw_shell,
+ 		    pw->pw_shell);
+ 	else
++#endif	
+ 		shell = pw->pw_shell;
+-
++#if 0
+ 	login_close(lc);
+-
++#endif
+ 	if (strcmp(shell, PATH_AUTHPF_SHELL)) {
+ 		syslog(LOG_ERR, "wrong shell for user %s, uid %u",
+ 		    pw->pw_name, pw->pw_uid);
+@@ -313,7 +315,9 @@
+ 	while (1) {
+ 		printf("\r\nHello %s. ", luser);
+ 		printf("You are authenticated from host \"%s\"\r\n", ipsrc);
++#if 0		
+ 		setproctitle("%s@%s", luser, ipsrc);
++#endif		
+ 		print_message(PATH_MESSAGE);
+ 		while (1) {
+ 			sleep(10);
+diff -urN src/contrib/pf/pfctl/parse.y src/contrib/pf/pfctl/parse.y
+--- src/contrib/pf/pfctl/parse.y	2007-01-09 11:00:24.000000000 +0100
++++ src/contrib/pf/pfctl/parse.y	2007-01-09 10:18:46.000000000 +0100
+@@ -56,7 +56,7 @@
+ #include <limits.h>
+ #include <pwd.h>
+ #include <grp.h>
+-#include <md5.h>
++#include <bsd/md5.h>
+ 
+ #include "pfctl_parser.h"
+ #include "pfctl.h"
+@@ -394,6 +396,7 @@
+ 	} v;
+ 	int lineno;
+ } YYSTYPE;
++#define YYSTYPE_IS_DECLARED 1
+ 
+ #define DYNIF_MULTIADDR(addr) ((addr).type == PF_ADDR_DYNIFTL && \
+ 	(!((addr).iflags & PFI_AFLAG_NOALIAS) ||		 \
+diff -urN src/contrib/pf/pfctl/pf_print_state.c src/contrib/pf/pfctl/pf_print_state.c
+--- src/contrib/pf/pfctl/pf_print_state.c	2007-01-09 11:00:24.000000000 +0100
++++ src/contrib/pf/pfctl/pf_print_state.c	2007-01-09 10:15:37.000000000 +0100
+@@ -34,7 +34,21 @@
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
++
++#ifdef __GLIBC__
++#include <stdint.h>
++#include <endian.h>
++#include <byteswap.h>
++# if __BYTE_ORDER == __LITTLE_ENDIAN
++# define be64toh(x) bswap_64(x)
++# elif __BYTE_ORDER == __BIG_ENDIAN
++# define be64toh(x) ((uint64_t)(x))
++# else
++# error Unknown endian
++# endif
++#else
+ #include <sys/endian.h>
++#endif
+ #include <net/if.h>
+ #define TCPSTATES
+ #include <netinet/tcp_fsm.h>
+diff -urN src/contrib/pf/pfctl/pfctl.h src/contrib/pf/pfctl/pfctl.h
+--- src/contrib/pf/pfctl/pfctl.h	2007-01-09 11:00:24.000000000 +0100
++++ src/contrib/pf/pfctl/pfctl.h	2007-01-09 10:06:36.000000000 +0100
+@@ -34,6 +34,12 @@
+ #ifndef _PFCTL_H_
+ #define _PFCTL_H_
+ 
++#include <bsd/string.h>
++#include <bsd/random.h>
++#define __BSD_VISIBLE 1
++#define __XSI_VISIBLE 1
++#include <sys/limits.h>
++
+ enum {	PFRB_TABLES = 1, PFRB_TSTATS, PFRB_ADDRS, PFRB_ASTATS,
+ 	PFRB_IFACES, PFRB_TRANS, PFRB_MAX };
+ struct pfr_buffer {
+diff -urN src/contrib/pf/pfctl/pfctl_parser.c src/contrib/pf/pfctl/pfctl_parser.c
+--- src/contrib/pf/pfctl/pfctl_parser.c	2007-01-09 11:00:24.000000000 +0100
++++ src/contrib/pf/pfctl/pfctl_parser.c	2007-01-09 10:04:29.000000000 +0100
+@@ -42,7 +42,7 @@
+ #include <netinet/in.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/ip.h>
+-#include <netinet/ip_icmp.h>
++//#include <netinet/ip_icmp.h>
+ #include <netinet/icmp6.h>
+ #include <net/pfvar.h>
+ #include <arpa/inet.h>
+@@ -58,6 +58,9 @@
+ #include <err.h>
+ #include <ifaddrs.h>
+ 
++#include <bsd/ip_icmp.h>
++#include <bsd/bsd.h>
++
+ #include "pfctl_parser.h"
+ #include "pfctl.h"
+ 
+diff -urN src/sbin/pfctl/Makefile src/sbin/pfctl/Makefile
+--- src/sbin/pfctl/Makefile	2007-01-09 10:59:51.000000000 +0100
++++ src/sbin/pfctl/Makefile	2007-01-09 09:48:06.000000000 +0100
+@@ -19,7 +19,7 @@
+ 
+ YFLAGS=
+ 
+-LDADD+=	-lm -lmd
++LDADD+=	-lm 
+ DPADD+=	${LIBM}
+ 
+ .include <bsd.prog.mk>
+diff -urN src/usr.sbin/authpf/Makefile src/usr.sbin/authpf/Makefile
+--- src/usr.sbin/authpf/Makefile	2007-01-09 10:59:54.000000000 +0100
++++ src/usr.sbin/authpf/Makefile	2007-01-09 09:45:02.000000000 +0100
+@@ -11,12 +11,12 @@
+ 
+ SRCS=   authpf.c
+ 
+-CFLAGS+= -I${.CURDIR}/../../contrib/pf/pfctl -Wall -Werror
++CFLAGS+= -I${.CURDIR}/../../contrib/pf/pfctl -Wall
+ 
+ # XXX ALTQ:
+ CFLAGS+= -DENABLE_ALTQ
+ 
+-LDADD+= -lm -lmd -lutil
++LDADD+= -lm -lutil
+ DPADD+= ${LIBM} ${LIBMD} ${LIBUTIL}
+ 
+ .include <bsd.prog.mk>

Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules	2007-01-11 15:23:54 UTC (rev 1861)
+++ trunk/freebsd-utils/debian/rules	2007-01-11 15:25:53 UTC (rev 1862)
@@ -13,6 +13,10 @@
 PMAKE=make COPTS="-D_GNU_SOURCE" NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO NO_SHARED=NO
 export LDADD=-lbsd -lfreebsd
 
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/tarball.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
 build/freebsd-utils:: apply-patches
 	set -e ; for i in sbin/{ccdconfig,dmesg,mdconfig,mount,mount_std,umount,swapon,sysctl} usr.sbin/rpc.umntall \
 		sbin/mount_{autofs,cd9660,ext2fs,hpfs,msdosfs,ntfs,nullfs,reiserfs,udf,umapfs,unionfs} \
@@ -29,7 +33,7 @@
 	done
 
 build/net-tools:: apply-patches
-	set -e ; for i in sbin/{ifconfig,route} \
+	set -e ; for i in sbin/{ifconfig,route,pfctl} usr.sbin/authpf \
 	; do \
 		$(PMAKE) -C $(DEB_SRCDIR)/$$i ; \
 	done
@@ -46,17 +50,18 @@
 	sed -e "s/@choices@/`cd $(DEB_SRCDIR)/share/syscons/keymaps && echo *.kbd | sed -e \"s/ /, /g\"`/g" \
 	< debian/kbdcontrol.templates.in > debian/kbdcontrol.templates
 
-include /usr/share/cdbs/1/rules/tarball.mk
 pre-build:: $(_cdbs_tarball_stamps)
 	find $(DEB_SRCDIR) -type f | (set -e ; while read i ; do sed -i $$i \
 		-e "/^__FBSDID/d" \
-		-e "s/[ \t]*__\(dead2\|unused\|result\)[ \t]*//g" \
+		-e "s/[ \t]*__\(dead2\|unused\|result\)[ \t]*/ /g" \
 		-e "s,<sys/queue\.h>,<bsd/queue.h>,g" \
 		-e "s/^LDADD=/LDADD+=/g" \
 		-e "s/getline/bsd_&/g" \
 	; done)
+	set -e ; find $(DEB_SRCDIR)/contrib/pf/ -type f | (while read i ; do \
+		sed -i $$i \
+		-e 's/defined\( \|\t\)*(\( \|\t\)*__FreeBSD__\( \|\t\)*)/defined(__FreeBSD_kernel__)/g' \
+		-e 's/#\( \|\t\)*ifdef\( \|\t\)*__FreeBSD__/#ifdef __FreeBSD_kernel__/g' \
+		-e 's/#\( \|\t\)*ifndef\( \|\t\)*__FreeBSD__/#ifndef __FreeBSD_kernel__/g' \
+	; done)
 
-
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/tarball.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk




More information about the Glibc-bsd-commits mailing list