GNU bug report logs - #11518
24.1.50; install-etc target installs emacs.png outside of $DESTDIR

Previous Next

Package: emacs;

Reported by: Ulrich Mueller <ulm <at> gentoo.org>

Date: Sat, 19 May 2012 08:10:01 UTC

Severity: normal

Found in version 24.1.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ulrich Mueller <ulm <at> gentoo.org>
Subject: bug#11518: closed (Re: bug#11518: 24.1.50; install-etc target
 installs emacs.png outside of $DESTDIR)
Date: Sat, 19 May 2012 18:58:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11518: 24.1.50; install-etc target installs emacs.png outside of $DESTDIR

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11518 <at> debbugs.gnu.org.

-- 
11518: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11518
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 11518-done <at> debbugs.gnu.org
Subject: Re: bug#11518: 24.1.50;
	install-etc target installs emacs.png outside of $DESTDIR
Date: Sat, 19 May 2012 14:57:28 -0400
Thanks.

[Message part 3 (message/rfc822, inline)]
From: Ulrich Mueller <ulm <at> gentoo.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50; install-etc target installs emacs.png outside of $DESTDIR
Date: Sat, 19 May 2012 10:08:28 +0200
Forwarding downstream bug <https://bugs.gentoo.org/show_bug.cgi?id=416515>.

When installing Emacs from BZR trunk as of today, the "install-etc"
target in the top-level Makefile tries to install files outside of
$DESTDIR. In Gentoo's sandboxed environment this leads to an access
violation.

Here is the relevant part of the build log:

umask 022; /bin/mkdir -p /var/tmp/portage/app-editors/emacs-vcs-24.1.9999/image//usr/share/applications
/usr/bin/install -c -m 644 /var/tmp/portage/app-editors/emacs-vcs-24.1.9999/work/emacs-vcs-24.1.9999/etc/emacs.desktop \
  /var/tmp/portage/app-editors/emacs-vcs-24.1.9999/image//usr/share/applications/emacs.desktop
thisdir=`/bin/pwd`; \
cd /var/tmp/portage/app-editors/emacs-vcs-24.1.9999/work/emacs-vcs-24.1.9999/etc/images/icons || exit 1; umask 022 ; \
for dir in */*/apps */*/mimetypes; do \
  [ -d ${dir} ] || continue ; \
  ( cd ${thisdir}; /bin/mkdir -p /usr/share/icons/${dir} ) ; \
  for icon in ${dir}/*.*; do \
    [ -r ${icon} ] || continue ; \
    ( cd ${thisdir}; \
      /usr/bin/install -c -m 644 /var/tmp/portage/app-editors/emacs-vcs-24.1.9999/work/emacs-vcs-24.1.9999/etc/images/icons/${icon} /usr/share/icons/${icon} ) \
    || exit 1; \
  done ; \
done
ACCESS DENIED  unlink:       /usr/share/icons/hicolor/128x128/apps/emacs.png
/usr/bin/install: cannot remove ‘/usr/share/icons/hicolor/128x128/apps/emacs.png’: Permission denied
make: *** [install-etc] Error 1
 * ERROR: app-editors/emacs-vcs-24.1.9999 failed (install phase):
 * emake failed


The breakage was introduced by this commit:
------------------------------------------------------------
revno: 108266
committer: Glenn Morris <rgm <at> gnu.org>
branch nick: trunk
timestamp: Thu 2012-05-17 15:13:02 -0400
message:
  Simplify install-etc rule
  
  * Makefile.in (install-etc, mkdir):
  Make relevant directories in install-etc rather than mkdir.
------------------------------------------------------------


The following patch should fix it:

2012-05-19  Ulrich Müller  <ulm <at> gentoo.org>

	* Makefile.in (install-etc): Install icons inside of DESTDIR.

--- emacs-orig/Makefile.in
+++ emacs/Makefile.in
@@ -626,11 +626,11 @@
 	cd ${iconsrcdir} || exit 1; umask 022 ; \
 	for dir in */*/apps */*/mimetypes; do \
 	  [ -d $${dir} ] || continue ; \
-	  ( cd $${thisdir}; ${MKDIR_P} ${icondir}/$${dir} ) ; \
+	  ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
 	  for icon in $${dir}/*.*; do \
 	    [ -r $${icon} ] || continue ; \
 	    ( cd $${thisdir}; \
-	      ${INSTALL_DATA} ${iconsrcdir}/$${icon} ${icondir}/$${icon} ) \
+	      ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${icon} ) \
 	    || exit 1; \
 	  done ; \
 	done



This bug report was last modified 13 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.