Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ipfs-update design + implementation #1842

Closed
6 of 11 tasks
jbenet opened this issue Oct 14, 2015 · 16 comments
Closed
6 of 11 tasks

ipfs-update design + implementation #1842

jbenet opened this issue Oct 14, 2015 · 16 comments
Milestone

Comments

@jbenet
Copy link
Member

jbenet commented Oct 14, 2015

(meant to post this last week, apparently i didnt)

ipfs-update design + implementation

ipfs-update is a subtool that updates an ipfs distribution.

Requirements:

  • it should be callable with ipfs update
  • it should be callable directly with ipfs-update
  • it should be capable of operating without the daemon on (ipget?)
  • it should be capable to operating with a broken ipfs default repo, and broken ipfs binary.
  • it should prefer to download using ipfs
  • it should fall-back to download with HTTPS (dist.ipfs.io)
  • it should fall-back to download with HTTP (if-and-only-if! signed releases)
  • it should fall-back to a manually-given tarball (ipfs-update install <ipfs-0.3.8.tar.gz)

Phases:

  • Phase 1: scaffolding, installs from gobuilder
  • Phase 2: installs from dist.ipfs.io
  • Phase 4: verifies signatures on releases

Commands

> ipfs-update --help

  ipfs update - update the ipfs distribution

SUBCOMMANDS

  ipfs update check             - checks for new updates
  ipfs update install <release> - install a specific release
  ipfs update latest            - install latest release
  ipfs update version           - returns current installed version
  ipfs update versions          - lists all known versions

DESCRIPTION

  The `ipfs update` command is used to update an ipfs distribution
  directly via ipfs. It is a standalone tool meant to be included
  with the distribution. Though it can be distributed, and run
  completely independently.

> ipfs update check
Current version: go-ipfs/0.3.9
Latest version: go-ipfs/0.4.0
To update, run: ipfs update latest

> ipfs update latest
Current version: go-ipfs/0.3.9
Latest version: go-ipfs/0.4.0
Downloading /ipfs/QmYJzq3Ggx9bDjRPrG41oFhiVwCqqZwxAtdAsXg2X6rAD6/ipfs-0.4.0-darwin
[=====================================================>          ] 82% of 20 MB # or whatever
Shutting down ipfs daemon...ok        # if one is detected
Verifying ipfs-0.4.0-darwin...ok      # runs some test commands
Installing ipfs-0.4.0-darwin...ok     # moves into place
Old version available at /Users/jbenet/.ipfs/old-bin/go-ipfs/0.3.9
Current version: go-ipfs/0.4.0
@jbenet
Copy link
Member Author

jbenet commented Oct 14, 2015

this is important for 0.3.9 release

@jbenet jbenet added this to the IPFS 0.3.9 milestone Oct 14, 2015
@whyrusleeping
Copy link
Member

@jbenet we will need some sort of endpoint for the tool to query to discover what versions are available, and where to download them.

@whyrusleeping
Copy link
Member

We will need something like:

> curl https://ipfs.io/dist/go-ipfs/versions
{
    "latest":"0.3.9",
    "0.3.9":"/ipfs/Qmasdasd",
    "0.3.8":"/ipfs/Qmeeeeee",
    "0.3.7":"/ipfs/Qmaljkawd",
}

And each of those hashes would resolve to a directory with a child directory for each architecture.

@JJJollyjim
Copy link

How will this work when ipfs has been installed through the system package manager?

@whyrusleeping
Copy link
Member

@JJJollyjim thats a good question. there should probably be some code to check for an installation method... Although, we should probably do it similar to how chrome does. You only install with your package manager, but updates happen through the app itself.

@jbenet
Copy link
Member Author

jbenet commented Oct 18, 2015

We will need something like:

we already have it. in https://github.com/ipfs/distributions/pull/10/files#diff-d2772e81a298311bb7bd125ec42d37deR43 we add a json file to the distributions repo with all the info per version.

@JJJollyjim
Copy link

@whyrusleeping where do you get that? From the chromium website:

Q: Does Chrome on Linux auto-update too?
A: Google Chrome on Linux does not auto-update itself; it relies on your package manager to update it.

In fact, my Chrome install (Arch Linux) is a couple of versions old because I haven't updated from the AUR recently. Windows install:

capture

Arch install:

screenshot_2015-10-18_21-31-14

Assuming you're planning to get go-ipfs into repos, I don't think that packagers would be keen on having the software downloading and installing updates as binaries from a 3rd-party. As a user, I trust the maintainers of my distro to not push malicious code to my system in updates and to have secure building/package-signing processes, though I cannot say the same for the developers of each individual package.

Just my thoughts, love what you're doing with IPFS!

@whyrusleeping
Copy link
Member

@JJJollyjim ah, yeah. youre right. I got confused with steam.

@whyrusleeping
Copy link
Member

we already have it

@jbenet can i curl dist.ipfs.io/versions or something for that then?

@jbenet
Copy link
Member Author

jbenet commented Oct 19, 2015

@whyrusleeping you'll be able to:

> curl dist.ipfs.io/go-ipfs/versions
v0.2.2
v0.2.3
v0.3.2
v0.3.3
v0.3.4
v0.3.5
v0.3.6
v0.3.7
v0.3.8

this is done but i cant push an example because the network am in is blocking all non-http traffic and i need to setup some cjdns style tunnel to look like HTTP/TLS.

@whyrusleeping
Copy link
Member

git push https://github.com/ipfs/whatever master

@jbenet
Copy link
Member Author

jbenet commented Oct 19, 2015

an example will be at: https://ipfs.io/ipfs/QmZiSAYkU7gZtqYeZWL21yuwgFtRnJu1JjDzR6Qd2qdDBr once i'm back at a real network.

@jbenet
Copy link
Member Author

jbenet commented Oct 19, 2015

@whyrusleeping it's pushed to git: https://github.com/ipfs/distributions and make. ipfs just needs to look more like http/tls.

@whyrusleeping
Copy link
Member

@jbenet could i get a json object or something back from the versions endpoint? having just a list works... but its not as nice

@jbenet
Copy link
Member Author

jbenet commented Oct 20, 2015

@whyrusleeping deal with the versions list or PR https://github.com/ipfs/distributions -- i dont have time this week for dev.

@whyrusleeping
Copy link
Member

ipfs update is a thing and has shipped!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants