GNU bug report logs - #59160
Fritzing parts are missing

Previous Next

Package: guix;

Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>

Date: Thu, 10 Nov 2022 01:08:02 UTC

Severity: normal

To reply to this bug, email your comments to 59160 AT debbugs.gnu.org.

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

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


Report forwarded to bug-guix <at> gnu.org:
bug#59160; Package guix. (Thu, 10 Nov 2022 01:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel Wicki <gabriel <at> erlikon.ch>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 10 Nov 2022 01:08:02 GMT) Full text and rfc822 format available.

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

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: bug-guix <at> gnu.org
Subject: Fritzing parts are missing
Date: Thu, 10 Nov 2022 02:06:07 +0100
I've come to notice that Fritzing currently does not work in Guix.  The
program starts but greets the user with a bunch of warnings/error
pop-ups.  One being about "142 parts" missing or not being found and
indeed: the parts pane remains empty and Fritzing therefor unusable.




Information forwarded to bug-guix <at> gnu.org:
bug#59160; Package guix. (Thu, 10 Nov 2022 01:28:02 GMT) Full text and rfc822 format available.

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

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 59160 <at> debbugs.gnu.org
Subject: Re: bug#59160: Acknowledgement (Fritzing parts are missing)
Date: Thu, 10 Nov 2022 02:27:21 +0100
I've come up with the following patch.  It is not optimal (there's still
some warnings and it makes use of an ugly hack to get rid of a certain
"Unable to find parts git repository" message) but with that patch
Fritzing is in a usable state.



From e713d634d8358d1a24219634fa7e8ed3b5c5dff4 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel <at> erlikon.ch>
Date: Thu, 10 Nov 2022 01:53:41 +0100
Subject: [PATCH] * gnu/packages/engineering.scm (fritzing): Update to 0.9.6.

