delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/02/23/16:51:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9A39C3945C3F
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.4 cv=Yq/K+6UX c=1 sm=1 tr=0 ts=603578ec
a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
a=r77TgQKjGQsHNAKrUKIA:9 a=w_pzkKWiAAAA:8 a=TImcKGuyeGIbufSLrCcA:9
a=QEXdDO2ut3YA:10 a=_jrB6pKBMU6T8jZcrmcA:9 a=B2y7HmGcmWMA:10
a=sRI3_1zDfAgwuvI8zelB:22
To: cygwin AT cygwin DOT com
References: <DM8PR09MB7095DE1F14F693111C4D4162A5809 AT DM8PR09MB7095 DOT namprd09 DOT prod DOT outlook DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Subject: Re: No admin setup questions
Message-ID: <74f0de28-a6a8-9cb0-81d6-25af806bae53@SystematicSw.ab.ca>
Date: Tue, 23 Feb 2021 14:51:39 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
MIME-Version: 1.0
In-Reply-To: <DM8PR09MB7095DE1F14F693111C4D4162A5809@DM8PR09MB7095.namprd09.prod.outlook.com>
X-CMAE-Envelope: MS4xfIm4K3LTzfRzjjVTrcS72lrvxpDhe8ccAf4GpI+pZlnME5jeLOt7tvXn1kxUte3/eow6aRKQyv5MJjYJArg9UZnPG+0eBjfQsyOnFKPkL1T9/Ul9nInM
da3yvQ3Cr/jUWpNjMrBIxjSusWlEjYYjjuVMJ2GPGhXzRVz2a2xuHrzzRp9IgpgW45KXImZQZuuEpE8OHufoqI79EB8oY2ivnJ0=
X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL,
RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

This is a multi-part message in MIME format.
--------------CEBF27A76C7B1CB8BC38A828
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On 2021-02-23 09:08, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrot=
e:
> I just downloaded the freshest setup.exe from the website to update a v=
ery
> old installation on a work PC, and am running it with -B (no admin).
> First thing I noticed is that the front page of the website (Cygwin.com=
)=20
> tells me that the latest Cygwin is 3.1.6, but the setup is downloading
> 3.1.7-1.

Good catch - thanks - patch submitted.

> Also, I see a lot of messages in the cmd.exe "terminal" window, from wh=
ere=20
> setup was run:  it seems to be logging all actions, including that I wa=
s not=20
> allowed to open service controller, and missing some rights, what the
> download and install path are, which packages are being downloaded, ext=
racted
> and installing.
> I do not remember seeing any of those in a "more regular" use (without =
the=20
> -B, when I just click the icon with the program).

Your non-elevated non-admin USER may not have perms to create logs in any=
 of the=20
usual places /var/log/, /tmp/, ./, /

> Is that some sort of a debugging output left behind?  Just curios, if t=
hat's=20
> a debug version of the setup ended up on being offered for download
> inadvertently.
> Also, procmail fails to post-install (I don't need it, so I don't basic=
ally
> care).
> running: C:\cygwin64\bin\bash.exe --norc --noprofile "/etc/postinstall/=
procmail.sh"
> abnormal exit: exit code=3D1
Your non-elevated non-admin USER will not have perms to be able to chown =
to=20
SYSTEM, and may not have perms to create directories, install config file=
s, etc.=20
required to install services such as procmail which should normally be in=
stalled=20
or upgraded under an elevated admin USER.

$ head /etc/postinstall/procmail.sh.done
#!/bin/sh

