Commit 24642e74 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible OpenWrt: show the build environment

parent b6e16d39
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
#!/bin/bash

# Copyright 2014-2021 Holger Levsen <holger@layer-acht.org>
# Copyright 2014-2022 Holger Levsen <holger@layer-acht.org>
#         © 2015 Reiner Herrmann <reiner@reiner-h.de>
#           2016-2021 Alexander Couzens <lynxis@fe80.eu>
# released under the GPLv2
@@ -23,6 +23,7 @@ OPENWRT_GIT_REPO=https://git.openwrt.org/openwrt/openwrt.git
OPENWRT_GIT_BRANCH=master
OPENWRT_CONFIG=
OPENWRT_TARGET=
OPENWRT_HOST_PACKAGES="gcc binutils bzip2 flex python3 perl make findutils grep diffutils unzip gawk util-linux zlib1g-dev libc6-dev git subversion"

# node configuration
GENERIC_NODE1=osuosl171-amd64.debian.net
@@ -119,7 +120,7 @@ node_document_environment() {
	done
	echo "</table>" >> "$toolchain_html"
	echo "<table><tr><th>Debian $(cat /etc/debian_version) $(dpkg --print-architecture) package name</th><th>installed version</th></tr>" >> "$toolchain_html"
	for i in gcc binutils bzip2 flex python3 perl make findutils grep diffutils unzip gawk util-linux zlib1g-dev libc6-dev git subversion ; do
	for i in OPENWRT_HOST_PACKAGES ; do
		echo " <tr><td>$i</td><td>" >> "$toolchain_html"
		dpkg -s $i|grep '^Version'|cut -d " " -f2 >> "$toolchain_html"
		echo " </td></tr>" >> "$toolchain_html"
@@ -242,6 +243,21 @@ openwrt_config() {
}

openwrt_build_toolchain() {
	echo "============================================================================="
	echo "$(date -u) - Showing the build environment."
	echo "============================================================================="

	for i in 'cat /etc/debian_version' 'dpkg --print-architecture' ; do
		echo "$ $i"
		$i
	done
	echo

	for i in $OPENWRT_HOST_PACKAGES ; do
		printf "%15s | %s\n" $i $(dpkg -s $i|grep '^Version'|cut -d " " -f2)
	done
	echo

	echo "============================================================================="
	echo "$(date -u) - Building the toolchain."
	echo "============================================================================="