mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
provisioning: fix mdns to support both docker and network tests
Network tests require the system resolver to resolve IP addresses back to host names, but "mdns4" seems to be unable to do that, and instead prevents "dns" from doing its job. So we place it after "dns". Done-with: Dimitrios Apostolou <jimis@qt.io> Done-with: Thiago Macieira <thiago.macieira@intel.com> Fixes: QTBUG-106013 Change-Id: If0379cf5f42b41964cf156cdf8691dbcfcc0275b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
This commit is contained in:
@@ -146,6 +146,11 @@ sudo sh -c "grep ^qt /etc/group >> $yoctoLocationARMv7/sysroots/$sysrootARMv7/et
|
||||
sudo sh -c "grep ^qt /etc/passwd >> $yoctoLocationARM64/sysroots/$sysrootARM64/etc/passwd"
|
||||
sudo sh -c "grep ^qt /etc/group >> $yoctoLocationARM64/sysroots/$sysrootARM64/etc/group"
|
||||
|
||||
# Fix mdns to support both docker and network tests
|
||||
# See also https://bugreports.qt.io/browse/QTBUG-106013
|
||||
sudo sh -c "sed -i '/^hosts:/s/.*/hosts: files myhostname mdns_minimal [NOTFOUND=return] dns mdns4/' $yoctoLocationARMv7/sysroots/$sysrootARMv7/etc/nsswitch.conf"
|
||||
sudo sh -c "sed -i '/^hosts:/s/.*/hosts: files myhostname mdns_minimal [NOTFOUND=return] dns mdns4/' $yoctoLocationARM64/sysroots/$sysrootARM64/etc/nsswitch.conf"
|
||||
|
||||
# Install qemu binfmt for 32bit and 64bit arm architectures
|
||||
sudo update-binfmts --package qemu-arm --install arm $yoctoLocationARMv7/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-arm \
|
||||
--magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \
|
||||
|
||||
@@ -10,4 +10,4 @@ cat <<EOT | sudo tee /etc/mdns.allow
|
||||
.local
|
||||
EOT
|
||||
|
||||
sudo sed -i '/^hosts:/s/mdns4_minimal/mdns4/' /etc/nsswitch.conf
|
||||
sudo sed -i '/^hosts:/s/.*/hosts: files mdns_minimal [NOTFOUND=return] dns mdns4/' /etc/nsswitch.conf
|
||||
|
||||
@@ -146,6 +146,11 @@ sudo sh -c "grep ^qt /etc/group >> $yoctoLocationARMv7/sysroots/$sysrootARMv7/et
|
||||
sudo sh -c "grep ^qt /etc/passwd >> $yoctoLocationARM64/sysroots/$sysrootARM64/etc/passwd"
|
||||
sudo sh -c "grep ^qt /etc/group >> $yoctoLocationARM64/sysroots/$sysrootARM64/etc/group"
|
||||
|
||||
# Fix mdns to support both docker and network tests
|
||||
# See also https://bugreports.qt.io/browse/QTBUG-106013
|
||||
sudo sh -c "sed -i '/^hosts:/s/.*/hosts: files myhostname mdns_minimal [NOTFOUND=return] dns mdns4/' $yoctoLocationARMv7/sysroots/$sysrootARMv7/etc/nsswitch.conf"
|
||||
sudo sh -c "sed -i '/^hosts:/s/.*/hosts: files myhostname mdns_minimal [NOTFOUND=return] dns mdns4/' $yoctoLocationARM64/sysroots/$sysrootARM64/etc/nsswitch.conf"
|
||||
|
||||
# Install qemu binfmt for 32bit and 64bit arm architectures
|
||||
sudo update-binfmts --package qemu-arm --install arm $yoctoLocationARMv7/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-arm \
|
||||
--magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \
|
||||
|
||||
@@ -48,4 +48,4 @@ cat <<EOT | sudo tee /etc/mdns.allow
|
||||
.local
|
||||
EOT
|
||||
|
||||
sudo sed -i '/^hosts:/s/mdns4_minimal/mdns4/' /etc/nsswitch.conf
|
||||
sudo sed -i '/^hosts:/s/.*/hosts: files mdns_minimal [NOTFOUND=return] dns mdns4/' /etc/nsswitch.conf
|
||||
|
||||
Reference in New Issue
Block a user