Hello community, here is the log from the commit of package yast2-cio for openSUSE:Factory checked in at 2018-06-19 12:03:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-cio (Old) and /work/SRC/openSUSE:Factory/.yast2-cio.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-cio" Tue Jun 19 12:03:27 2018 rev:2 rq:617173 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-cio/yast2-cio.changes 2018-04-22 14:40:56.998122872 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-cio.new/yast2-cio.changes 2018-06-19 12:03:29.842402067 +0200 @@ -1,0 +2,6 @@ +Fri Jun 15 14:41:21 UTC 2018 - [email protected] + +- fix invoking shell with too many channels (bsc#1096033) +- 4.0.2 + +------------------------------------------------------------------- Old: ---- yast2-cio-4.0.1.tar.bz2 New: ---- yast2-cio-4.0.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-cio.spec ++++++ --- /var/tmp/diff_new_pack.wXJ3wk/_old 2018-06-19 12:03:30.394381573 +0200 +++ /var/tmp/diff_new_pack.wXJ3wk/_new 2018-06-19 12:03:30.398381424 +0200 @@ -24,7 +24,7 @@ ###################################################################### Name: yast2-cio -Version: 4.0.1 +Version: 4.0.2 Release: 0 ExclusiveArch: s390 s390x ++++++ yast2-cio-4.0.1.tar.bz2 -> yast2-cio-4.0.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-cio-4.0.1/Dockerfile new/yast2-cio-4.0.2/Dockerfile --- old/yast2-cio-4.0.1/Dockerfile 2018-04-20 08:28:12.000000000 +0200 +++ new/yast2-cio-4.0.2/Dockerfile 2018-06-15 17:19:58.000000000 +0200 @@ -1,4 +1,5 @@ FROM yastdevel/ruby + COPY . /usr/src/app # a workaround to allow package building on a non-s390 machine RUN sed -i "/^ExclusiveArch:/d" package/*.spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-cio-4.0.1/package/yast2-cio.changes new/yast2-cio-4.0.2/package/yast2-cio.changes --- old/yast2-cio-4.0.1/package/yast2-cio.changes 2018-04-20 08:28:12.000000000 +0200 +++ new/yast2-cio-4.0.2/package/yast2-cio.changes 2018-06-15 17:19:58.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Jun 15 14:41:21 UTC 2018 - [email protected] + +- fix invoking shell with too many channels (bsc#1096033) +- 4.0.2 + +------------------------------------------------------------------- Thu Apr 19 13:07:04 UTC 2018 - [email protected] - make package s390 only as it is useless elsewhere (bsc#1089178) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-cio-4.0.1/package/yast2-cio.spec new/yast2-cio-4.0.2/package/yast2-cio.spec --- old/yast2-cio-4.0.1/package/yast2-cio.spec 2018-04-20 08:28:12.000000000 +0200 +++ new/yast2-cio-4.0.2/package/yast2-cio.spec 2018-06-15 17:19:58.000000000 +0200 @@ -24,7 +24,7 @@ ###################################################################### Name: yast2-cio -Version: 4.0.1 +Version: 4.0.2 Release: 0 ExclusiveArch: s390 s390x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-cio-4.0.1/src/lib/iochannel/channels.rb new/yast2-cio-4.0.2/src/lib/iochannel/channels.rb --- old/yast2-cio-4.0.1/src/lib/iochannel/channels.rb 2018-04-20 08:28:12.000000000 +0200 +++ new/yast2-cio-4.0.2/src/lib/iochannel/channels.rb 2018-06-15 17:19:58.000000000 +0200 @@ -46,20 +46,11 @@ end def block - return if @channels.empty? - - cmd = "cio_ignore -a #{@channels.map(&:device).join(",")}" - - result = Yast::SCR.Execute(BASH_SCR_PATH, cmd) - raise "Calling cio_ignore failed with #{result["stderr"]}" unless result["exit"].zero? + call_ignore("-a") end def unblock - return if @channels.empty? - cmd = "cio_ignore -r #{@channels.map(&:device).join(",")}" - - result = Yast::SCR.Execute(BASH_SCR_PATH, cmd) - raise "Calling cio_ignore failed with #{result["stderr"]}" unless result["exit"].zero? + call_ignore("-r") end private @@ -74,5 +65,23 @@ Channel.new(device, used) end end + + # number of entries that can fit into one command line run (see bsc#1096033) + CHUNK_SIZE = 500 + + def call_ignore(option) + return if @channels.empty? + + # split channels into chunks, so it can run on cmdline + # and then map it back chunk delimeter and index out of it + channels_chunks = @channels.each_with_index.chunk{ |d, i| i/CHUNK_SIZE } + .map { |i| i[1].map(&:first) } + channels_chunks.each do |channels| + cmd = "cio_ignore #{option} #{channels.map(&:device).join(",")}" + + result = Yast::SCR.Execute(BASH_SCR_PATH, cmd) + raise "Calling cio_ignore failed with #{result["stderr"]}" unless result["exit"].zero? + end + end end end
