Closed Bug 942475 Opened 11 years ago Closed 9 years ago

Bootstrap is not available for Arch Linux.

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: dsocolobsky, Assigned: geoffroy)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release)
Build ID: 20131118194756

Steps to reproduce:

I tried the bootstrap script listed in https://developer.mozilla.org/en-US/docs/Simple_Firefox_build/Linux_and_MacOS_build_preparation

"wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py"

Being Arch such a popular distro, I'd think it'd be good to support it.


Actual results:

The script did not complete successfully:

$ wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
--2013-11-23 15:22:09--  https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
Resolving hg.mozilla.org (hg.mozilla.org)... 63.245.215.25
Connecting to hg.mozilla.org (hg.mozilla.org)|63.245.215.25|:443... connected.
HTTP request sent, awaiting response... 200 Script output follows
Length: 4426 (4.3K) [text/x-python]
Saving to: ‘bootstrap.py’

100%[=================================================================================================================================>] 4,426       --.-K/s   in 0.008s  

2013-11-23 15:22:11 (530 KB/s) - ‘bootstrap.py’ saved [4426/4426]

Traceback (most recent call last):
  File "bootstrap.py", line 142, in <module>
    sys.exit(main(sys.argv))
  File "bootstrap.py", line 133, in main
    dasboot.bootstrap()
  File "/tmp/tmphd5f5l/mozboot/bootstrap.py", line 63, in bootstrap
    return files
NotImplementedError: Bootstrap support for this Linux distro not yet available.


Expected results:

Script should have ran without a problem, like it does in Ubuntu.
Bootstrap support is effectively maintained by interested individuals. If you would like to add Arch Linux support, please code up a patch and submit it here.

Code lives in python/mozboot in the tree.
Attached patch Archlinux Bootstrapper (obsolete) — Splinter Review
I implemented a bootstrapper for Arch Linux which works for me.

It works for Desktop only for now.
Attachment #8575859 - Flags: review?(gps)
Assignee: nobody → geoffroy
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8575859 [details] [diff] [review]
Archlinux Bootstrapper

Review of attachment 8575859 [details] [diff] [review]:
-----------------------------------------------------------------

This is mostly a rubber stamp review. I'm not an Arch Linux guru and can't speak to how proper this solution is. I don't see anything too concerning, so this looks good to my eyes!

::: python/mozboot/mozboot/archlinux.py
@@ +96,5 @@
> +        
> +        self.run_as_root(command)
> +
> +    def run(self, command):
> +        subprocess.check_call(command, stdin=sys.stdin)

I'm pretty sure sys.stdin is inherited if this argument is omitted.

::: python/mozboot/mozboot/bootstrap.py
@@ +7,4 @@
>  
>  import platform
>  import sys
> +import os.path

"import os" is sufficient to get os.path.
Attachment #8575859 - Flags: review?(gps) → review+
 (In reply to Gregory Szorc [:gps] from comment #3)
> This is mostly a rubber stamp review. I'm not an Arch Linux guru and can't
> speak to how proper this solution is. I don't see anything too concerning,
> so this looks good to my eyes!

Actually the only "wrong" decision is taking a package from the AUR as this is potentially unsafe, but uuid is not available in the official repositories and this is a common practice to use an AUR build in that case.

I put a warning which requires the user to exactly type "yes" to continue for this purpose.

> ::: python/mozboot/mozboot/archlinux.py
> > +        subprocess.check_call(command, stdin=sys.stdin)
> 
> I'm pretty sure sys.stdin is inherited if this argument is omitted.

That's how the call is made in python/mozboot/mozboot/base.py and as I'm a beginner in python I've prefered to keep the exact same call.

It maybe would have been better to move this method to base to make only one call to subprocess, but I didn't wanted to affect other files too much.

I'm gonna check the docs to see how can I submit this patch now.

Thanks for reviewing!
Same patch, just formatted it correctly for check-in.
Attachment #8575859 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d65a0be78209
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
How should i  use patch?
I am new to opensource.
(In reply to Rahul from comment #8)
> How should i  use patch?
> I am new to opensource.

Hi. You are commenting on an old bug that has been closed for 2 years. There should be nothing left to do here.

But if you are interested in contributing to Firefox or other Mozilla projects, I'd encourage you to read https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: