[arch-commits] Commit in networkmanager/trunk (4 files)
Jan Steffens
heftig at archlinux.org
Fri Oct 19 17:25:23 UTC 2018
Date: Friday, October 19, 2018 @ 17:25:22
Author: heftig
Revision: 336897
1.14.2-1: with meson!
Added:
networkmanager/trunk/0001-meson-Fix-platform-tests.patch
Modified:
networkmanager/trunk/PKGBUILD
Deleted:
networkmanager/trunk/20-connectivity.conf
networkmanager/trunk/NetworkManager.conf
-------------------------------------+
0001-meson-Fix-platform-tests.patch | 137 ++++++++++++++++++++++++++++++++++
20-connectivity.conf | 2
NetworkManager.conf | 2
PKGBUILD | 129 +++++++++++---------------------
4 files changed, 183 insertions(+), 87 deletions(-)
Added: 0001-meson-Fix-platform-tests.patch
===================================================================
--- 0001-meson-Fix-platform-tests.patch (rev 0)
+++ 0001-meson-Fix-platform-tests.patch 2018-10-19 17:25:22 UTC (rev 336897)
@@ -0,0 +1,137 @@
+From a407e10a2646771cd649976aae03f2cc6111ff92 Mon Sep 17 00:00:00 2001
+Message-Id: <a407e10a2646771cd649976aae03f2cc6111ff92.1539968035.git.jan.steffens at gmail.com>
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Fri, 19 Oct 2018 18:48:43 +0200
+Subject: [PATCH] meson: Fix platform tests
+
+All platform tests were run twice with the `linux` platform, instead of
+`fake` and `linux`, as expected.
+---
+ src/meson.build | 13 ++++++++++---
+ src/ndisc/tests/meson.build | 6 ++----
+ src/platform/tests/meson.build | 26 ++++++++++++--------------
+ 3 files changed, 24 insertions(+), 21 deletions(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index f293f299b..d58fb4d1f 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -216,23 +216,30 @@ if enable_tests
+ test_cflags += ['-DREQUIRE_ROOT_TESTS=1']
+ endif
+
+- platform = (host_machine.system().contains('linux') ? 'linux' : 'fake')
+- test_cflags_platform = '-DSETUP=nm_' + platform + '_platform_setup'
+-
+ libnetwork_manager_test = static_library(
+ nm_name + 'Test',
+ sources: sources,
+ dependencies: deps,
+ c_args: cflags + test_cflags,
+ link_with: libnetwork_manager
+ )
+
+ test_nm_dep = declare_dependency(
+ dependencies: nm_dep,
+ compile_args: test_cflags,
+ link_with: libnetwork_manager_test
+ )
+
++ test_nm_dep_fake = declare_dependency(
++ dependencies: test_nm_dep,
++ compile_args: ['-DSETUP=nm_fake_platform_setup']
++ )
++
++ test_nm_dep_linux = declare_dependency(
++ dependencies: test_nm_dep,
++ compile_args: ['-DSETUP=nm_linux_platform_setup']
++ )
++
+ subdir('dnsmasq/tests')
+ subdir('ndisc/tests')
+ subdir('platform/tests')
+diff --git a/src/ndisc/tests/meson.build b/src/ndisc/tests/meson.build
+index 2f479c2d9..e0dc9aa6c 100644
+--- a/src/ndisc/tests/meson.build
++++ b/src/ndisc/tests/meson.build
+@@ -3,21 +3,19 @@ test_unit = 'test-ndisc-fake'
+ exe = executable(
+ test_unit,
+ test_unit + '.c',
+- dependencies: test_nm_dep,
+- c_args: test_cflags_platform
++ dependencies: test_nm_dep_fake,
+ )
+
+ test(
+ 'ndisc/' + test_unit,
+ test_script,
+ args: test_args + [exe.full_path()]
+ )
+
+ test = 'test-ndisc-linux'
+
+ exe = executable(
+ test,
+ test + '.c',
+- dependencies: test_nm_dep,
+- c_args: test_cflags_platform
++ dependencies: test_nm_dep_linux,
+ )
+diff --git a/src/platform/tests/meson.build b/src/platform/tests/meson.build
+index 0571efacf..67582d776 100644
+--- a/src/platform/tests/meson.build
++++ b/src/platform/tests/meson.build
+@@ -1,37 +1,35 @@
+ test_units = [
+- ['test-link-fake', 'test-link.c', 60],
+- ['test-link-linux', 'test-link.c', 60],
+- ['test-address-fake', 'test-address.c'],
+- ['test-address-linux', 'test-address.c'],
+- ['test-general', 'test-general.c'],
+- ['test-nmp-object', 'test-nmp-object.c'],
+- ['test-route-fake', 'test-route.c'],
+- ['test-route-linux', 'test-route.c'],
+- ['test-cleanup-fake', 'test-cleanup.c'],
+- ['test-cleanup-linux', 'test-cleanup.c'],
++ ['test-link-fake', 'test-link.c', test_nm_dep_fake, 30],
++ ['test-link-linux', 'test-link.c', test_nm_dep_linux, 90],
++ ['test-address-fake', 'test-address.c', test_nm_dep_fake, 30],
++ ['test-address-linux', 'test-address.c', test_nm_dep_linux, 30],
++ ['test-general', 'test-general.c', test_nm_dep, 30],
++ ['test-nmp-object', 'test-nmp-object.c', test_nm_dep, 30],
++ ['test-route-fake', 'test-route.c', test_nm_dep_fake, 30],
++ ['test-route-linux', 'test-route.c', test_nm_dep_linux, 30],
++ ['test-cleanup-fake', 'test-cleanup.c', test_nm_dep_fake, 30],
++ ['test-cleanup-linux', 'test-cleanup.c', test_nm_dep_linux, 30],
+ ]
+
+ foreach test_unit: test_units
+ exe = executable(
+ 'platform-' + test_unit[0],
+ test_unit[1],
+- dependencies: test_nm_dep,
+- c_args: test_cflags_platform
++ dependencies: test_unit[2],
+ )
+
+ test(
+ 'platform/' + test_unit[0],
+ test_script,
+- timeout: test_unit.length() > 2 ? test_unit[2] : 30,
++ timeout: test_unit[3],
+ args: test_args + [exe.full_path()]
+ )
+ endforeach
+
+ test = 'monitor'
+
+ executable(
+ test,
+ test + '.c',
+ dependencies: test_nm_dep,
+- c_args: test_cflags_platform
+ )
+--
+2.19.1
+
Deleted: 20-connectivity.conf
===================================================================
--- 20-connectivity.conf 2018-10-19 15:21:33 UTC (rev 336896)
+++ 20-connectivity.conf 2018-10-19 17:25:22 UTC (rev 336897)
@@ -1,2 +0,0 @@
-[connectivity]
-uri=http://www.archlinux.org/check_network_status.txt
Deleted: NetworkManager.conf
===================================================================
--- NetworkManager.conf 2018-10-19 15:21:33 UTC (rev 336896)
+++ NetworkManager.conf 2018-10-19 17:25:22 UTC (rev 336897)
@@ -1,2 +0,0 @@
-# Configuration file for NetworkManager.
-# See "man 5 NetworkManager.conf" for details.
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-10-19 15:21:33 UTC (rev 336896)
+++ PKGBUILD 2018-10-19 17:25:22 UTC (rev 336897)
@@ -7,7 +7,7 @@
pkgbase=networkmanager
pkgname=(networkmanager libnm libnm-glib)
-pkgver=1.14.1dev+13+g0d3234478
+pkgver=1.14.2
pkgrel=1
pkgdesc="Network connection manager and user applications"
url="https://wiki.gnome.org/Projects/NetworkManager"
@@ -17,11 +17,13 @@
makedepends=(intltool dhclient iptables gobject-introspection gtk-doc "ppp=$_pppver" modemmanager
dbus-glib iproute2 nss polkit wpa_supplicant curl systemd libmm-glib
libnewt libndp libteam vala perl-yaml python-gobject git vala jansson bluez-libs
- glib2-docs dhcpcd iwd dnsmasq systemd-resolvconf libpsl audit)
+ glib2-docs dhcpcd iwd dnsmasq systemd-resolvconf libpsl audit meson)
checkdepends=(libx11 python-dbus)
-_commit=0d323447812ce1f07e1af4e6f38d6c0a135a85da # nm-1-14
-source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit")
-sha256sums=('SKIP')
+_commit=ef5ada1d1d53b04a468dc44838afb459f85e95e7 # tags/1.14.2^0
+source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit"
+ 0001-meson-Fix-platform-tests.patch)
+sha256sums=('SKIP'
+ 'e993a727bb06494419071baea3c20fcc00aa2f9cf110d14f09f043be23952a1b')
pkgver() {
cd NetworkManager
@@ -29,84 +31,45 @@
}
prepare() {
- mkdir build
cd NetworkManager
- NOCONFIGURE=1 ./autogen.sh
+
+ # Meson fixes
+ git cherry-pick -n 1ff00d51e750610ec5a1a1736ccb5b75c8457f20
+ patch -Np1 -i ../0001-meson-Fix-platform-tests.patch
}
build() {
- cd build
- ../NetworkManager/configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- runstatedir=/run \
- --sbindir=/usr/bin \
- --libexecdir=/usr/lib \
- --disable-ifcfg-rh \
- --disable-ifupdown \
- --disable-lto \
- --disable-more-logging \
- --disable-more-warnings \
- --disable-qt \
- --disable-static \
- --enable-bluez5-dun \
- --enable-concheck \
- --enable-config-plugin-ibft \
- --enable-gtk-doc \
- --enable-introspection \
- --enable-json-validation \
- --enable-ld-gc \
- --enable-modify-system \
- --enable-polkit \
- --enable-polkit-agent \
- --enable-teamdctl \
- --enable-wifi \
- --with-config-dhcp-default=internal \
- --with-config-dns-rc-manager-default=symlink \
- --with-config-logging-backend-default=journal \
- --with-config-plugins-default=keyfile,ibft \
- --with-crypto=nss \
- --with-dbus-sys-dir=/usr/share/dbus-1/system.d \
- --with-dhclient=/usr/bin/dhclient \
- --with-dhcpcd-supports-ipv6 \
- --with-dhcpcd=/usr/bin/dhcpcd \
- --with-dist-version="$pkgver-$pkgrel" \
- --with-dnsmasq=/usr/bin/dnsmasq \
- --with-dnssec-trigger=/usr/lib/dnssec-trigger/dnssec-trigger-script \
- --with-hostname-persist=default \
- --with-iptables=/usr/bin/iptables \
- --with-iwd \
- --with-kernel-firmware-dir=/usr/lib/firmware \
- --with-libaudit=yes \
- --with-libnm-glib \
- --with-libpsl \
- --with-modem-manager-1 \
- --with-nmcli \
- --with-nmtui \
- --with-pppd-plugin-dir=/usr/lib/pppd/$_pppver \
- --with-pppd=/usr/bin/pppd \
- --with-resolvconf=/usr/bin/resolvconf \
- --with-session-tracking=systemd \
- --with-suspend-resume=systemd \
- --with-system-ca-path=/etc/ssl/certs \
- --with-systemd-journal \
- --with-systemd-logind \
- --with-systemdsystemunitdir=/usr/lib/systemd/system \
- --with-udev-dir=/usr/lib/udev \
- --with-wext \
- --without-consolekit \
- --without-dhcpcanon \
- --without-more-asserts \
- --without-netconfig \
- --without-ofono \
- --without-selinux
- sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
- make
+ local meson_args=(
+ # LTO breaks NM_BACKPORT_SYMBOL
+ # https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/63
+ -D b_lto=false
+
+ -D dbus_conf_dir=/usr/share/dbus-1/system.d
+ -D dist_version="$pkgver-$pkgrel"
+ -D session_tracking_consolekit=false
+ -D suspend_resume=systemd
+ -D modify_system=true
+ -D polkit_agent=true
+ -D selinux=false
+ -D iwd=true
+ -D pppd_plugin_dir=/usr/lib/pppd/$_pppver
+ -D teamdctl=true
+ -D libnm_glib=true
+ -D bluez5_dun=true
+ -D config_plugins_default=keyfile,ibft
+ -D ibft=true
+ -D docs=true
+ -D more_asserts=no
+ -D more_logging=false
+ -D qt=false
+ )
+
+ arch-meson NetworkManager build "${meson_args[@]}"
+ ninja -C build
}
check() {
- make check -C build
+ meson test -C build
}
_pick() {
@@ -130,14 +93,8 @@
backup=(etc/NetworkManager/NetworkManager.conf)
groups=(gnome)
- DESTDIR="$pkgdir" make install -C build
+ DESTDIR="$pkgdir" meson install -C build
- # packaged configuration
- install -Dm644 /dev/stdin "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf" <<END
-[connectivity]
-uri=http://www.archlinux.org/check_network_status.txt
-END
-
# /etc/NetworkManager
install -d "$pkgdir"/etc/NetworkManager/{conf,dnsmasq}.d
install -dm700 "$pkgdir/etc/NetworkManager/system-connections"
@@ -146,6 +103,12 @@
# See "man 5 NetworkManager.conf" for details.
END
+ # packaged configuration
+ install -Dm644 /dev/stdin "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf" <<END
+[connectivity]
+uri=http://www.archlinux.org/check_network_status.txt
+END
+
### Split libnm
_pick libnm "$pkgdir"/usr/include/libnm
_pick libnm "$pkgdir"/usr/lib/girepository-1.0/NM-*
More information about the arch-commits
mailing list