Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429470 - dev-vcs/mercurial - install a default configuration hgrc
Summary: dev-vcs/mercurial - install a default configuration hgrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 2 votes (vote)
Assignee: Dirkjan Ochtman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 437964 442788
  Show dependency tree
 
Reported: 2012-08-02 11:07 UTC by Massimo Burcheri
Modified: 2012-12-30 15:46 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/cacerts.rc (cacerts.rc,51 bytes, text/plain)
2012-11-12 21:35 UTC, M8R-u38wij
Details
mercurial-2.1.1-r1.ebuild (mercurial-2.1.1-r1.ebuild,4.01 KB, text/plain)
2012-11-12 21:37 UTC, M8R-u38wij
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Burcheri 2012-08-02 11:07:55 UTC
We don't have a global configuration for mercurial yet.
So at least a template with comments would be useful.

In my opinion at least our CA [1] should be enabled here if we thrust our app-misc/ca-certificates:

$ cat /etc/mercurial/hgrc 
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt


[1] http://mercurial.selenic.com/wiki/CACertificates
Comment 1 Nikoli 2012-10-05 07:35:48 UTC
Good idea.
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-10-11 12:15:28 UTC
*** Bug 437964 has been marked as a duplicate of this bug. ***
Comment 3 nevermind 2012-10-11 12:20:04 UTC
Agreed with Massimo Burcheri we just rediscovered this solution and created duplicate bug here :P

someone take action on it please
Comment 4 M8R-u38wij 2012-11-12 21:00:00 UTC
(In reply to comment #0)
> $ cat /etc/mercurial/hgrc 

I think "/etc/mercurial/hgrc.d/ca-certificates.rc" would be much better
Comment 5 M8R-u38wij 2012-11-12 21:35:45 UTC
Created attachment 329400 [details]
files/cacerts.rc
Comment 6 M8R-u38wij 2012-11-12 21:37:35 UTC
Created attachment 329404 [details]
mercurial-2.1.1-r1.ebuild

ca-certs for stable version
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-12-11 12:21:31 UTC
Since ca-certificates.crt is not part of the @system set, we'd probably need to add a dependency on app-misc/ca-certificates. I think it's a good idea, and I'd be happy to implement it (/etc/mercurial/hgrc.d/ca-certificates.rc sounds like a good name), so I'll try to do that as soon as I get to it. In the meantime, any other developer should feel free to go ahead and do it.
Comment 8 Cynede (RETIRED) gentoo-dev 2012-12-17 05:54:35 UTC
Hello, I'm facing the same issue for a long long time. But that solution isn't full for me... seems like.

 * Updating /usr/portage/distfiles/hg-src/todo/ctodo from https://bitbucket.org/Cynede/ctodo
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)

>>cat /etc/mercurial/hgrc.d/ca-certificates.rc                                                                                                                                                   
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt#
Comment 9 M8R-u38wij 2012-12-28 21:35:40 UTC
(In reply to comment #8)
> Hello, I'm facing the same issue for a long long time. But that solution
> isn't full for me... seems like.
> 
>  * Updating /usr/portage/distfiles/hg-src/todo/ctodo from
> https://bitbucket.org/Cynede/ctodo
> warning: bitbucket.org certificate with fingerprint
> 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified
> (check hostfingerprints or web.cacerts config setting)
> 
> >>cat /etc/mercurial/hgrc.d/ca-certificates.rc                                                                                                                                                   
> [web]
> cacerts = /etc/ssl/certs/ca-certificates.crt#

Same here with cacerts in /etc or /root/.hgrc

>>ebuild pygments-9999.ebuild configure

>>> Unpacking source...
 * Updating /media/SHARE/distfiles/hg-src/pygments/pygments-main from https://bitbucket.org/gentoo90/pygments-main
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)


Seems like hg cant read its configs when runned from ebuild. Maybe its something about sandbox? ¯\(°_o)/¯
Comment 10 M8R-u38wij 2012-12-28 22:05:30 UTC
> Seems like hg cant read its configs when runned from ebuild. Maybe its
> something about sandbox? ¯\(°_o)/¯

Sorry, wrong guess.

It's because mercurial.eclass exports $HGRCPATH variable with empty value (line 87):

>># Should be set but blank to prevent using $HOME/.hgrc
>>export HGRCPATH=

If this variable is present hg reads it. If not - it uses default set of directories:
['/usr/etc/mercurial/hgrc', '/etc/mercurial/hgrc', '/etc/mercurial/hgrc.d/cacerts.rc', '/root/.hgrc']
Comment 11 Cynede (RETIRED) gentoo-dev 2012-12-29 04:02:41 UTC
Oh. Thank you for that find. Now I guess I can solve it at least for myself.
Comment 12 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-12-30 15:46:51 UTC
Fixed in mercurial-2.4.1-r1.