function install_conf {
         if ! [ -s "/$1" ]; then
                 cp -p "/etc/defaults/$1" "/$1"
                 chown SYSTEM "/$1"
                 chmod -x "/$1"
         fi
}
function install_dir {
$ dash -n /etc/postinstall/procmail.sh.done
a/procmail.sh.done: 9: a/procmail.sh.done: Syntax error: "}" unexpected
$ checkbashisms -fnpx /etc/postinstall/procmail.sh.done
possible bashism in /etc/postinstall/procmail.sh.done line 3 ('function' =
is=20
useless):
function install_conf {
possible bashism in /etc/postinstall/procmail.sh.done line 10 ('function'=
 is=20
useless):
function install_dir {

Script /etc/postinstall/procmail.sh is non-POSIX, non-portable, will not =
run=20
under dash or another POSIX shell, only if sh is bash as installed by Cyg=
win or=20
something similar; to be safe, explicit standard binary paths should be=20
hardcoded and precautions taken, just in case a proper PATH is not yet se=
t, the=20
script is not run under native Cygwin, or not installed for all users und=
er an=20
elevated admin USER, similar to the attached patch.

The postinstall script would be better rewritten to take account of these=
=20
conditions and use the install utility designed to do all this instead of=
=20
duplicating it in functions.

--=20
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

--------------CEBF27A76C7B1CB8BC38A828
Content-Type: text/plain; charset=UTF-8;
 name="procmail.sh.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="procmail.sh.patch"

ZGlmZiBhL3Byb2NtYWlsLnNoIGIvcHJvY21haWwuc2gKLS0tIGEvcHJvY21haWwuc2gJMjAx
NS0wNS0wMiAxNTo0Nzo1MS4wMDAwMDAwMDAgLTA2MDAKKysrIGIvcHJvY21haWwuc2gJMjAy
MS0wMi0yMyAxNDozNjoxMS42MTUzMzc1MDAgLTA3MDAKQEAgLTEsMjIgKzEsMjQgQEAKICMh
L2Jpbi9zaAogCi1mdW5jdGlvbiBpbnN0YWxsX2NvbmYgeworaW5zdGFsbF9jb25mICgpIHsK
IAlpZiAhIFsgLXMgIi8kMSIgXTsgdGhlbgotCQljcCAtcCAiL2V0Yy9kZWZhdWx0cy8kMSIg
Ii8kMSIKLQkJY2hvd24gU1lTVEVNICIvJDEiCi0JCWNobW9kIC14ICIvJDEiCisJCS9iaW4v
Y3AgLXAgIi9ldGMvZGVmYXVsdHMvJDEiICIvJDEiCisJCVsgLW4gIiRDWUdXSU5GT1JBTEwi
IF0gJiYgL2Jpbi9jaG93biAkcm9vdCAiLyQxIgorCQkvYmluL2NobW9kIGEteCAiLyQxIgog
CWZpCiB9Ci1mdW5jdGlvbiBpbnN0YWxsX2RpciB7CitpbnN0YWxsX2RpciAoKSB7CiAJaWYg
ISBbIC1kICIkMSIgXTsgdGhlbgotCQlta2RpciAtcCAiJDEiCi0JCWNob3duIFNZU1RFTSAi
JDEiCisJCS9iaW4vbWtkaXIgLXAgIiQxIgorCQlbIC1uICIkQ1lHV0lORk9SQUxMIiBdICYm
IC9iaW4vY2hvd24gJHJvb3QgIiQxIgogCWZpCiB9CiAKK1sgJCh1bmFtZSAtbykgPSBDeWd3
aW4gXSAmJiByb290PVNZU1RFTSB8fCByb290PXJvb3QKKwogaW5zdGFsbF9kaXIgL3Zhci9z
cG9vbC9tYWlsCiBpbnN0YWxsX2NvbmYgZXRjL2FsaWFzZXMKIAotY2hvd24gU1lTVEVNIC91
c3IvYmluL3Byb2NtYWlsLmV4ZQotY2hvd24gU1lTVEVNIC91c3IvYmluL2xvY2tmaWxlLmV4
ZQorL2Jpbi9jaG93biAkcm9vdCAvdXNyL2Jpbi9wcm9jbWFpbAorL2Jpbi9jaG93biAkcm9v
dCAvdXNyL2Jpbi9sb2NrZmlsZQogCg==
--------------CEBF27A76C7B1CB8BC38A828
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

--------------CEBF27A76C7B1CB8BC38A828--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019