Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id CC41E780783 for <~alpine/devel@lists.alpinelinux.org>; Thu, 30 Jun 2022 06:49:14 +0000 (UTC) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1656571753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fwef7mKq8chiqefyKvoUycRpqu1lZdAdwiMMLKA5XsU=; b=VQ7Dgs0uhxo/17OeflHJKqL2zcC9hG1c7ByKBhPtvBVubjP9RRUyjnngLL9h7LW5wHGle4 USCl5H+fz4ohbSQZgwbBk2G/CuwDSuIeWS6YV60Wi/xSuU+VjxegBvzMntWhfsbuXXWnWS T9VG9CDovTzEEhzi/zAWwzJGLZrtg58= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 30 Jun 2022 08:49:12 +0200 Message-Id: Cc: Subject: Re: Fixing shell script libraries like /lib/libalpine.sh X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "alice" To: "Daniel F. Dickinson" , <~alpine/devel@lists.alpinelinux.org> References: <4caa8c5f-7ebf-ad2f-0e92-29428785fe60@wildtechgarden.ca> In-Reply-To: <4caa8c5f-7ebf-ad2f-0e92-29428785fe60@wildtechgarden.ca> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: ayaya.dev On Thu Jun 30, 2022 at 8:16 AM CEST, Daniel F. Dickinson wrote: > Hello, > > I've noticed some issues with the Alpine shell script libraries (one > example below)[1] > > I'm new to Alpine but not to Linux, *BSD, or (way back) Ultrix, and have > not (yet) dug into the Alpine code base and infrastructure. (Although I > have my 'notes-to-self' documentation[2] that I intend (RSN...) to > integrate into the Wiki and have published on my website). > > My questions with respect to the issues mentioned are: > > 1. Do you prefer the GitLab merge request interface or the mailing list > for patches?[3] merge requests on gitlab are highly preferred- our mailing list integration is only into aports (package repository), and quite scuffed as it opens a new merge request and requires a new email for any changes.. > > 2. If you are not already using tools like shellcheck / shellfmt and or > shell unit tests in your CI, do you have objections to such being added? tests are extremely welcome. we write ours (now) in kyua+atf, and libalpine.sh comes from alpine-conf, see https://gitlab.alpinelinux.org/alpine/alpine-conf/ and the tests that are already there (and where you should report any issues that you have now, it seems). as for shellcheck i think that would be welcome, but shellcheck has a ton of very useless lints.. an opt-in only list of rules would most likely work, but you'd have to ask the maintainer. > > I'm hoping to spend some time fixing this type of issue as they result > in annoying hiccups when trying to automate setup-alpine, and I'd like > that to work well. > > A final note: I've got some cloud-init image creation using Packer that > I soon intend to push to public repository, along with Terraform usage > of the same; is there interest in those here? I almost forgot; what is > the status the work on the 'tiny' cloud-init substitute or other > alternatives in Alpine? > > Regards, > > Daniel > > > [1]: > > # test the first argument against the remaining ones, return success on > a match > isin() { > =C2=A0=C2=A0 =C2=A0local _a=3D$1 _b > =C2=A0=C2=A0 =C2=A0shift > =C2=A0=C2=A0 =C2=A0for _b; do > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 [ "$_a" =3D "$_b" ] && return 0 > =C2=A0=C2=A0 =C2=A0done > =C2=A0=C2=A0 =C2=A0return 1 > } > > _b is never assigned a value. This is why automating ntp setup fails > (specifically the following code in /sbin/setup-ntp) will never skip the > 'ask': > > while [ $# -eq 0 ] && ! isin "$resp" busybox openntpd chrony none abort; = do > =C2=A0=C2=A0 =C2=A0ask "Which NTP client to run? ('busybox', 'openntpd', = 'chrony' or > 'none')" chrony > done > > [2]: https://wildtechgarden.ca/deploy-admin/server-alpine-linux-docs4web/ > > [3]: I've been off in frontend-land for a while and am somewhat out of > sync with current systems development preferences. > > Speaking of which, I don't see at > https://useplaintext.email/#thunderbird how to limit the line length to > 72 characters as requested (or is this unnecessary due to things > Thunderbird does in background when sending plaintext?). seems to be wrapped correctly to me, and the entire email is plaintext and perfectly formatted. > > I unfortunately need features of Thunderbird that aren't available in > what I preferred in the days before MS 365 and Gmail were what most of > the folks I needed to communicate with dependent on, which was Claws Mail= . > > --=20 > > https://wildtechgarden.ca Technical and professional website > https://princesandmadmen.ca Personal and political blog