From owner-cvs-all@FreeBSD.ORG Sun Jun 15 06:39:26 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D2411065677 for ; Sun, 15 Jun 2008 06:39:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id A4A968FC16 for ; Sun, 15 Jun 2008 06:39:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 32264 invoked by uid 399); 15 Jun 2008 06:39:25 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Jun 2008 06:39:25 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4854B91A.30403@FreeBSD.org> Date: Sat, 14 Jun 2008 23:39:22 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.14 (X11/20080606) MIME-Version: 1.0 To: Tim Kientzle References: <200805261721.m4QHLCF4070787@repoman.freebsd.org> <20080608075256.GA35560@obiwan.tataz.chchile.org> <484CB927.3050101@freebsd.org> <484D5719.1070907@FreeBSD.org> In-Reply-To: <484D5719.1070907@FreeBSD.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=D5B2F0FB Content-Type: multipart/mixed; boundary="------------010906090407040002090706" Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Jeremie Le Hen , Gabor Kovesdan , cvs-all@freebsd.org Subject: Re: cvs commit [HEAD] src/gnu/usr.bin/cpio Makefile X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2008 06:39:26 -0000 This is a multi-part message in MIME format. --------------010906090407040002090706 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Doug Barton wrote: > Tim Kientzle wrote: >> This case is a little unusual: by default, I want to >> install both 'cpio' programs and symlink the common name >> to one of them. > > I'm not sure how that relates to Jeremie's (valid) point that these > flags need to be part of the system in bsd.own.mk. I admit that getting > stuff in there was a little intimidating to me at first, but Ruslan has > created a nice automated system, and he'll be glad to help you if you > need it. > >> How about this: >> WITH_GCPIO (default) - installs gcpio, symlinks 'cpio' unless >> WITH_BSDCPIO defined >> WITHOUT_GCPIO - does not install gcpio at all >> WITH_BSDCPIO (default) - installs bsdcpio, symlinks 'cpio' >> WITHOUT_BSDCPIO - does not install bsdcpio at all > > If by "not install" you mean "build or install" then I'm with you, but I > think it might be a little complicated. I'm not sure why you want to > build and install both by default (except maybe to ease people's > concerns in the interim period) but if it were me, in HEAD I would do this: > > WITH_BSDCPIO (default) build, install, and symlink to cpio > WITHOUT_GCPIO (default) do not build or install > > Then if WITHOUT_BSDCPIO is defined you don't build or install it, and if > WITH_GCPIO is defined you build, install, and symlink it, regardless of > the state of the BSDCPIO knob. > > When this gets MFC'ed I would just flip the defaults. I've attached a patch which does what I described above for CPIO, and adds a knob to turn off building of GNU grep. When we get to the point where bsd grep is imported into the base system, I would do the same in HEAD/8-current for bsd grep as I am proposing we do for cpio. But for now it is a step forward to be able to disable the grep build to allow for easier testing. If this stuff makes anyone happy I'm glad to commit it. Note that after you add the options files you have to run the makeman script in that directory, and redirect the output to src/share/man/man5/src.conf.5 then commit the changes there too. Side note to gabor, I noticed right away when I set up the test tonight that anything which expects there to be a grep in /usr/bin only fails, and that the base grep has 9 links, but your port only installs 6. The difference is that the base version installs links for {bze|bzf|bz}grep too. If I were you I would offer an option to create symlinks in /usr/bin, and install the bz* stuff as well. hth, Doug -- This .signature sanitized for your protection --------------010906090407040002090706 Content-Type: text/plain; name="gnu-cpio-grep.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gnu-cpio-grep.diff" Index: usr.bin/Makefile =================================================================== --- usr.bin/Makefile (revision 179788) +++ usr.bin/Makefile (working copy) @@ -43,7 +43,7 @@ comm \ compile_et \ compress \ - cpio \ + ${_cpio} \ cpuset \ csplit \ ${_csup} \ @@ -257,6 +257,10 @@ _bluetooth= bluetooth .endif +.if ${MK_BSD_CPIO} != "no" +_cpio= cpio +.endif + .if ${MK_CALENDAR} != "no" _calendar= calendar .endif Index: usr.bin/cpio/Makefile =================================================================== --- usr.bin/cpio/Makefile (revision 179788) +++ usr.bin/cpio/Makefile (working copy) @@ -9,7 +9,7 @@ CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" LDADD+= -larchive -lz -lbz2 -.if defined(WITH_BSDCPIO) +.if ${MK_GNU_CPIO} != "yes" SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 .endif Index: gnu/usr.bin/cpio/Makefile =================================================================== --- gnu/usr.bin/cpio/Makefile (revision 179788) +++ gnu/usr.bin/cpio/Makefile (working copy) @@ -62,9 +62,7 @@ gcpio.1: ${CPIODIR}/doc/cpio.1 cat ${CPIODIR}/doc/cpio.1 >gcpio.1 -.if !defined(WITH_BSDCPIO) SYMLINKS=gcpio ${BINDIR}/cpio MLINKS=gcpio.1 cpio.1 -.endif .include Index: gnu/usr.bin/Makefile =================================================================== --- gnu/usr.bin/Makefile (revision 179788) +++ gnu/usr.bin/Makefile (working copy) @@ -5,7 +5,7 @@ SUBDIR= bc \ ${_binutils} \ ${_cc} \ - cpio \ + ${_cpio} \ ${_cvs} \ dc \ dialog \ @@ -13,7 +13,7 @@ diff3 \ ${_gdb} \ ${_gperf} \ - grep \ + ${_grep} \ ${_groff} \ ${_man} \ patch \ @@ -30,10 +30,18 @@ .endif .endif +.if ${MK_GNU_CPIO} == "yes" +_cpio= cpio +.endif + .if ${MK_CVS} != "no" _cvs= cvs .endif +.if ${MK_GNU_GREP} != "no" +_grep= grep +.endif + .if ${MK_MAN} != "no" _man= man .endif Index: share/mk/bsd.own.mk =================================================================== --- share/mk/bsd.own.mk (revision 179788) +++ share/mk/bsd.own.mk (working copy) @@ -287,6 +287,7 @@ ATM \ AUDIT \ AUTHPF \ + BSD_CPIO \ BIND \ BIND_DNSSEC \ BIND_ETC \ @@ -312,6 +313,7 @@ GCOV \ GDB \ GNU \ + GNU_GREP \ GPIB \ GROFF \ HTML \ @@ -374,6 +376,7 @@ # .for var in \ BIND_LIBS \ + GNU_CPIO \ HESIOD \ IDEA .if defined(WITH_${var}) && defined(WITHOUT_${var}) --------------010906090407040002090706--