2017-12-03 02:24:28 +00:00
|
|
|
IPFS transport for apt
|
2017-12-03 16:31:42 +00:00
|
|
|
|
|
|
|
# Requirements
|
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
sudo apt install python3-pip git
|
2017-12-03 16:31:42 +00:00
|
|
|
sudo pip3 install ipfsapi
|
2017-12-03 17:47:59 +00:00
|
|
|
sudo snap install ipfs
|
|
|
|
ipfs init
|
|
|
|
ipfs daemon &
|
2017-12-03 16:31:42 +00:00
|
|
|
|
|
|
|
# Install
|
|
|
|
|
|
|
|
Copy the ipfs file from this repo to the directory for apt transport methods:
|
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
git clone https://github.com/JaquerEspeis/apt-transport-ipfs
|
2017-12-03 20:21:25 +00:00
|
|
|
cd apt-transport-ipfs
|
2017-12-03 18:59:09 +00:00
|
|
|
sudo mv ipfs /usr/lib/apt/methods/ipfs
|
2017-12-03 16:31:42 +00:00
|
|
|
|
|
|
|
# Configure
|
|
|
|
|
2017-12-03 17:47:59 +00:00
|
|
|
Add an IPFS mirror to your apt sources.list file. TODO set up a mirror.
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
# Hacky test
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
While we set up a proper IPFS mirror, this can be tested by using a hardcoded
|
|
|
|
IPFS hash that was manually set up to serve the hello deb.
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
Backup your /etc/apt/sources.list, remove all the lines that it has and leave it
|
|
|
|
just with:
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-06 21:45:54 +00:00
|
|
|
deb ipfs:/ipns/QmdyaTjqXayZVQULcEyHQFx6n76TrMBc5aEDCgvp5cUTEi xenial main
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
To test it, run:
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install hello
|
2017-12-03 18:27:38 +00:00
|
|
|
|
2017-12-03 18:59:09 +00:00
|
|
|
This IPFS node is not permanent and will disappear. To set it up again, use the
|
|
|
|
script in `scripts/add_test_mirror.sh`.
|
2018-02-08 23:41:33 +00:00
|
|
|
|
|
|
|
Made with :rainbow: by JáquerEspeis.
|