[Glibc-bsd-commits] r2816 - in trunk/freebsd-utils/debian: . patches
Aurelien Jarno
aurel32 at alioth.debian.org
Tue Oct 27 20:35:48 UTC 2009
Author: aurel32
Date: 2009-10-27 20:35:48 +0000 (Tue, 27 Oct 2009)
New Revision: 2816
Added:
trunk/freebsd-utils/debian/patches/020_lib.diff
Removed:
trunk/freebsd-utils/debian/patches/019_kenv_syscall.diff
Modified:
trunk/freebsd-utils/debian/changelog
trunk/freebsd-utils/debian/control
trunk/freebsd-utils/debian/patches/002_ifconfig.diff
trunk/freebsd-utils/debian/patches/004_kldconfig.diff
trunk/freebsd-utils/debian/patches/014_route.diff
trunk/freebsd-utils/debian/patches/016_swapon.diff
trunk/freebsd-utils/debian/patches/series
trunk/freebsd-utils/debian/rules
Log:
* Drop build-depends on libfreebsd-dev in favor of libc0.1-dev
(>= 2.10.1). Update patches accordingly.
Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/changelog 2009-10-27 20:35:48 UTC (rev 2816)
@@ -1,4 +1,4 @@
-freebsd-utils (7.2-9) UNRELEASED; urgency=low
+freebsd-utils (7.2-9) unstable; urgency=low
* debian/rules: adjust start priority of freebsd-utils.init and
kldutils.init.
@@ -8,8 +8,10 @@
* Add a /bin/kenv binary in both freebsd-utils and freebsd-utils-udeb.
* Add a debian/README.source file to make lintian happy.
* Bumped Standards-Version to 3.8.3 (no changes).
+ * Drop build-depends on libfreebsd-dev in favor of libc0.1-dev
+ (>= 2.10.1). Update patches accordingly.
- -- Aurelien Jarno <aurel32 at debian.org> Sat, 22 Aug 2009 19:42:25 +0200
+ -- Aurelien Jarno <aurel32 at debian.org> Sat, 24 Oct 2009 14:57:29 +0200
freebsd-utils (7.2-8) unstable; urgency=low
Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/control 2009-10-27 20:35:48 UTC (rev 2816)
@@ -4,12 +4,11 @@
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: debhelper (>= 7), quilt, po-debconf, freebsd-buildutils,
- libkvm-dev (>= 7.0), libbsd-dev (>= 0.0-1.2), libc0.1-dev (>= 2.7-13),
- flex | flex-old, kfreebsd-kernel-headers (>= 0.31), libfreebsd-dev (>= 0.0-5),
+ libkvm-dev (>= 7.0), libbsd-dev (>= 0.0-1.2), libc0.1-dev (>= 2.10.1),
+ flex | flex-old, kfreebsd-kernel-headers (>= 0.31),
libipx-dev, libkiconv-dev, libgeom-dev, libdevstat-dev, libsbuf-dev
# libkvm-dev: dmesg
# libgeom-dev : ccdconfig
-# libfreebsd (>= 0.0-5): ifconfig
# libipx-dev: ifconfig
# libkiconv-dev: mount_*
# libc0.1-dev (>= 2.7-13): ifconfig
Modified: trunk/freebsd-utils/debian/patches/002_ifconfig.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/002_ifconfig.diff 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/patches/002_ifconfig.diff 2009-10-27 20:35:48 UTC (rev 2816)
@@ -45,7 +45,7 @@
MAN= ifconfig.8
CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
-+LDADD+= -lbsd -lfreebsd
++LDADD+= -lbsd ../../lib/linkaddr.o
WARNS?= 0
.include <bsd.prog.mk>
@@ -254,11 +254,12 @@
exit(0);
--- a/sbin/ifconfig/af_link.c
+++ b/sbin/ifconfig/af_link.c
-@@ -46,13 +46,14 @@
+@@ -46,13 +46,15 @@
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/ethernet.h>
+#include <netinet/ether.h>
++#include "../../lib/linkaddr.h"
#include "ifconfig.h"
@@ -272,13 +273,14 @@
struct sockaddr_dl *sdl = (struct sockaddr_dl *) ifa->ifa_addr;
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
-@@ -87,6 +87,9 @@
+@@ -87,6 +87,10 @@
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
+#include <stdint.h>
+#include <netinet/ether.h>
+#include <bsd/string.h>
++#include "../../lib/linkaddr.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Modified: trunk/freebsd-utils/debian/patches/004_kldconfig.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/004_kldconfig.diff 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/patches/004_kldconfig.diff 2009-10-27 20:35:48 UTC (rev 2816)
@@ -36,6 +36,6 @@
PROG= kldconfig
MAN= kldconfig.8
WARNS?= 5
-+LDADD= -lbsd -lfreebsd
++LDADD= -lbsd
.include <bsd.prog.mk>
Modified: trunk/freebsd-utils/debian/patches/014_route.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/014_route.diff 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/patches/014_route.diff 2009-10-27 20:35:48 UTC (rev 2816)
@@ -6,7 +6,7 @@
===================================================================
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
-@@ -63,10 +63,12 @@
+@@ -63,10 +63,13 @@
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
@@ -16,7 +16,8 @@
#include <unistd.h>
#include <ifaddrs.h>
+#include <time.h>
-
++#include "../../lib/linkaddr.h"
+
struct keytab {
char *kt_cp;
@@ -110,7 +112,7 @@
@@ -45,16 +46,14 @@
+ mask = 0xf0000000;
else
mask = 0xffffffff;
-
-Index: b/sbin/route/Makefile
-===================================================================
+
--- a/sbin/route/Makefile
+++ b/sbin/route/Makefile
-@@ -10,6 +10,7 @@
+@@ -7,6 +7,7 @@
+ MAN= route.8
+ SRCS= route.c keywords.h
+ WARNS?= 0
++LDADD= ../../lib/linkaddr.o
CLEANFILES+=keywords.h _keywords.tmp
CFLAGS+= -DNS
-+LDADD+= -lfreebsd
-
- .if ${MK_INET6_SUPPORT} != "no"
- CFLAGS+= -DINET6
Modified: trunk/freebsd-utils/debian/patches/016_swapon.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/016_swapon.diff 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/patches/016_swapon.diff 2009-10-27 20:35:48 UTC (rev 2816)
@@ -16,15 +16,6 @@
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/sysctl.h>
-@@ -50,7 +51,7 @@
- #include <errno.h>
- #include <fstab.h>
- #include <stdio.h>
--#include <stdlib.h>
-+#include <freebsd/stdlib.h>
- #include <string.h>
- #include <unistd.h>
- #include <fcntl.h>
@@ -70,6 +71,8 @@
int ch, doall;
int sflag = 0, lflag = 0, hflag = 0;
@@ -69,6 +60,6 @@
LINKS+= ${BINDIR}/swapon ${BINDIR}/swapctl
MLINKS= swapon.8 swapoff.8
MLINKS+=swapon.8 swapctl.8
-+LDADD= -lbsd -lfreebsd
++LDADD= -lbsd
.include <bsd.prog.mk>
Deleted: trunk/freebsd-utils/debian/patches/019_kenv_syscall.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/019_kenv_syscall.diff 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/patches/019_kenv_syscall.diff 2009-10-27 20:35:48 UTC (rev 2816)
@@ -1,21 +0,0 @@
-This patch is there to workaround a missing syscall in the glibc that
-will appear with version 2.10. It can be dropped when this version is
-available.
-
---- a/bin/kenv/kenv.c
-+++ b/bin/kenv/kenv.c
-@@ -45,6 +45,14 @@
- static int qflag = 0;
- static int uflag = 0;
-
-+#if (GLIBC_MINOR <= 9)
-+#include <sys/syscall.h>
-+int kenv(int action, const char *name, char *value, int len)
-+{
-+ syscall(SYS_kenv, action, name, value, len);
-+}
-+#endif
-+
- static void
- usage(void)
- {
Added: trunk/freebsd-utils/debian/patches/020_lib.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/020_lib.diff (rev 0)
+++ trunk/freebsd-utils/debian/patches/020_lib.diff 2009-10-27 20:35:48 UTC (rev 2816)
@@ -0,0 +1,208 @@
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -0,0 +1,12 @@
++SRCS = linkaddr.c
++
++OBJS = $(SRCS:%.c=%.o)
++
++%.o: %.c
++ $(CC) -o $@ $(MK_CFLAGS) $(CFLAGS) -c $<
++
++all: $(OBJS)
++
++clean:
++ rm -f $(OBJS)
++
+--- a/lib/linkaddr.c
++++ b/lib/linkaddr.c
+@@ -0,0 +1,155 @@
++/*-
++ * Copyright (c) 1990, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++#if defined(LIBC_SCCS) && !defined(lint)
++static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
++#endif /* LIBC_SCCS and not lint */
++#include <sys/cdefs.h>
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <net/if_dl.h>
++#include <string.h>
++
++/* States*/
++#define NAMING 0
++#define GOTONE 1
++#define GOTTWO 2
++#define RESET 3
++/* Inputs */
++#define DIGIT (4*0)
++#define END (4*1)
++#define DELIM (4*2)
++#define LETTER (4*3)
++
++void
++link_addr(addr, sdl)
++ const char *addr;
++ struct sockaddr_dl *sdl;
++{
++ char *cp = sdl->sdl_data;
++ char *cplim = sdl->sdl_len + (char *)sdl;
++ int byte = 0, state = NAMING, new;
++
++ bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
++ sdl->sdl_family = AF_LINK;
++ do {
++ state &= ~LETTER;
++ if ((*addr >= '0') && (*addr <= '9')) {
++ new = *addr - '0';
++ } else if ((*addr >= 'a') && (*addr <= 'f')) {
++ new = *addr - 'a' + 10;
++ } else if ((*addr >= 'A') && (*addr <= 'F')) {
++ new = *addr - 'A' + 10;
++ } else if (*addr == 0) {
++ state |= END;
++ } else if (state == NAMING &&
++ (((*addr >= 'A') && (*addr <= 'Z')) ||
++ ((*addr >= 'a') && (*addr <= 'z'))))
++ state |= LETTER;
++ else
++ state |= DELIM;
++ addr++;
++ switch (state /* | INPUT */) {
++ case NAMING | DIGIT:
++ case NAMING | LETTER:
++ *cp++ = addr[-1];
++ continue;
++ case NAMING | DELIM:
++ state = RESET;
++ sdl->sdl_nlen = cp - sdl->sdl_data;
++ continue;
++ case GOTTWO | DIGIT:
++ *cp++ = byte;
++ /* FALLTHROUGH */
++ case RESET | DIGIT:
++ state = GOTONE;
++ byte = new;
++ continue;
++ case GOTONE | DIGIT:
++ state = GOTTWO;
++ byte = new + (byte << 4);
++ continue;
++ default: /* | DELIM */
++ state = RESET;
++ *cp++ = byte;
++ byte = 0;
++ continue;
++ case GOTONE | END:
++ case GOTTWO | END:
++ *cp++ = byte;
++ /* FALLTHROUGH */
++ case RESET | END:
++ break;
++ }
++ break;
++ } while (cp < cplim);
++ sdl->sdl_alen = cp - LLADDR(sdl);
++ new = cp - (char *)sdl;
++ if (new > sizeof(*sdl))
++ sdl->sdl_len = new;
++ return;
++}
++
++static char hexlist[] = "0123456789abcdef";
++
++char *
++link_ntoa(sdl)
++ const struct sockaddr_dl *sdl;
++{
++ static char obuf[64];
++ char *out = obuf;
++ int i;
++ u_char *in = (u_char *)LLADDR(sdl);
++ u_char *inlim = in + sdl->sdl_alen;
++ int firsttime = 1;
++
++ if (sdl->sdl_nlen) {
++ bcopy(sdl->sdl_data, obuf, sdl->sdl_nlen);
++ out += sdl->sdl_nlen;
++ if (sdl->sdl_alen)
++ *out++ = ':';
++ }
++ while (in < inlim) {
++ if (firsttime)
++ firsttime = 0;
++ else
++ *out++ = '.';
++ i = *in++;
++ if (i > 0xf) {
++ out[1] = hexlist[i & 0xf];
++ i >>= 4;
++ out[0] = hexlist[i];
++ out += 2;
++ } else
++ *out++ = hexlist[i];
++ }
++ *out = 0;
++ return (obuf);
++}
+--- a/lib/linkaddr.h
++++ b/lib/linkaddr.h
+@@ -0,0 +1,32 @@
++/*-
++ * Copyright (c) 1990, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++void link_addr(const char *addr, struct sockaddr_dl *sdl);
++
++char *link_ntoa(const struct sockaddr_dl *sdl);
Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/patches/series 2009-10-27 20:35:48 UTC (rev 2816)
@@ -17,4 +17,4 @@
017_sysctl.diff
018_umount.diff
019_kenv_sources.diff
-019_kenv_syscall.diff
+020_lib.diff
Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules 2009-10-27 19:48:23 UTC (rev 2815)
+++ trunk/freebsd-utils/debian/rules 2009-10-27 20:35:48 UTC (rev 2816)
@@ -19,7 +19,6 @@
PATH:=/usr/lib/freebsd:$(PATH)
DESTDIR=$(CURDIR)/debian/tmp
PMAKE=COPTS="$(CFLAGS)" CFLAGS="$(CFLAGS)" NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO NO_SHARED=NO DESTDIR=$(DESTDIR) make
-#export LDADD=-lfreebsd -lbsd
build: build-arch build-indep
@@ -48,6 +47,11 @@
QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
touch $@
+lib: lib-stamp
+lib-stamp: patch-stamp
+ $(MAKE) -C lib
+ touch $@
+
build-arch: freebsd-utils gbde geli kbdcontrol kldutils freebsd-net-tools
freebsd-utils: freebsd-utils-stamp
@@ -104,7 +108,7 @@
touch $@
freebsd-net-tools: freebsd-net-tools-stamp
-freebsd-net-tools-stamp: patch-stamp
+freebsd-net-tools-stamp: patch-stamp lib-stamp
$(PMAKE) -C sbin/ifconfig
$(PMAKE) -C sbin/pfctl
$(PMAKE) -C sbin/route
@@ -119,6 +123,7 @@
clean:
dh_testdir
dh_testroot
+ [ ! -f lib/Makefile ] || $(MAKE) -C lib clean
$(PMAKE) -C bin/chflags clean
[ ! -f bin/kenv/Makefile ] || $(PMAKE) -C bin/kenv clean
$(PMAKE) -C sbin/ccdconfig clean
More information about the Glibc-bsd-commits
mailing list