summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rwxr-xr-xsupport/dependencies/check-host-tar.sh33
-rw-r--r--support/dependencies/dependencies.mk5
-rwxr-xr-xsupport/dependencies/dependencies.sh15
-rw-r--r--support/docker/Dockerfile2
-rw-r--r--support/misc/Vagrantfile2
-rwxr-xr-xsupport/scripts/check-bin-arch8
-rwxr-xr-xsupport/scripts/check-uniq-files2
-rw-r--r--support/testing/tests/init/test_systemd.py12
-rw-r--r--support/testing/tests/package/test_rust.py18
9 files changed, 77 insertions, 20 deletions
diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
index 932d3c4fb2..2143877524 100755
--- a/support/dependencies/check-host-tar.sh
+++ b/support/dependencies/check-host-tar.sh
@@ -30,13 +30,28 @@ fi
# containing hard-links if the --strip-components option is used).
major_min=1
minor_min=17
-if [ $major -gt $major_min ]; then
- echo $tar
-else
- if [ $major -eq $major_min -a $minor -ge $minor_min ]; then
- echo $tar
- else
- # echo nothing: no suitable tar found
- exit 1
- fi
+
+# Maximal version = 1.29 (1.30 changed --numeric-owner output for
+# filenames > 100 characters). This is really a fix for a bug in
+# earlier tar versions regarding deterministic output so it is
+# unlikely to be reverted in later versions.
+major_max=1
+minor_max=29
+
+if [ $major -lt $major_min -o $major -gt $major_max ]; then
+ # echo nothing: no suitable tar found
+ exit 1
fi
+
+if [ $major -eq $major_min -a $minor -lt $minor_min ]; then
+ # echo nothing: no suitable tar found
+ exit 1
+fi
+
+if [ $major -eq $major_max -a $minor -gt $minor_max ]; then
+ # echo nothing: no suitable tar found
+ exit 1
+fi
+
+# valid
+echo $tar
diff --git a/support/dependencies/dependencies.mk b/support/dependencies/dependencies.mk
index 4f606f849d..3fc235863c 100644
--- a/support/dependencies/dependencies.mk
+++ b/support/dependencies/dependencies.mk
@@ -12,7 +12,10 @@
define suitable-host-package
$(shell support/dependencies/check-host-$(1).sh $(2))
endef
--include $(sort $(wildcard support/dependencies/check-host-*.mk))
+# host utilities needs host-tar to extract the source code tarballs, so
+# ensure check-host-tar.mk is included before the rest
+include support/dependencies/check-host-tar.mk
+-include $(sort $(filter-out %-tar.mk,$(wildcard support/dependencies/check-host-*.mk)))
ifeq ($(BR2_CCACHE),y)
DEPENDENCIES_HOST_PREREQ += host-ccache
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index a195c62c8c..985b1d863b 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -200,7 +200,7 @@ if grep ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then
echo "You need locale support on your build machine to build a toolchain supporting locales"
exit 1 ;
fi
- if ! locale -a | grep -q -i utf8$ ; then
+ if ! locale -a | grep -q -i -E 'utf-?8$' ; then
echo
echo "You need at least one UTF8 locale to build a toolchain supporting locales"
exit 1 ;
@@ -249,6 +249,14 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
echo "For other distributions, refer to their documentation."
exit 1
fi
+
+ if ! echo "int main(void) {}" | g++ -m32 -x c++ - -o /dev/null 2>/dev/null; then
+ echo
+ echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries."
+ echo "If you're running a Debian/Ubuntu distribution, install the g++-multilib package."
+ echo "For other distributions, refer to their documentation."
+ exit 1
+ fi
fi
# Check that the Perl installation is complete enough for Buildroot.
@@ -280,3 +288,8 @@ if [ -n "$missing_perl_modules" ] ; then
echo
exit 1
fi
+
+if ! python -c "import argparse" > /dev/null 2>&1 ; then
+ echo "Your Python installation is not complete enough: argparse module is missing"
+ exit 1
+fi
diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
index 474e073c61..ce3fdd9cc2 100644
--- a/support/docker/Dockerfile
+++ b/support/docker/Dockerfile
@@ -22,7 +22,7 @@ COPY apt-sources.list /etc/apt/sources.list
RUN dpkg --add-architecture i386 && \
apt-get update -y && \
apt-get install -y --no-install-recommends \
- build-essential cmake libc6:i386 gcc-multilib \
+ build-essential cmake libc6:i386 g++-multilib \
bc ca-certificates file locales rsync \
cvs bzr git mercurial subversion wget \
cpio unzip \
diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile
index 3d833f09fc..54b45da69e 100644
--- a/support/misc/Vagrantfile
+++ b/support/misc/Vagrantfile
@@ -5,7 +5,7 @@
################################################################################
# Buildroot version to use
-RELEASE='2017.11'
+RELEASE='2018.02'
### Change here for more memory/cores ###
VM_MEMORY=2048
diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch
index 887b6613cd..f6a4569c62 100755
--- a/support/scripts/check-bin-arch
+++ b/support/scripts/check-bin-arch
@@ -29,6 +29,14 @@ while read f; do
continue
fi
+ # Skip kernel modules
+ # When building a 32-bit userland on 64-bit architectures, the kernel
+ # and its modules may still be 64-bit. To keep the basic
+ # check-bin-arch logic simple, just skip this directory.
+ if [[ "${f}" =~ ^/lib/modules/.* ]]; then
+ continue
+ fi
+
# Skip files in /usr/share, several packages (qemu,
# pru-software-support) legitimately install ELF binaries that
# are not for the target architecture
diff --git a/support/scripts/check-uniq-files b/support/scripts/check-uniq-files
index a3d176710e..be808cce03 100755
--- a/support/scripts/check-uniq-files
+++ b/support/scripts/check-uniq-files
@@ -5,7 +5,7 @@ import csv
import argparse
from collections import defaultdict
-warn = 'Warning: {} file "{}" is touched by more than one package: {}\n'
+warn = 'Warning: {0} file "{1}" is touched by more than one package: {2}\n'
def main():
diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py
index 48fac1490f..a324ba8569 100644
--- a/support/testing/tests/init/test_systemd.py
+++ b/support/testing/tests/init/test_systemd.py
@@ -21,6 +21,18 @@ class InitSystemSystemdBase(InitSystemBase):
def check_init(self):
super(InitSystemSystemdBase, self).check_init("/lib/systemd/systemd")
+ # Test all units are OK
+ output, _ = self.emulator.run("systemctl --no-pager --failed --no-legend")
+ self.assertEqual(len(output), 0)
+
+ # Test we can reach the DBus daemon
+ _, exit_code = self.emulator.run("busctl --no-pager")
+ self.assertEqual(exit_code, 0)
+
+ # Test we can read at least one line from the journal
+ output, _ = self.emulator.run("journalctl --no-pager --lines 1 --quiet")
+ self.assertEqual(len(output), 1)
+
class TestInitSystemSystemdRoNetworkd(InitSystemSystemdBase):
config = InitSystemSystemdBase.config + \
diff --git a/support/testing/tests/package/test_rust.py b/support/testing/tests/package/test_rust.py
index 8035f8b83a..e6c0de2214 100644
--- a/support/testing/tests/package/test_rust.py
+++ b/support/testing/tests/package/test_rust.py
@@ -53,12 +53,6 @@ class TestRustBase(infra.basetest.BRTest):
self.b.build()
shutil.rmtree(workdir)
- def test_run(self):
- self.build_test_prog()
- self.login()
- _, exit_code = self.emulator.run(self.crate)
- self.assertEqual(exit_code, 0)
-
class TestRustBin(TestRustBase):
config = \
@@ -82,6 +76,12 @@ class TestRustBin(TestRustBase):
BR2_PACKAGE_HOST_RUSTC=y
"""
+ def test_run(self):
+ self.build_test_prog()
+ self.login()
+ _, exit_code = self.emulator.run(self.crate)
+ self.assertEqual(exit_code, 0)
+
class TestRust(TestRustBase):
config = \
@@ -105,3 +105,9 @@ class TestRust(TestRustBase):
BR2_PACKAGE_HOST_RUSTC=y
BR2_PACKAGE_HOST_RUST=y
"""
+
+ def test_run(self):
+ self.build_test_prog()
+ self.login()
+ _, exit_code = self.emulator.run(self.crate)
+ self.assertEqual(exit_code, 0)
OpenPOWER on IntegriCloud