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 756633 - gnome-session shell wraper fails to expand @libexecdir@
gnome-session shell wraper fails to expand @libexecdir@
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-15 11:46 UTC by Alexander Larsson
Modified: 2016-01-05 09:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build-goo: generate shell script wrapper in different way (5.39 KB, patch)
2015-10-15 12:43 UTC, Ray Strode [halfline]
reviewed Details | Review
build: generate gnome-session script in different way (1.72 KB, patch)
2015-10-15 15:49 UTC, Alberts Muktupāvels
none Details | Review

Description Alexander Larsson 2015-10-15 11:46:20 UTC
In this commit:

https://git.gnome.org/browse/gnome-session/commit/?id=39f146e6c5727105a3c88c2290654c6ef83102c5

the gnome-session binary was made a wrapper, however the .in file includes @libexecdir@ which expands to "${exec_prefix}/libexec" which fails because exec_prefix is not set in the environment.
Comment 1 Alexander Larsson 2015-10-15 11:51:34 UTC
Easiest fix is probably to do the rewrite from the makefile instead:

	$(AM_V_GEN) $(SED) -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
Comment 2 Bastien Nocera 2015-10-15 12:34:53 UTC
Or you could use AS_AC_EXPAND() in the configure.ac, which is made for that.
Comment 3 Ray Strode [halfline] 2015-10-15 12:43:20 UTC
Created attachment 313365 [details] [review]
build-goo: generate shell script wrapper in different way

Using configure to generate the wrapper doesn't work unless
we switch to AS_AC_EXPAND or something since the libexecdir
won't fully expand to an absolute path by default.

This commit drops the idea of using configure to generate
the wrapper and instead falls back to good old sed.
Comment 4 Ray Strode [halfline] 2015-10-15 12:46:01 UTC
(In reply to Bastien Nocera from comment #2)
> Or you could use AS_AC_EXPAND() in the configure.ac, which is made for that.

I can see you had the same first thought I had. I don't want to switch to AS_AC_EXPAND for a brown bag release since we aren't already using it, and introducing the macro definition will add complexity.

The sed idiom predates AS_AS_EXPAND by many years so should be fine.
Comment 5 Bastien Nocera 2015-10-15 13:16:53 UTC
Review of attachment 313365 [details] [review]:

::: gnome-session/Makefile.am
@@ +20,3 @@
+	$(AM_V_GEN) sed \
+		-e "s|\@libexecdir\@|$(libexecdir)|" \
+                $< > $@

I'd put that on one line, which would make it more readable to me.

g-s-d does that:
gnome-settings-daemon-localeexec: gnome-settings-daemon-localeexec.in
         $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@prefix\@|$(prefix)|"  $< > $@.tmp && mv $@.tmp $@

Which ensures that the file is atomically created.
Comment 6 Alberts Muktupāvels 2015-10-15 15:49:19 UTC
Created attachment 313386 [details] [review]
build: generate gnome-session script in different way

I used this patch to fix this bug.
Comment 7 Ray Strode [halfline] 2015-10-15 20:44:01 UTC
how is that different? isn't it the same patch?
Comment 8 Ray Strode [halfline] 2015-10-15 20:44:41 UTC
git bz screwed up but this is pushed now.