From owner-freebsd-hackers@freebsd.org Sun Mar 5 21:42:07 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04A90CFAB7A for ; Sun, 5 Mar 2017 21:42:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C581A15AC; Sun, 5 Mar 2017 21:42:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 4FF1E28A9; Sun, 5 Mar 2017 21:41:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 577F935D41; Sun, 5 Mar 2017 21:41:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id MZOM1-Nq7qC9; Sun, 5 Mar 2017 21:41:42 +0000 (UTC) Subject: Re: svn commit: r314693 - head/usr.sbin/rmt DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4E7C335D3C To: rgrimes@FreeBSD.org References: <201703052139.v25Ld6iR084880@pdx.rh.CN85.dnsmgr.net> Cc: Baptiste Daroussin , freebsd-hackers@FreeBSD.org From: Bryan Drewery Organization: FreeBSD Message-ID: <957a873a-cf20-5a2a-638a-c6f7c154bf84@FreeBSD.org> Date: Sun, 5 Mar 2017 13:41:25 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201703052139.v25Ld6iR084880@pdx.rh.CN85.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cQQiMtCMIh5XgWScQb0upBpvsBXH9JSrX" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2017 21:42:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cQQiMtCMIh5XgWScQb0upBpvsBXH9JSrX Content-Type: multipart/mixed; boundary="aVlGD1bQiHLK42nu7JO0hcDkAme54iXJ5"; protected-headers="v1" From: Bryan Drewery To: rgrimes@FreeBSD.org Cc: Baptiste Daroussin , freebsd-hackers@FreeBSD.org Message-ID: <957a873a-cf20-5a2a-638a-c6f7c154bf84@FreeBSD.org> Subject: Re: svn commit: r314693 - head/usr.sbin/rmt References: <201703052139.v25Ld6iR084880@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201703052139.v25Ld6iR084880@pdx.rh.CN85.dnsmgr.net> --aVlGD1bQiHLK42nu7JO0hcDkAme54iXJ5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/5/17 1:39 PM, Rodney W. Grimes wrote: >> On 3/5/17 8:26 AM, Rodney W. Grimes wrote: >>> Moved thread to -hackers for a quick discussion. >>> >>>> On Sun, Mar 05, 2017 at 05:19:28AM -0800, Rodney W. Grimes wrote: >>>>> -- Start of PGP signed section. >>>>>> On Sun, Mar 05, 2017 at 04:09:18AM +0000, Rodney W. Grimes wrote: >>>>>>> Author: rgrimes >>>>>>> Date: Sun Mar 5 04:09:18 2017 >>>>>>> New Revision: 314693 >>>>>>> URL: https://svnweb.freebsd.org/changeset/base/314693 >>>>>>> >>>>>>> Log: >>>>>>> Change /etc/rmt symlink from absolute to relative path, >>>>>>> correcting the mistake made in r6499 >>>>>>> =20 >>>>>>> Approved by: grehan >>>>>>> MFC after: 1 week >>>>>>> >>>>>>> Modified: >>>>>>> head/usr.sbin/rmt/Makefile >>>>>>> >>>>>>> Modified: head/usr.sbin/rmt/Makefile >>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D >>>>>>> --- head/usr.sbin/rmt/Makefile Sun Mar 5 04:02:47 2017 (r314692)= >>>>>>> +++ head/usr.sbin/rmt/Makefile Sun Mar 5 04:09:18 2017 (r314693)= >>>>>>> @@ -7,6 +7,6 @@ MAN=3D rmt.8 >>>>>>> # called from /usr/src/etc/Makefile >>>>>>> etc-rmt: >>>>>>> rm -f ${DESTDIR}/etc/rmt >>>>>>> - ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rmt >>>>>>> + ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt >>>>>> >>>>>> I think this should be ${INSTALL_RSYMLINK} ${BINDIR}/rmt ${DESTDIR= }/etc/rmt >>>>> >>>>> find /usr/src | xargs grep INSTALL_RSYM >>>>> (no results) >>>>> >>>>> Sorry, no prior work does this, perhaps once I get done sweeping th= e >>>>> absolutes out of the tree (about 10 or 15 IIRC) a pass can be made = to >>>>> sweep all ln -s out and propage this internal bsd.lib.mk function o= ut >>>>> to the rest of the source tree? >>>> >>>> There is also no Makefiles that do ls -sf directly beside that one. >>> Unless I have missed a commit: >>> ./crypto/openssh/contrib/cygwin/Makefile: cd $(DESTDIR)$(mandir= )/man1 && ln -s ssh.1.gz slogin.1.gz >>> ./usr.sbin/sendmail/Makefile: ln -sf ${.ALLSRC} ${.TARGET} >>> ./usr.sbin/rmt/Makefile: ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rm= t >>> ... >> >> Keep in mind that INSTALL_*SYMLINK should only be used for *installing= * >> a symlink, not for intermediate build files. All of the direct 'ln' >> usage in the tree should be not installed. Brooks and I and others ha= ve >> done passes before to ensure that any installed symlink uses >> INSTALL_*SYMLINK. The reasoning is that the -DNO_ROOT build requires >> that 'install' be used since it is logging the file in a meta log that= >> is later used to build an image from. This is also important for the >> DIRDEPS_BUILD feature. >=20 > In those several passes you have missed at least this one here in rmt > that has been there since the refer commit of r6499. This is not a > new link someone added recently. I simply corrected the arguments to > the command so that we no longer have an absolute link inside > of ${DESTDIR}. Yup it looks like we missed the 'etc'/configuration ones. Those are kind of special in those 2 build modes I mentioned which is probably why they've been missed. >=20 > Let me review my other 10 or so pending commits again, but I think all > of those are errors in SYMLINKS=3D. Bapt did not answer my question > on how to deal with SYMLINKS hardcoded to use INSTALL_SYMLINKS but > I well need it to use INSTALL_RSYMLINKS for some of these corrections. >=20 > For now I have just feed the proper arguments to SYMLINKS so that it > creates proper relative paths. =20 >=20 >>> A summary is there are 50 instances of ln -sf, 28 other variants of = ln -s, >>> and 5 ln -fs. I did not search for other permutaions of ln and s f o= ptions. > ... > REVIEWING my patches I see this: > --- share/termcap/Makefile (revision 314708) > +++ share/termcap/Makefile (working copy) > @@ -24,6 +24,6 @@ > cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} >=20 > etc-termcap: > - ${INSTALL_SYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termca= p > + ${INSTALL_SYMLINK} ..${BINDIR}/misc/termcap ${DESTDIR}/etc/term= cap >=20 > .include >=20 > I'll convert that to INSTALL_RSYMLINK, all others are in > SYMLINK lists. That should get handled by your .mk modifications to > do the right thing. >=20 >=20 --=20 Regards, Bryan Drewery --aVlGD1bQiHLK42nu7JO0hcDkAme54iXJ5-- --cQQiMtCMIh5XgWScQb0upBpvsBXH9JSrX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJYvIYFAAoJEDXXcbtuRpfPO2QIAOESVU99vUk0JSNWGzA7QWzA I4RD44bO9stQ/Yj0B3cOl2/SgBondKSCKMAYL+qTomxPSf1Bgu06Zp1W5KM4HQJh QSPDy5DMODuh1mNcCz8sEtmiirfKS1hoLvfUgaYt1cJI9fa5xmwKol3iP9/B3I+P l7VIpJMBOTJc+tmy0Vt0sWr611hwT1hC1BiQlQZAW5KILHhCke+NQcougpfA+u90 g61mfE6Ehx+EI2VyZiIFyIoI1rgefk+fl3sFZlwEptFvgJ6j3O8GImyC7oy2cLC5 ktWGZD0aJ0FrZF/87mRayeTqjlRKVykRE9dE2bx/K02E0745xyE0wH1nj6cYpk4= =22Nu -----END PGP SIGNATURE----- --cQQiMtCMIh5XgWScQb0upBpvsBXH9JSrX--