unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Omar Bassam <omar.bassam88@gmail.com>
To: Suhail Singh <suhailsingh247@gmail.com>
Cc: 72925@debbugs.gnu.org, Omar Bassam <omar.bassam88@gmail.com>
Subject: [bug#72925] [PATCH v10] gnu: Add jpm.
Date: Mon, 07 Oct 2024 21:24:33 +0300	[thread overview]
Message-ID: <871q0rhiu6.fsf@omar-Latitude-5540.mail-host-address-is-not-set> (raw)
In-Reply-To: <8734l86h4l.fsf@gmail.com> (Suhail Singh's message of "Sun, 06 Oct 2024 17:44:42 -0400")

Suhail Singh <suhailsingh247@gmail.com> writes:

> Omar Bassam <omar.bassam88@gmail.com> writes:
>
>>> This should be doable without propagating any other inputs.  For example
>>> by ensuring that jpm sets appropriate environment variables (such as
>>> $CPATH , $C_INCLUDE_PATH , $CPLUS_INCLUDE_PATH etc.) or flags when
>>> invoking the compiler.  If so, that would be the preferred approach.  We
>>> only want to propagate those inputs that are strictly necessary.
>>>
>>> I do know that when I had tried to remove gcc-toolchain (without doing
>>> anything else) I encountered some errors during "jpm install -l sh" (in
>>> a pure shell).  However, I did not spend any effort in simplifying this,
>>> and I agree that we should try to.
>>>
>>> I look forward to seeing what you come up with in v11 :)
>>>
>>
>> I gave tried replacing gcc-toolchain with gcc and both the "jpm install"
>> commands and the "jpm build" commands worked fine for me without any
>> issues. I didn't need to set up any C related environemnt variables.
>> What kind of error where you getting? 
>
> I am unable to get the exact message at the moment (due to non-technical
> and unrelated reasons), but it was some missing header file.
>
> As I mentioned in the quoted message above, however, what would be
> better than propagating gcc, g++ etc would be to ensure that jpm passes
> appropriate flags when invoking them.  Have you looked into that?
>

I am not really an expert in compiling C programs so I'm not sure what
would be the best way to verify this? the "jpm build" command ran fine
for me and I don't have any of those C*PATH environment variables set.

>>>>> +    ;; NOTE: Below ensures that the user provides the CA certificates they
>>>>> +    ;; desire (as opposed to bundling `nss-certs' in propagated-inputs, which
>>>>> +    ;; isn't recommended) and when they do, that they are respected.
>>>>
>>>> Why isn't bundling nss-certs recommended?
>>>
>>> Doing so would deprive the user of the choice of which CAs to trust.
>>> I.e., if we were to bundle nss-certs we are taking an opinionated stance
>>> that the user agrees with Mozilla project's stance on these matters.
>>>
>>
>> But how will the user know that they will need to install nss-certs in
>> the shell or that they need to setup these SSL environemnt variables?
>
> Are you saying that when you test in a _non-pure_ shell where system
> certificates are available, you observe failures?

Yes, it did fail initially even in a non-pure non-container shell. I had
to manually set the SSL_CERT_DIR environment variable to /etc/ssl/certs
(I'm on Ubuntu). I did not need to set the SSL_CERT_FILE variable.
Is it possible to set a default value for that environment variable?
I'm not sure though if the /etc/ssl/certs/ is a standard among all Linux
distros or just Ubuntu.

>
> In pure containers, the failure one observes if the user hasn't done
> something to make certificates available is a commonly known occurrence.
> See <https://issues.guix.gnu.org/70314> for patch to change this default
> for networked containers.
>
> Note that if you're not using a pure container, things should just work.
> Please correct me if I am mistaken.
>
>> I agree of giving the user the freedom to enable or disable this but I
>> truly believe we need to provide sane defaults.
>
> Bundling nss-certs would depart from the current conventions in Guix (as
> I have recently come to understand).  For what it's worth, I also (now)
> agree that it's not the place for _a package_ to make the determination
> of which CAs to trust vs not.  However, since I don't have commit
> authority, you are welcome to ignore my opinions.  My goal was simply to
> demonstrate a working patch that didn't depart from current conventions.
> I believe I did that.
>
> Perhaps there is a discussion to be had, to revise said conventions
> and/or to better understand the tradeoffs of said and related
> conventions.  However, the guix-devel mailing list may be a better place
> for such discussions, and it might help your cause of upstreaming jpm if
> those discussions didn't block this patch.
>
>>>> What are the difference between search-paths and
>>>> native-search-paths.
>>>
>>> These are documented in the info manual.  However, it's not clear to me
>>> _why_ native-search-paths is the right thing to use in this situation.
>>> I posted a message on guix-devel regarding this:
>>> <https://yhetil.org/guix-devel/87zfnipg4b.fsf@gmail.com/>.
>>>
>>
>> OK, please let me know when you get to the bottom of this.
>
> I invite you to join the discussion on guix-devel.  It's possible that
> things that make sense to me, may not to you.
>

Thank you, I'm relatively very new to Guix, so I definitely need to read 
involved more about those discussions.

>>>> And were you able to run the "jpm install" command without
>>>> nss-certs. Because, for me I was unable to do so.  When I added back
>>>> the nss-certs in propagated-inputs, it worked fine.
>>>
>>> That is expected behaviour.
>>>
>>> The way to test it, when in a pure container, would be by explicitly
>>> ensuring that certificates of trusted CAs are included in the profile.
>>> On way to do so would by adding nss-certs alongside jpm when invoking
>>> the shell.
>>>
>>> Relying on the package to provide nss-certs isn't desirable.  We simply
>>> want to ensure that when the certs are provided that the package _is
>>> able to use_ them.  This is what the native-search-paths line
>>> accomplishes.
>>
>> I still don't understand why is it an expected behaviour if jpm by
>> default is expected to download packages mainly from github?
>
> It is the expected behaviour given my understanding of current packaging
> practices in Guix.  I have nothing more to add beyond what I've already
> said on this topic.
>
> Regards,

BRs,
Omar




  reply	other threads:[~2024-10-07 18:26 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01  8:31 [bug#72925] Adding JPM package for Janet Omar Bassam
2024-09-04  8:22 ` [bug#72925] [PATCH] adding jpm package Omar Bassam
2024-09-05 14:50 ` Omar Bassam
2024-09-18 13:18   ` [bug#72925] Adding JPM package for Janet Suhail Singh
2024-09-18 15:34     ` Omar Bassam
2024-09-18 16:16       ` Suhail Singh
2024-09-30  8:12 ` [bug#72925] [PATCH v3] adding jpm package Omar Bassam
2024-10-01  0:06   ` Suhail Singh
2024-10-02 15:09     ` Omar Bassam
2024-10-02 18:21       ` Suhail Singh
2024-10-02 19:04         ` jgart via Guix-patches via
2024-10-02 19:12         ` Omar Bassam
2024-10-02 20:14           ` Suhail Singh
2024-10-02 20:27             ` Omar Bassam
2024-10-02 20:33               ` jgart via Guix-patches via
2024-10-02 21:39               ` Suhail Singh
2024-10-02 21:52                 ` Omar Bassam
2024-10-02 22:07                   ` Suhail Singh
2024-10-03  1:40                     ` Suhail Singh
2024-10-03  7:14                       ` Omar Bassam
2024-10-03 13:40                         ` [bug#72925] Adding JPM package for Janet Suhail Singh
2024-10-03 19:45                           ` Omar Bassam
2024-10-03 22:04                             ` Omar Bassam
2024-10-04 16:00                               ` Omar Bassam
2024-10-05  3:11                                 ` Suhail Singh
2024-10-02 20:27             ` [bug#72925] [PATCH v3] adding jpm package jgart via Guix-patches via
2024-10-02 14:36 ` [bug#72925] [PATCH v5] gnu: add " Omar Bassam
2024-10-02 14:50 ` [bug#72925] [PATCH v6] " Omar Bassam
2024-10-02 14:51 ` [bug#72925] [PATCH v7] " Omar Bassam
2024-10-04 15:17   ` Omar Bassam
2024-10-04 15:57 ` [bug#72925] [PATCH v8] " Omar Bassam
2024-10-05  3:28   ` Suhail Singh
2024-10-05 17:25     ` [bug#72925] Adding JPM package for Janet Suhail Singh
2024-10-05  3:15 ` [bug#72925] [PATCH v9] gnu: Add jpm Suhail Singh
2024-10-05 17:21 ` [bug#72925] [PATCH v10] " Suhail Singh
2024-10-06 13:21   ` Omar Bassam
2024-10-06 15:46     ` Suhail Singh
2024-10-06 19:48       ` Omar Bassam
2024-10-06 21:44         ` Suhail Singh
2024-10-07 18:24           ` Omar Bassam [this message]
2024-10-07 18:51             ` Suhail Singh
2024-10-07 19:17               ` Omar Bassam
2024-10-07 20:15                 ` Suhail Singh
2024-10-07 21:13                   ` Omar Bassam
2024-10-08  0:11                     ` Suhail Singh
2024-10-08  3:49                       ` Suhail Singh
2024-10-08  8:25                       ` Omar Bassam
2024-10-08 13:39                         ` Suhail Singh
2024-10-08 16:33                           ` Omar Bassam
2024-10-08 22:01                             ` Suhail Singh
2024-10-09 11:58                               ` Omar Bassam
2024-10-09 13:12                                 ` Suhail Singh
2024-10-09 16:49                                   ` Omar Bassam
2024-10-09 17:15                                     ` Suhail Singh
2024-10-11 16:23                                       ` Omar Bassam
2024-10-11 16:45                                         ` Suhail Singh
2024-10-07 21:08 ` [bug#72925] [PATCH v11] gnu: Add jpm package Omar Bassam
2024-10-08  4:13 ` [bug#72925] [PATCH v12 0/2] " Suhail Singh
2024-10-08  4:14   ` [bug#72925] [PATCH v12 1/2] " Suhail Singh
2024-10-12 17:18     ` [bug#72925] Adding JPM package for Janet Ludovic Courtès
2024-10-12 20:17       ` Suhail Singh
2024-10-08  4:16   ` [bug#72925] [PATCH v12 2/2] gnu: Improve user-experience for jpm Suhail Singh
2024-10-12 17:22     ` [bug#72925] Adding JPM package for Janet Ludovic Courtès
2024-10-12 20:22       ` Suhail Singh
2024-10-12 21:14       ` Suhail Singh
2024-10-14 17:23 ` [bug#72925] [PATCH v13 0/2] Add jpm Suhail Singh
2024-10-14 17:25   ` [bug#72925] [PATCH v13 1/2] gnu: Add jpm package Suhail Singh
2024-10-14 17:26   ` [bug#72925] [PATCH v13 2/2] gnu: Improve user-experience for jpm Suhail Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q0rhiu6.fsf@omar-Latitude-5540.mail-host-address-is-not-set \
    --to=omar.bassam88@gmail.com \
    --cc=72925@debbugs.gnu.org \
    --cc=suhailsingh247@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).