/usr/lib/freedombox/setup.d/99_provide-source is in freedombox-setup 0.8ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/sh
#
# Make sure generated images complies with licenses requiring the
# source to be available, by providing the source of every package
# used.
if [ 'true' = "$SOURCE" ] ; then
echo "Adding source packages to file system"
else
echo "Not adding source packages to filesystem (SOURCE=false)"
exit 0
fi
targetdir=/usr/src/packages
echo "Adding source packages to filesystem in $targetdir"
apt-get update || true
dpkg --get-selections > /tmp/selections
mkdir -p $targetdir
cd $targetdir
cut -f 1 < /tmp/selections | \
cut -d ':' -f 1 > /tmp/packages
apt-get source -m --download-only `cat /tmp/packages`
rm /tmp/selections /tmp/packages
|