Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kdump for openSUSE:Factory checked in at 2021-03-10 08:49:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdump (Old) and /work/SRC/openSUSE:Factory/.kdump.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdump" Wed Mar 10 08:49:44 2021 rev:114 rq:877002 version:0.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kdump/kdump.changes 2020-10-03 18:55:51.669506123 +0200 +++ /work/SRC/openSUSE:Factory/.kdump.new.2378/kdump.changes 2021-03-10 08:49:52.734432152 +0100 @@ -1,0 +2,9 @@ +Fri Mar 5 11:02:51 UTC 2021 - Petr Tesa????k <ptesa...@suse.com> + +- kdump-query-systemd-network.service.patch: Query systemd + network.service to find out if wicked is used (bsc#1182309). +- kdump-check-explicit-ip-options.patch: Do not add + network-related dracut options if ip= is set explicitly + (bsc#1182309). + +------------------------------------------------------------------- New: ---- kdump-check-explicit-ip-options.patch kdump-query-systemd-network.service.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdump.spec ++++++ --- /var/tmp/diff_new_pack.aBb0I3/_old 2021-03-10 08:49:53.498432941 +0100 +++ /var/tmp/diff_new_pack.aBb0I3/_new 2021-03-10 08:49:53.502432945 +0100 @@ -1,7 +1,7 @@ # # spec file for package kdump # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -65,6 +65,8 @@ Patch31: %{name}-activate-udev-rules-late-during-boot.patch Patch32: %{name}-make-sure-that-the-udev-runtime-directory-exists.patch Patch33: %{name}-make-sure-that-initrd.target.wants-directory-exists.patch +Patch34: %{name}-check-explicit-ip-options.patch +Patch35: %{name}-query-systemd-network.service.patch BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc-c++ @@ -149,6 +151,8 @@ %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 +%patch35 -p1 %build export CXXFLAGS="%{optflags} -std=gnu++98" ++++++ kdump-check-explicit-ip-options.patch ++++++ From: Petr Tesarik <ptesa...@suse.com> Date: Fri Mar 5 11:06:35 2021 +0100 Subject: Do not add network-related dracut options if ip= is set explicitly References: bsc#1182309 Upstream: merged Git-commit: bbe9b1281cd6c26ec937c6fee622ad7a84da959d If the KDUMP_COMMANDLINE or KDUMP_COMMANDLINE_APPEND contain an explicit ip= option, do not try to add anything automatically, because it will clash with the admin's intention. Signed-off-by: Petr Tesarik <ptesa...@suse.com> --- doc/man/kdump.5.txt.in | 8 ++++++-- init/module-setup.sh | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) --- a/doc/man/kdump.5.txt.in +++ b/doc/man/kdump.5.txt.in @@ -580,8 +580,12 @@ _netdevice_ is for example "eth0". The _ * use DHCP6 if it has a permanent IPv6 address (IPv4 not set up), * use IPv6 auto-configuration if it has neither (IPv4 not set up). -You can set KDUMP_NETCONFIG to "" if you want no network in initrd, i.e. you use -disk dumping. +*Note:* If an _ip=_ option is found in KDUMP_COMMANDLINE or +KDUMP_COMMANDLINE_APPEND, kdump does not add any other _ip=_ or _ifname=_ +options. In other words, the value of KDUMP_NETCONFIG is effectively ignored. + +Setting KDUMP_NETCONFIG to "" disables network completely. In this case, kdump +does not even add the _network_ dracut module to the initrd. Default: "auto" --- a/init/module-setup.sh +++ b/init/module-setup.sh @@ -168,9 +168,24 @@ kdump_cmdline_zfcp() { } | sort -u } +kdump_ip_set_explicitly() { + local _opt + for _opt in $KDUMP_COMMANDLINE $KDUMP_COMMANDLINE_APPEND + do + if [ "${_opt%%=*}" = "ip" -a \ + "${_opt#*=}" != "$_opt" ] + then + return 0 + fi + done + return 1 +} + kdump_cmdline_ip() { [ "$kdump_neednet" = y ] || return 0 + kdump_ip_set_explicitly && return 0 + local _cfg="${KDUMP_NETCONFIG%:force}" if [ "$_cfg" = "auto" ] ; then kdump_host_if=default ++++++ kdump-query-systemd-network.service.patch ++++++ From: Petr Tesarik <ptesa...@suse.com> Date: Fri Mar 5 10:45:03 2021 +0100 Subject: Query systemd network.service to find out if wicked is used References: bsc#1182309 Upstream: merged Git-commit: 44a25927a0c234eb1c731b919d16cf282d168138 Even if wicked is installed on a system, network may still be managed by NetworkManager. Improve the logic by checking the actual Id of the currently configured network.service. Signed-off-by: Petr Tesarik <ptesa...@suse.com> --- init/setup-kdump.functions | 49 ++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 16 deletions(-) --- a/init/setup-kdump.functions +++ b/init/setup-kdump.functions @@ -30,6 +30,21 @@ function kdump_route2dev() # {{{ sed -n 's/.* dev \([^ ]*\) *.*/\1/p' } # }}} +# Get network manager id +# +# Output: +# network manager identifier ("wicked" or "NetworkManager") +function kdump_net_manager() # {{{ +{ + if [ -z "$kdump_cached_net_manager" ] ; then + local _id + _id=$(systemctl show --property=Id network.service) + _id="${_id#Id=}" + kdump_cached_net_manager="${_id%.service}" + fi + echo "$kdump_cached_net_manager" +} # }}} + # # Get a wicked configuration value for a device # @@ -95,17 +110,19 @@ function kdump_netdev_mode() # { local BOOTPROTO # get mode using wicked if possible - if [ -n "$(type -P wicked)" -a \ - "$(kdump_wicked_conf "$ifname" "%{name}")" = "$ifname" ] + if [ "$(kdump_net_manager)" = "wicked" ] then - local dhcpv4 dhcpv6 - eval $( kdump_wicked_conf "$ifname" \ - "dhcpv4=%{ipv4:dhcp/enabled}" \ - "dhcpv6=%{ipv6:dhcp/enabled}" ) - if [ "$dhcpv4" = true -o "$dhcpv6" = true ] ; then - BOOTPROTO=dhcp - else - BOOTPROTO=static + if [ "$(kdump_wicked_conf "$ifname" "%{name}")" = "$ifname" ] + then + local dhcpv4 dhcpv6 + eval $( kdump_wicked_conf "$ifname" \ + "dhcpv4=%{ipv4:dhcp/enabled}" \ + "dhcpv6=%{ipv6:dhcp/enabled}" ) + if [ "$dhcpv4" = true -o "$dhcpv6" = true ] ; then + BOOTPROTO=dhcp + else + BOOTPROTO=static + fi fi fi @@ -153,7 +170,7 @@ function kdump_ifkind() # {{{ echo ovs-system # get kind using wicked if possible - elif [ -n "$(type -P wicked)" ] + elif [ "$(kdump_net_manager)" = "wicked" ] then local -a elems=( infiniband @@ -234,7 +251,7 @@ function kdump_bridge_config() # local curslaves # use wicked to read VLAN configuration, if possible - if [ -n "$(type -P wicked)" ] + if [ "$(kdump_net_manager)" = "wicked" ] then curslaves=$( kdump_wicked_conf "$bridge" "%{bridge/ports/port/device}" ) fi @@ -273,7 +290,7 @@ function kdump_bond_config() # { local curslaves opts # use wicked to read bonding settings, if possible - if [ -n "$(type -P wicked)" ] + if [ "$(kdump_net_manager)" = "wicked" ] then local -a optvars=( mode arp_interval arp_validate arp_all_targets arp_ip_target @@ -402,7 +419,7 @@ function kdump_vlan_config() # { local vid # use wicked to read VLAN configuration, if possible - if [ -n "$(type -P wicked)" ] + if [ "$(kdump_net_manager)" = "wicked" ] then eval $( kdump_wicked_conf "$if" \ "vid=%{vlan/tag}; if=%{vlan/device}" ) @@ -538,7 +555,7 @@ function kdump_ip_routes() # {{{ local _addintf="s/\$/:${_bootif}/p" # get configured routes using wicked if possible - if [ -n "$(type -P wicked)" ] + if [ "$(kdump_net_manager)" = "wicked" ] then wicked show-config | \ wicked xpath --reference \ @@ -619,7 +636,7 @@ function kdump_ip6_routes() # {{ local _addintf="s/\$/:${_bootif}/p" # get configured routes using wicked if possible - if [ -n "$(type -P wicked)" ] + if [ "$(kdump_net_manager)" = "wicked" ] then wicked show-config | \ wicked xpath \