[source]: Update hash.
[arguments]: Update libgit2 hacks.
---
 gnu/packages/engineering.scm | 34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b6a881d03b..dd12029b3f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -669,7 +669,7 @@ (define-public fasthenry
 (define-public fritzing
   (package
     (name "fritzing")
-    (version "0.9.3b")
+    (version "0.9.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -678,7 +678,7 @@ (define-public fritzing
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
+                "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -687,24 +687,18 @@ (define-public fritzing
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (copy-recursively (assoc-ref inputs "fritzing-parts-db")
                                "parts")
-             ;; Make compatible with libgit2 > 0.24
-             (substitute* "src/version/partschecker.cpp"
-               (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
-                "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
-
              ;; Use system libgit2 and boost.
              (substitute* "phoenix.pro"
-               (("^LIBGIT2INCLUDE =.*")
-                (string-append "LIBGIT2INCLUDE="
-                               (assoc-ref inputs "libgit2") "/include\n"))
-               (("^    LIBGIT2LIB =.*")
-                (string-append "    LIBGIT2LIB="
-                               (assoc-ref inputs "libgit2") "/lib\n")))
-             ;; This file checks for old versions of Boost, insisting on
-             ;; having us download the boost sources and placing them in the
-             ;; build directory.
-             (substitute* "pri/utils.pri"
-               (("error\\(") "message("))
+               (("^LIBGIT_STATIC.*")
+                (string-append "LIBGIT2INCLUDE=" (assoc-ref inputs "libgit2") "/include\n"
+                               "LIBGIT2LIB=" (assoc-ref inputs "libgit2") "/lib\n"
+                               "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
+                               "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
+               (("^.*pri/libgit2detect.pri.") ""))
+             ;; Trick the internal mechanism to load the parts
+             (substitute* "src/version/partschecker.cpp"
+               ((".*git_libgit2_init.*")
+                "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
 
              (let ((out (assoc-ref outputs "out")))
                (invoke "qmake"
@@ -723,11 +717,11 @@ (define-public fritzing
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/fritzing/fritzing-parts")
-                 (commit version)))
+                 (commit (string-append "release_" version))))
            (file-name (git-file-name "fritzing-parts" version))
            (sha256
             (base32
-             "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
+             "0wsvn57v6n0ygnhk2my94rrfzb962z1cj4d1xmp1farwck3811h6"))))))
     (home-page "https://fritzing.org")
     (synopsis "Electronic circuit design")
     (description
-- 
2.37.3





Information forwarded to bug-guix <at> gnu.org:
bug#59160; Package guix. (Sun, 20 Nov 2022 14:23:02 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Gabriel Wicki <gabriel <at> erlikon.ch>
Cc: 59160 <at> debbugs.gnu.org, bug-guix <at> gnu.org
Subject: Re: bug#59160: Acknowledgement (Fritzing parts are missing)
Date: Sun, 20 Nov 2022 15:21:30 +0100
[Message part 1 (text/plain, inline)]
Gabriel,

Thanks for the patch!

Gabriel Wicki 写道:
> I've come up with the following patch.  It is not optimal 
> (there's still
> some warnings and it makes use of an ugly hack to get rid of a 
> certain
> "Unable to find parts git repository" message) but with that 
> patch
> Fritzing is in a usable state.

[…]

> +             (substitute* "src/version/partschecker.cpp"
> +               ((".*git_libgit2_init.*")
> +                "return 
> \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))

It doesn't really matter *what* this returns, right?  At least I 
can't find any observable difference.  And as noted on IRC, this 
‘base32’ format is unique to Guix and Nix.

Could you explain the mechanism behind this, er, mechanism?

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#59160; Package guix. (Sun, 20 Nov 2022 14:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#59160; Package guix. (Fri, 02 Dec 2022 11:21:02 GMT) Full text and rfc822 format available.

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

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 59160 <at> debbugs.gnu.org
Subject: Re: bug#59160: Acknowledgement (Fritzing parts are missing)
Date: Fri, 02 Dec 2022 12:20:38 +0100
Resending this to debbugs since the mail previously was only sent to Tobias


Hi Tobias

Thanks for the review!

The line in question will make all functions return prematurely that are
intended to use libgit2 (that's why the git_libgit2_init is
patched).  Fritzing still reports "Sorry, we have a problem with the
swapping mechanism.
Fritzing still works, but you won't be able to change parts
properties.Error 1", but seems to work fine apart from that.

Since the content of the returned String doesn't seem to matter (as long
as it's not an empty string) I've adjusted it to a less ugly "true".


I'm sorry i don't have the capacity to provide a more satisfying
solution ATM but at least Fritzing is back to a usable state.


Best wishes,
g


> From 242f0f7858435600303333a811635c0c4a72d81b Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel <at> erlikon.ch>
Date: Tue, 22 Nov 2022 00:35:19 +0100
Subject: [PATCH] gnu: fritzing: Update to 0.9.6.

* gnu/packages/engineering.scm (fritzing): Update to 0.9.6.
[arguments]<#:phases>{'configure}: Modify to work with
new version.
---
 gnu/packages/engineering.scm | 34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 43e23e30a8..edfef77a5c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -669,7 +669,7 @@ (define-public fasthenry
 (define-public fritzing
   (package
     (name "fritzing")
-    (version "0.9.3b")
+    (version "0.9.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -678,7 +678,7 @@ (define-public fritzing
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
+                "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -687,24 +687,18 @@ (define-public fritzing
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (copy-recursively (assoc-ref inputs "fritzing-parts-db")
                                "parts")
-             ;; Make compatible with libgit2 > 0.24
-             (substitute* "src/version/partschecker.cpp"
-               (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
-                "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
-
              ;; Use system libgit2 and boost.
              (substitute* "phoenix.pro"
-               (("^LIBGIT2INCLUDE =.*")
-                (string-append "LIBGIT2INCLUDE="
-                               (assoc-ref inputs "libgit2") "/include\n"))
-               (("^    LIBGIT2LIB =.*")
-                (string-append "    LIBGIT2LIB="
-                               (assoc-ref inputs "libgit2") "/lib\n")))
-             ;; This file checks for old versions of Boost, insisting on
-             ;; having us download the boost sources and placing them in the
-             ;; build directory.
-             (substitute* "pri/utils.pri"
-               (("error\\(") "message("))
+               (("^LIBGIT_STATIC.*")
+                (string-append "LIBGIT2INCLUDE=" (assoc-ref inputs "libgit2") "/include\n"
+                               "LIBGIT2LIB=" (assoc-ref inputs "libgit2") "/lib\n"
+                               "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
+                               "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
+               (("^.*pri/libgit2detect.pri.") ""))
+             ;; Trick the internal mechanism to load the parts
+             (substitute* "src/version/partschecker.cpp"
+               ((".*git_libgit2_init.*")
+                "return \"true\";"))
 
              (let ((out (assoc-ref outputs "out")))
                (invoke "qmake"
@@ -723,11 +717,11 @@ (define-public fritzing
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/fritzing/fritzing-parts")
-                 (commit version)))
+                 (commit (string-append "release_" version))))
            (file-name (git-file-name "fritzing-parts" version))
            (sha256
             (base32
-             "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
+             "0wsvn57v6n0ygnhk2my94rrfzb962z1cj4d1xmp1farwck3811h6"))))))
     (home-page "https://fritzing.org")
     (synopsis "Electronic circuit design")
     (description
-- 

2.38.0




This bug report was last modified 1 year and 137 days ago.

Previous Next


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