tech-userlevel archive

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

bsdcpio and bsdtar installed by default



Hi all,
I would like to go on and install bsdcpio and bsdtar by default.
This does not mean that /bin/tar will change to bsdtar for now, just
that both are present.

One major is simply that the current pax doesn't handle POSIX
interchange format very well. E.g. it supports the long symlinks in the
form GNU tar creates them so far, but doesn't actually use the header
type. This is a problem as expressed e.g. in PR 38066. Basically, tar
currently can't read archives with long symlinks as created by bsdtar or
star, nor can it create such archives.

FreeBSD currently has a SoC project that will extend libarchive support
and a pax frontend might be the result. In the long run I want to
completely move to libarchive, so it would be nice if people look at the
differences and evaluate what is needed and what can go as historic
legacy. For example bsdcpio currently lacks the byte swapping support --
easy to add, but I don't believe it is relevant. For most operations
bsdtar is supposed to be as fast or faster as pax. When benchmarking,
keep in mind that e.g. compression is normally handled internally.

The attached patch installs bsdcpio and bsdtar to /bin, moves the two
missing dependencies (libarchive and libbz2) to /lib and updates the
file lists. Note that an update build will break due to the type change,
removing destdir fixes that.

Joerg
Index: bin/Makefile
===================================================================
RCS file: /data/repo/netbsd/src/bin/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- bin/Makefile        31 Dec 2007 15:31:24 -0000      1.22
+++ bin/Makefile        3 Jun 2008 16:26:11 -0000
@@ -1,8 +1,8 @@
 #      $NetBSD: Makefile,v 1.22 2007/12/31 15:31:24 ad Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
-SUBDIR=        cat chio chmod cp csh date dd df domainname echo ed expr 
hostname \
-       kill ksh ln ls mkdir mt mv pax ps pwd rcp rcmd rm rmdir sh \
-       sleep stty sync test
+SUBDIR=        cat chio chmod cp cpio csh date dd df domainname echo ed expr \
+       hostname kill ksh ln ls mkdir mt mv pax ps pwd \
+       rcp rcmd rm rmdir sh sleep stty sync tar test
 
 .include <bsd.subdir.mk>
