Removal of /stand Directory
Ryan Sommers
ryans at gamersimpact.com
Mon Oct 18 10:49:28 PDT 2004
David O'Brien said:
> On Mon, Oct 18, 2004 at 11:12:15AM -0400, Richard Coleman wrote:
>> Of course, I still find it odd that tar and cpio are in /usr/bin, but
>> pax is in /bin. But that's a bikeshed for another day when we are
>> really bored.
>
> pax(1) can read (ie, restore from tape) both tar and cpio archives. So
> why litter /bin up with 3 programs when 1 will do?
I tend to agree. Adding bsdtar to the root filesystem would mean not only
bringing in bsdtar but also 2 more shared libraries /usr/lib/libarchive.so
and /usr/lib/libbz2.so. We can just bring gzip into /bin and get all the
functionality of cpio, bsdtar and pax without adding 2 extra libraries.
This also will allow us to not only unarchive gzipped archives but also
decompress single files, something I don't think bsdtar -z can do.
Attached is a tarball of the modifications. To add it to your source tree:
cd /usr/src (or your respective directory) ; tar zxvf
/path/to/gzip-to-bin.tgz ; rm -rf gnu/usr.bin/gzip
This is strictly a Makefile change to the Makefiles in gnu and subdirs and
rescue/rescue/Makefile. Following is the patch for existing Makefiles
(note, don't try to build off it because it doesn't take into account the
directory move:
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- Makefile 5 Jun 2002 17:02:37 -0000 1.36
+++ Makefile 18 Oct 2004 14:23:19 -0000
@@ -1,6 +1,6 @@
# @(#)Makefile 5.33.1.1 (Berkeley) 5/6/91
# $FreeBSD: src/gnu/Makefile,v 1.36 2002/06/05 17:02:37 obrien Exp $
-SUBDIR= lib usr.bin
+SUBDIR= lib usr.bin bin
.include <bsd.subdir.mk>
Index: usr.bin/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/Makefile,v
retrieving revision 1.82
diff -u -r1.82 Makefile
--- usr.bin/Makefile 7 Jul 2004 17:24:30 -0000 1.82
+++ usr.bin/Makefile 18 Oct 2004 14:23:19 -0000
@@ -13,7 +13,6 @@
${_gperf} \
grep \
${_groff} \
- gzip \
man \
patch \
rcs \
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/rescue/rescue/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile 16 Aug 2004 03:16:48 -0000 1.28
+++ Makefile 18 Oct 2004 14:31:56 -0000
@@ -92,6 +92,11 @@
CRUNCH_SUPPRESS_LINK_-tcsh= 1
.endif
+CRUNCH_SRCDIRS+= gnu/bin
+CRUNCH_PROGS_gnu/bin+= gzip
+CRUNCH_ALIAS_gzip= gunzip gzcat zcat
+
+
###################################################################
# Programs from standard /sbin
#
@@ -186,9 +191,6 @@
CRUNCH_SRCDIRS+= usr.bin
CRUNCH_SRCDIRS+= gnu/usr.bin
-CRUNCH_PROGS_gnu/usr.bin+= gzip
-CRUNCH_ALIAS_gzip= gunzip gzcat zcat
-
CRUNCH_PROGS_usr.bin+= bzip2
CRUNCH_ALIAS_bzip2= bunzip2 bzcat
CRUNCH_LIBS+= -lbz2
I tested this against a (build|install)world this morning.
--
Ryan Sommers
ryans at gamersimpact.com
More information about the freebsd-arch
mailing list