From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 39AC03858039 for ; Sat, 27 Feb 2021 08:13:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 39AC03858039 Received: by mail-pf1-x42f.google.com with SMTP id j12so7822532pfj.12 for ; Sat, 27 Feb 2021 00:13:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:in-reply-to:references :message-id:mime-version:content-transfer-encoding; bh=6Z1uVWh22BjioqxDt2Dz6FuZ9uLE0YifPCuyonTjvO0=; b=mCr4/udvZ3k09Lm9Dmz5jo8zfpy6/nB624+3lN1ncumbQGIjdxeWEeTw+SXycd1wq9 XiQAye4yhZiGzf6w/fpIPnGmEd+cFcm5clRRB4WmNPXJdCLQLIdYGR6P1YOnRmA+mSlQ gcZGh5slddlfAfKLP3GHtATxCyVqsxm88OddrY9fgn+vYUpOIiuMtEd5YQ4nxNaK8CAa Jc5/euvCoeP9+AtPO0lob2d0WusW0A4D1MEKetDVahtfTS3J1bzk9/y8n9lNh6Uhw3Ac m6o0YI+Qz9VOHw6+3f1Z9rwWnPJrTNn3StPcnTHhStgNseVTa99+RvmWGzDb7y2ZY4Jg CelQ== X-Gm-Message-State: AOAM532Nd3gCEOfUYjARuCarBo57GyK+oA5JUtz027MHUp+90HHgUas/ cg8j7xLSqc8HRHWblL9XzGfwUf+qP4s= X-Google-Smtp-Source: ABdhPJwr10RIJHMaq5O5+VCgZOeDMUWkYAc9ipSbnpr3DfwZuUG/HlvLqFju6EI/XTfNbiH/60J3cg== X-Received: by 2002:a63:4808:: with SMTP id v8mr6108633pga.381.1614413609800; Sat, 27 Feb 2021 00:13:29 -0800 (PST) Received: from [192.168.3.4] ([2400:2411:aa20:4300:7d3d:d577:cc13:9b9e]) by smtp.gmail.com with ESMTPSA id nh6sm10461060pjb.21.2021.02.27.00.13.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Feb 2021 00:13:29 -0800 (PST) Date: Sat, 27 Feb 2021 17:13:29 +0900 From: Lemures Lemniscati To: cygwin-apps@cygwin.com Subject: Re: Multiple version of Lua with alternatives In-Reply-To: <42e545cf-2a49-f5e2-f75b-0f9ed7f2ac7a@SystematicSw.ab.ca> References: <20210224200321.589E.50F79699@gmail.com> <42e545cf-2a49-f5e2-f75b-0f9ed7f2ac7a@SystematicSw.ab.ca> Message-Id: <20210227171327.39AC.50F79699@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Mailer: Becky! ver. 2.75.02 [ja] X-Antivirus: Avast (VPS 210226-8, 2021/02/27), Outbound message X-Antivirus-Status: Clean X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2021 08:13:33 -0000 On Wed, 24 Feb 2021 09:38:33 -0700, Brian Inglis > On 2021-02-24 04:03, Lemures Lemniscati via Cygwin-apps wrote: > > On Tue, 23 Feb 2021 23:53:08 -0700, Brian Inglis > >> On 2021-02-23 22:20, Marco Atzeri via Cygwin-apps wrote: > >>> On 24.02.2021 05:18, Lemures Lemniscati via Cygwin-apps wrote: > >>>> On Sat, 20 Feb 2021 19:15:38 +0900, Lemures Lemniscati > >>>>> On Sat, 20 Feb 2021 08:40:33 +0100, Achim Gratz > >>>>>> Lemures Lemniscati via Cygwin-apps writes: > >>>>>>> * A new source luarocks provides lua53- and lua54-luarocks. > >>>>>>>    They install rocks into an alternative tree /var/lib/lua-site/. > > >>>>>> That looks wrong to me, I'd have expected > >>>>>> /usr/share/lua/luarocks > >>>>>> or maybe /usr/local as a prefix depending on how much emphasis you want > >>>>>> to put on the user-installable part.  The /var/lib tree is for local > >>>>>> state information per FHS, not installed components. > > >>>>> Thank you for review. > >>>>> I've fixed it, so that luarocks should install rocks into > >>>>> /usr/share/lua/luarocks, and updated packages [1]. > > ^^^^^^^^^ (Sorry I accidentally replaced it by '/usr/local' in the > > original mail: it is still /usr/share/lua/luarocks ) > >>>> I'm wondering again it would be better for luarock to install into /usr/local > >>>> tree. > > >>> usually installation with a similar subtree are installed > >>> under usr/lib > >>> $ find /usr/lib -name bin > > >>> there are few cases under usr/share > >>> but usually are sub-sub trees > >>> $ find /usr/share -name bin > > >>> we have nothing "current" installed under usr/local > >>> at all. No package should be installed there > > >> Indeed - that's where I stash all my personal Cygwin scripts and exes. > > >> Another good spot is /usr/libexec/ which is well populated by the likes of > >> git plumbing and other packages. I prefer the packages that populate > >> subdirectories rather than littering the top level like geoclue and gvfsd. > > > Thank you for advices! > > I've understood that we should avoid /usr/local. > > And, choices for a tree-prefix where luarocks will install rocks are: > > 1) luarocks_tree=/usr/share/lua/luarocks > > 2) luarocks_tree=/usr/lib/lua/luarocks > > 3) luarocks_tree=/usr/libexec/lua/luarocks > > And rocks will go: > > ${luarocks_tree}/bin > > ${luarocks_tree}/lib/lua/5.3 > > ${luarocks_tree}/lib/lua/5.4 > > ${luarocks_tree}/lib/luarocks/rocks-5.3/ > > ${luarocks_tree}/lib/luarocks/rocks-5.4/ > > ${luarocks_tree}/share/lua/5.3 > > ${luarocks_tree}/share/lua/5.4 > > I don't know which is the best. > > Current choice is still /usr/share/lua/luarocks [1]. > > [1]: https://cygwin-lem.github.io/lua-cygwin-packages/ > > Packaging luarocks varies across distros. Where I have been able to find target directories suggests: > > basing off Fedora as much here does: > https://src.fedoraproject.org/rpms/luarocks/blob/rawhide/f/luarocks.spec#_57: > mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version} > would suggest /usr/lib/luarocks/rocks-%{lua_version} > > msys2 uses: > https://github.com/msys2/MINGW-packages/blob/fbe23378fcb1fa50dcd132ce8ab24217a6d9e433/mingw-w64-lua-luarocks/luarocks-x86_64.install#L8 > ${MINGW_PREFIX}/share/lua/5.1/luarocks/site_config.lua > /usr/share/lua/$VER/luarocks/ > > Arch uses: > https://archlinux.org/packages/community/any/luarocks/ > usr/share/lua/$VER/luarocks/ > > slack uses: > https://slackbuilds.org/slackbuilds/14.2/development/luarocks/luarocks.SlackBuild#77 > suggests /usr/lib{,64}/ and whatever make install defaults to. > > Ubuntu uses: > https://packages.ubuntu.com/groovy/all/luarocks/filelist > /usr/share/lua/$VER/luarocks/ Thank you. Their places for luarocks package itself seem to be almost default with prefix /usr. I've tested luarocks on fedora/opensuse/debian/ubuntu to find out places in which luarocks install rocks and libraries [1]. [1]: https://gitlab.com/test.cases/luarocks-test/-/pipelines/262667066 fedora: using /usr tree https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115707 https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115708 /usr/bin/ /usr/lib64/luarocks/rocks-5.4/ /usr/lib/lua/5.4/ /usr/share/lua/5.4/ opensuse: using /usr tree https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115709 /usr/bin/ /usr/lib64/lua/5.3/ /usr/lib/luarocks/rocks-5.3/ /usr/share/lua/5.3/ debian/ubuntu: using /usr/local tree https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115705 https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115706 https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115710 /usr/local/bin/ /usr/local/lib/luarocks/rocks/ /usr/local/lib/lua/5.1/ /usr/local/share/lua/5.1/ Lem