[Glibc-bsd-commits] r2262 - in trunk/ufsutils/debian: . patches
aurel32 at alioth.debian.org
aurel32 at alioth.debian.org
Sun Jul 27 13:22:28 UTC 2008
Author: aurel32
Date: 2008-07-27 13:22:27 +0000 (Sun, 27 Jul 2008)
New Revision: 2262
Modified:
trunk/ufsutils/debian/changelog
trunk/ufsutils/debian/control
trunk/ufsutils/debian/copyright
trunk/ufsutils/debian/patches/00_libport.patch
trunk/ufsutils/debian/patches/01_libufs.patch
trunk/ufsutils/debian/patches/02_mkfs.ufs.patch
trunk/ufsutils/debian/patches/02_tunefs.ufs.patch
trunk/ufsutils/debian/patches/99_makefiles.patch
trunk/ufsutils/debian/rules
trunk/ufsutils/debian/upstream.sh
Log:
* Use libbsd instead of duplicating code.
* Remove .pc/ on clean.
Modified: trunk/ufsutils/debian/changelog
===================================================================
--- trunk/ufsutils/debian/changelog 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/changelog 2008-07-27 13:22:27 UTC (rev 2262)
@@ -13,16 +13,16 @@
- debian/patch.mk
* Use root gid as a fallback for operator on mkfs.ufs. (Closes: #293411)
* Updated upstream tarball creator (debian/upstream.sh).
- * Now using Standards-Version 3.6.2 (no changes needed).
* Upgraded to debhelper compatibility level 5.
* Reindent debian/copyright.
* Make debian/patch.mk privide an unpatch target. Switch patch to single
- colong target.
+ colon target.
[ Aurelien Jarno ]
* Bump Standard-Versions to 3.8.0 (no changes).
* Fix debian/copyright.
* Don't ignore make clean errors.
+ * Remove .pc/ on clean.
-- Guillem Jover <guillem at debian.org> Tue, 08 Jan 2008 10:24:57 +0100
Modified: trunk/ufsutils/debian/control
===================================================================
--- trunk/ufsutils/debian/control 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/control 2008-07-27 13:22:27 UTC (rev 2262)
@@ -2,7 +2,7 @@
Section: utils
Priority: optional
Maintainer: Guillem Jover <guillem at debian.org>
-Build-Depends: debhelper (>= 5), quilt, libedit-dev, libncurses5-dev, libfreebsd-dev [kfreebsd-i386 kfreebsd-amd64], libbsd-dev [kfreebsd-i386 kfreebsd-amd64]
+Build-Depends: debhelper (>= 5), quilt, libedit-dev, libncurses5-dev, libfreebsd-dev [kfreebsd-i386 kfreebsd-amd64], libbsd-dev
Standards-Version: 3.8.0
Package: ufsutils
Modified: trunk/ufsutils/debian/copyright
===================================================================
--- trunk/ufsutils/debian/copyright 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/copyright 2008-07-27 13:22:27 UTC (rev 2262)
@@ -15,7 +15,8 @@
Copyright:
- Copyright (c) 1980-1983, 1985-1994 The Regents of the University of California.
+ Copyright (c) 1980-1983, 1985-1994 The Regents of the University of
+ California.
Copyright (c) 1994 Theo de Raadt
Copyright (c) 1994, 1995 Gordon W. Ross
Copyright (c) 1995 John T. Kohl
Modified: trunk/ufsutils/debian/patches/00_libport.patch
===================================================================
--- trunk/ufsutils/debian/patches/00_libport.patch 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/patches/00_libport.patch 2008-07-27 13:22:27 UTC (rev 2262)
@@ -3,16 +3,10 @@
===================================================================
--- /dev/null
+++ ufsutils/include/port/port.h
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,22 @@
+#ifndef LIBPORT_H
+#define LIBPORT_H
+
-+#define setproctitle(fmt, args...)
-+
-+#define __dead2
-+#define __printflike(x,y)
-+#define __FBSDID(x)
-+
+#ifdef __FreeBSD_kernel__
+
+# include <sys/param.h>
@@ -32,95 +26,6 @@
+#endif
+
+#endif
-Index: ufsutils/include/port/random.h
-===================================================================
---- /dev/null
-+++ ufsutils/include/port/random.h
-@@ -0,0 +1,11 @@
-+#ifndef LIBPORT_RANDOM_H
-+#define LIBPORT_RANDOM_H
-+
-+#include <sys/types.h>
-+
-+void arc4random_stir();
-+void arc4random_addrandom(u_char *dat, int datlen);
-+u_int32_t arc4random();
-+
-+#endif
-+
-Index: ufsutils/include/port/string.h
-===================================================================
---- /dev/null
-+++ ufsutils/include/port/string.h
-@@ -0,0 +1,10 @@
-+#ifndef LIBPORT_STRING_H
-+#define LIBPORT_STRING_H
-+
-+#include <string.h>
-+
-+size_t strlcat(char *dst, const char *src, size_t siz);
-+size_t strlcpy(char *dst, const char *src, size_t siz);
-+
-+#endif
-+
-Index: ufsutils/libport/arc4random.c
-===================================================================
---- ufsutils.orig/libport/arc4random.c
-+++ ufsutils/libport/arc4random.c
-@@ -26,16 +26,11 @@
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: src/lib/libc/gen/arc4random.c,v 1.12 2007/05/25 10:40:33 delphij Exp $");
-
--#include "namespace.h"
- #include <sys/types.h>
- #include <sys/time.h>
- #include <stdlib.h>
- #include <fcntl.h>
- #include <unistd.h>
--#include <pthread.h>
--
--#include "libc_private.h"
--#include "un-namespace.h"
-
- struct arc4_stream {
- u_int8_t i;
-@@ -43,20 +38,9 @@
- u_int8_t s[256];
- };
-
--static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
--
- #define RANDOMDEV "/dev/urandom"
--#define THREAD_LOCK() \
-- do { \
-- if (__isthreaded) \
-- _pthread_mutex_lock(&arc4random_mtx); \
-- } while (0)
--
--#define THREAD_UNLOCK() \
-- do { \
-- if (__isthreaded) \
-- _pthread_mutex_unlock(&arc4random_mtx); \
-- } while (0)
-+#define THREAD_LOCK()
-+#define THREAD_UNLOCK()
-
- static struct arc4_stream rs;
- static int rs_initialized;
-@@ -105,10 +89,10 @@
-
- gettimeofday(&rdat.tv, NULL);
- rdat.pid = getpid();
-- fd = _open(RANDOMDEV, O_RDONLY, 0);
-+ fd = open(RANDOMDEV, O_RDONLY, 0);
- if (fd >= 0) {
-- (void) _read(fd, rdat.rnd, sizeof(rdat.rnd));
-- _close(fd);
-+ (void) read(fd, rdat.rnd, sizeof(rdat.rnd));
-+ close(fd);
- }
- /* fd < 0? Ah, what the heck. We'll just take whatever was on the
- * stack... */
Index: ufsutils/libport/blockdev.c
===================================================================
--- /dev/null
@@ -239,7 +144,7 @@
@@ -0,0 +1,13 @@
+LIB = port
+LIB_type = static
-+LIBSRCS = arc4random.c strlcpy.c strlcat.c blockdev.c
++LIBSRCS = blockdev.c
+
+ALL_CFLAGS = -D_LIBPORT
+ifdef LIBPORT_DEBUG
Modified: trunk/ufsutils/debian/patches/01_libufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/01_libufs.patch 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/patches/01_libufs.patch 2008-07-27 13:22:27 UTC (rev 2262)
@@ -67,7 +67,7 @@
+SHLIB_MAJOR= 2
-SRCS= block.c cgroup.c inode.c sblock.c type.c
-+LIBSRCS= block.c cgroup.c inode.c sblock.c type.c ../libport/strlcpy.c
++LIBSRCS= block.c cgroup.c inode.c sblock.c type.c
INCS= libufs.h
-MAN= bread.3 cgread.3 libufs.3 sbread.3 ufs_disk_close.3
Modified: trunk/ufsutils/debian/patches/02_mkfs.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_mkfs.ufs.patch 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/patches/02_mkfs.ufs.patch 2008-07-27 13:22:27 UTC (rev 2262)
@@ -126,8 +126,8 @@
+MAN = newfs.8:mkfs.ufs.8
-.include <bsd.prog.mk>
-+LDADD = -L../libufs -lufs -L../libdisklabel -ldisklabel -L../libport -lport
-+INCLUDES = -I../libufs -include port/string.h -include port/random.h \
++LDADD = -L../libufs -lufs -L../libdisklabel -ldisklabel -L../libport -lport -lbsd
++INCLUDES = -I../libufs \
+ -include port/blockdev.h
+
+include ../Makefile.common
Modified: trunk/ufsutils/debian/patches/02_tunefs.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_tunefs.ufs.patch 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/patches/02_tunefs.ufs.patch 2008-07-27 13:22:27 UTC (rev 2262)
@@ -76,8 +76,8 @@
+SRCS = tunefs.c
+MAN = tunefs.8:tunefs.ufs.8
+
-+LDADD = -L../libufs -lufs -L../libport -lport
-+INCLUDES = -I../libufs -include port/string.h
++LDADD = -L../libufs -lufs -lbsd
++INCLUDES = -I../libufs
+
+include ../Makefile.common
Modified: trunk/ufsutils/debian/patches/99_makefiles.patch
===================================================================
--- trunk/ufsutils/debian/patches/99_makefiles.patch 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/patches/99_makefiles.patch 2008-07-27 13:22:27 UTC (rev 2262)
@@ -51,7 +51,7 @@
+
+#LDADD += -lbsd -lfreebsd
+CFLAGS ?= -Wall -g -O2
-+ALL_CFLAGS += -I../include -include port/port.h -D_GNU_SOURCE
++ALL_CFLAGS += -I../include -include port/port.h -include bsd/bsd.h -D_GNU_SOURCE
+# -DHAVE_BSD_ERRNO -DHAVE_BSD_SIGNALS -DHAVE_BSD_STATFS -DHAVE_BSD_DISKLABEL -DHAVE_BSD_MOUNT -DHAVE_UFS_SNAPSHOT -DHAVE_BSD_SYSCTL
+
+INSTALL = install
Modified: trunk/ufsutils/debian/rules
===================================================================
--- trunk/ufsutils/debian/rules 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/rules 2008-07-27 13:22:27 UTC (rev 2262)
@@ -53,6 +53,7 @@
[ ! -f Makefile ] || $(MAKE) clean
QUILT_PATCHES=$(CURDIR)/debian/patches quilt pop -a || test $$? = 2
+ rm -rf $(CURDIR)/.pc
dh_clean
Modified: trunk/ufsutils/debian/upstream.sh
===================================================================
--- trunk/ufsutils/debian/upstream.sh 2008-07-26 20:00:36 UTC (rev 2261)
+++ trunk/ufsutils/debian/upstream.sh 2008-07-27 13:22:27 UTC (rev 2262)
@@ -25,12 +25,6 @@
src/sys/sys/param.h:freebsd/sys \
src/sys/sys/ucred.h:freebsd/sys"
-libc_files=" \
- src/lib/libc/gen/arc4random.c:libport \
- src/lib/libc/string/strlcat.c:libport \
- src/lib/libc/string/strlcpy.c:libport"
-
-
move_repo()
{
local list=$@
@@ -56,16 +50,16 @@
}
echo "-> Downloading all upstream sources ..."
-repos=`get_cvs_list $srcs $include_files $libc_files`
+repos=`get_cvs_list $srcs $include_files`
# Note: Does not use co -d because freebsd cvs server has
# a fascist connection limit (2)
cvs -z3 -d $ANONCVS co -r $RELENG $repos
-rm -rf badsect.ufs bsdlabel dump.ufs dumpfs.ufs ffsinfo freebsd fsck.ufs fsdb.ufs growfs.ufs include libufs libport mkfs.ufs sunlabel tunefs.ufs libdisklabel
+rm -rf badsect.ufs bsdlabel dump.ufs dumpfs.ufs ffsinfo freebsd fsck.ufs fsdb.ufs growfs.ufs include libufs mkfs.ufs sunlabel tunefs.ufs libdisklabel
-mkdir -p include libport freebsd/sys
+mkdir -p include freebsd/sys
echo "-> Moving upstream sources to the proper place ..."
move_repo $srcs
@@ -73,8 +67,5 @@
echo "-> Moving upstream includes to the proper place ..."
move_repo $include_files
-echo "-> Moving upstream libc bits to the proper place ..."
-move_repo $libc_files
-
echo "-> Cleaning the mess ..."
rm -rf src
More information about the Glibc-bsd-commits
mailing list