Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2012-01-09 11:17:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2011-09-23 12:53:16.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2012-01-09 11:17:26.000000000 +0100 @@ -1,0 +2,19 @@ +Fri Jan 6 16:17:00 CET 2012 - [email protected] + +- skip USB NICs during bridge proposal (bnc#710098) +- do not inherit for new bridge port devices PREFIXLEN (bnc#735109) +- do not inherit for bridge device ETHTOOLS_OPTIONS (bnc#735109) +- Filter out Chelsio devices without device file (bnc#711432) +- Only save LLADDR (persistent MAC) for some s390 card types + (bnc#658708). +- 2.22.0 + +------------------------------------------------------------------- +Fri Jan 6 14:47:16 CET 2012 - [email protected] + +- Moved NetworkStorage from yast2.rpm to yast2-network.rpm + (bnc#726057) +- Use Storage::IsDeviceOnNetwork instead of trying to do it + ourselves, wrong (bnc#726057). + +------------------------------------------------------------------- Old: ---- yast2-network-2.21.8.tar.bz2 New: ---- yast2-network-2.22.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.LakbFW/_old 2012-01-09 11:17:27.000000000 +0100 +++ /var/tmp/diff_new_pack.LakbFW/_new 2012-01-09 11:17:27.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2-network # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,17 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: yast2-network -Version: 2.21.8 +Version: 2.22.0 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-network-2.21.8.tar.bz2 - -Prefix: /usr +Source0: yast2-network-%{version}.tar.bz2 Group: System/YaST License: GPL-2.0+ @@ -46,6 +43,9 @@ #GetLanguageCountry #(in newly created yast2-country-data) Requires: yast2-country-data >= 2.16.3 +# Storage::IsDeviceOnNetwork +BuildRequires: yast2-storage >= 2.21.11 +Requires: yast2-storage >= 2.21.11 PreReq: /bin/rm @@ -74,37 +74,36 @@ This package contains autogenerated documentation for yast2-network %prep -%setup -n yast2-network-2.21.8 +%setup -n yast2-network-%{version} %build -%{prefix}/bin/y2tool y2autoconf -%{prefix}/bin/y2tool y2automake +%{_prefix}/bin/y2tool y2autoconf +%{_prefix}/bin/y2tool y2automake autoreconf --force --install export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" -%{?suse_update_config:%{suse_update_config -f}} -./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir} +./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir} # V=1: verbose build in case we used AM_SILENT_RULES(yes) # so that RPM_OPT_FLAGS check works make %{?jobs:-j%jobs} V=1 %install make install DESTDIR="$RPM_BUILD_ROOT" -[ -e "%{prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT" -for f in `find $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/ -name "*.desktop"` ; do +[ -e "%{_prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT" +for f in `find $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/ -name "*.desktop"` ; do d=${f##*/} %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop} done %ifarch s390 s390x -/bin/rm -f $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/dsl.desktop -/bin/rm -f $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/isdn.desktop -/bin/rm -f $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/modem.desktop +/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/dsl.desktop +/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/isdn.desktop +/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/modem.desktop %endif -/bin/rm -f $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/network.desktop -/bin/rm -f $RPM_BUILD_ROOT/%{prefix}/share/applications/YaST2/provider.desktop +/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/network.desktop +/bin/rm -f $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/provider.desktop %clean rm -rf "$RPM_BUILD_ROOT" @@ -121,28 +120,28 @@ %files %defattr(-,root,root) -%{prefix}/lib/YaST2/bin/* +%{_prefix}/lib/YaST2/bin/* /usr/share/YaST2/data/* /usr/share/YaST2/include/network /usr/share/YaST2/clients/*.ycp /usr/share/YaST2/modules/YaPI/NETWORK.pm /usr/share/YaST2/modules/*.ycp /usr/share/YaST2/modules/*.ybc -%{prefix}/share/applications/YaST2/*.desktop +%{_prefix}/share/applications/YaST2/*.desktop /usr/share/YaST2/scrconf/*.scr /usr/lib/YaST2/servers_non_y2/ag_udev_persistent /usr/share/YaST2/schema/autoyast/rnc/networking.rnc /usr/share/YaST2/schema/autoyast/rnc/host.rnc /usr/share/YaST2/schema/autoyast/rnc/proxy.rnc -%dir %{prefix}/share/doc/packages/yast2-network -%{prefix}/share/doc/packages/yast2-network/COPYING -%readme %{prefix}/share/doc/packages/yast2-network/README +%dir %{_prefix}/share/doc/packages/yast2-network +%{_prefix}/share/doc/packages/yast2-network/COPYING +%readme %{_prefix}/share/doc/packages/yast2-network/README %files devel-doc %defattr(-,root,root) -%doc %{prefix}/share/doc/packages/yast2-network -%exclude %{prefix}/share/doc/packages/yast2-network/COPYING -%exclude %{prefix}/share/doc/packages/yast2-network/README +%doc %{_prefix}/share/doc/packages/yast2-network +%exclude %{_prefix}/share/doc/packages/yast2-network/COPYING +%exclude %{_prefix}/share/doc/packages/yast2-network/README %changelog ++++++ yast2-network-2.21.8.tar.bz2 -> yast2-network-2.22.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/Makefile.am new/yast2-network-2.22.0/Makefile.am --- old/yast2-network-2.21.8/Makefile.am 2011-09-22 11:26:01.000000000 +0200 +++ new/yast2-network-2.22.0/Makefile.am 2012-01-06 16:21:03.000000000 +0100 @@ -20,7 +20,6 @@ IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME)) DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools) -ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl) COPYRIGHT_files_gpl = README COPYING @@ -155,7 +154,7 @@ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \ done -package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local +package: check-up-to-date check-tagversion check-textdomain package-local TAGVERSION = $(Y2TOOL) tagversion @@ -185,21 +184,6 @@ check-parse: @echo "Not running parseycp." -check-all-packages: - @if [ ! -e "$(ALL_PACKAGES)" ]; then \ - echo ERROR: "Can't find $(ALL_PACKAGES)"; false; \ - fi - @if ! grep -q "^$(RPMNAME)[[:space:]]" $(ALL_PACKAGES); then \ - echo ERROR: "$(RPMNAME) not in $(ALL_PACKAGES)"; false; \ - fi - @if grep -q "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); then \ - echo ERROR: "$(RPMNAME) info in $(ALL_PACKAGES) contains some unknown (?) fields:"; \ - echo; \ - grep "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); \ - echo; \ - false; \ - fi - check-textdomain: $(Y2TOOL) check-textdomain $(srcdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/Makefile.in new/yast2-network-2.22.0/Makefile.in --- old/yast2-network-2.21.8/Makefile.in 2011-09-22 11:26:06.000000000 +0200 +++ new/yast2-network-2.22.0/Makefile.in 2012-01-06 16:21:08.000000000 +0100 @@ -261,7 +261,6 @@ # do we do Makefile.am for devtools? It is a little special... IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME)) DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools) -ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl) COPYRIGHT_files_gpl = README COPYING COPYRIGHT_files_yast = YAST_LICENSE README COPYING COPYRIGHT.english \ @@ -902,7 +901,7 @@ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \ done -package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local +package: check-up-to-date check-tagversion check-textdomain package-local check-up-to-date check-cvs-up-to-date check-svn-up-to-date: if [ -d $(srcdir)/CVS ]; then \ @@ -930,21 +929,6 @@ check-parse: @echo "Not running parseycp." -check-all-packages: - @if [ ! -e "$(ALL_PACKAGES)" ]; then \ - echo ERROR: "Can't find $(ALL_PACKAGES)"; false; \ - fi - @if ! grep -q "^$(RPMNAME)[[:space:]]" $(ALL_PACKAGES); then \ - echo ERROR: "$(RPMNAME) not in $(ALL_PACKAGES)"; false; \ - fi - @if grep -q "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); then \ - echo ERROR: "$(RPMNAME) info in $(ALL_PACKAGES) contains some unknown (?) fields:"; \ - echo; \ - grep "^$(RPMNAME)[[:space:]]\+.*?" $(ALL_PACKAGES); \ - echo; \ - false; \ - fi - check-textdomain: $(Y2TOOL) check-textdomain $(srcdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/VERSION new/yast2-network-2.22.0/VERSION --- old/yast2-network-2.21.8/VERSION 2011-09-22 11:25:54.000000000 +0200 +++ new/yast2-network-2.22.0/VERSION 2012-01-06 16:21:02.000000000 +0100 @@ -1 +1 @@ -2.21.8 +2.22.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/configure new/yast2-network-2.22.0/configure --- old/yast2-network-2.21.8/configure 2011-09-22 11:26:04.000000000 +0200 +++ new/yast2-network-2.22.0/configure 2012-01-06 16:21:06.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for yast2-network 2.21.8. +# Generated by GNU Autoconf 2.68 for yast2-network 2.22.0. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -559,8 +559,8 @@ # Identity of this package. PACKAGE_NAME='yast2-network' PACKAGE_TARNAME='yast2-network' -PACKAGE_VERSION='2.21.8' -PACKAGE_STRING='yast2-network 2.21.8' +PACKAGE_VERSION='2.22.0' +PACKAGE_STRING='yast2-network 2.22.0' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1229,7 +1229,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-network 2.21.8 to adapt to many kinds of systems. +\`configure' configures yast2-network 2.22.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1300,7 +1300,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-network 2.21.8:";; + short | recursive ) echo "Configuration of yast2-network 2.22.0:";; esac cat <<\_ACEOF @@ -1380,7 +1380,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-network configure 2.21.8 +yast2-network configure 2.22.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1397,7 +1397,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-network $as_me 2.21.8, which was +It was created by yast2-network $as_me 2.22.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2327,7 +2327,7 @@ # Define the identity of the package. PACKAGE='yast2-network' - VERSION='2.21.8' + VERSION='2.22.0' cat >>confdefs.h <<_ACEOF @@ -2449,7 +2449,7 @@ -VERSION="2.21.8" +VERSION="2.22.0" RPMNAME="yast2-network" MAINTAINER="Martin Vidner <[email protected]>" @@ -3379,7 +3379,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-network $as_me 2.21.8, which was +This file was extended by yast2-network $as_me 2.22.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3432,7 +3432,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-network config.status 2.21.8 +yast2-network config.status 2.22.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/configure.in new/yast2-network-2.22.0/configure.in --- old/yast2-network-2.21.8/configure.in 2011-09-22 11:26:01.000000000 +0200 +++ new/yast2-network-2.22.0/configure.in 2012-01-06 16:21:03.000000000 +0100 @@ -1,9 +1,9 @@ dnl configure.in for yast2-network dnl -dnl -- This file is generated by y2autoconf 2.21.0 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.21.7 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-network, 2.21.8, http://bugs.opensuse.org/, yast2-network) +AC_INIT(yast2-network, 2.22.0, http://bugs.opensuse.org/, yast2-network) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.21.8" +VERSION="2.22.0" RPMNAME="yast2-network" MAINTAINER="Martin Vidner <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/src/clients/save_network.ycp new/yast2-network-2.22.0/src/clients/save_network.ycp --- old/yast2-network-2.21.8/src/clients/save_network.ycp 2011-09-22 11:25:56.000000000 +0200 +++ new/yast2-network-2.22.0/src/clients/save_network.ycp 2012-01-06 16:21:01.000000000 +0100 @@ -31,9 +31,13 @@ map <string, any> InstallInf = $[]; // global variable because chrooted environment -integer network_disk=0; +symbol network_disk = `no; // `nfs `iscsi `fcoe string netdevice=""; +list<map> hardware=ReadHardware("netcard"); +y2milestone("hardware %1", hardware); + + /** * Read one install.inf item * @param item InstallInf map key @@ -59,6 +63,35 @@ return (ret == nil)? s: ret; } +string dev_name_to_sysfs_id(string dev_name) { + // hardware is global, read at client start + map hw_item = find(map i, hardware, ``( i["dev_name"]:"" == dev_name )); + return hw_item["sysfs_id"]:""; +} + +string sysfs_card_type(string device) { + string sysfs_id = dev_name_to_sysfs_id(device); + if (sysfs_id == "") return "none"; + string filename = "/sys" + sysfs_id + "/card_type"; + string card_type = (string) SCR::Read(.target.string, filename); + return String::FirstChunk(card_type, "\n"); +} + +boolean s390_device_needs_persistent_mac(string device) { + string card_type = sysfs_card_type(device); + list<string> types_needing_persistent = [ + "OSD_100", + "OSD_1000", + "OSD_10GIG", + "OSD_FE_LANE", + "OSD_GbE_LANE", + "OSD_Express", + ]; + boolean needs_persistent = contains(types_needing_persistent, card_type); + y2milestone("Device: %1, card type: %2, needs persistent MAC: %3", device, card_type, needs_persistent); + return needs_persistent; +} + /** * Read install.inf from the correct location * @return true on success @@ -137,6 +170,10 @@ if (Arch::s390()) { y2milestone ("Interface type: %1", InstallInf["type"]:""); + // only some card types need a persistent MAC (bnc#658708) + if (! s390_device_needs_persistent_mac(netdevice)) { + InstallInf = remove (InstallInf, "hwaddr"); + } // hsi devices do not support setting hwaddr (bnc #479481) if (InstallInf["type"]:"" == "hsi" && haskey (InstallInf, "hwaddr")) InstallInf = remove (InstallInf, "hwaddr"); @@ -218,11 +255,6 @@ return ""; } - -//map <string,any> hwcfg=$[]; -list<map> hardware=ReadHardware("netcard"); -y2milestone("hardware %1", hardware); - string StdoutOf(string command) { map out = (map) SCR::Execute (.target.bash_output, command); return out["stdout"]:""; @@ -231,7 +263,7 @@ void CreateIfcfg() { string ifcfg=""; - if (network_disk==1 && contains(NetworkStorage::getiBFTDevices(), InstallInf["netdevice"]:"")){ + if (network_disk == `iscsi && contains(NetworkStorage::getiBFTDevices(), InstallInf["netdevice"]:"")){ ifcfg = sformat("%1STARTMODE='nfsroot'\nBOOTPROTO='ibft'\n", ifcfg); } else { @@ -257,10 +289,10 @@ SCR::Execute(.target.bash_output, "sed -i s/\"DHCLIENT_SET_HOSTNAME=.*\"/'DHCLIENT_SET_HOSTNAME=\"yes\"'/g /etc/sysconfig/network/dhcp"); } - if (network_disk == 0) { + if (network_disk == `no) { ifcfg = sformat("%1STARTMODE='onboot'\n", ifcfg); } - else if (network_disk > 0) { + else { ifcfg = sformat("%1STARTMODE='nfsroot'\n", ifcfg); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/src/modules/Lan.ycp new/yast2-network-2.22.0/src/modules/Lan.ycp --- old/yast2-network-2.21.8/src/modules/Lan.ycp 2011-09-22 11:25:57.000000000 +0200 +++ new/yast2-network-2.22.0/src/modules/Lan.ycp 2012-01-06 16:21:02.000000000 +0100 @@ -4,7 +4,7 @@ * Summary: Network card data * Authors: Michal Svec <[email protected]> * - * $Id: Lan.ycp 65367 2011-08-17 13:30:01Z mvidner $ + * $Id: Lan.ycp 67124 2012-01-06 15:20:33Z mvidner $ * * Representation of the configuration of network cards. * Input and output routines. @@ -26,7 +26,6 @@ import "NetworkConfig"; import "NetworkInterfaces"; import "NetworkService"; -//import "NetworkStorage"; import "Package"; import "ProductFeatures"; import "Routing"; @@ -846,6 +845,12 @@ if(size(slave)>0) skipped=add(skipped, slave); }); } + // Skip also usb device as it is not good for bridge proposal (bnc#710098) + if (NetworkInterfaces::GetType(ifcfg)=="usb"){ + NetworkInterfaces::Edit(ifcfg); + y2milestone("Usb device %1 skipped from bridge proposal", ifcfg); + skipped=add(skipped, ifcfg); + } if (NetworkInterfaces::GetValue(ifcfg, "STARTMODE")=="nfsroot"){ y2milestone("Skipped %1 interface from bridge slaves because of nfsroot.", ifcfg); skipped=add(skipped, ifcfg); @@ -907,6 +912,8 @@ NetworkInterfaces::Current["STARTMODE"]="auto"; // remove description - will be replaced by new (real) one NetworkInterfaces::Current=remove(NetworkInterfaces::Current, "NAME"); + // remove ETHTOOLS_OPTIONS as it is useful only for real hardware + NetworkInterfaces::Current=remove(NetworkInterfaces::Current, "ETHTOOLS_OPTIONS"); if( NetworkInterfaces::Commit() ){ NetworkInterfaces::Add(); NetworkInterfaces::Edit(ifcfg); @@ -916,6 +923,8 @@ foreach (string a, any v, (map <string, any>)NetworkInterfaces::Current["_aliases"]:$[], { if (v != nil) { NetworkInterfaces::DeleteAlias (NetworkInterfaces::Name, a); } }); + //take out PREFIXLEN from old configuration (BNC#735109) + old_config["PREFIXLEN"]=""; old_config["_aliases"]=$[]; y2milestone("Old Config with apllied changes %1\n%2", ifcfg, old_config); NetworkInterfaces::Current = old_config; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/src/modules/LanItems.ycp new/yast2-network-2.22.0/src/modules/LanItems.ycp --- old/yast2-network-2.21.8/src/modules/LanItems.ycp 2011-09-22 11:25:57.000000000 +0200 +++ new/yast2-network-2.22.0/src/modules/LanItems.ycp 2012-01-06 16:21:02.000000000 +0100 @@ -1431,7 +1431,7 @@ netmask = ""; bootproto = "dhcp"; // #176804 - if (NetworkStorage::isDiskOnNetwork ( NetworkStorage::getDevice("/") )>0) + if (NetworkStorage::isDiskOnNetwork ( NetworkStorage::getDevice("/") ) != `no) { startmode = "nfsroot"; y2milestone ("startmode nfsroot"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/src/modules/NetworkStorage.ycp new/yast2-network-2.22.0/src/modules/NetworkStorage.ycp --- old/yast2-network-2.21.8/src/modules/NetworkStorage.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-2.22.0/src/modules/NetworkStorage.ycp 2012-01-06 16:21:02.000000000 +0100 @@ -0,0 +1,73 @@ +/** + * File: modules/NetworkStorage.ycp + * Package: Network configuration + * Summary: Networked disks + * Authors: Martin Vidner <[email protected]> + * + * $Id: NetworkStorage.ycp 38154 2007-05-28 08:20:39Z mzugec $ + * + * #176804 - Root on iSCSI installation fails + */ + +{ + +module "NetworkStorage"; + +import "Storage"; + +/** + * Ask /proc/mounts what device a mount point is using. + * @return e.g. /dev/sda2 (or just "nfs") + */ +global string getDevice(string mount_point) { + string cmd = sformat("grep ' %1 ' /proc/mounts|grep -v rootfs|tr -d '\n'", mount_point); + map out = (map)SCR::Execute(.target.bash_output, cmd); + y2milestone("mountpoint found %1", out); + list<string> fields = splitstring(out["stdout"]:"", " "); + string vfstype = fields[2]:""; + string device = (vfstype == "nfs" || vfstype == "nfs4")? "nfs": fields[0]:""; + y2milestone("%1 is on device: %2", mount_point, device); + return device; +} + +/** + * If the disk is on a networked device (NFS, ISCSI), + * the main NIC needs STARTMODE nfsroot instead of auto. + * @return root dev over network: `no `iscsi `nfs `fcoe + */ +global symbol isDiskOnNetwork(string device) { + y2milestone("begin isDiskOnNetwork(%1) function", device); + if (device=="nfs") { + return `nfs; + } + if (size(device)==0) { + y2error("Empty parameter for isDiskOnNetwork() function"); + return `no; + } + + symbol network_based = Storage::IsDeviceOnNetwork(device); + + // test for nfs (bnc#384420) + if (network_based == `no) { + string space="[[:space:]]"; + if (SCR::Execute(.target.bash, sformat("grep '%1%2%3*nfs%4' /proc/mounts ", space, device, space, space))==0){ + y2milestone("device %1 is network based : %2", device, network_based); + network_based = `nfs; + } + } + return network_based; +} + +global list<string> getiBFTDevices() { + if (SCR::Execute(.target.bash, "ls /sys/firmware/ibft")==0){ + map<string, any> output = (map<string, any>)SCR::Execute(.target.bash_output, "ls /sys/firmware/ibft/ethernet*/device/net/"); + list<string> ifaces = filter(string row, splitstring(output["stdout"]:"", "\n"), { return (size(row)>0);}); + return ifaces; + } + else { + return []; + } +} + +/* EOF */ +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/src/routines/routines.ycp new/yast2-network-2.22.0/src/routines/routines.ycp --- old/yast2-network-2.21.8/src/routines/routines.ycp 2011-09-22 11:25:57.000000000 +0200 +++ new/yast2-network-2.22.0/src/routines/routines.ycp 2012-01-06 16:21:02.000000000 +0100 @@ -4,7 +4,7 @@ * Summary: Miscellaneous routines * Authors: Michal Svec <[email protected]> * - * $Id: routines.ycp 61797 2010-04-21 13:06:35Z mzugec $ + * $Id: routines.ycp 67124 2012-01-06 15:20:33Z mvidner $ */ { @@ -750,6 +750,11 @@ card_ok=false; y2milestone("Filtering out virtio device without device file."); } + // filter out device with chelsio Driver and no Device File (bnc#711432) + if (one["module"]:""=="cxgb4" && one["dev_name"]:""==""){ + card_ok=false; + y2milestone("Filtering out Chelsio device without device file."); + } // exception to filter out uicv devices (bnc#585363) if (card["device"]:""=="IUCV" && card["sysfs_bus_id"]:""!="netiucv"){ card_ok=false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/testsuite/tests/NetworkStorage.out new/yast2-network-2.22.0/testsuite/tests/NetworkStorage.out --- old/yast2-network-2.21.8/testsuite/tests/NetworkStorage.out 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-2.22.0/testsuite/tests/NetworkStorage.out 2012-01-06 16:21:02.000000000 +0100 @@ -0,0 +1,4 @@ +Execute .target.bash_output "grep ' / ' /proc/mounts|grep -v rootfs|tr -d '\n'" $["exit":0, "stderr":"", "stdout":"/dev/sda2 / ext3 rw,relatime,errors=continue,user_xattr,acl,commit=15,barrier=1,data=ordered 0 0"] +Return true +Execute .target.bash_output "grep ' /home ' /proc/mounts|grep -v rootfs|tr -d '\n'" $["exit":0, "stderr":"", "stdout":"nfs.example.com:/home/ /home nfs4 rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5i,clientaddr=10.0.2.2,minorversion=0,local_lock=none,addr=10.0.0.1 0 0"] +Return true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/testsuite/tests/NetworkStorage.ycp new/yast2-network-2.22.0/testsuite/tests/NetworkStorage.ycp --- old/yast2-network-2.21.8/testsuite/tests/NetworkStorage.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-2.22.0/testsuite/tests/NetworkStorage.ycp 2012-01-06 16:21:02.000000000 +0100 @@ -0,0 +1,54 @@ +// +{ +// testedfiles: NetworkStorage.ycp +include "testsuite.ycp"; + +import "Assert"; + +map MockBash(string stdout) { + return $[ + "target" : $[ + "bash_output" : $[ + "exit" : 0, + "stdout" : stdout, + "stderr" : "", + ], + ], + ]; +} + +map READ = $[ + "target" : $[ + "tmpdir" : "/tmp", + ] +]; +map WRITE = $[]; +map EXECUTE = MockBash(""); + +TESTSUITE_INIT([READ, WRITE, EXECUTE], nil); + +import "NetworkStorage"; + +EXECUTE = MockBash ("/dev/sda2 / ext3 rw,relatime,errors=continue,user_xattr,acl,commit=15,barrier=1,data=ordered 0 0"); +TEST(``( + Assert::Equal("/dev/sda2", NetworkStorage::getDevice("/")) + ), [READ, WRITE, EXECUTE], nil); + +EXECUTE = MockBash ("nfs.example.com:/home/ /home nfs4 rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=krb5i,clientaddr=10.0.2.2,minorversion=0,local_lock=none,addr=10.0.0.1 0 0"); +TEST(``( + Assert::Equal("nfs", NetworkStorage::getDevice("/home")) + ), [READ, WRITE, EXECUTE], nil); + +/* +FIXME polish it to really test it + +TEST(``( + Assert::Equal(`nfs, NetworkStorage::isDiskOnNetwork("server:/export")) + ), [READ, WRITE, EXECUTE], nil); + +TEST(``( + Assert::Equal(`nfs, NetworkStorage::isDiskOnNetwork("server-v4:/")) + ), [READ, WRITE, EXECUTE], nil); +*/ + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/testsuite/tests/Network_YaPI.out new/yast2-network-2.22.0/testsuite/tests/Network_YaPI.out --- old/yast2-network-2.21.8/testsuite/tests/Network_YaPI.out 2011-09-22 11:25:58.000000000 +0200 +++ new/yast2-network-2.22.0/testsuite/tests/Network_YaPI.out 2012-01-06 16:21:02.000000000 +0100 @@ -46,6 +46,9 @@ Read .network.value."eth5.23".IPADDR "1.2.3.8/24" Read .network.value."eth5.23".STARTMODE "auto" Read .network.value."eth5.23".VLAN_ID "23" +Read .probe.architecture "i386" +Read .sysconfig.console.CONSOLE_ENCODING "UTF-8" +Execute .target.bash_output "locale -k charmap" $["exit":0, "stdout":"laptop.suse.cz"] Read .target.size "/etc/install.inf" 27 Dir .etc.install_inf: [] Read .target.string "/proc/cmdline" "laptop.suse.cz" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-2.21.8/testsuite/tests/Network_YaPI.ycp new/yast2-network-2.22.0/testsuite/tests/Network_YaPI.ycp --- old/yast2-network-2.21.8/testsuite/tests/Network_YaPI.ycp 2011-09-22 11:25:58.000000000 +0200 +++ new/yast2-network-2.22.0/testsuite/tests/Network_YaPI.ycp 2012-01-06 16:21:02.000000000 +0100 @@ -8,7 +8,13 @@ "string" : "laptop.suse.cz", "stat" : $[] ], + "probe": $[ + "architecture": "i386" + ], "sysconfig": $[ + "console": $[ + "CONSOLE_ENCODING": "UTF-8" + ], "network" : $[ "config" : $[ "NETCONFIG_DNS_STATIC_SERVERS" : "208.67.222.222 208.67.220.220", -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
