3

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?

2 Answers 2

3

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.

1
  • 1
    2022-05-29: I don't find the 'snapshot' archives - perhaps it has been decommissioned? Perhaps replaced by: https://archive.raspbian.org/ ?
    – Seamus
    May 29 at 19:11
1

This is not an answer to the OP's question, per se. I'm posting this primarily as an update to the currently accepted answer, as it appears that the Raspberry Pi Organization has changed some things since that answer was posted.

As of today, it seems there are four (4) archives for Raspberry Pi binaries and source packages:

I. http://sourcearchive.raspbian.org/
II. https://archive.raspbian.org/
III. https://archive.raspberrypi.org/
IV. http://raspbian.raspberrypi.org/

I've been unable to find any explanation or summary for the contents of these archives in the "official documentation".

Note however, item IV. appears in /etc/apt/sources.list:

$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

While item III appears in /etc/apt/sources.list.d/raspi.list:

$ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ bullseye main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspberrypi.org/debian/ bullseye main

Which leaves us with questions:

  1. What is the purpose of archives I & II?
  • ??
  1. What is the function of /etc/apt/sources.list.d/raspi.list?

The Raspberry Pi documentation is silent on both of these questions. I'll update this answer if I learn more, and knowledgeable readers please feel free to edit this answer if you have something to offer.

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.