Date: Sun, 5 Mar 2017 17:54:32 +0100 From: Baptiste Daroussin <bapt@freebsd.org> To: rgrimes@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: svn commit: r314693 - head/usr.sbin/rmt Message-ID: <20170305165432.zkv3vifhoxeo5f7d@ivaldir.net> In-Reply-To: <201703051626.v25GQWNd083561@pdx.rh.CN85.dnsmgr.net> References: <20170305134226.px4ivdtjjppbgiyf@ivaldir.net> <201703051626.v25GQWNd083561@pdx.rh.CN85.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--2s4snrmstqz6e4ci Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 05, 2017 at 08:26:32AM -0800, Rodney W. Grimes wrote: > Moved thread to -hackers for a quick discussion. >=20 > > 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 > > > > >=20 > > > > > Log: > > > > > Change /etc/rmt symlink from absolute to relative path, > > > > > correcting the mistake made in r6499 > > > > > =20 > > > > > Approved by: grehan > > > > > MFC after: 1 week > > > > >=20 > > > > > Modified: > > > > > head/usr.sbin/rmt/Makefile > > > > >=20 > > > > > 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 > > > >=20 > > > > I think this should be ${INSTALL_RSYMLINK} ${BINDIR}/rmt ${DESTDIR}= /etc/rmt > > >=20 > > > find /usr/src | xargs grep INSTALL_RSYM > > > (no results) > > >=20 > > > Sorry, no prior work does this, perhaps once I get done sweeping the > > > 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 out > > > to the rest of the source tree? > >=20 > > 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)/ma= n1 && ln -s ssh.1.gz slogin.1.gz This is withing contrib hence not used to build > ./usr.sbin/sendmail/Makefile: ln -sf ${.ALLSRC} ${.TARGET} This is different this is a built time > ./usr.sbin/rmt/Makefile: ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rmt This one is the one we are speaking about :) > ... > 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 optio= ns. >=20 >=20 > > INSTALL_RSYMLINK has exactly be done to be use everywhere it is needed.= (I wrote > > it for that exact reason :)) >=20 > Wonderful!! I'll investigate a sweep to finish implementing this tree wi= de > in my spare time.... I notice that SYMLINKS=3D is hard coded to use > INSTALL_SYMLINKS so that can't be used to fix some of these. > How would you propose I proceed in that area?? Thank you >=20 > And investigation into using INSTALL_RSYMLINK in SYMLINKS=3D should be do= ne, > I can not think of a reason when you DONT want a relative link installed, > but I may be missing some new odd use for symlinks by the FreeBSD base > system. Actually when I implemented INSTALL_RSYMLINK the goal I was targetting was having all the library built in a way we have by default a usable sysroot. Then I planned to sweep on all other use cases but somehow never did it. > > >=20 > > > find /usr/share/mk/ | xargs grep INSTALL_RSYM > > > /usr/share/mk/bsd.own.mk:INSTALL_RSYMLINK?=3D ${INSTALL} ${RSYMLI= NK} > > > /usr/share/mk/bsd.lib.mk: ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG= _ARGS},development} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} > > > /usr/share/mk/bsd.lib.mk: ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DES= TDIR}${_SHLIBDIR}/${SHLIB_NAME} \ > > > /usr/share/mk/bsd.lib.mk: ${INSTALL_RSYMLINK} ${TAG_ARGS:D${TAG= _ARGS},development} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \ > > > /usr/share/mk/bsd.lib.mk: ${INSTALL_RSYMLINK} ${TAG_ARGS} ${DES= TDIR}${_SHLIBDIR}/${SHLIB_NAME} \ > > >=20 > > > This is called from within bsd.lib.mk only, do we want to use this for > > > all symbolics links in the source tree? If so I would of though the > > > person adding this functionality to the .mk files would of made > > > a tree sweeping looking for that and making those changes as well. > >=20 > > When I did it only bsd.lib.mk was using it iirc >=20 > And that appears to still be the case. >=20 > > > > The rm -f before can then be removed, the symlink will be relative = and the > > > > METALOG will be respected=20 > > >=20 > > > METALOG? The only documentation I can find on this seems to be part = of > > > src/tootls/tools/makeroot.8. > > >=20 > > > It appears that something in Makefile.inc uses it and there are refer= ences > > > to it in etc/Makefile. > > >=20 > > > Where is this METALOG documented? =20 > >=20 > > It is really badly documented and should be :( it is a mtree file that = is > > generated when built is done via -DNO_ROOT for the purpose of being abl= e to > > generate disk with makefs as a user > >=20 > > I have reused it for packaging base. > >=20 > > This was designed IIRC by adrian and brooks iirc. > >=20 > > Embedded people relies a lot on it. > > Everything not going though the install(1) command is not tracked that = is why > > this is an issue. >=20 > I guess then that these 83 things I have found are not so important to th= em? Having an embedded system using /etc/rmt is probably something you don't fi= nd often :) That said, it is very import for packaging base. >=20 > Lets take this to -hackers, discuss it where it should be, and get it fix= ed. Best regards, Bapt --2s4snrmstqz6e4ci Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAli8QsQACgkQY4mL3PG3 PloPJxAA1NPVcQF29XJgq6cUrC76RF2E9E+7oRUqGeCPylRR0NtDCDdIc3CJIWyB CX5/TTh0lJ95OOQrCUxhuatRv2SSUHo4Q2XYxET5sSBZxzbHswFoyVMyosKUGNyV gd97ruPmXasbLlIrhL8mpDdxWdtPE81PwZvOgOPaG4iXhz88KsaCws3zSYtSAFwJ 6s2Nslo64WUIQQXND5U9KosX/14Nqz/lJfV4hkVibgE7Xl9/htM6X+4znPgNmuvQ /IlS0DzqavTpXDurKnm+4BMunCjiZZi+p+oFiyHFX4QimMy9cMShkIbU2el8OB53 z82qT84cn5VeSmCFYo8knryZUW0zM4bBN/lYOCSaTgRnO7iajjQJoFsQzIDc6oAK T5/NAkZOCD47qj+UCcjlB0eXxgu3zdIwl83Cab/Lreqd1m++2qkTTmhQuOHtz+/M 1D9uvb1O8u44U/3wAL+4RICk4JmmY32lYNIDOW+NSPeVsNwg2mlbefp61UcqVmcS quqLiwhBoFqRl5ZyzcCCb0mTgV99lhljZuYO3Ao3QP4hJJ26G02xwapu42Ibb/ms npFG6DAZi8E+P5phCz150+QdCERbxgjTaiZ4+3PUcxmI7eRbQI/diLOUXZ1uDqGc u+TxmrBWvOsTSP+472sNnyZ1NgsqZVIHa/1NMtqmQ+wMKWvRABY= =fuLx -----END PGP SIGNATURE----- --2s4snrmstqz6e4ci--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170305165432.zkv3vifhoxeo5f7d>