After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758097 - gnome-documents-3.18.2: make install tries to remove a file installed in real filesystem
gnome-documents-3.18.2: make install tries to remove a file installed in real...
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-11-14 10:11 UTC by Pacho Ramos
Modified: 2015-12-14 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
books: Fix installation on some systems (2.35 KB, patch)
2015-12-08 18:03 UTC, Bastien Nocera
none Details | Review
books: Fix installation on some systems (2.34 KB, patch)
2015-12-11 10:51 UTC, Bastien Nocera
committed Details | Review

Description Pacho Ramos 2015-11-14 10:11:10 UTC
On Gentoo we build things on a sandbox to prevent build systems messing with the real filesystem and, then, we get a failure due to make install trying to remove a file in real filesystem:
make[4]: Entering directory '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/work/gnome-documents-3.18.2/data'
 /bin/mkdir -p '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/image//usr/share/appdata'
rm -f /usr/share/gnome-documents/org.gnome.Books.data.gresource
  /bin/mkdir -p '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/image//usr/share/applications'
* ACCESS DENIED:  unlinkat:     /usr/share/gnome-documents/org.gnome.Books.data.gresource
rm: cannot remove ‘/usr/share/gnome-documents/org.gnome.Books.data.gresource’: Permission denied
 /bin/mkdir -p '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/image//usr/share/gnome-documents'
Makefile:899: recipe for target 'install-exec-hook' failed
make[4]: [install-exec-hook] Error 1 (ignored)

This comes from data/Makefile.am:
install-exec-hook:
        -rm -f $(appdir)/org.gnome.Books.data.gresource
        $(LN_S) $(appdir)/org.gnome.Documents.data.gresource $(DESTDIR)$(appdir)/org.gnome.Books.data.gresource

Thanks
Comment 1 Bastien Nocera 2015-12-08 18:03:31 UTC
Created attachment 316967 [details] [review]
books: Fix installation on some systems

Instead of using symlinks and creating those ourselves in the install
directory, which creates problems with installing in a different
location than the prefix, just process 2 versions of the same file,
through a symlink in the source tree.
Comment 2 Debarshi Ray 2015-12-08 18:42:54 UTC
Review of attachment 316967 [details] [review]:

Thanks for the patch, Bastien. No strong opinion on this one. :)

::: data/Makefile.am
@@ -65,3 @@
-	$(LN_S) $(appdir)/org.gnome.Documents.data.gresource $(DESTDIR)$(appdir)/org.gnome.Books.data.gresource
-uninstall-hook:
-	-rm -f $(appdir)/org.gnome.Books.data.gresource

I was expecting the '-rm ...' to ignore failures, but if this fixes the problem on Gentoo, then sure.
Comment 3 Cosimo Cecchi 2015-12-10 22:44:32 UTC
Review of attachment 316967 [details] [review]:

::: data/Makefile.am
@@ +64,3 @@
 CLEANFILES = \
     org.gnome.Documents.data.gresource \
+    org.gnome.Books.data.gresource.xml \

Should this not be the gresource file (as opposed to the gresource.xml)?
Comment 4 Bastien Nocera 2015-12-11 10:48:33 UTC
(In reply to Cosimo Cecchi from comment #3)
> Review of attachment 316967 [details] [review] [review]:
> 
> ::: data/Makefile.am
> @@ +64,3 @@
>  CLEANFILES = \
>      org.gnome.Documents.data.gresource \
> +    org.gnome.Books.data.gresource.xml \
> 
> Should this not be the gresource file (as opposed to the gresource.xml)?

Yeah, completely. Would be great if Pacho could actually test the patch though.
Comment 5 Bastien Nocera 2015-12-11 10:51:43 UTC
Created attachment 317197 [details] [review]
books: Fix installation on some systems

Instead of using symlinks and creating those ourselves in the install
directory, which creates problems with installing in a different
location than the prefix, just process 2 versions of the same file,
through a symlink in the source tree.
Comment 6 Pacho Ramos 2015-12-12 10:13:36 UTC
It looks to work fine for me

Thanks!
Comment 7 Cosimo Cecchi 2015-12-12 19:14:27 UTC
Review of attachment 317197 [details] [review]:

Looks good to me.
Comment 8 Bastien Nocera 2015-12-14 13:17:24 UTC
Attachment 317197 [details] pushed as 5ff8458 - books: Fix installation on some systems