I want to sell embedded devices powered by Raspberry Pis and Raspbian (without the non-free software). I want to distribute the sources of the os distribution with the devices (mainly to satisfy GPL requirements).

How can I download all the source packages of all the installed packages? My approach is, to insert the following lines to /etc/apt/sources.list:

deb-src http://archive.raspbian.org/raspbian wheezy main firmware
deb-src http://archive.raspberrypi.org/debian wheezy main

And then get a list of installed packages plus version information with dpkg-query and pass it to apt-get source:

apt-get update
apt-get source $(dpkg-query --show --showformat="\${Package}=\${Version} ")

The problem is, that packages, not being the current version in the repository, will not be found in the raspbian / raspberrypi repos. Ok, as I understand, most of them are none modified debian packages but compiled for ARMv6 hard float. So I could get them from the original debian repos. But I think there are also modified packages. And the GPL requires me to distribute the sources to build exactly the binaries, I am distributing.

I have already assembled and tested a system for a SD-Card image and don't want to upgrade it (never change a running system).

So my question is: How do I get source packages of packages older then the current one in the binary repos?


http://sourcearchive.raspbian.org/ seems to have source packages for every version of every package of Raspbian.

If your system is up to certain single date, i. e. it has not been updated partially, http://snapshot.raspbian.org/ (it contains both binaries and sources) might be more convenient for your purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.