[PATCH wayland-build-tools] Add helper script to setup and use an uninstalled environment

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 1 09:13:36 UTC 2016


On Wed, 31 Aug 2016 23:17:09 +0100
Emil Velikov <emil.l.velikov at gmail.com> wrote:

> On 31 August 2016 at 19:10, Derek Foreman <derekf at osg.samsung.com> wrote:
> > Thanks for taking a look!
> >
> > On 31/08/16 04:22 AM, Emil Velikov wrote:  
> >> On 30 August 2016 at 19:56, Derek Foreman <derekf at osg.samsung.com> wrote:  
> >>> From: "Reynaldo H. Verdejo Pinochet" <reynaldo at osg.samsung.com>
> >>>
> >>> The wl_uninstalled script provides a shell environment to
> >>> build and use an uninstalled Wayland/Weston setup.
> >>>
> >>> For example, this script and a fresh checkout of Wayland,
> >>> libinput, wayland-protocols and Weston is all you need to
> >>> run Weston from the uninstalled environment created by
> >>> building every module. No installation required.
> >>>
> >>> Quick instructions:
> >>>
> >>> Lets use Weston as an example altough other Wayland-based
> >>> software should work as well.
> >>>
> >>> Edit a local copy of the script to make $WLD point to the
> >>> base directory where your repositories are (make sure to
> >>> use the absolute paths), then, after executing the script,
> >>> issue the following commands to have everything built and
> >>> Weston runing from the uninstalled environment.
> >>>
> >>> cd <basedir>
> >>> for i in wayland wayland-protocols libinput weston; do
> >>> cd $i && ./autogen.sh && make && cd ..; done  
> >> Above all please do _not_ recommend building in-tree. Pretty please.  
> >
> > Uhh, for better or worse, perhaps too late?  The build instructions at:
> > https://wayland.freedesktop.org/building.html
> > explain how to do in tree builds.
> >
> > The existing wl_build script in wayland-build-tools does in tree builds
> > as well.
> >
> > Really don't want this to degenerate into a debate about in tree vs out
> > of tree builds - but our instructions and scripts have been doing
> > in-tree for a while now...
> >  
> in case it was unclear none of what I've said is meant to block any of
> the work but to point out some mispractise/bad ideas.
> It's up-to the core devs/community to make a decision.

Hi

> What's stopping wayland/weston devs from moving away from this bad practise ?

Not knowing why it's bad. It will also be even more steps in the build
guide so there wasn't a known benefit for going more complicated, AFAIK.

The most important thing at the time was trying to get people to not
install to default prefix /usr/local.

> >> As mentioned before using --prefix=$WLD/foo + make install will make
> >> things shorter/simpler  
> >
> > Takes more time (waiting for misc relinking during the install - perhaps
> > not overly onerous for wayland/weston/libinput), takes more steps
> > (performing the install), takes more effort to undo (make distclean is
> > essentially a complete uninstall of a package - of course I could have a
> > separate prefix for each repo and a bunch more env vars, so perhaps
> > that's not an important distinction), takes more space on disk.

Even with that explanation which doesn't seem too compelling to me, I'm
not sure why anyone would like to run uninstalled apart from some
Android hackery, but wayland-build-tools is Bryce's domain so he can
decide what goes in there.

I would have hoped the commit message to explain "why it is useful",
not just "you can now do this".

This also applies to the -uninstalled.pc files. I may have once used
them in my dark Android past, but I have happily forgot why they ever
existed. Patches adding them would be nice to remind us all what they
are needed for.

> >
> > This doesn't seem shorter or less complicated?
> >  
> In one case you have a setup that resembles closer to what _everyone_
> will be using. Not by a huge margin, but still.
> Afaict one of the reasons behind --prefix was exactly this -
> intermediate location to accommodate testing before deployment.
> 
> > If we do install, we must configure weston with --disable-weston-launch
> > as it requires root perms during installation.  
> Grr this sounds like a sub-optimal/busted configure. One should be able to do
> $ autoreconf --force --verbose --install --prefix=`pwd`/install && make install
> and
> $ autoreconf --force --verbose --install && make distcheck
> 
> If the latter works while the former does not it means that one is
> only working around the bug via the *DISTCHECK_CONFIGURE_FLAGS.

Yes, we have --disable-setuid-install for ./configure. It works also
for normal uses, no need for --disable-weston-launch.

Whether that's a thing to change is another topic.

> > Not sure what to make of
> > that - it's not very useful without root perms anyway, and not required
> > on systems with systemd.  Building it "uninstalled" seems to only have
> > value to check for compilation and warnings anyway.
> >  
> Having a look and there isn't even a help text on this option. Yet it
> requires root, is enabled by default and if chown root (and co) fails
> so does `make install` :-( This doesn't sound good ...
> 
> Please draw some inspiration from Xserver on this one.

It sounds like you are talking to Derek when you should be addressing
everyone. Anyway, AFAICR you are the first one in years to say this
actually bothers anyone.

I don't have any prejudice against changing things there.

> >> LD_LIBRARY_PATH="\
> >> $WLD/foo/lib/\
> >> ${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
> >>
> >> WESTON_BUILD_DIR="\
> >> $WLD/build/weston/\
> >> ${WESTON_BUILD_DIR:+:$WESTON_BUILD_DIR}"
> >>
> >> PKG_CONFIG_PATH="\
> >> :$WLD/foo/lib/pkgconfig/
> >> ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
> >>
> >> PATH="\
> >> $WLD/foo/bin/\
> >> :$PATH"
> >>
> >>  
> >>> +* Edit a local copy of the script to make $WLD point to the base directory  
> >> How about one honours the WLD that's already set since ...  
> >
> > It's not already set - the script exports it.  Oh, this seems to be the
> > same variable name used in some of the build instructions at:
> > https://wayland.freedesktop.org/building.html
> >
> > and in weston's releasing.txt.
> >
> > Is that the problem?
> >  
> Definitely not a problem, esp. since I've completely misread the help
> text. Hope I'm the only one...
> In general I'm biased towards "the script should just work and if you
> modify it that means there's something wrong" behaviour.
> 
> Mostly because any form of modifying it implies (and it really does)
> that making further changes it is perfectly fine and before you know
> it your version has little resemblance to the one used by another dev.
> At the same time both of you believe to be using the same procedure
> :-\

This I agree with, even just for the small practical matter of git
saying you have changes in the file which you would never ever want to
commit and send upstream. Or if you actually do make a copy of the
file, then it's a pain to track upstream fixes to it, or even realize
that there are any.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160901/d37ebf6f/attachment.sig>


More information about the wayland-devel mailing list