Skip to content

Install script broken? #836

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
everythingfunctional opened this issue Feb 7, 2023 · 10 comments
Closed

Install script broken? #836

everythingfunctional opened this issue Feb 7, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@everythingfunctional
Copy link
Member

Description

Did something recently change to break the install script? I just had a build failure on my dockerfpm project that seems to indicate the install script couldn't find the latest release.

Expected Behaviour

The install script should work within an Ubuntu based Docker image.

Version of fpm

latest

Platform and Architecture

Docker image based on ubuntu:rolling

Additional Information

A git blame seems to indicate the change from #818 may be the culprit.

@everythingfunctional everythingfunctional added the bug Something isn't working label Feb 7, 2023
@perazz
Copy link
Member

perazz commented Feb 9, 2023

@everythingfunctional You're right, it seems like curl is not supplied by default on Ubuntu:

#10 0.237 ./install.sh: 24: curl: not found

which is weird, because it looks like it's been installed on your docker image:

#7 1009. Preparing to unpack .../088-libcurl3-gnutls_7.85.0-1ubuntu0.2_amd64.deb ...
[599](https://gitlab.com/everythingfunctional/dockerfpm/-/jobs/3722858510#L599)#7 1009. Unpacking libcurl3-gnutls:amd64 (7.85.0-1ubuntu0.2) ...

@everythingfunctional
Copy link
Member Author

That's because the next lines are the important part:

#10 0.242 --2023-02-06 17:19:47--  https://github.com/fortran-lang/fpm/releases/download/v/fpm-.F90
#10 0.245 Resolving github.com (github.com)... 140.82.113.3
#10 0.249 Connecting to github.com (github.com)|140.82.113.3|:443... connected.
#10 0.280 HTTP request sent, awaiting response... 404 Not Found
#10 0.373 2023-02-06 17:19:47 ERROR 404: Not Found.

It's not that curl wasn't found, it's that curl didn't find anything at the provided url. Notice the missing version identifier in https://github.com/fortran-lang/fpm/releases/download/v/fpm-.F90

@perazz
Copy link
Member

perazz commented Feb 9, 2023

#839 should solve this issue, where to test the install script?

@everythingfunctional
Copy link
Member Author

I've tried it out locally and it seems to work.

@perazz
Copy link
Member

perazz commented Feb 9, 2023

My bad, install.sh already checked curl vs wget at

fpm/install.sh

Lines 66 to 73 in 4be07af

if command -v curl > /dev/null 2>&1; then
FETCH="curl -L"
elif command -v wget > /dev/null 2>&1; then
FETCH="wget -O -"
else
echo "No download mechanism found. Install curl or wget first."
exit 1
fi

I should have not overlooked that

@vmagnin
Copy link
Member

vmagnin commented Feb 17, 2023

I have just tried installing fpm on a Debian Sid 32bits, after a git clone:

osboxes@osboxes:~/fpm$ ./install.sh
--2023-02-17 18:51:30--  https://api.github.com/repos/fortran-lang/fpm/releases/latest
Resolving api.github.com (api.github.com)... 140.82.121.6
Connecting to api.github.com (api.github.com)|140.82.121.6|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘latest’

latest                                    [ <=>                                                                      ]  27.15K  --.-KB/s    in 0.05s   

2023-02-17 18:51:31 (503 KB/s) - ‘latest’ saved [27806]

--2023-02-17 18:51:31--  https://github.com/fortran-lang/fpm/releases/download/v/fpm-.F90
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-02-17 18:51:31 ERROR 404: Not Found

After a $ sudo apt install curl, the install script worked fine.

Note that wget was already installed.

@perazz
Copy link
Member

perazz commented Feb 17, 2023

Did you get the repo after #839 was merged?

@vmagnin
Copy link
Member

vmagnin commented Feb 17, 2023

I think, I have git clone just 20 minutes ago.

@perazz
Copy link
Member

perazz commented Feb 17, 2023

fpm/install.sh

Line 74 in 5efb9e0

LATEST_RELEASE=$(get_latest_release "fortran-lang/fpm" $FETCH)

this line is to blame, it should be

LATEST_RELEASE=$(get_latest_release "fortran-lang/fpm" "$FETCH")

@perazz
Copy link
Member

perazz commented Feb 27, 2023

#842 has been merged and closed, so I would close this for now.

@perazz perazz closed this as completed Feb 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants