Merge ~alfonsosanchezbeato/network-manager:remove-deps into network-manager:snap-1.10

Proposed by Alfonso Sanchez-Beato
Status: Needs review
Proposed branch: ~alfonsosanchezbeato/network-manager:remove-deps
Merge into: network-manager:snap-1.10
Diff against target: 196 lines (+56/-39)
4 files modified
snap-common/bin/networkmanager (+4/-2)
snap/snapcraft.yaml (+29/-35)
tests/main/can-exec-iptables/task.yaml (+1/-2)
unstage.txt (+22/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Review via email: mp+378045@code.launchpad.net

Commit message

Set rc-manager=symlink for UC18 and later
Otherwise, NM will call resolvconf even though it fails if UC version is
newer than 16. To properly set DNS we need to set both dns and
rc-manager options, but we were doing this only for the former. However,
this did not have adverse effects as, as said, the call to resolvconf
failed, while systemd-resolved was properly updated.

Do not call dhcp-lease-mover anymore
As it was not actually working anymore since we were not staging inotify
anymore since a while.

Specify explicitly copyrights to include
Previously there were copyright files included from non-staged
packages.

Add unstage.txt file
This file contains a list of debian package that we are not actually
staging, although snapcraft adds them to manifest.yaml. CI now
recognizes this file, and manually removes the listed packages from the
manifest when releasing a snap to the store.

Do not stage iptables/xtables
iptables and all needed libraries are now included in the core18 snap,
since revision 1049 (2019-06-27).

Do not stage libs already in core18
The libraries were not really included finally in the snap, but they
were triggering CVE warnings from the review tools that did not actually
apply.

Description of the change

Set rc-manager=symlink for UC18 and later
Otherwise, NM will call resolvconf even though it fails if UC version is
newer than 16. To properly set DNS we need to set both dns and
rc-manager options, but we were doing this only for the former. However,
this did not have adverse effects as, as said, the call to resolvconf
failed, while systemd-resolved was properly updated.

Do not call dhcp-lease-mover anymore
As it was not actually working anymore since we were not staging inotify
anymore since a while.

Specify explicitly copyrights to include
Previously there were copyright files included from non-staged
packages.

Add unstage.txt file
This file contains a list of debian package that we are not actually
staging, although snapcraft adds them to manifest.yaml. CI now
recognizes this file, and manually removes the listed packages from the
manifest when releasing a snap to the store.

Do not stage iptables/xtables
iptables and all needed libraries are now included in the core18 snap,
since revision 1049 (2019-06-27).

Do not stage libs already in core18
The libraries were not really included finally in the snap, but they
were triggering CVE warnings from the review tools that did not actually
apply.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
81895f7... by Alfonso Sanchez-Beato

tests: run iptables from core snap now

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Unmerged commits

81895f7... by Alfonso Sanchez-Beato

tests: run iptables from core snap now

ee83d3a... by Alfonso Sanchez-Beato

Set rc-manager=symlink for UC18 and later

Otherwise, NM will call resolvconf even though it fails if UC version is
newer than 16. To properly set DNS we need to set both dns and
rc-manager options, but we were doing this only for the former. However,
this did not have adverse effects as, as said, the call to resolvconf
failed, while systemd-resolved was properly updated.

e03fb45... by Alfonso Sanchez-Beato

Do not call dhcp-lease-mover anymore

As it was not actually working anymore since we were not staging inotify
anymore since a while.

63c3a2e... by Alfonso Sanchez-Beato

Specify explicitly copyrights to include

Previously there were copyright files included from non-staged
packages.

f2d42ac... by Alfonso Sanchez-Beato

Add unstage.txt file

This file contains a list of debian package that we are not actually
staging, although snapcraft adds them to manifest.yaml. CI now
recognizes this file, and manually removes the listed packages from the
manifest when releasing a snap to the store.

3222766... by Alfonso Sanchez-Beato

Do not stage iptables/xtables

iptables and all needed libraries are now included in the core18 snap,
since revision 1049 (2019-06-27).

9ccd63f... by Alfonso Sanchez-Beato

Do not stage libs already in core18

The libraries were not really included finally in the snap, but they
were triggering CVE warnings from the review tools that did not actually
apply.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap-common/bin/networkmanager b/snap-common/bin/networkmanager
2index bb8131b..7d5315f 100755
3--- a/snap-common/bin/networkmanager
4+++ b/snap-common/bin/networkmanager
5@@ -55,7 +55,8 @@ dns_conf_file="$SNAP_DATA"/conf.d/10-dns.conf
6 if [ "$(get_series_major_version)" = "16" ]; then
7 printf "[main]\ndns=default\nrc-manager=resolvconf\n" > "$dns_conf_file"
8 else
9- printf "[main]\ndns=systemd-resolved\n" > "$dns_conf_file"
10+ printf "[main]\ndns=systemd-resolved\nrc-manager=symlink\n" > \
11+ "$dns_conf_file"
12 fi
13
14 # HACK: Until we've fixed probert to look in $SNAP_DATA/state/dhcp or
15@@ -63,7 +64,8 @@ fi
16 # our lease files and copy all over when something has changed. This
17 # background process gets stopped when our systemd service unit gets
18 # stopped.
19-"$SNAP"/bin/dhcp-lease-mover &
20+# Do not call: dhcp-lease-mover fails as we do not stage inotify anymore
21+#"$SNAP"/bin/dhcp-lease-mover &
22
23 # Identify if we are in debug mode or not
24 LOG_LEVEL=INFO
25diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
26index c5cb97e..51a5c33 100644
27--- a/snap/snapcraft.yaml
28+++ b/snap/snapcraft.yaml
29@@ -53,10 +53,6 @@ apps:
30 plugs: [modem-manager, ppp, network-setup-observe, wpa, firewall-control,
31 hardware-observe, network-setup-control]
32
33-layout:
34- /usr/lib/x86_64-linux-gnu/xtables:
35- bind: $SNAP/usr/lib/x86_64-linux-gnu/xtables
36-
37 parts:
38 networkmanager-common:
39 plugin: dump
40@@ -155,7 +151,7 @@ parts:
41 - --with-dhcpcd=no
42 - --with-dhclient=no
43 - --with-dnsmasq=no
44- - --with-iptables=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/iptables
45+ - --with-iptables=/sbin/iptables
46 - --with-systemd-journal=yes
47 - --libexecdir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/NetworkManager
48 - --with-pppd=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/sbin/pppd
49@@ -206,24 +202,17 @@ parts:
50 # Run all tests NetworkManager ships by default
51 make check
52 stage-packages:
53- - iptables
54 - iputils-arping
55 - libasn1-8-heimdal
56 - libdbus-glib-1-2
57 - libcurl3-gnutls
58 - libgssapi3-heimdal
59- - libgssapi-krb5-2
60 - libhcrypto4-heimdal
61 - libheimbase1-heimdal
62 - libheimntlm0-heimdal
63 - libhx509-5-heimdal
64- - libidn2-0
65 - libjansson4
66- - libkeyutils1
67- - libkrb5-3
68 - libkrb5-26-heimdal
69- - libkrb5support0
70- - libk5crypto3
71 - libldap-2.4-2
72 - libmm-glib0
73 - libnewt0.52
74@@ -231,29 +220,10 @@ parts:
75 - libroken18-heimdal
76 - libndp0
77 - libpsl5
78- - libreadline7
79 - librtmp1
80 - libsasl2-2
81 - libteamdctl0
82- - libunistring2
83- - libblkid1
84- - libgcrypt20
85- - libgpg-error0
86- - liblzma5
87- - libmount1
88- - libnl-3-200
89- - libpcre3
90- - libselinux1
91- - libuuid1
92- - zlib1g
93- - libgmp10
94- - libgnutls30
95- - libhogweed4
96- - liblz4-1
97- - libnettle6
98- - libp11-kit0
99 - libslang2
100- - libtasn1-6
101 - libwind0-heimdal
102 - ppp
103 - resolvconf
104@@ -269,7 +239,6 @@ parts:
105 # here are the results of the network manager build.
106 filesets:
107 binaries:
108- - sbin/*tables*
109 - sbin/resolvconf
110 - usr/bin/arping
111 - usr/bin/nmcli
112@@ -286,7 +255,34 @@ parts:
113 - etc/NetworkManager/*
114 - etc/resolvconf/update.d/libc
115 docs:
116- - usr/share/doc/*/copyright
117+ - usr/share/doc/dnsmasq/copyright
118+ - usr/share/doc/iputils-arping/copyright
119+ - usr/share/doc/libasn1-8-heimdal/copyright
120+ - usr/share/doc/libcurl3-gnutls/copyright
121+ - usr/share/doc/libdbus-glib-1-2/copyright
122+ - usr/share/doc/libgssapi3-heimdal/copyright
123+ - usr/share/doc/libhcrypto4-heimdal/copyright
124+ - usr/share/doc/libheimbase1-heimdal/copyright
125+ - usr/share/doc/libheimntlm0-heimdal/copyright
126+ - usr/share/doc/libhx509-5-heimdal/copyright
127+ - usr/share/doc/libjansson4/copyright
128+ - usr/share/doc/libkrb5-26-heimdal/copyright
129+ - usr/share/doc/libldap-2.4-2/copyright
130+ - usr/share/doc/libmm-glib0/copyright
131+ - usr/share/doc/libndp0/copyright
132+ - usr/share/doc/libnewt0.52/copyright
133+ - usr/share/doc/libnghttp2-14/copyright
134+ - usr/share/doc/libpcap0.8/copyright
135+ - usr/share/doc/libpsl5/copyright
136+ - usr/share/doc/libroken18-heimdal/copyright
137+ - usr/share/doc/librtmp1/copyright
138+ - usr/share/doc/libsasl2-2/copyright
139+ - usr/share/doc/libslang2/copyright
140+ - usr/share/doc/libteamdctl0/copyright
141+ - usr/share/doc/libwind0-heimdal/copyright
142+ - usr/share/doc/network-manager/copyright
143+ - usr/share/doc/ppp/copyright
144+ - usr/share/doc/resolvconf/copyright
145 libs:
146 - lib/resolvconf/list-records
147 - lib/*/libnewt*
148@@ -319,8 +315,6 @@ parts:
149 - usr/lib/*/libsasl2*
150 - usr/lib/*/libteamdctl*
151 - usr/lib/*/libwind*
152- - usr/lib/*/libxtables*
153- - usr/lib/*/xtables/*
154 unwanted:
155 # We don't use dhclient so we don't need this helper
156 - -usr/lib/NetworkManager/nm-dhcp-helper
157diff --git a/tests/main/can-exec-iptables/task.yaml b/tests/main/can-exec-iptables/task.yaml
158index eeffe75..c210bbe 100644
159--- a/tests/main/can-exec-iptables/task.yaml
160+++ b/tests/main/can-exec-iptables/task.yaml
161@@ -6,6 +6,5 @@ execute: |
162 # from the core snap or not.
163 snap run --shell network-manager.networkmanager <<EOF
164 set -ex
165- export LD_LIBRARY_PATH=/snap/network-manager/current/lib:/snap/network-manager/current/usr/lib:/snap/network-manager/current/lib/$(arch)-linux-gnu:/snap/network-manager/current/usr/lib/$(arch)-linux-gnu:/snap/network-manager/current/usr/lib/NetworkManager
166- /snap/network-manager/current/sbin/iptables -L
167+ iptables -L
168 EOF
169diff --git a/unstage.txt b/unstage.txt
170new file mode 100644
171index 0000000..e8997c1
172--- /dev/null
173+++ b/unstage.txt
174@@ -0,0 +1,22 @@
175+init-system-helpers
176+libcom-err2
177+libdbus-1-3
178+libffi6
179+libglib2.0-0
180+libgmp10
181+libgnutls30
182+libgssapi-krb5-2
183+libhogweed4
184+libidn2-0
185+libk5crypto3
186+libkeyutils1
187+libkrb5-3
188+libkrb5support0
189+libldap-common
190+libnettle6
191+libp11-kit0
192+libsasl2-modules-db
193+libsqlite3-0
194+libssl1.1
195+libtasn1-6
196+libunistring2

Subscribers

People subscribed via source and target branches