src/platform/dev/gmerge - stateful lsb-release override

19 views
Skip to first unread message

Patrick Wenz

unread,
Aug 26, 2011, 5:55:25 AM8/26/11
to Chromium OS dev
Hi everyone,

starting to work on Chromium OS thesis I went through a lot of the
wikis guides and especially the page about the devserver. When i tried
to gmerge something I noticed that gmerge in contrast to the
update_engine_client does not care about entries in a /mnt/
stateful_partition/etc/lsb-release file, but as far as I understand
gmerge should read it as well shouldn't it?

I also have a question about the "(Non-committers) Submit your
changes" section of the developer-guide: Am I supposed to just pick
someone from the projects "git log" and mail them my patch before
posting here to get a Gerrit code review ?before-hand? If this is the
case what is the point of posting to this group? Anyway, I thought of
something like this:


project src/platform/dev/
diff --git a/gmerge b/gmerge
index 0a23ef5..9718c07 100755
--- a/gmerge
+++ b/gmerge
@@ -30,11 +30,19 @@ class GMerger(object):

def __init__(self, lsb_release_lines):
self.lsb_release = self.ParseLsbRelease(lsb_release_lines)
+ self.s_lsb_release_path = '/mnt/stateful_partition/etc/lsb-
release'
+ if os.path.exists(self.s_lsb_release_path) and \
+ os.stat(self.s_lsb_release_path).st_uid == 0:
+ # A stateful lsb-release exists and its owner is root.
+ self.s_lsb_release_lines = open
(self.s_lsb_release_path).readlines()
+ self.s_lsb_release =
self.ParseLsbRelease(self.s_lsb_release_lines)
+ for key in self.s_lsb_release:
+ self.lsb_release[key] = self.s_lsb_release[key]
try:
self.devkit_url = self.lsb_release['CHROMEOS_DEVSERVER']
self.board_name = self.lsb_release['CHROMEOS_RELEASE_BOARD']
except KeyError, e:
- sys.exit('Could not find /etc/lsb_release value: ' + e)
+ sys.exit('Could not find lsb_release value: ' + e)

def RemountOrChangeRoot(self, environ):
"""Remount the root filesystem rw; install into /usr/local if
this fails."""


Gaurav Shah

unread,
Aug 26, 2011, 1:57:19 PM8/26/11
to Patrick Wenz, Chromium OS dev
On Fri, Aug 26, 2011 at 2:55 AM, Patrick Wenz
<patric...@googlemail.com> wrote:
> Hi everyone,
>
> starting to work on Chromium OS thesis I went through a lot of the
> wikis guides and especially the page about the devserver. When i tried
> to gmerge something I noticed that gmerge in contrast to the
> update_engine_client does not care about entries in a /mnt/
> stateful_partition/etc/lsb-release file, but as far as I understand
> gmerge should read it as well shouldn't it?
>
> I also have a question about the "(Non-committers) Submit your
> changes" section of the developer-guide: Am I supposed to just pick
> someone from the projects "git log" and mail them my patch before
> posting here to get a Gerrit code review ?before-hand? If this is the

Create a gerrit code review first. And then add appropriate reviewers to it.

It also helps to give a heads up to the reviewers either on irc or dev
mailing list (like you did) to explain the motivation for the change.

> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>

--
-g

Patrick Wenz

unread,
Aug 31, 2011, 5:04:30 AM8/31/11
to Chromium OS dev
Sorry to bother you guys again but as far as I understand I cannot
create a code review without a gerrit account but I can't "repo
upload ." my changes without an @chromium.org account can I? With my
@googlemail.com account I just created a gerrit account but as feared:

... to gerrit.chromium.org/gerrit (y/n)? y
ssh: connect to host gerrit.chromium.org port 29418: Connection
refused
fatal: The remote end hung up unexpectedly

----------------------------------------------------------------------
[FAILED] src/platform/dev/ gmerge-stateful-lsb-release (Upload failed)

with:

