www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Bug in installer.sh#L552-L556 and missing signature files

reply Andrew Edwards <edwards.ac gmail.com> writes:
 Martin  Seb,

Request assistance with Issue 21226. The description is pasted 
below for easy reference:

=================

The following lines:

https://github.com/dlang/installer/blob/720d3af0756390c065774b62952076fc73d17a49/script/install.sh#L552-L556

incorrectly assumes that we've always used 2.xxx.x for our 
releases. As a result, it wrongly classifies any compiler prior 
to 2.065.0 as nightlies and fails to install them.

I attempted to remedy this by changing the condition to:

     if [[ ! $input_compiler =~ -[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] &&
        [[ ! $input_compiler =~ -[0-9][.][0-9]{3}$ ]] &&
        [[ ! $input_compiler =~ 
-[0-9][.][0-9]{3}[.][0-9]{1,3}(-[0-9]{1,3})? ]]; then

Not sure if this messes up some other logic further down in the 
script but it works for my purposes. I don't install nighties so 
I couldn't care less. Nightlies are a hit and miss thing anyway. 
We haven't had one uploaded since March. The other option I see 
is to rename these releases to match current convention.

This works to an extent. It downloads the archive but fails on 
attempt to download the signature files. All release from 2.000 
to 2.064 are missing them.

Please upload those files and patch the script to allow for their 
download/installation.

--Andrew
Sep 05 2020
parent reply Jacob Carlborg <doob me.com> writes:
On 2020-09-05 23:35, Andrew Edwards wrote:
  Martin  Seb,
 
 Request assistance with Issue 21226. The description is pasted below for 
 easy reference:
 
 =================
 
 The following lines:
 
 https://github.com/dlang/installer/blob/720d3af0756390c065774b62952076fc73d17a49/script/
nstall.sh#L552-L556 
 
 
 incorrectly assumes that we've always used 2.xxx.x for our releases. As 
 a result, it wrongly classifies any compiler prior to 2.065.0 as 
 nightlies and fails to install them.
 
 I attempted to remedy this by changing the condition to:
 
      if [[ ! $input_compiler =~ -[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] &&
         [[ ! $input_compiler =~ -[0-9][.][0-9]{3}$ ]] &&
         [[ ! $input_compiler =~ 
 -[0-9][.][0-9]{3}[.][0-9]{1,3}(-[0-9]{1,3})? ]]; then
 
 Not sure if this messes up some other logic further down in the script 
 but it works for my purposes. I don't install nighties so I couldn't 
 care less. Nightlies are a hit and miss thing anyway. We haven't had one 
 uploaded since March. The other option I see is to rename these releases 
 to match current convention.
 
 This works to an extent. It downloads the archive but fails on attempt 
 to download the signature files. All release from 2.000 to 2.064 are 
 missing them.
 
 Please upload those files and patch the script to allow for their 
 download/installation.
 
 --Andrew
Alternatively you can use DVM [1]. [1] https://github.com/jacob-carlborg/dvm -- /Jacob Carlborg
Sep 06 2020
parent reply Andrew Edwards <edwards.ac gmail.com> writes:
On Sunday, 6 September 2020 at 13:09:31 UTC, Jacob Carlborg wrote:
 On 2020-09-05 23:35, Andrew Edwards wrote:
  Martin  Seb,
 
 Request assistance with Issue 21226. The description is pasted 
 below for easy reference:
[snip]
 Alternatively you can use DVM [1].

 [1]  https://github.com/jacob-carlborg/dvm
Thanks Jacob. But I need the the issue to be addressed formally. I'm glad that there are alternative methods available but I think the out-of-the-box experience should be seamless. As for my own personal use, I am able to work around this. Andrew
Sep 06 2020
parent reply Seb <seb wilzba.ch> writes:
On Sunday, 6 September 2020 at 14:08:04 UTC, Andrew Edwards wrote:
 On Sunday, 6 September 2020 at 13:09:31 UTC, Jacob Carlborg 
 wrote:
 On 2020-09-05 23:35, Andrew Edwards wrote:
  Martin  Seb,
 
 Request assistance with Issue 21226. The description is 
 pasted below for easy reference:
[snip]
 Alternatively you can use DVM [1].

 [1]  https://github.com/jacob-carlborg/dvm
Thanks Jacob. But I need the the issue to be addressed formally.
May I ask where the need is coming from? After all, these binaries are at least seven years old and: - Linux binaries only work with 2.079.0 or higher on modern machines which require PIC binaries - OSX binaries only work with with 2.088 or higher due to ABI changes on >= 10.15 - The install script only supports CygWin for two releases and even here you'll likely to have problems with older versions as they aren't code-signed Anyhow, as the fix is easy, I opened a PR and uploaded signatures until 2.060. https://github.com/dlang/installer/pull/470 The bigger issue is that even newer binaries (e.g. 2.088) have been signed with a GPG key that has since been expired and we should resign all archives. So when this resign script is been setup, we can also sign the older archives.
Sep 06 2020
parent reply Andrew Edwards <edwards.ac gmail.com> writes:
On Sunday, 6 September 2020 at 15:54:41 UTC, Seb wrote:
 On Sunday, 6 September 2020 at 14:08:04 UTC, Andrew Edwards 
 wrote:
 On Sunday, 6 September 2020 at 13:09:31 UTC, Jacob Carlborg 
 wrote:
 On 2020-09-05 23:35, Andrew Edwards wrote:
  Martin  Seb,
 
 Request assistance with Issue 21226. The description is 
 pasted below for easy reference:
[snip]
 Alternatively you can use DVM [1].

 [1]  https://github.com/jacob-carlborg/dvm
Thanks Jacob. But I need the the issue to be addressed formally.
May I ask where the need is coming from? After all, these binaries are at least seven years old
There are bugs in the issue tracker far longer than that. I though I’d try my hand at fixing one but am not sure that I’m seeing the same thing at the author. Hence, the need to recreate the environment in which he submitted the report.
Sep 06 2020
parent Seb <seb wilzba.ch> writes:
On Sunday, 6 September 2020 at 19:09:33 UTC, Andrew Edwards wrote:
 There are bugs in the issue tracker far longer than that. I 
 though I’d try my hand at fixing one but am not sure that I’m 
 seeing the same thing at the author. Hence, the need to 
 recreate the environment in which he submitted the report.
Hmm, I'm not sure at what issue you're looking, but the general rule of thumb is that if you can't reproduce it with the current DMD, it can be closed as either 'WORKSFORME' or 'FIXED'.
Sep 06 2020