Index: distrib/sets/lists/base/mi
===================================================================
RCS file: /data/repo/netbsd/src/distrib/sets/lists/base/mi,v
retrieving revision 1.750
diff -u -p -r1.750 mi
--- distrib/sets/lists/base/mi  24 May 2008 19:39:30 -0000      1.750
+++ distrib/sets/lists/base/mi  3 Jun 2008 19:10:59 -0000
@@ -15,6 +15,8 @@
 ./altroot                                      base-sys-root
 ./bin                                          base-sys-root
 ./bin/[                                                base-util-root
+./bin/bsdcpio                                  base-util-root
+./bin/bsdtar                                   base-util-root
 ./bin/cat                                      base-util-root
 ./bin/chio                                     base-util-root
 ./bin/chmod                                    base-util-root
Index: distrib/sets/lists/base/shl.elf
===================================================================
RCS file: /data/repo/netbsd/src/distrib/sets/lists/base/shl.elf,v
retrieving revision 1.148
diff -u -p -r1.148 shl.elf
--- distrib/sets/lists/base/shl.elf     22 May 2008 14:24:42 -0000      1.148
+++ distrib/sets/lists/base/shl.elf     3 Jun 2008 16:34:57 -0000
@@ -10,6 +10,10 @@
 #
 # Note:        libtermcap and libtermlib are hardlinked and share the same 
version.
 #
+./lib/libarchive.so                            base-sys-shlib
+./lib/libarchive.so.2                          base-sys-shlib
+./lib/libbz2.so                                        base-sys-shlib
+./lib/libbz2.so.1                              base-sys-shlib
 ./lib/libc.so                                  base-sys-shlib
 ./lib/libc.so.12                               base-sys-shlib
 ./lib/libcrypt.so                              base-sys-shlib
Index: distrib/sets/lists/base/shl.mi
===================================================================
RCS file: /data/repo/netbsd/src/distrib/sets/lists/base/shl.mi,v
retrieving revision 1.436
diff -u -p -r1.436 shl.mi
--- distrib/sets/lists/base/shl.mi      26 May 2008 16:56:44 -0000      1.436
+++ distrib/sets/lists/base/shl.mi      3 Jun 2008 16:35:35 -0000
@@ -13,6 +13,8 @@
 #
 # Note:        libtermcap and libtermlib are hardlinked and share the same 
version.
 #
+./lib/libarchive.so.2.1                                base-sys-shlib
+./lib/libbz2.so.1.1                            base-sys-shlib
 ./lib/libc.so.12.159                           base-sys-shlib
 ./lib/libcrypt.so.0.2                          base-sys-shlib
 ./lib/libcrypto.so.4.1                         base-crypto-shlib       crypto
Index: distrib/sets/lists/man/mi
===================================================================
RCS file: /data/repo/netbsd/src/distrib/sets/lists/man/mi,v
retrieving revision 1.1076
diff -u -p -r1.1076 mi
--- distrib/sets/lists/man/mi   26 May 2008 00:32:33 -0000      1.1076
+++ distrib/sets/lists/man/mi   3 Jun 2008 19:11:39 -0000
@@ -74,6 +74,8 @@
 ./usr/share/man/cat1/bg.0                      man-util-catman         .cat
 ./usr/share/man/cat1/biff.0                    man-mail-catman         .cat
 ./usr/share/man/cat1/bpm.0                     man-pkgutil-catman      .cat
+./usr/share/man/cat1/bsdcpio.0                 man-util-catman         .cat
+./usr/share/man/cat1/bsdtar.0                  man-util-catman         .cat
 ./usr/share/man/cat1/bthset.0                  man-util-catman         .cat
 ./usr/share/man/cat1/btkey.0                   man-util-catman         .cat
 ./usr/share/man/cat1/btpin.0                   man-util-catman         .cat
@@ -2641,6 +2643,8 @@
 ./usr/share/man/man1/bg.1                      man-util-man            .man
 ./usr/share/man/man1/biff.1                    man-mail-man            .man
 ./usr/share/man/man1/bpm.1                     man-pkgutil-man         .man
+./usr/share/man/man1/bsdcpio.1                 man-util-man            .man
+./usr/share/man/man1/bsdtar.1                  man-util-man            .man
 ./usr/share/man/man1/bthset.1                  man-util-man            .man
 ./usr/share/man/man1/btkey.1                   man-util-man            .man
 ./usr/share/man/man1/btpin.1                   man-util-man            .man
Index: lib/libarchive/Makefile
===================================================================
RCS file: /data/repo/netbsd/src/lib/libarchive/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- lib/libarchive/Makefile     25 May 2008 19:33:27 -0000      1.7
+++ lib/libarchive/Makefile     3 Jun 2008 16:25:34 -0000
@@ -4,6 +4,8 @@ USE_FORT?=      yes # complex string handling
 
 .include <bsd.own.mk>
 
+USE_SHLIBDIR=  yes
+
 LIBARCHIVEDIR= ${NETBSDSRCDIR}/dist/libarchive
 .PATH:         ${LIBARCHIVEDIR}/libarchive
 
Index: lib/libbz2/Makefile
===================================================================
RCS file: /data/repo/netbsd/src/lib/libbz2/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- lib/libbz2/Makefile 16 May 2008 13:13:00 -0000      1.13
+++ lib/libbz2/Makefile 3 Jun 2008 16:25:23 -0000
@@ -6,6 +6,8 @@ NOMAN=          # defined
 
 .include <bsd.own.mk>
 
+USE_SHLIBDIR=  yes
+
 LIB=           bz2
 DIST=          ${NETBSDSRCDIR}/dist/bzip2
 .PATH:         ${DIST}


Home | Main Index | Thread Index | Old Index