[PATCH] gnu: virtuoso-ose: Update to 7.2.7.

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Maxim Cournoyer
  • Roel Janssen
Owner
unassigned
Submitted by
Roel Janssen
Severity
normal
R
R
Roel Janssen wrote on 20 May 2022 10:41
(address . guix-patches@gnu.org)
cfd0695b112fa6c8dda5a24d98ed826da3942079.camel@gnu.org
Dear Guix,

I'd like to update Virtuoso OSE to the latest release (see attached patch).

Other than the version number and checksum bump I noticed that some JAR files made it in the build
output. I tried removing them from the source tarball using a snippet, but then one needs to
include a patch for various Makefile.am files and run the autogen.sh script. I thought this was
simpler and clearer on what's actually achieved.

Kind regards,
Roel Janssen
From a5591def946ba8a5d9a2c5ccc3259efe9e43391c Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Fri, 20 May 2022 10:36:50 +0200
Subject: [PATCH] gnu: virtuoso-ose: Update to 7.2.7.

* gnu/packages/databases.scm (virtuoso-ose): Update to 7.2.7; Remove pre-built
blobs from the build output.
---
gnu/packages/databases.scm | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index feedfe68e7..03e191bab2 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3229,14 +3229,14 @@ (define-public python-lmdb
(define-public virtuoso-ose
(package
(name "virtuoso-ose")
- (version "7.2.6")
+ (version "7.2.7")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/virtuoso/virtuoso/" version "/"
"virtuoso-opensource-" version ".tar.gz"))
(sha256
- (base32 "0ly7s7a3w2a2zhhi9rq9k2qlnzapqbbc1rcdqb3zqqpgg81krz9q"))))
+ (base32 "1853ln0smiilf3pni70gq6nmi9ps039cy44g6b5i9d2z1n9hnj02"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; Tests require a network connection.
@@ -3255,7 +3255,26 @@ (define-public virtuoso-ose
(for-each (lambda (file)
(delete-file (string-append lib "/" file)))
'("libvirtuoso-t.a"
- "libvirtuoso-t.la"))))))))
+ "libvirtuoso-t.la")))))
+ ;; Optional bundled Java archives are copied into the build output.
+ ;; This phase removes them.
+ (add-after 'install 'remove-static-libs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
+ (for-each (lambda (directory)
+ (delete-file-recursively
+ (string-append lib "/" directory)))
+ '("hibernate"
+ "jdbc-4.0"
+ "jdbc-4.1"
+ "jdbc-4.2"
+ "jdbc-4.3"
+ "jena"
+ "jena2"
+ "jena3"
+ "jena4"
+ "rdf4j"
+ "sesame"))))))))
(inputs
(list openssl net-tools readline zlib))
(home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
--
2.36.1
M
M
Maxim Cournoyer wrote on 25 May 2022 16:29
(name . Roel Janssen)(address . roel@gnu.org)(address . 55538@debbugs.gnu.org)
875ylt4rep.fsf@gmail.com
Hi Roel,

Roel Janssen <roel@gnu.org> writes:

Toggle quote (9 lines)
> Dear Guix,
>
> I'd like to update Virtuoso OSE to the latest release (see attached patch).
>
> Other than the version number and checksum bump I noticed that some JAR files made it in the build
> output. I tried removing them from the source tarball using a snippet, but then one needs to
> include a patch for various Makefile.am files and run the autogen.sh script. I thought this was
> simpler and clearer on what's actually achieved.

I fear in the future it would be easy to overlook the introduction of
extra bundled jars in the source, that'd get installed. I feel it'd be
preferable if we removed them all from a source snippet, at the cost of
having to patch the build system (the extra complications you
mentioned).

Could you try it and send a revised patch?

Thanks!

Maxim
R
R
Roel Janssen wrote on 25 May 2022 17:51
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55538@debbugs.gnu.org)
9b71e2c249653a74c0e039670d5a60492c9c2eb0.camel@gnu.org
On Wed, 2022-05-25 at 10:29 -0400, Maxim Cournoyer wrote:
Toggle quote (23 lines)
> Hi Roel,
>
> Roel Janssen <roel@gnu.org> writes:
>
> > Dear Guix,
> >
> > I'd like to update Virtuoso OSE to the latest release (see attached patch).
> >
> > Other than the version number and checksum bump I noticed that some JAR files made it in the
> > build
> > output.  I tried removing them from the source tarball using a snippet, but then one needs to
> > include a patch for various Makefile.am files and run the autogen.sh script.  I thought this was
> > simpler and clearer on what's actually achieved.
>
> I fear in the future it would be easy to overlook the introduction of
> extra bundled jars in the source, that'd get installed.  I feel it'd be
> preferable if we removed them all from a source snippet, at the cost of
> having to patch the build system (the extra complications you
> mentioned).
>
> Could you try it and send a revised patch?
>