$ git config -l
user.email=patric...@googlemail.com
user.name=PatrickWenz
...

public key is in place.

I followed the <a href="http://www.chromium.org/chromium-os/developer-
guide">developer-guide</a> and the <a href="http://www.chromium.org/
chromium-os/developer-guide/gerrit-guide">gerrit guide</a>. This is
still very unclear to me and I think it would help to clarify this
"Non-Committers" topic on the wiki. Hope it's not just me... Can
someone please enlighten me?

Regards, Patrick.



On Aug 26, 7:57 pm, Gaurav Shah <gaura...@chromium.org> wrote:
> On Fri, Aug 26, 2011 at 2:55 AM, Patrick Wenz
>
> > Chromium OS Developers mailing list: chromium-os-...@chromium.org

Guillaume Brunerie

unread,
Aug 31, 2011, 6:11:45 AM8/31/11
to Patrick Wenz, Chromium OS dev

No, you do not need a chromium.org account to submit a code review.
Your problem looks like a firewall issue. Does "ssh -p 29418 gerrit.chromium.org" give the same error?
Can you try to open port 29418 on your firewall and try again (if you have one and can configure it)?

> Chromium OS Developers mailing list: chromiu...@chromium.org

Patrick Wenz

unread,
Aug 31, 2011, 8:47:04 AM8/31/11
to Chromium OS dev
Oh, thx didn't think of that. No way I can get them to change this,
the policy is "do not ask!" :( But I vpn'ed out and it works.
Unfortunately now the server complains even though I double checked
that my key is in place:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly
...

I also just read this post here, so hopefully things will be clearer
soon. http://groups.google.com/a/chromium.org/group/chromium-os-dev/browse_thread/thread/a965fc2a323b6e0f

On Aug 31, 12:11 pm, Guillaume Brunerie <guillaume.brune...@gmail.com>
wrote:
> No, you do not need a chromium.org account to submit a code review.
> Your problem looks like a firewall issue. Does "ssh -p 29418
> gerrit.chromium.org" give the same error?
> Can you try to open port 29418 on your firewall and try again (if you have
> one and can configure it)?
> Le 31 août 2011 11:05, "Patrick Wenz" <patrick.w...@googlemail.com> a
> écrit :
>
>
>
>
>
>
>
> > Sorry to bother you guys again but as far as I understand I cannot
> > create a code review without a gerrit account but I can't "repo
> > upload ." my changes without an @chromium.org account can I? With my
> > @googlemail.com account I just created a gerrit account but as feared:
>
> > ... to gerrit.chromium.org/gerrit (y/n)? y
> > ssh: connect to host gerrit.chromium.org port 29418: Connection
> > refused
> > fatal: The remote end hung up unexpectedly
>
> > ----------------------------------------------------------------------
> > [FAILED] src/platform/dev/ gmerge-stateful-lsb-release (Upload failed)
>
> > with:
>
> > $ git config -l
> > user.email=patrick.w...@googlemail.com

Patrick Wenz

unread,
Aug 31, 2011, 9:05:57 AM8/31/11
to Chromium OS dev
Hurray! Setting the gerrit username as suggested in the above link was
missing:

$ git config review.gerrit.chromium.org/gerrit.username USERNAME
with USERNAME allowing
$ ssh -p 29418 USER...@gerrit.chromium.org

Thanks for the support but I still think this needs clarification.

Regards, P.

On Aug 31, 2:47 pm, Patrick Wenz <patrick.w...@googlemail.com> wrote:
> Oh, thx didn't think of that. No way I can get them to change this,
> the policy is "do not ask!" :( But I vpn'ed out and it works.
> Unfortunately now the server complains even though I double checked
> that my key is in place:
>
> Permission denied (publickey).
> fatal: The remote end hung up unexpectedly
> ...
>
> I also just read this post here, so hopefully things will be clearer
> soon.http://groups.google.com/a/chromium.org/group/chromium-os-dev/browse_...
Reply all
Reply to author
Forward
0 new messages