303

The http://stappers.it/do303/ service is a lookup table. Give it a package name and it returns a download URL. With wget as query tool you have also have a fetch tool.

It is like apt-get download without edits on /etc/apt/sources.list And the apt-get update part is done at server side.

Demo

See it in action to get the idea.

Non-free firmware

You have a new computer. With all libre software. But some firmware is in non-free.

$ wget http://stappers.it/do303/firmware-iwlwifi.deb
--2016-07-17 09:24:49--  http://stappers.it/do303/firmware-iwlwifi.deb
Resolving stappers.it (stappers.it)... 77.72.145.78
Connecting to stappers.it (stappers.it)|77.72.145.78|:80... connected.
HTTP request sent, awaiting response... 303 See other
Location: http://stappers.it/do303/debian/unstable/non-free/all/firmware-iwlwifi.deb [following]
--2016-07-17 09:24:49--  http://stappers.it/do303/debian/unstable/non-free/all/firmware-iwlwifi.deb
Connecting to stappers.it (stappers.it)|77.72.145.78|:80... connected.
HTTP request sent, awaiting response... 303 See Other
Location: http://ftp.nl.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20160110-1_all.deb [following]
--2016-07-17 09:24:49--  http://ftp.nl.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20160110-1_all.deb
Resolving ftp.nl.debian.org (ftp.nl.debian.org)... 2001:67c:2564:a120::21, 130.89.149.21
Connecting to ftp.nl.debian.org (ftp.nl.debian.org)|2001:67c:2564:a120::21|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3799032 (3.6M) [application/x-debian-package]
Saving to: ‘firmware-iwlwifi.deb’

100%[============================================================>] 3,799,032   1.25MB/s   in 2.9s   

2016-07-17 09:24:52 (1.25 MB/s) - ‘firmware-iwlwifi.deb’ saved [3799032/3799032]

$ sudo dpkg --install firmware-iwlwifi.deb
Selecting previously unselected package firmware-iwlwifi.
(Reading database ... 230700 files and directories currently installed.)
Preparing to unpack firmware-iwlwifi.deb ...
Unpacking firmware-iwlwifi (20160110-1) ...
Setting up firmware-iwlwifi (20160110-1) ...
$ rm firmware-iwlwifi.deb

So no changes on /etc/apt/sources.list, no risc of more non-free packages slipping in.

Newer in unstable

Example given with ansible

$ wget http://stappers.it/do303/ansible.deb
--2016-07-12 20:20:48--  http://stappers.it/do303/ansible.deb
Resolving stappers.it (stappers.it)... 77.72.145.78
Connecting to stappers.it (stappers.it)|77.72.145.78|:80... connected.
HTTP request sent, awaiting response... 303 See other
Location: http://stappers.it/do303/debian/unstable/main/all/ansible.deb [following]
--2016-07-12 20:20:49--  http://stappers.it/do303/debian/unstable/main/all/ansible.deb
Reusing existing connection to stappers.it:80.
HTTP request sent, awaiting response... No data received.
Retrying.

--2016-07-12 20:20:50--  (try: 2)  http://stappers.it/do303/debian/unstable/main/all/ansible.deb
Connecting to stappers.it (stappers.it)|77.72.145.78|:80... connected.
HTTP request sent, awaiting response... 303 See Other
Location: http://ftp.nl.debian.org/debian/pool/main/a/ansible/ansible_2.1.0.0-1_all.deb [following]
--2016-07-12 20:20:50--  http://ftp.nl.debian.org/debian/pool/main/a/ansible/ansible_2.1.0.0-1_all.deb
Resolving ftp.nl.debian.org (ftp.nl.debian.org)... 130.89.149.21, 2001:67c:2564:a120::21
Connecting to ftp.nl.debian.org (ftp.nl.debian.org)|130.89.149.21|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1284428 (1.2M) [application/x-debian-package]
Saving to: ‘ansible.deb’

100%[==============================================>] 1,284,428    969KB/s   in 1.3s

2016-07-12 20:20:51 (969 KB/s) - ‘ansible.deb’ saved [1284428/1284428]

$ sudo dpkg --install ansible.deb
(Reading database ... 229798 files and directories currently installed.)
Preparing to unpack ansible.deb ...
Unpacking ansible (2.1.0.0-1) over (1.7.2+dfsg-2) ...
Setting up ansible (2.1.0.0-1) ...
Installing new version of config file /etc/ansible/ansible.cfg ...
Processing triggers for man-db (2.6.7.1-1) ...
$ rm ansible.deb

More examples

By typing more, you get more.

Previous examples were using short format, packagename.type.

Long format is distro/suite/component/architecture/packagename.type.

Backport

letsencrypt:

wget http://stappers.it/do303/debian/jessie-backports/main/arm64/letsencrypt.deb

Other Distros

Yes, see Distro and repository website. Example given:

wget http://stappers.it/do303/zorin-os/wily/main/amd64/base-files.deb

Script what should be downloaded

To see what will be downloaded, replace .deb with .scr. As in:

wget http://stappers.it/do303/ansible.scr

Now you have a script ansible.scr with download URL and content like

# shell commands
wget -O ansible_2.1.0.0-1_all.deb --progress=dot:mega \
  http://ftp.nl.debian.org/debian/pool/main/a/ansible/ansible_2.1.0.0-1_all.deb
echo "1ee339605187310c0aab47656c956990e38ab716d8b248a4397c52732b804158  sha256 sum should match"
sha256sum ansible_2.1.0.0-1_all.deb
echo sudo dpkg -i ansible_2.1.0.0-1_all.deb

Next step could be bash ansible.scr. Output to expect.

--2016-07-17 16:09:31--  http://ftp.nl.debian.org/debian/pool/main/a/ansible/ansible_2.1.0.0-1_all.deb
Resolving ftp.nl.debian.org (ftp.nl.debian.org)... 2001:67c:2564:a120::21, 130.89.149.21
Connecting to ftp.nl.debian.org (ftp.nl.debian.org)|2001:67c:2564:a120::21|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1284428 (1.2M) [application/x-debian-package]
Saving to: ‘ansible_2.1.0.0-1_all.deb’

     0K ........ ........ ...                                100%  782K=1.6s

2016-07-17 16:09:32 (782 KB/s) - ‘ansible_2.1.0.0-1_all.deb’ saved [1284428/1284428]

1ee339605187310c0aab47656c956990e38ab716d8b248a4397c52732b804158  sha256 sum should match
1ee339605187310c0aab47656c956990e38ab716d8b248a4397c52732b804158  ansible_2.1.0.0-1_all.deb
sudo dpkg -i ansible_2.1.0.0-1_all.deb

It is up to you to do sudo dpkg --install PACKAGE or not.

See other