English | Lietuviškai

Info


Communication


PEROPESIS FORUM

This forum is dedicated to discussing issues related to the use and development of the Peropesis Linux operating system.

Suggestion for git and cURL

by sskras ⌂, Lithuania, Monday, November 21, 2022, 15:03 (762 days ago)

Since now user is about to build additional software itself, I urge adding `git` tool. :)
Without it reaching a lot of new software recedes several steps further/away.


I mean, downloading `git` sources using `wget` and building them would be a big task by itself.
IMO this would involve compiling additional dependencies as well (most of which probably would require `git` by themselves).


Hence my vote.

Review comments

by g, Wednesday, November 23, 2022, 08:24 (760 days ago) @ sskras

Personally, I don't have an opinion on the necessity of git. Maybe this should be brought to the future.

Review comments

by sskras ⌂, Lithuania, Wednesday, November 23, 2022, 13:19 (760 days ago) @ g
edited by sskras, Wednesday, November 23, 2022, 13:42

Acknowledged. I will return to this after I do some experiments with `pkgsrc`. :)


Now my another vote.


Peropesis has `wget` for fetching/downloading files from internet.

Then quite a few Linux tools has shell one-liners to bootstrap their installation independently from package manager. But they use `curl` for that, Eg:

https://nixos.wiki/wiki/Nix_Installation_Guide#Stable_Nix
https://nim-lang.org/install_unix.html#installation-using-choosenim
https://github.com/docker/docker-install#usage
https://go.googlesource.com/tools/+/master/cmd/getgo/#usage
https://www.rust-lang.org/tools/install#rustup


`wget` probably can do most of what `curl` can. But the command line conversion would take some additional effort every such time. So I would like to have `curl` too.


I am not sure about the dependencies of `curl` though. I.e. are there something more required in comparison to dependencies that came with `wget`.


What's you opinion about including both tools?

Review comments

by g, Thursday, November 24, 2022, 11:40 (759 days ago) @ sskras

I'm studying cURL and your links. I don't have an opinion right now.

Review comments

by g, Thursday, December 29, 2022, 11:42 (724 days ago) @ sskras

I've created a new thread for the git and curl posts.


As I understood in all of the examples you've gave, cURL is used to download .sh files, that later initiation of these files will download and install the intended software. In this case, downloading .sh files in Peropesis system is possible using wget program, as you mentioned.


Thus, the essential function of cURL is to transport data (to both sides) using protocols such as FTP, HTTP, IMAP, SMTP, etc. With Peropesis, at this moment there is possibility to download files using wget and links programs and using HTTP and FTP protocols. Also, using the S-nail mail program, it is possible to transport files (to both sides) using the IMAP and SMTP protocols.


There is currently no way to send files to ftp or to other type of servers with Peropesis. The Peropesis distribution distributes several programs (ping, ping6, whois) from the Inetutils software package. Inetutils package also distributes ftp program for file transfer using file transfer protocol (FTP). So, if inetutils will be fully installed in the Peropesis distribution, it would be possible to upload files as well.


But what if there's a need to transport data using not only the SMTP, IMAP and FTP, HTTP protocols? The question is what protocols are used most often, with which data is transported and what software (clients) are used to work with them?


I got a little familiar with the cURL program from the lame user's side. The first impression is that it is a very wide use software. For example, when I wrote earlier that the Peropesis system have the ability to download files from an HTTP server, but there is no software on this system for uploading files to a Web server. By the cURL user manual (https://curl.se/docs/manpage.html), this program has the ability to upload files to HTTP servers. However, I personally failed to transport the file to the local apache server (command: curl -T file.txt http://localhost/directory). As I understood with cURL, there is an option to send variable values using GET or POST methods and not only using HTTP, but also using, for example, the MQTT protocol. As I understood, there are also software developed that use cURL and would not even work without cURL (https://curl.se/docs/programs.html). So this is serious software. And in what situations do you use cURL?

Review comments

by sskras ⌂, Lithuania, Thursday, December 29, 2022, 13:13 (724 days ago) @ g

As I understood in all of the examples you've gave, cURL is used to download .sh files,


Exactly...
 

that later initiation of these files will download and install the intended software.


... and presumably these will do that using the same tool, `curl`.
 

In this case, downloading .sh files in Peropesis system is possible using wget program, as you mentioned.


Sure, but this requires a user to reconstruct the command line (ie. no quick copy-paste and being happy, especially if the guy is a newbie:)
 

Thus, the essential function of cURL is to transport data (to both sides) using protocols such as FTP, HTTP, IMAP, SMTP, etc. [...]


Thanks for your wide review of the `curl`. I use it only for transfter using HTTP(S) protocol, and surely these are downloads only.
 

Inetutils package also distributes ftp program for file transfer using file transfer protocol (FTP). So, if inetutils will be fully installed in the Peropesis distribution, it would be possible to upload files as well.


In case I want an FTP transfer, I would go with `lftp` client. And I would install it from my `pkgsrc` build.
 

But what if there's a need to transport data using not only the SMTP, IMAP and FTP, HTTP protocols? The question is what protocols are used most often, with which data is transported and what software (clients) are used to work with them?


The only protocol I would use for file transfer is the SSH. And if I like to move data through some other protocols, most likely I will use a specific app or maybe even tunnel for that (like `chisel` -- an IP over HTTP tunnel). Which surely I will try to build myself and would not hope to find on such small and cute distro. :)
 

I got a little familiar with the cURL program from the lame user's side. The first impression is that it is a very wide use software.

[...]

As I understood with cURL, there is an option to send variable values using GET or POST methods and not only using HTTP, but also using, for example, the MQTT protocol. As I understood, there are also software developed that use cURL and would not even work without cURL (https://curl.se/docs/programs.html). So this is serious software. And in what situations do you use cURL?


Thanks again for your detailed analysis. I use `curl` mainly for two things:


(1) downloading the stuff via HTTP, and

(2) debugging HTTP issues (eg. by showing the HTTP headers of both the request and the response, overriding some header value or making a POST to some REST API backend).
 

IOW, it's so common (would say even popular), that I expect it to be found installed alone `wget`. :)
But well, in case it's not there, I think I should be able to get it from https://pkgsrc.se/www/curl
 

PS. Haven't started my Peropesis experiments yet. :)

Review comments

by g, Thursday, December 29, 2022, 16:38 (724 days ago) @ sskras

[...] ...ssh really should be installed, also cURL and git (someday).


Copyright © 2021-2024 Peropesis. See license terms.
E-mail: info(at)peropesis.org