Thank you for taking a look at it! To be fair, what the patches would do, would be to avoid
including the directories that I remove. So removing the current pre-built binaries in a snippet
will be equally error-prone.

But I agree that you would preferably want to have a source tarball without pre-built binaries in it
when running `guix build -S virtuoso-ose`.

A naive patch leads to the build getting stuck, so I need to investigate the impact further.
I'll report back when I have adapted the patch.

THank you again for your time!

Kind regards,
Roel Janssen
R
R
Roel Janssen wrote on 27 May 2022 12:47
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55538@debbugs.gnu.org)
b6df6820c1a0042d4fcfb2f4971272ced737e933.camel@gnu.org
On Wed, 2022-05-25 at 17:51 +0200, Roel Janssen wrote:
Toggle quote (38 lines)
> On Wed, 2022-05-25 at 10:29 -0400, Maxim Cournoyer wrote:
> > Hi Roel,
> >
> > Roel Janssen <roel@gnu.org> writes:
> >
> > > Dear Guix,
> > >
> > > I'd like to update Virtuoso OSE to the latest release (see attached patch).
> > >
> > > Other than the version number and checksum bump I noticed that some JAR files made it in the
> > > build
> > > output.  I tried removing them from the source tarball using a snippet, but then one needs to
> > > include a patch for various Makefile.am files and run the autogen.sh script.  I thought this
> > > was
> > > simpler and clearer on what's actually achieved.
> >
> > I fear in the future it would be easy to overlook the introduction of
> > extra bundled jars in the source, that'd get installed.  I feel it'd be
> > preferable if we removed them all from a source snippet, at the cost of
> > having to patch the build system (the extra complications you
> > mentioned).
> >
> > Could you try it and send a revised patch?
> >
>
> Thank you for taking a look at it! To be fair, what the patches would do, would be to avoid
> including the directories that I remove. So removing the current pre-built binaries in a snippet
> will be equally error-prone.
>
> But I agree that you would preferably want to have a source tarball without pre-built binaries in
> it
> when running `guix build -S virtuoso-ose`.
>
> A naive patch leads to the build getting stuck, so I need to investigate the impact further.
> I'll report back when I have adapted the patch.
>
> THank you again for your time!

I attached an updated patch that removes the pre-built binaries in a snippet. It then removes these
directories from the build system which in turn requires one to re-run autogen.sh.

