GNU bug report logs - #74552
[PATCH 0/3] Small changes for running qa-frontpage locally

Previous Next

Package: guix-patches;

Reported by: Noé Lopez <noe <at> xn--no-cja.eu>

Date: Tue, 26 Nov 2024 22:55:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74552 in the body.
You can then email your comments to 74552 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to mail <at> cbaines.net, guix-patches <at> gnu.org:
bug#74552; Package guix-patches. (Tue, 26 Nov 2024 22:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noé Lopez <noe <at> xn--no-cja.eu>:
New bug report received and forwarded. Copy sent to mail <at> cbaines.net, guix-patches <at> gnu.org. (Tue, 26 Nov 2024 22:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: guix-patches <at> gnu.org
Cc: Noé Lopez <noelopez <at> free.fr>
Subject: [PATCH 0/3] Small changes for running qa-frontpage locally
Date: Tue, 26 Nov 2024 23:54:49 +0100
From: Noé Lopez <noelopez <at> free.fr>

Hi,

While trying out qa-frontpage locally, I had the occasion to make some
trivial changes:

– Changed references for guix environment to guix shell
– Changed the remote url for guix-patches to not require authentication
– Abstracted git fetch invocations into a function.  This was
  originally intended for further changes but I suppose it can’t hurt.

Have a good day,
Noé Lopez

Noé Lopez (3):
  Update references to guix environment
  Abstract git fetch invocations into fetch-remote! function
  Use https protocol for the guix-patches remote

 README.org                                  |  2 +-
 guix-dev.scm                                |  2 +-
 guix-qa-frontpage/git-repository.scm        | 14 ++++++++++----
 guix-qa-frontpage/manage-patch-branches.scm |  6 +++---
 4 files changed, 15 insertions(+), 9 deletions(-)


base-commit: d3e526bf8a8b2723fdfd26d14c9959a060ba523b
-- 
2.46.0





Information forwarded to mail <at> cbaines.net, guix-patches <at> gnu.org:
bug#74552; Package guix-patches. (Tue, 26 Nov 2024 23:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 74552 <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: 74552 <at> debbugs.gnu.org
Cc: Noé Lopez <noe <at> xn--no-cja.eu>
Subject: [PATCH 1/3] Update references to guix environment
Date: Wed, 27 Nov 2024 00:01:13 +0100
From: Noé Lopez <noelopez <at> free.fr>

---
 README.org   | 2 +-
 guix-dev.scm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index abb0858..377f549 100644
--- a/README.org
+++ b/README.org
@@ -9,7 +9,7 @@ Guix, like packages for example.
 Use the guix-dev.scm file to provide the dependencies.
 
 #+BEGIN_SRC shell
-guix environment -l guix-dev.scm
+guix shell -D --file=guix-dev.scm
 #+END_SRC
 
 Then run the following commands:
diff --git a/guix-dev.scm b/guix-dev.scm
index e820570..f32a449 100644
--- a/guix-dev.scm
+++ b/guix-dev.scm
@@ -21,7 +21,7 @@
 ;;; Run the following command to enter a development environment for
 ;;; the guix-qa-frontpage:
 ;;;
-;;;  $ guix environment -l guix-dev.scm
+;;;  $ guix shell -D --file=guix-dev.scm
 
 (use-modules ((guix licenses) #:prefix license:)
              (guix packages)
-- 
2.46.0





Information forwarded to mail <at> cbaines.net, guix-patches <at> gnu.org:
bug#74552; Package guix-patches. (Tue, 26 Nov 2024 23:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 74552 <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: 74552 <at> debbugs.gnu.org
Cc: Noé Lopez <noe <at> xn--no-cja.eu>
Subject: [PATCH 2/3] Abstract git fetch invocations into fetch-remote! function
Date: Wed, 27 Nov 2024 00:01:14 +0100
From: Noé Lopez <noelopez <at> free.fr>

---
 guix-qa-frontpage/git-repository.scm        | 12 +++++++++---
 guix-qa-frontpage/manage-patch-branches.scm |  6 +++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/guix-qa-frontpage/git-repository.scm b/guix-qa-frontpage/git-repository.scm
index 2140c1e..0d31fe6 100644
--- a/guix-qa-frontpage/git-repository.scm
+++ b/guix-qa-frontpage/git-repository.scm
@@ -16,6 +16,7 @@
   #:export (%git-repository-location
 
             ensure-repository-exists!
+	    fetch-remote!
             update-repository!
             with-bare-git-repository
             with-git-worktree
@@ -55,13 +56,18 @@
           (invoke "git" "config" "user.name" "Guix Patches Tester")
           (invoke "git" "config" "user.email" "")))))))
 
