2017-12-03 02:24:28 +00:00
|
|
|
IPFS transport for apt
|
2017-12-03 16:31:42 +00:00
|
|
|
|
|
|
|
# Requirements
|
|
|
|
|
|
|
|
sudo apt install python3 pip
|
|
|
|
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 17:54:16 +00:00
|
|
|
sudo wget --output-document /usr/lib/apt/methods/ipfs https://raw.githubusercontent.com/JaquerEspeis/apt-transport-ipfs/master/ipfs
|
2017-12-03 17:47:59 +00:00
|
|
|
sudo chmod +x /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
|
|
|
|
|
|
|
# Hacky local test
|
|
|
|
|
|
|
|
While we set up a proper IPFS mirror, this can be tested by adding a bunch
|
|
|
|
of files:
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
mkdir --parents test-archive/dists/xenial/
|
|
|
|
cd test-archive/dists/xenial
|
|
|
|
wget http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease
|
|
|
|
wget http://archive.ubuntu.com/ubuntu/dists/xenial/Release
|
|
|
|
ipfs add --recursive ~/test-archive
|
|
|
|
|
|
|
|
The last line that this command returns will be something like:
|
|
|
|
|
|
|
|
added {hash} test-archive
|
|
|
|
|
|
|
|
Now, add that hash to /etc/apt/source.list with the following form:
|
|
|
|
|
|
|
|
deb ipfs://{hash} xenial main
|