Closed
Bug 613587
Opened 14 years ago
Closed 12 years ago
cfx init should generate a JID
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: myk, Assigned: KWierso)
References
Details
Attachments
(1 file, 3 obsolete files)
"cfx init" creates most of the necessary infrastructure for an addon, but it doesn't generate a public/private key pair, which then has to get generated the first time the user runs "cfx run" (causing "cfx run" not to do what the user expects the first time they run it). "cfx init" should generate that public/private key pair automatically as part of its process of setting up the infrastructure for an addon.
Comment 1•14 years ago
|
||
Could i implement it?, it's a good idea
Reporter | ||
Comment 2•14 years ago
|
||
Julián: sure, that'd be great! Assigning the bug to you.
Assignee: nobody → cristianjulianceballos
Comment 3•14 years ago
|
||
this is the update of "cfx init", i've made in git: $ git add packages/init-template/* $ git rm python-lib/cuddlefish/templates.py but the patch doesn't show me the files added and deleted, how could i do it?, because in this code i use the template in the folder packages/init-template, i've wrote my reasons for this, in bug 613630 -> https://bugzilla.mozilla.org/show_bug.cgi?id=613630
Attachment #493500 -
Flags: review?(warner-bugzilla)
Comment 4•14 years ago
|
||
Are you familiar with the git "staging area", also known (unfortunately) as the "cache" or the "index"? The "git add" command copies changes into the staging area, and "git diff" only shows you the differences between the staging area and your working tree. Use "git diff --cached" to see the differences between the latest checkout and the staging area. Does the generate-keypair fix depend upon the move-template-into-a-package fix? Should I be looking at the attachment now, or waiting for a version of the patch with additional files?
Comment 5•14 years ago
|
||
To generare the keypair you need first the addon template in examples directory where it will be. I'll upload a new version of the patch with this bugs fixed.
Comment 6•14 years ago
|
||
Hi everybody, i've finished the code for cfx init new functions to generate the public and private key :). Everything it's ok, well i guess. The rest of the patch is in the bug 613604, the content in that patch is the new files for generate the init template for addons.
Attachment #493500 -
Attachment is obsolete: true
Attachment #494302 -
Flags: review?(warner-bugzilla)
Attachment #493500 -
Flags: review?(warner-bugzilla)
Comment 7•14 years ago
|
||
Comment on attachment 494302 [details] [diff] [review] init generate a private/public keypair As mentioned on Bug 613604, could you make this into a self-contained patch? Making it build on top of the patch from 613604 is fine (and we can make this bug depend upon that one). As it stands, I can't apply it independently. The patch seems about right, but I'll wait until I can apply and test it. One thing to consider is that copying each file separately is a bit of a drag: you might want to use shutil.copytree() and copy everything from the template directory into the target.
Attachment #494302 -
Flags: review?(warner-bugzilla) → review-
Reporter | ||
Updated•13 years ago
|
Priority: -- → P3
Target Milestone: --- → 1.0
Comment 8•13 years ago
|
||
Note that I implemented this in one of the patches in bug 641215 (commit 'a3f8915' here: https://github.com/mozilla/addon-sdk/pull/124 )
Comment 9•13 years ago
|
||
Now that we've removed the cryptographic keys (Bug 654588), this ticket can be converted into one about generating random JIDs during 'cfx init', which is marginally easier.
Summary: cfx init should generate a public/private key pair → cfx init should generate a JID
Reporter | ||
Comment 11•13 years ago
|
||
(automatic reprioritization of 1.0 bugs)
Priority: P3 → P2
Target Milestone: 1.0 → 1.1
Assignee | ||
Comment 12•13 years ago
|
||
(Pushing all open bugs to the --- milestone for the new triage system)
Target Milestone: 1.1 → ---
Assignee | ||
Comment 14•12 years ago
|
||
I'm sure there's more that needs to be cleaned up in addition to this, but this patch seems to work for me. It copies preflight.py's method of generating the jID over to __init__.py, allowing cfx init to generate the jID as part of what it does. With this patch, I no longer need to do 'cfx run' twice to actually get the addon running.
Attachment #494302 -
Attachment is obsolete: true
Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 631520 [details]
Link to pull request 461
Alex, can you take a look at this?
Attachment #631520 -
Flags: review?(poirot.alex)
Assignee | ||
Updated•12 years ago
|
Assignee: cristianjulianceballos → kwierso
Comment 16•12 years ago
|
||
Comment on attachment 631520 [details]
Link to pull request 461
Made a comment in pull request. Tests are failing and need to be fixed.
Attachment #631520 -
Flags: review?(poirot.alex)
Assignee | ||
Comment 17•12 years ago
|
||
I screwed up the branch I was working on this in, so had to move it to another branch/pull request. I think I addressed most of your issues with it.
Attachment #631520 -
Attachment is obsolete: true
Attachment #659853 -
Flags: review?(poirot.alex)
Comment 18•12 years ago
|
||
Comment on attachment 659853 [details]
Link to pull request 564
Looks good. Tests pass. Tested manually and works fine.
For some reason your branch has conflict with master so that we can't merge it automatically.
Attachment #659853 -
Flags: review?(poirot.alex) → review+
Comment 19•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/61c5fca000c794138942604fcd48db53bcedcf93 Merge pull request #703 from KWierso/613587final Bug 613587 - Make cfx init automatically generate the jID
Assignee | ||
Comment 20•12 years ago
|
||
I had to make a new pull request to get this mergeable, but it's essentially the same code. Pull request here: https://github.com/mozilla/addon-sdk/pull/703 Carrying the r+ forward and landed it.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 21•12 years ago
|
||
Commit pushed to integration at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/61c5fca000c794138942604fcd48db53bcedcf93 Merge pull request #703 from KWierso/613587final
You need to log in
before you can comment on or make changes to this bug.
Description
•