+(define* (fetch-remote! remote #:rest additional-args)
+  (let ((args `("git" "fetch" "--prune"
+		,@additional-args ,remote)))
+    (apply invoke args)))
+
 (define (update-repository!)
   (with-bare-git-repository
    (lambda ()
      (invoke "git" "prune")
-     (invoke "git" "fetch" "--prune" "origin")
-     (invoke "git" "fetch" "--prune" "patches")
-     (invoke "git" "fetch" "--force" "--tags" "patches"))))
+     (fetch-remote! "origin")
+     (fetch-remote! "patches")
+     (fetch-remote! "patches" "--force" "--tags"))))
 
 (define (with-bare-git-repository thunk)
   (ensure-repository-exists!)
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm
index fc389e1..b725113 100644
--- a/guix-qa-frontpage/manage-patch-branches.scm
+++ b/guix-qa-frontpage/manage-patch-branches.scm
@@ -64,7 +64,7 @@
 
   (with-bare-git-repository
    (lambda ()
-     (run "git" "fetch" "--prune" "patches")
+     (fetch-remote! "origin")
 
      (let ((pipe (open-pipe* OPEN_READ
                              "git" "ls-remote" "--heads" "patches")))
@@ -142,7 +142,7 @@
           latest-processed-master-revision
           (with-bare-git-repository
            (lambda ()
-             (invoke "git" "fetch" "--prune" "origin")
+             (fetch-remote! "origin")
              (invoke-read-line "git" "show-ref" "--hash"
                                (string-append "origin/" branch)))))))
 
@@ -262,7 +262,7 @@
       (begin
         (with-bare-git-repository
          (lambda ()
-           (invoke "git" "fetch" "--prune" "origin")
+	   (fetch-remote! "origin")
            (system* "git" "worktree" "remove" "--force"
                     (simple-format #f "../issue-~A" issue-number))
            (system* "git" "branch" "-D"
-- 
2.46.0





Information forwarded to mail <at> cbaines.net, guix-patches <at> gnu.org:
bug#74552; Package guix-patches. (Tue, 26 Nov 2024 23:03:03 GMT) Full text and rfc822 format available.

Message #14 received at 74552 <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: 74552 <at> debbugs.gnu.org
Cc: Noé Lopez <noe <at> xn--no-cja.eu>
Subject: [PATCH 3/3] Use https protocol for the guix-patches remote
Date: Wed, 27 Nov 2024 00:01:15 +0100
From: Noé Lopez <noelopez <at> free.fr>

The git protocol requires credentials.
---
 guix-qa-frontpage/git-repository.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix-qa-frontpage/git-repository.scm b/guix-qa-frontpage/git-repository.scm
index 0d31fe6..4ba7ca7 100644
--- a/guix-qa-frontpage/git-repository.scm
+++ b/guix-qa-frontpage/git-repository.scm
@@ -51,7 +51,7 @@
           (invoke "git" "remote" "add" "origin"
                   "https://git.savannah.gnu.org/git/guix.git")
           (invoke "git" "remote" "add" "patches"
-                  "git <at> git.qa.guix.gnu.org:guix-patches")
+                  "https://git.qa.guix.gnu.org/git/guix-patches")
 
           (invoke "git" "config" "user.name" "Guix Patches Tester")
           (invoke "git" "config" "user.email" "")))))))
-- 
2.46.0





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Thu, 27 Feb 2025 15:18:02 GMT) Full text and rfc822 format available.

Notification sent to Noé Lopez <noe <at> xn--no-cja.eu>:
bug acknowledged by developer. (Thu, 27 Feb 2025 15:18:03 GMT) Full text and rfc822 format available.

Message #19 received at 74552-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Noé Lopez <noe <at> xn--no-cja.eu>
Cc: 74552-done <at> debbugs.gnu.org, Noé Lopez <noelopez <at> free.fr>
Subject: Re: [bug#74552] [PATCH 0/3] Small changes for running qa-frontpage
 locally
Date: Thu, 27 Feb 2025 15:17:01 +0000
[Message part 1 (text/plain, inline)]
Noé Lopez <noe <at> noé.eu> writes:

> From: Noé Lopez <noelopez <at> free.fr>
>
> Hi,
>
> While trying out qa-frontpage locally, I had the occasion to make some
> trivial changes:

Hi,

Sorry I missed these emails, not sure how that happened.

> – Changed references for guix environment to guix shell

I've pushed this change now, note that I've switched to trunk as the
master branch since you sent these patches.

> – Changed the remote url for guix-patches to not require authentication

The solution here needed to be slightly more complicated, as QA on
bayfront still needs to use the git <at> git.qa.guix.gnu.org:guix-patches URL
so that it can modify the repository. I've pushed a patch that achieves
that now, and will use the https url by default, providing you don't
tell QA you want to manage the patch branches.

> – Abstracted git fetch invocations into a function.  This was
>   originally intended for further changes but I suppose it can’t hurt.

I wasn't so sure about this refactoring as to me it makes it less
obvious what's going on, and (for better or for worse) that we're
calling out to Git on the command line.

Feel free to resend it if you're still interested in making that change.

Thanks for the patches,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#74552; Package guix-patches. (Thu, 27 Feb 2025 16:01:01 GMT) Full text and rfc822 format available.

Message #22 received at 74552-done <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 74552-done <at> debbugs.gnu.org
Subject: Re: [bug#74552] [PATCH 0/3] Small changes for running qa-frontpage
 locally
Date: Thu, 27 Feb 2025 17:00:07 +0100
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:

>> – Abstracted git fetch invocations into a function.  This was
>>   originally intended for further changes but I suppose it can’t hurt.
>
> I wasn't so sure about this refactoring as to me it makes it less
> obvious what's going on, and (for better or for worse) that we're
> calling out to Git on the command line.
>
> Feel free to resend it if you're still interested in making that change.
>

I had done it for something that ended up not working out (don’t
remember what) so I don’t really have a motivation for those changes.

> Thanks for the patches,
>
> Chris

Thanks for looking at them :) I believe its important to have an easy
way to run locally for me to contribute, it can be a real pain in some
projects!

Good evening,
Noé
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Mar 2025 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.