[PATCH] gnu: mozjs: Remove static library

  • Done
  • quality assurance status badge
Details
2 participants
  • Julien Lepiller
  • Leo Famulari
Owner
unassigned
Submitted by
Julien Lepiller
Severity
normal
J
J
Julien Lepiller wrote on 26 May 2020 23:15
(address . guix-patches@gnu.org)
20200526231557.0e4c40a5@tachikoma.lepiller.eu
Hi,

the attached patch removes lib/libjs_static.ajs from the output of
mozjs, a 30 MB static library. This mozjs is part of the closure of
gdm and gnome, so it reduces the size of most desktop systems.

The reason why I found that file, is because it is mentionned in
From 9529f1442323bad4f96fe070a510e1dd64a2c8ce Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Tue, 26 May 2020 23:08:15 +0200
Subject: [PATCH] gnu: mozjs: Remove static library.

* gnu/packages/gnuzilla.scm (mozjs-60): Remove static library.
---
gnu/packages/gnuzilla.scm | 6 ++++++
1 file changed, 6 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 7bf9850e97..808c04f1db 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -404,6 +404,12 @@ in C/C++.")
;; This test assumes that /bin exists and contains certain
;; executables.
(delete-file "js/src/tests/shell/os.js")
+ #t))
+ (add-after 'install 'remove-static
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; this saves ~30 MB
+ (delete-file (string-append (assoc-ref outputs "out")
+ "/lib/libjs_static.ajs"))
#t)))))
(native-inputs
`(("autoconf" ,autoconf)
--
2.26.2
L
L
Leo Famulari wrote on 28 May 2020 19:46
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 41548@debbugs.gnu.org)
20200528174649.GA23745@jasmine.lan
On Tue, May 26, 2020 at 11:15:57PM +0200, Julien Lepiller wrote:
Toggle quote (6 lines)
> Hi,
>
> the attached patch removes lib/libjs_static.ajs from the output of
> mozjs, a 30 MB static library. This mozjs is part of the closure of
> gdm and gnome, so it reduces the size of most desktop systems.

Awesome! I figure that things seem to keep working without it?
J
J
Julien Lepiller wrote on 28 May 2020 19:57
(name . Leo Famulari)(address . leo@famulari.name)(address . 41548@debbugs.gnu.org)
D3853B0E-4351-4734-A280-B8404055D3C9@lepiller.eu
Le 28 mai 2020 13:46:49 GMT-04:00, Leo Famulari <leo@famulari.name> a écrit :
Toggle quote (9 lines)
>On Tue, May 26, 2020 at 11:15:57PM +0200, Julien Lepiller wrote:
>> Hi,
>>
>> the attached patch removes lib/libjs_static.ajs from the output of
>> mozjs, a 30 MB static library. This mozjs is part of the closure of
>> gdm and gnome, so it reduces the size of most desktop systems.
>
>Awesome! I figure that things seem to keep working without it?

At least gdm still builds, but I'm not sure how to test it properly
L
L
Leo Famulari wrote on 29 May 2020 18:54
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 41548@debbugs.gnu.org)
20200529165445.GB27027@jasmine.lan
On Thu, May 28, 2020 at 01:57:32PM -0400, Julien Lepiller wrote:
Toggle quote (12 lines)
> Le 28 mai 2020 13:46:49 GMT-04:00, Leo Famulari <leo@famulari.name> a �crit :
> >On Tue, May 26, 2020 at 11:15:57PM +0200, Julien Lepiller wrote:
> >> Hi,
> >>
> >> the attached patch removes lib/libjs_static.ajs from the output of
> >> mozjs, a 30 MB static library. This mozjs is part of the closure of
> >> gdm and gnome, so it reduces the size of most desktop systems.
> >
> >Awesome! I figure that things seem to keep working without it?
>
> At least gdm still builds, but I'm not sure how to test it properly

You could make a vm-image with %desktop-services, which uses GDM.
J
J
Julien Lepiller wrote on 30 May 2020 18:07
(name . Leo Famulari)(address . leo@famulari.name)(address . 41548-close@debbugs.gnu.org)
20200530180736.4d3cc380@tachikoma.lepiller.eu
Le Fri, 29 May 2020 12:54:45 -0400,
Leo Famulari <leo@famulari.name> a écrit :

Toggle quote (18 lines)
> On Thu, May 28, 2020 at 01:57:32PM -0400, Julien Lepiller wrote:
> > Le 28 mai 2020 13:46:49 GMT-04:00, Leo Famulari <leo@famulari.name>
> > a écrit :
> > >On Tue, May 26, 2020 at 11:15:57PM +0200, Julien Lepiller wrote:
> > >> Hi,
> > >>
> > >> the attached patch removes lib/libjs_static.ajs from the output
> > >> of mozjs, a 30 MB static library. This mozjs is part of the
> > >> closure of gdm and gnome, so it reduces the size of most desktop
> > >> systems.
> > >
> > >Awesome! I figure that things seem to keep working without it?
> >
> > At least gdm still builds, but I'm not sure how to test it properly
> >
>
> You could make a vm-image with %desktop-services, which uses GDM.

Thanks, that's a good idea. I managed to build a vm that way and
unfortunately gdm fails to start, so the static library must be used in
some way. I'm closing this without pushing anything.
L
L
Leo Famulari wrote on 30 May 2020 19:08
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 41548-close@debbugs.gnu.org)
20200530170828.GC25025@jasmine.lan
On Sat, May 30, 2020 at 06:07:36PM +0200, Julien Lepiller wrote:
Toggle quote (4 lines)
> Thanks, that's a good idea. I managed to build a vm that way and
> unfortunately gdm fails to start, so the static library must be used in
> some way. I'm closing this without pushing anything.

Okay, but did it work without your patch?
?