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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11518 in the body.
You can then email your comments to 11518 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11518; Package emacs. (Sat, 19 May 2012 08:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Mueller <ulm <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 May 2012 08:10:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 19 May 2012 18:58:01 GMT) Full text and rfc822 format available.

Notification sent to Ulrich Mueller <ulm <at> gentoo.org>:
bug acknowledged by developer. (Sat, 19 May 2012 18:58:02 GMT) Full text and rfc822 format available.

Message #10 received at 11518-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Jun 2012 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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