From owner-svn-src-all@freebsd.org Fri Dec 2 17:18:57 2016 Return-Path: Delivered-To: svn-src-all@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 8F42BC63F7D; Fri, 2 Dec 2016 17:18:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E94813; Fri, 2 Dec 2016 17:18:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id uB2HIlla070541 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 2 Dec 2016 19:18:47 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua uB2HIlla070541 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id uB2HIlgW070540; Fri, 2 Dec 2016 19:18:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 2 Dec 2016 19:18:46 +0200 From: Konstantin Belousov To: Julian Elischer Cc: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309035 - in head/lib/libpathconv: . tests Message-ID: <20161202171846.GF54029@kib.kiev.ua> References: <201611230757.uAN7vqmC008888@repo.freebsd.org> <20161127204305.GA58954@stack.nl> <4de52b2a-fef9-f043-2409-c77bafc599fe@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4de52b2a-fef9-f043-2409-c77bafc599fe@freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 17:18:57 -0000 On Sat, Dec 03, 2016 at 12:00:01AM +0800, Julian Elischer wrote: > On 28/11/2016 4:43 AM, Jilles Tjoelker wrote: > > On Wed, Nov 23, 2016 at 07:57:52AM +0000, Julian Elischer wrote: > >> Author: julian > >> Date: Wed Nov 23 07:57:52 2016 > >> New Revision: 309035 > >> URL: https://svnweb.freebsd.org/changeset/base/309035 > >> Log: > >> This little BSD licensed library has been kicking around for years. > >> It allows one to trivially convert an absolute path to a relative path > >> and the reverse. The test programs themselves are very useful in scripts > >> but the real use comes shortly with the -r and -a arguments to ln. > >> These are sometimes known as the --relative and --absolute flags and > >> can force a symlink to be relative when you only have an absolue path. > >> Another place these are sometimes used is to add -a and -r args to 'realpath'. > >> Incredibly useful in Makefiles. > >> I was going to just add the files in with 'ln' but a library makes more sense. > >> The test programs may come out in their own right some day for scripting. > >> released under a BSD 2-clause: > >> * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. > >> * Copyright (c) 1999 Tama Communications Corporation. All rights reserved. > >> The test directry does not conform to any framework. > >> Not connected to build. > >> doc people may want to play with the manual pages. > >> Obtained from: https://www.tamacom.com/pathconvert.html Shigio Yamaguchi. > >> MFC after: 1 month > >> Relnotes: yes > >> Sponsored by: Panzura, Tama Communications Corporation > > Consider making this a static-only library or a part of an existing > > library such as libc or libutil, since the overhead of a shared object > > is rather big compared to the amount of code here. > > yeah I was thinking of making it part of libc but libc is already > such a kitchen sink and there are only two planned users. > ln and realpath. > A static library is one idea for sure. (or even just a .o). Note that libutil was mentioned, which is the kitchen sink both by design and by purpose. > > The actual real target for this is the build itself. Currently we are > making > lots of symlinks that should be relative but we only really have > absolute information. > This allows symlink -sr to dynamically generate the correct relative > symlink, > given absolute args. > e.g. /usr/lib/libm.so -> /lib/libm.so.5 should really be > ../../lib/libm.so.5 > so that when it is read from outside a jail it still refers to the > right place. > > I'm waiting for a gap in my work schedule to get ln and realpath > changes in place. > > > > > > > Thanks for not linking this to the build right away. > > >