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 655714 - Change default install directory to inside users home directory
Change default install directory to inside users home directory
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
: 656611 709022 (view as bug list)
Depends on:
Blocks: 646510 655763
 
 
Reported: 2011-08-01 12:14 UTC by Craig Keogh
Modified: 2014-04-14 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
checkout and prefix in home folders (1.08 KB, patch)
2013-09-30 00:21 UTC, Magdalen Berns (irc magpie)
none Details | Review

Description Craig Keogh 2011-08-01 12:14:14 UTC
Change default install directory to inside users home directory. This bug is inspired by Owen Taylor:
http://mail.gnome.org/archives/desktop-devel-list/2011-July/msg00100.html
Comment 1 Colin Walters 2011-08-01 12:19:44 UTC
There will be a lot of documentation to change, but that's fine.

The only slightly tricky thing about this I see is detecting the case where the user was actually using the default in defaults.jhbuildrc, in other words if you had just an empty .jhbuildrc and were *actually* using /opt/gnome for installs.
Comment 2 Craig Keogh 2011-08-15 23:24:37 UTC
What should the default prefix be?
Maybe ~/.local, but I like to 'rm -rf prefix' so ~/.local is a bad idea.
Other ideas I thought of: ~/install  ~/sandbox  ~/prefix
Any suggestions?
Comment 3 Craig Keogh 2011-09-01 06:40:14 UTC
xdg-user-dirs only provides the following. None suit.

DESKTOP=Desktop
DOWNLOAD=Downloads
TEMPLATES=Templates
PUBLICSHARE=Public
DOCUMENTS=Documents
MUSIC=Music
PICTURES=Pictures
VIDEOS=Videos

How about:

~/Applications/jhbuildgnome

'Applications' wouldn't be localized, but users could localize themselves via the config file. This is just the default.
Comment 4 Thomas Andersen 2012-06-13 15:40:28 UTC
Setting prefix to ~/whatever is always the first thing I tell new users. A combination of this and working without a .jhbuildrc would make jhbuild a lot easier to get started with.

How about ~/.local/share/jhbuild/built? It is a bit long but I guess you don't need to go there very often if programs are started with "jhbuild run"
Comment 5 Federico Mena Quintero 2012-09-05 23:09:19 UTC
<bikeshed>

~/.local is, well, hidden :)

I have ~/jhbuild/src for checkouts (including jhbuild itself, so there is a ~/jhbuild/src/jhbuild), and ~/jhbuild/install for the installed/built tree.  It works quite well and is quite visible.
Comment 6 Craig Keogh 2012-09-06 00:12:36 UTC
Ryan Lortie (desrt) has [1]:
 ~/jhbuild/jhbuild
 ~/jhbuild/checkout
 ~/jhbuild/install

It appears ~/jhbuild is popular. Keeping everything JHBuild within ~/jhbuild is popular.

So I propose:
 ~/jhbuild/src/jhbuild  - for jhbuild itself, and update 'getting started' of the manual.
 ~/jhbuild/src          - for checkoutroot
 ~/jhbuild/downloads    - for tarballdir
 ~/jhbuild/install      - for prefix

