mirror of https://github.com/Fabio286/antares.git
fix: support to mDNS/zeroconf in snap build, closes #58
This commit is contained in:
parent
370ad6a536
commit
35ef070725
|
@ -14,6 +14,9 @@ confinement: strict
|
||||||
architectures:
|
architectures:
|
||||||
- build-on: amd64
|
- build-on: amd64
|
||||||
compression: lzo
|
compression: lzo
|
||||||
|
layout:
|
||||||
|
/etc/nsswitch.conf:
|
||||||
|
bind-file: $SNAP/etc/nsswitch.conf
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
antares:
|
antares:
|
||||||
|
@ -71,11 +74,28 @@ parts:
|
||||||
cleanup:
|
cleanup:
|
||||||
after: [antares]
|
after: [antares]
|
||||||
plugin: nil
|
plugin: nil
|
||||||
build-snaps: [ gnome-3-28-1804 ]
|
build-snaps: [gnome-3-28-1804]
|
||||||
override-prime: |
|
override-prime: |
|
||||||
set -eux
|
set -eux
|
||||||
cd /snap/gnome-3-28-1804/current
|
cd /snap/gnome-3-28-1804/current
|
||||||
find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/{} \;
|
find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/{} \;
|
||||||
|
|
||||||
|
mdns-lookup:
|
||||||
|
# Make resolution of ".local" host names (Zero-Conf/mDNS/DNS-SD)
|
||||||
|
# working: Take the original nsswitch.conf file from the base
|
||||||
|
# Snap and add "mdns4_minimal [NOTFOUND=return]" to its "hosts:" line
|
||||||
|
# Also install corresponding mdns4_minimal plug-in
|
||||||
|
# See: https://forum.snapcraft.io/t/no-mdns-support-in-snaps-should-core-have-a-modified-nsswitch-conf/
|
||||||
|
plugin: nil
|
||||||
|
stage-packages:
|
||||||
|
- libnss-mdns
|
||||||
|
override-prime: |
|
||||||
|
set -eux
|
||||||
|
sed -Ee 's/^\s*hosts:(\s+)files/hosts:\1files mdns4_minimal \[NOTFOUND=return\]/' /snap/core18/current/etc/nsswitch.conf > $SNAPCRAFT_STAGE/etc/nsswitch.conf
|
||||||
|
snapcraftctl prime
|
||||||
|
prime:
|
||||||
|
- lib/$SNAPCRAFT_ARCH_TRIPLET/libnss_mdns4_minimal*
|
||||||
|
- etc/nsswitch.conf
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
antares:
|
antares:
|
||||||
|
@ -93,4 +113,4 @@ apps:
|
||||||
- opengl
|
- opengl
|
||||||
- pulseaudio
|
- pulseaudio
|
||||||
- removable-media
|
- removable-media
|
||||||
- unity7
|
- unity7
|
||||||
|
|
Loading…
Reference in New Issue