File: openstack-hook

package info (click to toggle)
openstack-debian-images 1.87
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: sh: 3,179; makefile: 11
file content (28 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (7)
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
27
28
#!/bin/bash

# This script is used when generating the Debian official
# OpenStack image to list all source packages shipped in
# the image, and later on generate a tarball containing
# them all.

TOP="/w"
LOCALCONF="${TOP}/in"
STATE="${TOP}/state"

. ${LOCALCONF}/common.sh

BUILDNAME="openstack-jessie"
WORK="${TOP}/work/${BUILDNAME}"

# Write the script inside the image chroot
cat > $BODI_CHROOT_PATH/list-sources <<EOF
#!/bin/sh
for PKG in \$(COLUMNS=500 dpkg -l | awk '/^ii/ {printf "%s ",\$2}'); do
 apt-get source -qq --print-uris \$PKG
done
EOF

# Execute the script and delete it
chmod +x $BODI_CHROOT_PATH/list-sources
chroot $BODI_CHROOT_PATH /list-sources > $WORK/sources
rm -f $BODI_CHROOT_PATH/list-sources