[1] https://live.gnome.org/Jhbuild/desrt%27sSetup
Comment 7 Federico Mena Quintero 2012-09-06 02:04:12 UTC
Craig, this sounds quite good.  I wasn't aware that you can have a separate directory for tarballs.  It sounds handy for when you wipe all of src and start a fresh build - the tarballs can still be reused.
Comment 8 Frederic Peters 2013-05-23 12:15:08 UTC
*** Bug 656611 has been marked as a duplicate of this bug. ***
Comment 9 Thomas Andersen 2013-06-01 20:05:11 UTC
I have been testing this setup for a few days. One thing I noticed is that checking out modules in git.gnome.org that are not in the modulesets no longer works. E.g. I cannot do "updateone msitools".
Comment 10 Michael Catanzaro 2013-06-02 14:44:28 UTC
(In reply to comment #7)
> Craig, this sounds quite good.  I wasn't aware that you can have a separate
> directory for tarballs.  It sounds handy for when you wipe all of src and start
> a fresh build - the tarballs can still be reused.

desrt also sets dvcs_mirror_dir to '~/jhbuild/mirror', so that you don't need to re-clone after you delete your repo.  Unless I'm mistaken, this just moves the .git folder to that location. Probably more important since clones are a lot bigger than tarballs.
Comment 11 Michael Catanzaro 2013-06-04 01:23:08 UTC
> (In reply to comment #7)
> 
> desrt also sets dvcs_mirror_dir to '~/jhbuild/mirror', so that you don't need
> to re-clone after you delete your repo.  Unless I'm mistaken, this just moves
> the .git folder to that location. Probably more important since clones are a
> lot bigger than tarballs.

It was cool until I realized my git pushes were going to this extra repo instead.
Comment 12 Stefano Facchini 2013-09-06 11:34:05 UTC
Maybe it could make sense to keep the checkouts somewhere under ~/.cache, which is automatically excluded by backup tools like DejaDup. And using something under ~/.local for the prefix, much like /usr/local w.r.t. /usr. So:

checkoutroot = ~/.cache/jhbuild/checkout
prefix = ~/.local/jhbuild
Comment 13 Frederic Peters 2013-09-29 18:01:45 UTC
*** Bug 709022 has been marked as a duplicate of this bug. ***
Comment 14 Magdalen Berns (irc magpie) 2013-09-30 00:21:51 UTC
Created attachment 256047 [details] [review]
 checkout and prefix in home folders
Comment 15 Allison Karlitskaya (desrt) 2014-01-02 05:48:50 UTC
fwiw, I've changed over to this for my personal use:

tarballdir      = '~/.cache/jhbuild/download'
dvcs_mirror_dir = '~/.cache/git'
checkoutroot    = '~/.cache/jhbuild/checkout'
prefix          = '~/.cache/jhbuild/install'

but I consider that this is maybe slightly confusing for newcomers.

I do this for the same reason as comment 12 mentions: avoiding backing this stuff up.

This setup is slightly illogical for people who use jhbuild for hacking because then you might want your checkout directory backed up.  I never modify what jhbuild checks out, so this is not a concern for me.

The reason I have ~/.cache/git separate from the others is because I mirror all of git.gnome.org (and a few other things) and use the mirror repositories from other scripts (like a script I have for quickly checking out such module, as an example).
Comment 16 Frederic Peters 2014-01-29 10:34:23 UTC
I went with the proposal from comment 6, this gives visibile directories and a straightforward git setup.

commit 053fb5231c0cd13daf9f09353f87cfb24d3536ac
Author: Frédéric Péters <fpeters@0d.be>
Date:   Wed Jan 29 10:25:42 2014 +0000

    use ~/jhbuild/ as a base for jhbuild directories
    
    This gives:
     - checkoutroot = ~/jhbuild/src/
     - prefix = ~/jhbuild/install/
     - tarballdir = ~/jhbuild/install/
    
    Additionally compatibility is kept with older installations that used the
    default configuration values.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=655714
Comment 17 Colin Walters 2014-01-29 12:07:16 UTC
Hooray!
Comment 18 Christophe Fergeau 2014-04-14 12:45:04 UTC
Doc seems outdated with this change.
https://developer.gnome.org/jhbuild/unstable/config-reference.html.en has

« tarballdir: A string if set, tarballs will be downloaded to the specified directory instead of checkoutroot. » The « Defaults to ~/jhbuild/downloads » bit which was added by this commit does not appear in the online documentation.

This also seems to force tarballs to go in ~/jhbuild/downloads even if checkoutroot is overridden in ~/.jhbuildrc but tarballdir is not set. If this is the expected result, imo tarballdir should be listed in examples/sample.jhbuildrc.