X-Original-To: alpine-aports@lists.alpinelinux.org Received: from newmail.tetrasec.net (unknown [172.21.74.12]) by lists.alpinelinux.org (Postfix) with ESMTP id BDF615C41CD for ; Thu, 11 Aug 2016 19:59:11 +0000 (GMT) Received: from ncopa-desktop.copa.dup.pw (71.63.200.37.customer.cdi.no [37.200.63.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by newmail.tetrasec.net (Postfix) with ESMTPSA id 34E335A0848; Thu, 11 Aug 2016 19:59:10 +0000 (GMT) Date: Thu, 11 Aug 2016 21:59:07 +0200 From: Natanael Copa To: Jann - Ove Risvik Cc: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH] main/open-iscsi: musl fix, second try. fixes bug #4802. added default config file. Message-ID: <20160811215907.77a520ed@ncopa-desktop.copa.dup.pw> In-Reply-To: <20160720205752.17582-1-jann.ove@usaklig.com> References: <20160720205752.17582-1-jann.ove@usaklig.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 20 Jul 2016 22:57:52 +0200 Jann - Ove Risvik wrote: > While making sure it didn't throw away legitimate unrecognised > arguments I managed to break everything else... Not good. Didn't test > it well enough. :/ I looked at it and it is easy to get it wrong. > I've also included the default config file. Previously the package > didn't include all the config files needed to work out of the box. Where did you find the config file? Is there some copy in the sources that we can use instead of shipping our own variant. > --- > main/open-iscsi/APKBUILD | 21 +-- > main/open-iscsi/iscsid.conf | 304 +++++++++++++++++++++++++++++++++++++++ > main/open-iscsi/musl-fixes.patch | 21 ++- > 3 files changed, 332 insertions(+), 14 deletions(-) > create mode 100644 main/open-iscsi/iscsid.conf ... > diff --git a/main/open-iscsi/musl-fixes.patch b/main/open-iscsi/musl-fixes.patch > index 910b485..f101eda 100644 > --- a/main/open-iscsi/musl-fixes.patch > +++ b/main/open-iscsi/musl-fixes.patch > @@ -29,9 +29,17 @@ > #include > #include > #include > ---- ./usr/iscsiadm.c.orig > -+++ ./usr/iscsiadm.c > -@@ -2553,7 +2553,10 @@ main(int argc, char **argv) > +--- ./usr/iscsiadm.c.orig 2012-05-21 02:59:24.000000000 +0200 > ++++ ./usr/iscsiadm.c 2016-07-20 22:00:54.430451701 +0200 > +@@ -2403,6 +2403,7 @@ main(int argc, char **argv) > + int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0; > + int packet_size=32, ping_count=1, ping_interval=0; > + int do_discover = 0, sub_mode = -1; > ++ int argerror = 0; > + struct sigaction sa_old; > + struct sigaction sa_new; > + struct list_head ifaces; > +@@ -2553,7 +2554,11 @@ main(int argc, char **argv) > return 0; > case 'h': > usage(0); > @@ -39,17 +47,18 @@ > + > + case '?': > + log_error("unrecognized character '%c'", optopt); > ++ argerror = 1; > + } > > if (name && value) { > param = idbm_alloc_user_param(name, value); > -@@ -2568,8 +2571,7 @@ main(int argc, char **argv) > +@@ -2568,8 +2573,7 @@ main(int argc, char **argv) > } > } > > - if (optopt) { > - log_error("unrecognized character '%c'", optopt); > -+ if (opterr) { > ++ if (argerror) { > rc = ISCSI_ERR_INVAL; > goto free_ifaces; > - } > + This looks better. I think I'll merge the fix/workaround for getopt into a single commit and then add a default config in separate commit. The reason is that I want to backport the fix to stable, but without adding the config. Thanks! -nc --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---