Kind regards,
Roel Janssen
E
E
Efraim Flashner wrote on 29 May 2022 14:44
Re: [bug#55538] [PATCH] gnu: virtuoso-ose: Update to 7.2.7.
(name . Roel Janssen)(address . roel@gnu.org)
YpNqo7FlpzzASWAN@3900XT
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmKTaqAACgkQQarn3Mo9
g1FVuA/+KcEnsKqoFjGWefbU+A9YWgRRMaB/WhopFfLtrtWxzNndGgrkL69kSAEY
yu9kIgWW9XpD1S/iEYrVQXVNrt5J4TkFClLTyo0FpEn10ALS8uIv1E73AMxZQ5r8
bROsxcg7UxIncX98WCEPwEVPV1XRXaK8Mb8pdpdWzzVJhb3USKQ0B2q3o6iLRdsY
wiLRcOU6EuCnTmwhcscvSzL+HNvxfXFSkWPcghLf9zwPwb3g2Bu2/JPScS5DSfAF
YnHcTj8NBPgHwhbmldZnXTO1A8Zu9IZvI+oKogjwf90kdhHZpid05ySqPfQQP+Kh
S3Weka+iN8AkSXpgqvINVZ3LC2rWyU9BNtUZ0JSry3XU5u5Xqw6hGu2iNfLKKgPd
j85KTBOsw8+q73Oz8avKdau0vsG2cIBV2VNSjTeivzffmFrmkLGcT6dJIEEm/ZxG
gIfh3qa2TQO1NPih0b52jDZ15V+Qbk1Ifpz7YAq7pTjBdQY6xlGlLuzqvtNccZnY
9DdGtUh2nUXOS172LuF+GfQnTQiCr/YKQpRkXddKdEXNRQ8y105/wpSI4iDLsmV1
wqkD0SQGAvHk/At4B1J1ktEPdoOb+SZg0Zu3MM6ck+EtPrQ50a0YkjCb5KtFZVrO
sTs73TonyO3utP1R95/moiqwJ52blUcgaQ+VnoRtZwQxycoO38Y=
=mbJt
-----END PGP SIGNATURE-----


R
R
Roel Janssen wrote on 29 May 2022 23:55
(name . Efraim Flashner)(address . efraim@flashner.co.il)
f24f0d7a1f0685f9945403881871e106bd47d7a1.camel@gnu.org
Hi Efraim,

Thank you for reviewing this patch.
I attached a new version of the patch. I'll address your comments inline.

On Sun, 2022-05-29 at 15:44 +0300, Efraim Flashner wrote:
Toggle quote (67 lines)
> ...
> On Fri, May 27, 2022 at 12:47:18PM +0200, Roel Janssen wrote:
> > From 1f3b9db55cac790711ece613f5ebeb51474764a7 Mon Sep 17 00:00:00 2001
> > From: Roel Janssen <roel@gnu.org>
> > Date: Fri, 27 May 2022 12:40:46 +0200
> > Subject: [PATCH] gnu: virtuoso-ose: Update to 7.2.7.
> >
> > * gnu/packages/databases.scm (virtuoso-ose): Update to 7.2.7; Run autogen
> >   after applying the patch below.
> > * gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch:
> >   New file.
> > ---
> >  gnu/packages/databases.scm                    |  26 +++-
> >  ...tuoso-ose-remove-pre-built-jar-files.patch | 117 ++++++++++++++++++
> >  2 files changed, 141 insertions(+), 2 deletions(-)
> >  create mode 100644 gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch
> >
> > diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
> > index 2161340ef9..58b6dd088c 100644
> > --- a/gnu/packages/databases.scm
> > +++ b/gnu/packages/databases.scm
> > @@ -100,6 +100,7 @@ (define-module (gnu packages databases)
> >    #:use-module (gnu packages gnome)
> >    #:use-module (gnu packages gnupg)
> >    #:use-module (gnu packages golang)
> > +  #:use-module (gnu packages gperf)
> >    #:use-module (gnu packages gtk)
> >    #:use-module (gnu packages guile)
> >    #:use-module (gnu packages icu4c)
> > @@ -3229,14 +3230,30 @@ (define-public python-lmdb
> >  (define-public virtuoso-ose
> >    (package
> >      (name "virtuoso-ose")
> > -    (version "7.2.6")
> > +    (version "7.2.7")
> >      (source
> >       (origin
> >         (method url-fetch)
> >         (uri (string-append "mirror://sourceforge/virtuoso/virtuoso/" version "/"
> >                             "virtuoso-opensource-" version ".tar.gz"))
> >         (sha256
> > -        (base32 "0ly7s7a3w2a2zhhi9rq9k2qlnzapqbbc1rcdqb3zqqpgg81krz9q"))))
> > +        (base32 "1853ln0smiilf3pni70gq6nmi9ps039cy44g6b5i9d2z1n9hnj02"))
> > +       (patches (search-patches "virtuoso-ose-remove-pre-built-jar-files.patch"))
> > +       (modules '((guix build utils)))
> > +       ;; This snippet removes pre-built Java archives.
> > +       (snippet
> > +        '(begin
> > +           (delete-file-recursively "libsrc/JDBCDriverType4")
> > +           (delete-file-recursively "binsrc/hibernate")
> > +           (delete-file-recursively "binsrc/jena")
> > +           (delete-file-recursively "binsrc/jena2")
> > +           (delete-file-recursively "binsrc/jena3")
> > +           (delete-file-recursively "binsrc/jena4")
> > +           (delete-file-recursively "binsrc/rdf4j")
> > +           (delete-file-recursively "binsrc/sesame")
> > +           (delete-file-recursively "binsrc/sesame2")
> > +           (delete-file-recursively "binsrc/sesame3")
> > +           (delete-file-recursively "binsrc/sesame4")))))
>
> how about
> (for-each delete-file-recursively
>   (list "libsrc/JDBCDriverType4"
>         "binsrc/hibernate"
>         ...))
>

I adapted this in the new patch.

Toggle quote (14 lines)
> >      (build-system gnu-build-system)
> >      (arguments
> >       `(#:tests? #f ; Tests require a network connection.
> > @@ -3247,6 +3264,9 @@ (define-public virtuoso-ose
> >                             "--enable-static=no")
> >         #:phases
> >         (modify-phases %standard-phases
> > +         (add-before 'configure 'autogen
> > +           (lambda _
> > +             (invoke "./autogen.sh")))
>
> This would probably be better as (replace 'bootstrap
>

I adapted this in the new patch.

Toggle quote (12 lines)
> >           ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in
> >           ;; the build output.  The following phase removes it.
> >           (add-after 'install 'remove-static-libs
> > @@ -3256,6 +3276,8 @@ (define-public virtuoso-ose
> >                             (delete-file (string-append lib "/" file)))
> >                           '("libvirtuoso-t.a"
> >                             "libvirtuoso-t.la"))))))))
> > +    (native-inputs
> > +     (list autoconf automake libtool bison flex gperf))
>
> That's more than I expected!

Yes, it's unfortunate that we apply changes to the build system code. :)
Without any of these, the build fails.

Toggle quote (2 lines)
> > ...

Kind regards,
Roel Janssen
E
E
Efraim Flashner wrote on 30 May 2022 08:21
(name . Roel Janssen)(address . roel@gnu.org)
YpRiTI+1mn/YD5bm@3900XT
Go ahead and sort the native-inputs alphabetically and it looks good to
me!

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmKUYkwACgkQQarn3Mo9
g1FNCA/+PY23SHL22dHwa5RTrtAi0kmD0SOe9m1Fh+01puiOMjITKfXFZ51I/gzD
UtiJJtPH7gceVrg1ZjAcAFAyUB+NEruPVGJ7GsaEFQbBrtROFPOu+lDbsndVwJUI
e3Gie2oPMYNt3QH8247XQPlOM0w8z0QhZJrC8WdzAnvCiNfFF43I3InA3F8cwBFr
oungjbPH5RL5rToQ0w+uNSbWHCIRu7ft9RdeQOkTAqQ3nDw46+AUMy6HIAoiAp9+
bRYXY6xoO7bUGuMpX1Ef1T8YBXQWjuMf3dHMgF/JioyKGNl2/rzuhnPaZkPcyU+E
NJROCbEG4zkpIk4Qh29oB1F18SNb44eXqtmPrPgQD6w/9AXxxLfoUzziJ4vItTc+
gJoy8SNUcVHKD4GfTNeKnX08DqYg4+nXcGGVMgfzW7NYv8ZLeAf4U7P4c9pXBSjG
9qtQaNuff/OCc1ne/SnqtJ7dF5YMuYPZGFz3jXvjYpRsbaSrSViqHQZhRf4UJiTl
Yp2cdKUHHJp+h5ndV04mkfi5oRpY1WKNbhh5O3AUVPDwAUfBkQD6cRZuIuSYQ9bS
I18vEvpGOcqfy3Jx08QpOYMF2YPQKEjzjAWsFJzO5U8EdDex1yGKRr9Q7q4oss6e
bkaQNtcBWplxFE8qItmuNDEfNt+qri8Uc2vaZlSAvC5HPuKInso=
=UyUA
-----END PGP SIGNATURE-----


R
R
Roel Janssen wrote on 30 May 2022 09:09
(name . Efraim Flashner)(address . efraim@flashner.co.il)
eab53cf835fb33151764684c920a657f227827cd.camel@gnu.org
On Mon, 2022-05-30 at 09:21 +0300, Efraim Flashner wrote:
Toggle quote (4 lines)
> Go ahead and sort the native-inputs alphabetically and it looks good to
> me!
>

Thanks! I ordered the native-inputs alphabetically and pushed.

Kind regards,
Roel Janssen
Closed
M
M
Maxim Cournoyer wrote on 31 May 2022 15:44
Re: bug#55538: [PATCH] gnu: virtuoso-ose: Update to 7.2.7.
(name . Roel Janssen)(address . roel@gnu.org)(address . 55538@debbugs.gnu.org)
87v8tlrf3m.fsf@gmail.com
Hello,

Roel Janssen <roel@gnu.org> writes:

Toggle quote (30 lines)
> On Wed, 2022-05-25 at 17:51 +0200, Roel Janssen wrote:
>> On Wed, 2022-05-25 at 10:29 -0400, Maxim Cournoyer wrote:
>> > Hi Roel,
>> >
>> > Roel Janssen <roel@gnu.org> writes:
>> >
>> > > Dear Guix,
>> > >
>> > > I'd like to update Virtuoso OSE to the latest release (see attached patch).
>> > >
>> > > Other than the version number and checksum bump I noticed that some JAR files made it in the
>> > > build
>> > > output.  I tried removing them from the source tarball using a snippet, but then one needs to
>> > > include a patch for various Makefile.am files and run the autogen.sh script.  I thought this
>> > > was
>> > > simpler and clearer on what's actually achieved.
>> >
>> > I fear in the future it would be easy to overlook the introduction of
>> > extra bundled jars in the source, that'd get installed.  I feel it'd be
>> > preferable if we removed them all from a source snippet, at the cost of
>> > having to patch the build system (the extra complications you
>> > mentioned).
>> >
>> > Could you try it and send a revised patch?
>> >
>>
>> Thank you for taking a look at it! To be fair, what the patches would do, would be to avoid
>> including the directories that I remove. So removing the current pre-built binaries in a snippet
>> will be equally error-prone.

The way I deal with this is to have an allow list of things to preserve
in the source instead of a deny list; this way if new binaries get added
and need to be handled, the build will break instead of using the
bundled binaries silently.

Thanks for the package update (and to Efraim for picking up the review
where I had left it)!

Maxim
?