From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3041 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Pending issues for next release Date: Thu, 4 Apr 2013 19:04:04 -0400 Message-ID: <20130404230404.GA20323@brightrain.aerifal.cx> References: <20130401233144.GA29587@brightrain.aerifal.cx> <20130403210000.b60ba35a.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1365116661 21483 80.91.229.3 (4 Apr 2013 23:04:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Apr 2013 23:04:21 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3042-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 05 01:04:46 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UNtD2-0000q4-Hc for gllmg-musl@plane.gmane.org; Fri, 05 Apr 2013 01:04:44 +0200 Original-Received: (qmail 30596 invoked by uid 550); 4 Apr 2013 23:04:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30588 invoked from network); 4 Apr 2013 23:04:17 -0000 Content-Disposition: inline In-Reply-To: <20130403210000.b60ba35a.idunham@lavabit.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3041 Archived-At: On Wed, Apr 03, 2013 at 09:00:00PM -0700, Isaac Dunham wrote: > On Mon, 1 Apr 2013 19:31:44 -0400 > Rich Felker wrote: > > > Here's a quick list of open issues that we might want to take care of > > before another release: > > > (snipping several interesting improvements) > > - switching libc.so/ld-musl.so symlink direction > > Does this patch look suitable? > I know it does work, including in the DESTDIR=./.../ case. I can't say it's wrong, but seeing this patch reminds me why I didn't do it before... > diff --git a/Makefile b/Makefile > index 997c5bb..478e698 100644 > --- a/Makefile > +++ b/Makefile > @@ -118,7 +118,10 @@ tools/musl-gcc: config.mak > $(DESTDIR)$(bindir)/%: tools/% > install -D $< $@ > > -$(DESTDIR)$(libdir)/%.so: lib/%.so > +$(DESTDIR)$(libdir)/libc.so: $(DESTDIR)$(LDSO_PATHNAME) > + ln -sf $(LDSO_PATHNAME) $@ > + > +$(DESTDIR)$(LDSO_PATHNAME): lib/libc.so > install -D -m 755 $< $@ > > $(DESTDIR)$(libdir)/%: lib/% > @@ -127,12 +130,6 @@ $(DESTDIR)$(libdir)/%: lib/% > $(DESTDIR)$(includedir)/%: include/% > install -D -m 644 $< $@ > > -$(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(syslibdir) > - ln -sf $(libdir)/libc.so $@ || true > - > -$(DESTDIR)$(syslibdir): > - install -d -m 755 $(DESTDIR)$(syslibdir) > - Unfortunately, this makes it impossible to run "make install" without a DESTDIR unless you're root. Before, the ||true in the dynamic-linker installation allowed you to "make install" without root as long as you have permissions to the prefix, and the resulting install could be used for everything except _running_ dynamic-linked programs. (Also, if root added a single symlink for you, it would be fully functional.) I don't want to reject the patch, because I think this change is mostly correct, but I would like to discuss and see if there's any way we can get back the old level of functionality while making this change. In particular, users should be able to install musl with --prefix=$HOME/musl and build binaries which will run on any system with the musl loader in /lib. Rich