From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by sourceware.org (Postfix) with ESMTPS id 766CF3858031 for ; Fri, 22 Jan 2021 21:05:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 766CF3858031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ajrh.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=anthony@ajrh.net Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 888E65C0189 for ; Fri, 22 Jan 2021 16:05:42 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Fri, 22 Jan 2021 16:05:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ajrh.net; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=mesmtp; bh=N6BMGK2NF2IdD6AT4bfKKb4fHX6r iqhEdP/F+ksD9qY=; b=YSCjBq/HDejfE4g+76Lyc0bWUhtGNIT38nCgoiGO6CMq yOP5hzyhMS7rfEy6Y+2oD9tqlyenIRc9/21mpKTInL9rs5qVqKd4sIEUDIhMr3pv fvaxHo2KhCjOdxKSDdRRJk54Bt3VavIDdlSvQfYuE6BottLp5Kamcyd0YMPn7EY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=N6BMGK 2NF2IdD6AT4bfKKb4fHX6riqhEdP/F+ksD9qY=; b=HUHIF4j6G+LwF0/vwGftJX w4KU4hkRWoxQLsuMTtJ8fRgZu2p1LcBcxKw/HWZODq7jqeT45ObPEiioxyx2SqOU rcSg18NaDeRcbd52iVIvqDM4jJ7cb8jwSUWCKutZgYq8OCQv6aUd97fApgvCxGCN uCpuxF6Ztxh+IlI09zrSseSVvgsqTyDB5E5mURRTumFOUWgQvxU7RNhxpNdkf/EO cbxPJ7X9REMQIBA5F82Il2RVSMUfMdofOf5oTDkhcfLbbh9sqJPIuc1iYZiRfmEZ 7sffZ33q2fnoN7ynBqnC3QOMRZbBAAAEDIHIL9Ayi1W0+C98ktQRQcIgLTecCIvA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeigdduheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhht hhhonhihucfjvggrughinhhgfdcuoegrnhhthhhonhihsegrjhhrhhdrnhgvtheqnecugg ftrfgrthhtvghrnhepfeefhefgtdefkeejfeffveekuddvgeekteeukeejieehiedvgefg leegkeekkeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnthhhohhnhiesrghjrhhhrdhnvght X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id F029D130005E; Fri, 22 Jan 2021 16:05:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-78-g36b56e88ef-fm-20210120.001-g36b56e88 Mime-Version: 1.0 Message-Id: In-Reply-To: <87czxw3gu0.fsf@Rainer.invalid> References: <87czxw3gu0.fsf@Rainer.invalid> Date: Fri, 22 Jan 2021 21:05:21 +0000 From: "Anthony Heading" To: "Marco Atzeri via Cygwin" Subject: Re: missing perl directories Content-Type: text/plain X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2021 21:05:45 -0000 On Fri, Jan 22, 2021, at 7:35 PM, Achim Gratz wrote: > > For good measure I repeated this with /usr/local not existing at all and > the result stays the same. Achim, that was a helpful test, thankyou. Digging further, the triggering perl code in /usr/share/perl5/5.30/CPAN/FirstTime.pm, so to replicate I also need to delete my ~/.cpan directory. Could you try doing that too and see if you agree? Here's the fuller problem, which is more than a cosmetic warning: ================ % cpan install Win32::Symlink Loading internal logger. Log::Log4perl recommended for better logging CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead. Would you like to configure as much as possible automatically? [yes] Use of uninitialized value $what in concatenation (.) or string at /usr/share/perl5/5.30/App/Cpan.pm line 679, line 1. Warning: You do not have write permission for Perl library directories. To install modules, you need to configure a local Perl library directory or escalate your privileges. CPAN can help you by bootstrapping the local::lib module or by configuring itself to use 'sudo' (if available). You may also resolve this problem manually if you need to customize your setup. What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') [local::lib] [...] ================ So the _apparent_ lack of write permission triggers a whole load of privilege escalation machinery which is unnecessary. This code is in unless ( $matcher || _can_write_to_libdirs() || _using_installbase() || _using_sudo() ) { local $auto_config = 0; # We *must* ask, even under autoconfig local *_real_prompt; # We *must* show prompt my_prompt_loop(install_help => 'local::lib', $matcher, 'local::lib|sudo|manual'); } and the core test on that looks like this: sub _can_write_to_libdirs { return -w $Config{installprivlib} && -w $Config{installarchlib} && -w $Config{installsitelib} && -w $Config{installsitearch} } hence there is an assumption that these directories exist.