[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r1231 - in trunk/kfreebsd-6/debian: . patches



Author: rmh
Date: 2006-02-17 19:12:53 +0000 (Fri, 17 Feb 2006)
New Revision: 1231

Removed:
   trunk/kfreebsd-6/debian/autopatch.sh
   trunk/kfreebsd-6/debian/patches/900_devfs_perm_fixes.diff
Modified:
   trunk/kfreebsd-6/debian/changelog
   trunk/kfreebsd-6/debian/control.flavor.in
   trunk/kfreebsd-6/debian/control.in
   trunk/kfreebsd-6/debian/patches/001_misc.diff
   trunk/kfreebsd-6/debian/patches/004_xargs.diff
   trunk/kfreebsd-6/debian/rules
Log:
  * control.in:
    - (Build-Depends-Indep): Remove patchutils and sharutils (not really
    needed).
    - (Build-Depends): Ditto.  Also update libdb4.4-dev.
    - (Replaces): Remove kfreebsd@major@-source (it never existed for 6.x).
  * rules: When obtaining major/version numbers, if this is a preliminar
    snapshot (e.g. 6.99+20060217), pretend this is the actual release.
  * autopatch.sh: Merge into rules.  This allows us to use  instead
    of a hardcoded number.
  * patches/001_misc.diff: Make this patch more upstream-friendly.
  * Fix /dev permissions in userland.
    - control.flavor.in (Depends): Add kfreebsd-common.
    - patches/900_devfs_perm_fixes.diff: Remove.

Deleted: trunk/kfreebsd-6/debian/autopatch.sh
===================================================================
--- trunk/kfreebsd-6/debian/autopatch.sh	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/autopatch.sh	2006-02-17 19:12:53 UTC (rev 1231)
@@ -1,16 +0,0 @@
-#!/bin/sh
-set -e
-
-for i in `find . -type f` ; 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' \
-    -e 's/__FreeBSD__/6/g' \
-    -e 's,#\( \|\t\)*include\( \|\t\)*<sys/device.h>,,g' \
-    -e 's,#\( \|\t\)*include\( \|\t\)*<dev/rndvar.h>,,g' \
-    -e 's,#\( \|\t\)*include\( \|\t\)*<sys/pool.h>,,g' \
-    -e 's,#\( \|\t\)*include\( \|\t\)*<netinet/ip_ipsp.h>,,g' \
-    -e 's,#\( \|\t\)*include\( \|\t\)*\(<\|"\)bpfilter.h\(>\|"\),,g' \
-    -e 's,#\( \|\t\)*include\( \|\t\)*\(<\|"\)pflog.h\(>\|"\),,g'
-done

Modified: trunk/kfreebsd-6/debian/changelog
===================================================================
--- trunk/kfreebsd-6/debian/changelog	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/changelog	2006-02-17 19:12:53 UTC (rev 1231)
@@ -15,8 +15,21 @@
     - copyright: Add nve to list of non-free components.
     - patches/903_disable_non-free_drivers.diff: Disable nve.
     - arch/i386/486.config: Ditto.
+  * control.in:
+    - (Build-Depends-Indep): Remove patchutils and sharutils (not really
+    needed).
+    - (Build-Depends): Ditto.  Also update libdb4.4-dev.
+    - (Replaces): Remove kfreebsd@major@-source (it never existed for 6.x).
+  * rules: When obtaining major/version numbers, if this is a preliminar
+    snapshot (e.g. 6.99+20060217), pretend this is the actual release.
+  * autopatch.sh: Merge into rules.  This allows us to use $(major) instead
+    of a hardcoded number.
+  * patches/001_misc.diff: Make this patch more upstream-friendly.
+  * Fix /dev permissions in userland.
+    - control.flavor.in (Depends): Add kfreebsd-common.
+    - patches/900_devfs_perm_fixes.diff: Remove.
 
- -- Robert Millan <rmh@aybabtu.com>  Sat, 11 Feb 2006 09:53:51 +0100
+ -- Robert Millan <rmh@aybabtu.com>  Fri, 17 Feb 2006 19:06:37 +0100
 
 kfreebsd-5 (5.3-6) unstable; urgency=low
 

Modified: trunk/kfreebsd-6/debian/control.flavor.in
===================================================================
--- trunk/kfreebsd-6/debian/control.flavor.in	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/control.flavor.in	2006-02-17 19:12:53 UTC (rev 1231)
@@ -1,7 +1,7 @@
 Package: kfreebsd-image-@version@-@abiname@-@flavor@
 Architecture: kfreebsd-@arch@
 Section: base
-Depends: freebsd-utils (>= 5), kldutils
+Depends: freebsd-utils (>= 5), kldutils, kfreebsd-common
 Provides: kfreebsd-image-@major@, kfreebsd-image
 Conflicts: kfreebsd5, kfreebsd-image
 Replaces: kfreebsd5

Modified: trunk/kfreebsd-6/debian/control.in
===================================================================
--- trunk/kfreebsd-6/debian/control.in	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/control.in	2006-02-17 19:12:53 UTC (rev 1231)
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>
 Uploaders: Aurelien Jarno <aurel32@debian.org>, Guillem Jover <guillem@debian.org>
-Build-Depends-Indep: debhelper (>= 4.1.0), bzip2, patchutils (>= 0.2.25)
-Build-Depends: debhelper (>= 4.1.0), bzip2, patchutils (>= 0.2.25), dpkg (>= 1.13.9), freebsd@major@-buildutils, libdb4.3-dev | libdb-dev, flex-old | flex, sharutils, libbsd-dev
+Build-Depends-Indep: debhelper (>= 4.1.0), bzip2
+Build-Depends: debhelper (>= 4.1.0), bzip2, freebsd@major@-buildutils, libdb4.4-dev | libdb-dev, flex-old | flex, libbsd-dev
 Standards-Version: 3.6.2
 
 Package: kfreebsd-source-@version@
@@ -12,7 +12,6 @@
 Section: devel
 Recommends: freebsd@major@-buildutils (>= @version@)
 Provides: kfreebsd-source-@major@, kfreebsd-source
-Replaces: kfreebsd@major@-source
 Description: source code for kernel of FreeBSD @version@ with Debian patches
  This package provides the source code for kernel of FreeBSD @version@, base of 
  a GNU/kFreeBSD system.

Modified: trunk/kfreebsd-6/debian/patches/001_misc.diff
===================================================================
--- trunk/kfreebsd-6/debian/patches/001_misc.diff	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/patches/001_misc.diff	2006-02-17 19:12:53 UTC (rev 1231)
@@ -1,35 +1,72 @@
 
-Status:
-  - xargs -J option requested to both upstream and debian.
-  - -fformat-extensions and -mno-align-long-strings are gcc extensions available
-    in FreeBSD's src/contrib/gcc.  Maybe they end up merging them in gcc
-    upstream (or getting rid of them).
-  - chflags is BSD-specific.  We could add it to freebsd-utils.
+Status: chflags is BSD-specific.  We could add it to freebsd-utils.
+  I think the rest can be submitted. -- rmh
 
---- sys.old/conf/kern.mk	2005-03-31 17:53:58.000000000 -0500
-+++ sys/conf/kern.mk	2005-09-03 16:06:03.000000000 -0400
-@@ -12,7 +12,7 @@
- .else
- CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
+diff -ur sys/conf.old/kern.mk sys/conf/kern.mk
+--- sys/conf.old/kern.mk	2006-02-17 19:04:05.000000000 +0100
++++ sys/conf/kern.mk	2006-02-17 19:05:07.000000000 +0100
+@@ -1,5 +1,9 @@
+ # $FreeBSD: src/sys/conf/kern.mk,v 1.45 2005/03/31 22:53:58 peter Exp $
+ 
++.if !defined(OPSYS)
++OPSYS!=		uname -s
++.endif
++
+ #
+ # Warning flags for compiling the kernel and components of the kernel.
+ #
+@@ -9,10 +13,14 @@
+ .if ${CC} == "icc"
+ #CWARNFLAGS=	-w2	# use this if you are terribly bored
+ CWARNFLAGS=
+-.else
+-CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
++.elif !defined(CWARNFLAGS)
++CWARNFLAGS=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
  		-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
 -		-fformat-extensions -std=c99
 +		-std=c99
++.if ${OPSYS} == "FreeBSD"
++# FreeBSD extensions, not available in upstream GCC
++CWARNFLAGS+=	-fformat-extensions
++.endif
  .endif
  #
  # The following flags are next up for working on:
-@@ -30,7 +30,7 @@
+@@ -30,8 +38,12 @@
  # reserved for user applications.
  #
  .if ${MACHINE_ARCH} == "i386" && ${CC} != "icc"
 -CFLAGS+=	-mno-align-long-strings -mpreferred-stack-boundary=2 \
 +CFLAGS+=	-mpreferred-stack-boundary=2 \
  		-mno-mmx -mno-3dnow -mno-sse -mno-sse2
++.if ${OPSYS} == "FreeBSD"
++# FreeBSD extensions, not available in upstream GCC
++CFLAGS+=	-mno-align-long-strings
++.endif
  INLINE_LIMIT?=	8000
  .endif
-
---- sys.old/conf/kern.post.mk	2005-06-09 01:38:18.000000000 -0400
-+++ sys/conf/kern.post.mk	2005-09-03 16:06:45.000000000 -0400
-@@ -193,11 +193,9 @@
+ 
+diff -ur sys/conf.old/kern.post.mk sys/conf/kern.post.mk
+--- sys/conf.old/kern.post.mk	2006-02-17 19:04:05.000000000 +0100
++++ sys/conf/kern.post.mk	2006-02-17 19:04:12.000000000 +0100
+@@ -1,5 +1,15 @@
+ # $FreeBSD: src/sys/conf/kern.post.mk,v 1.83 2005/06/09 05:38:18 imp Exp $
+ 
++.if !defined(OPSYS)
++OPSYS!=		uname -s
++.endif
++
++.if ${OPSYS} == "FreeBSD"
++WHEEL_GROUP?=	wheel
++.else
++WHEEL_GROUP?=	root
++.endif
++
+ # Part of a unified Makefile for building kernels.  This part includes all
+ # the definitions that need to be after all the % directives except %RULES
+ # and ones that act like they are part of %RULES.
+@@ -193,11 +203,9 @@
  .if exists(${DESTDIR}${KODIR})
  	-thiskernel=`sysctl -n kern.bootfile` ; \
  	if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \
@@ -41,25 +78,25 @@
  			rm -rf ${DESTDIR}${KODIR}.old ; \
  		fi ; \
  		mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old ; \
-@@ -206,17 +204,16 @@
+@@ -206,17 +214,16 @@
  .endif
  	mkdir -p ${DESTDIR}${KODIR}
  .if defined(DEBUG) && defined(INSTALL_DEBUG)
 -	${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR}
-+	${INSTALL} -p -m 555 -o root -g root ${FULLKERNEL} ${DESTDIR}${KODIR}
++	${INSTALL} -p -m 555 -o root -g ${WHEEL_GROUP} ${FULLKERNEL} ${DESTDIR}${KODIR}
  .else
 -	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
-+	${INSTALL} -p -m 555 -o root -g root ${KERNEL_KO} ${DESTDIR}${KODIR}
++	${INSTALL} -p -m 555 -o root -g ${WHEEL_GROUP} ${KERNEL_KO} ${DESTDIR}${KODIR}
  .endif
  
  kernel-reinstall:
 -	@-chflags -R noschg ${DESTDIR}${KODIR}
  .if defined(DEBUG) && defined(INSTALL_DEBUG)
 -	${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR}
-+	${INSTALL} -p -m 555 -o root -g root ${FULLKERNEL} ${DESTDIR}${KODIR}
++	${INSTALL} -p -m 555 -o root -g ${WHEEL_GROUP} ${FULLKERNEL} ${DESTDIR}${KODIR}
  .else
 -	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
-+	${INSTALL} -p -m 555 -o root -g root ${KERNEL_KO} ${DESTDIR}${KODIR}
++	${INSTALL} -p -m 555 -o root -g ${WHEEL_GROUP} ${KERNEL_KO} ${DESTDIR}${KODIR}
  .endif
  
  config.o env.o hints.o vers.o vnode_if.o:

Modified: trunk/kfreebsd-6/debian/patches/004_xargs.diff
===================================================================
--- trunk/kfreebsd-6/debian/patches/004_xargs.diff	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/patches/004_xargs.diff	2006-02-17 19:12:53 UTC (rev 1231)
@@ -1,3 +1,6 @@
+
+Status: xargs -J option requested to both upstream and debian.
+
 --- sys.old/conf/kmod.mk	2005-04-22 13:39:58.000000000 -0400
 +++ sys/conf/kmod.mk	2005-09-03 16:11:36.000000000 -0400
 @@ -180,7 +180,7 @@
@@ -5,7 +8,7 @@
  .endif
  	awk -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \
 -	    export_syms | xargs -J% ${OBJCOPY} % ${.TARGET}
-+	    export_syms | xargs -i% ${OBJCOPY} % ${.TARGET}
++	    export_syms | xargs -I% ${OBJCOPY} % ${.TARGET}
  .endif
  .endif
  .if !defined(DEBUG_FLAGS) && ${MACHINE_ARCH} == amd64
@@ -17,13 +20,13 @@
  echo copying full dirs
  for i in ${fulldirs}; do
 -    find ${wrk} -name ${i} -type d | xargs -J % mv % ${dst}
-+    find ${wrk} -name ${i} -type d | xargs -i % mv % ${dst}
++    find ${wrk} -name ${i} -type d | xargs -I % mv % ${dst}
  done
  
  # move files to destination
  echo copying flat dirs
 -find ${wrk} -type f | xargs -J % mv % ${dst}
-+find ${wrk} -type f | xargs -i % mv % ${dst}
++find ${wrk} -type f | xargs -I % mv % ${dst}
  mv CHANGES.txt ${dst}
  
  # update src/headers for appropriate paths

Deleted: trunk/kfreebsd-6/debian/patches/900_devfs_perm_fixes.diff
===================================================================
--- trunk/kfreebsd-6/debian/patches/900_devfs_perm_fixes.diff	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/patches/900_devfs_perm_fixes.diff	2006-02-17 19:12:53 UTC (rev 1231)
@@ -1,25 +0,0 @@
---- sys/sys/conf.h.old	2004-10-05 00:22:17.000000000 +0200
-+++ sys/sys/conf.h	2004-10-05 00:37:00.000000000 +0200
-@@ -295,15 +295,15 @@
- void devfs_destroy(dev_t dev);
- 
- #define		UID_ROOT	0
--#define		UID_BIN		3
--#define		UID_UUCP	66
-+#define		UID_BIN		2	/* debian bin */
-+#define		UID_UUCP	0	/* linux ttyS0 */
- 
- #define		GID_WHEEL	0
--#define		GID_KMEM	2
--#define		GID_OPERATOR	5
--#define		GID_BIN		7
--#define		GID_GAMES	13
--#define		GID_DIALER	68
-+#define		GID_KMEM	15	/* linux kmem */
-+#define		GID_OPERATOR	0	/* no such group */
-+#define		GID_BIN		2	/* debian bin */
-+#define		GID_GAMES	60	/* debian games */
-+#define		GID_DIALER	20	/* linux ttyS0 */
- 
- typedef void (*dev_clone_fn)(void *arg, char *name, int namelen, dev_t *result);
- 

Modified: trunk/kfreebsd-6/debian/rules
===================================================================
--- trunk/kfreebsd-6/debian/rules	2006-02-17 18:15:42 UTC (rev 1230)
+++ trunk/kfreebsd-6/debian/rules	2006-02-17 19:12:53 UTC (rev 1231)
@@ -5,10 +5,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-full_version	:= $(shell dpkg-parsechangelog | grep ^Version | sed -e 's/^.*: //g')
+full_version	:= $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
 version		:= $(shell echo $(full_version) | sed -e 's/[+-].*//g')
-major		:= $(shell echo $(version) | sed -e 's/\..*//g')
 revision	:= $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
+major		:= $(shell dpkg-parsechangelog | grep ^Source: | sed -e 's/^.*-//g')
+ifeq (, $(findstring :$(major)., :$(version)))
+# Preliminar snapshot (e.g. 6.99+20060217).  Pretend this is the actual release.
+version		:= $(major).0
+endif
+
 os		:= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 cpu		:= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 config_files	:= $(wildcard debian/arch/$(cpu)/*.config)
@@ -51,9 +56,19 @@
 src:
 	tar xfj $(CURDIR)/src.tar.bz2
 	
-	chmod +x $(CURDIR)/debian/autopatch.sh \
-		&& cd src/ \
-		&& $(CURDIR)/debian/autopatch.sh
+	set -e ; find src -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' \
+		-e 's/__FreeBSD__/$(major)/g' \
+		-e 's,#\( \|\t\)*include\( \|\t\)*<sys/device.h>,,g' \
+		-e 's,#\( \|\t\)*include\( \|\t\)*<dev/rndvar.h>,,g' \
+		-e 's,#\( \|\t\)*include\( \|\t\)*<sys/pool.h>,,g' \
+		-e 's,#\( \|\t\)*include\( \|\t\)*<netinet/ip_ipsp.h>,,g' \
+		-e 's,#\( \|\t\)*include\( \|\t\)*\(<\|"\)bpfilter.h\(>\|"\),,g' \
+		-e 's,#\( \|\t\)*include\( \|\t\)*\(<\|"\)pflog.h\(>\|"\),,g' \
+	; done)
 	
 	set -e ; for i in $(CURDIR)/debian/patches/*.diff ; do \
 		echo "--- Patch $$i ---" ; \



Reply to: