public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin-apps@cygwin.com
Subject: Re: [Bug] setup regression #2
Date: Sun, 13 Nov 2022 13:47:38 +0100	[thread overview]
Message-ID: <87iljjggwl.fsf@Rainer.invalid> (raw)
In-Reply-To: <8a811ecf-38e7-a631-c09e-92ca4d439cc2@dronecode.org.uk> (Jon Turney's message of "Tue, 8 Nov 2022 16:21:44 +0000")

Jon Turney writes:
> On 08/10/2022 17:56, Achim Gratz wrote:
>> I think that setup was essentially treating the install as "for this
>> user only" since it was created and maintained by a script that can't
>> affect that option and the fact it was also in group Adminsitroators
>> didn't actually register until now.
>
> Yeah, that seems possible, since some of these changes fix what are
> arguably bugs in how that works (i.e. I suspect that previously, even
> when elevated, if only the registry key
> HKEY_CURRENT_USER\\Software\\Cygwin\\setup\rootdir exists (and not the
> same key under HKLM), we're going to install for "Just Me",
> irrespective of what the UI says)

I've checked some old logs and even though the install was identified as
"system", there was no line "Changing gid to Administrators" for the
main install until setup version 2.921.

> I wrote some code for this option (attached), but I have a hard time
> seeing how it's functionally different from using '-B/'--no-admin'.

This option does nothing to prevent the use of Administrator group when
the install is identified as "system" and those rights are actually
available (which they are as the scripting needs those rights in other
places).

> So, I guess a question is, does running with that option work as
> expected in your problematic instance?

No, it does not, see above.

The problem is actually a more knotty than you seem to think:
prominently ca-certificates and man-db get their knickers in a twist
when the group during post-install is different from the group of the
installed files and I suspect some other packages will run into similar
problems depending on how fussy they are with the group permissions.
The symptom is that you see failures from chmod (for whatever reason
"Invalid argument") when these programs try to swap the existing with
the newly gerenated (temporary) files.  In the case of man-db that
results in the /var/cache/man/index.db file getting removed (and
depending on the version the PID temporaries getting left in place), for
update-ca-trust the mkstemp temporaries will be left over and the
original files left in place.

So all installs from before the change to setup are affected if the
installation wasn't done via the GUI at least.

I think it would be best to have an option to directly specify a desired
group for both the installed files and running the post-install (which
already must be in the user token).  The default should be the primary
group of the user doing the installation.  I don't think the
installation should be group-owned by "Administrators" on Windows.  If
anything it makes it much more difficult to administer the installation
from within Cygwin as there doesn't seem to be a way to change to a
different than the primary group for domain accounts yet.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

  parent reply	other threads:[~2022-11-13 12:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 17:14 Achim Gratz
2022-10-01 15:37 ` Jon Turney
2022-10-03 19:23   ` Achim Gratz
2022-10-08 15:18     ` Jon Turney
2022-10-08 16:56       ` Achim Gratz
2022-11-08 16:21         ` Jon Turney
2022-11-09 18:25           ` Achim Gratz
2022-11-13 12:47           ` Achim Gratz [this message]
2022-11-20 17:16             ` Jon Turney
2022-11-20 19:05               ` Achim Gratz
2022-11-21 12:32                 ` Corinna Vinschen
2022-11-21 12:39                   ` ASSI
2022-11-21 12:47                     ` Corinna Vinschen
2022-11-29 21:37                 ` Jon Turney
2022-11-30 21:22                   ` Christian Franke
2022-12-01 19:50                     ` Achim Gratz
2023-02-02 16:00               ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iljjggwl.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).