Bug#876478: ben tracker --global-conf ignores settings

2018-05-21 Thread Mehdi Dogguy

Hi,

On 2018-05-21 18:43, Sebastiaan Couwenberg wrote:


Do you still have to for the documentation update?



I've published new instructions on Ben's website (which
is generated from Ben's git repository). You can read
them here: https://ben.debian.net/#_tracker

Basically, it is:
$ ocamlbuild -pkg ben foo.cmx
$ ocamlopt -shared -o foo.cmxs _build/foo.cmx

In short: Do not use ocamlbuild to generate the .cmxs
file.

--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-21 Thread Sebastiaan Couwenberg
On 05/15/2018 11:15 AM, Mehdi Dogguy wrote:
> On 2018-05-14 18:46, Sebastiaan Couwenberg wrote:
>> On 05/14/2018 08:26 AM, Mehdi Dogguy wrote:
>>> On 2018-05-14 08:01, Sebastiaan Couwenberg wrote:
 Unfortunately that doesn't apply cleanly on top of 0.7.4 for
 stretch. If
 you can provide a rebased commit for 0.7.4 I'm willing to test that.

>>>
>>> No problem. Here it is (attached). Thanks for your tests!
>>
>> Thanks for the patch, it doesn't seem to work as expected, though.
>>
>> `ben tracker` downloads the Packages & Sources files again even when
>> `ben download` downloaded them just before. It also uses the current
>> working directory for the downloaded files instead of the cache-dir from
>> the global.conf.
>>
>> It looks like this is caused by the custom template that was built with
>> the old ben, because switching the template to debianrt in global.conf
>> results in the expected behaviour.
>>
> 
> Indeed. I didn't explain fully how to apply the patch. My apologies.
> 
> The only effect of my second patch is to build templates differently to
> avoid linking and include all Ben's library. So in order to have this
> bug fixed, templates must be recompiled.
> 
>> Rebuilding the template fails when executed from the root of the git
>> directory:
>>
>>  $ ocamlbuild -pkg ben debiangis.cmxs
>>  + /usr/bin/ocamlopt unix.cmxa -I /usr/lib/ocaml/ocamlbuild
>> /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -I /usr/lib/ocaml -I
>> /usr/lib/ocaml/ben -I /usr/lib/ocaml/bytes -I /usr/lib/ocaml/ocamlgraph
>> -I /usr/lib/ocaml/pcre -I /usr/lib/ocaml/tyxml -I /usr/lib/ocaml/uutf
>> /usr/lib/ocaml/unix.cmxa /usr/lib/ocaml/pcre/pcre.cmxa
>> /usr/lib/ocaml/ocamlgraph/graph.cmxa /usr/lib/ocaml/str.cmxa
>> /usr/lib/ocaml/uutf/uutf.cmxa /usr/lib/ocaml/tyxml/tyxml.cmxa
>> /usr/lib/ocaml/ben/benl.cmxa myocamlbuild.ml
>> /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
>>  File "myocamlbuild.ml", line 1:
>>  Error: Files /usr/lib/ocaml/unix.cmxa and /usr/lib/ocaml/unix.cmxa
>>     both define a module named Unix
>>
> 
> It is true that the fix needs a documentation update to specify how
> templates should be built. I'll send you one very soon.
> 
> If you have an already built plugin, you may use the /usr/lib/ocaml/expunge
> tool to hide/remove non-necessary modules (that you can list using
> ocamlobjinfo). But, in any case, I'll provide a new procedure to build
> custom plugins.

Do you still have to for the documentation update?

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-15 Thread Mehdi Dogguy

On 2018-05-14 18:46, Sebastiaan Couwenberg wrote:

On 05/14/2018 08:26 AM, Mehdi Dogguy wrote:

On 2018-05-14 08:01, Sebastiaan Couwenberg wrote:
Unfortunately that doesn't apply cleanly on top of 0.7.4 for stretch. 
If

you can provide a rebased commit for 0.7.4 I'm willing to test that.



No problem. Here it is (attached). Thanks for your tests!


Thanks for the patch, it doesn't seem to work as expected, though.

`ben tracker` downloads the Packages & Sources files again even when
`ben download` downloaded them just before. It also uses the current
working directory for the downloaded files instead of the cache-dir 
from

the global.conf.

It looks like this is caused by the custom template that was built with
the old ben, because switching the template to debianrt in global.conf
results in the expected behaviour.



Indeed. I didn't explain fully how to apply the patch. My apologies.

The only effect of my second patch is to build templates differently to
avoid linking and include all Ben's library. So in order to have this
bug fixed, templates must be recompiled.


Rebuilding the template fails when executed from the root of the git
directory:

 $ ocamlbuild -pkg ben debiangis.cmxs
 + /usr/bin/ocamlopt unix.cmxa -I /usr/lib/ocaml/ocamlbuild
/usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -I /usr/lib/ocaml -I
/usr/lib/ocaml/ben -I /usr/lib/ocaml/bytes -I /usr/lib/ocaml/ocamlgraph
-I /usr/lib/ocaml/pcre -I /usr/lib/ocaml/tyxml -I /usr/lib/ocaml/uutf
/usr/lib/ocaml/unix.cmxa /usr/lib/ocaml/pcre/pcre.cmxa
/usr/lib/ocaml/ocamlgraph/graph.cmxa /usr/lib/ocaml/str.cmxa
/usr/lib/ocaml/uutf/uutf.cmxa /usr/lib/ocaml/tyxml/tyxml.cmxa
/usr/lib/ocaml/ben/benl.cmxa myocamlbuild.ml
/usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
 File "myocamlbuild.ml", line 1:
 Error: Files /usr/lib/ocaml/unix.cmxa and /usr/lib/ocaml/unix.cmxa
both define a module named Unix



It is true that the fix needs a documentation update to specify how
templates should be built. I'll send you one very soon.

If you have an already built plugin, you may use the 
/usr/lib/ocaml/expunge

tool to hide/remove non-necessary modules (that you can list using
ocamlobjinfo). But, in any case, I'll provide a new procedure to build
custom plugins.

Regards,

--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-14 Thread Sebastiaan Couwenberg
On 05/14/2018 08:26 AM, Mehdi Dogguy wrote:
> On 2018-05-14 08:01, Sebastiaan Couwenberg wrote:
>> Unfortunately that doesn't apply cleanly on top of 0.7.4 for stretch. If
>> you can provide a rebased commit for 0.7.4 I'm willing to test that.
>>
> 
> No problem. Here it is (attached). Thanks for your tests!

Thanks for the patch, it doesn't seem to work as expected, though.

`ben tracker` downloads the Packages & Sources files again even when
`ben download` downloaded them just before. It also uses the current
working directory for the downloaded files instead of the cache-dir from
the global.conf.

It looks like this is caused by the custom template that was built with
the old ben, because switching the template to debianrt in global.conf
results in the expected behaviour.

Rebuilding the template fails when executed from the root of the git
directory:

 $ ocamlbuild -pkg ben debiangis.cmxs
 + /usr/bin/ocamlopt unix.cmxa -I /usr/lib/ocaml/ocamlbuild
/usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -I /usr/lib/ocaml -I
/usr/lib/ocaml/ben -I /usr/lib/ocaml/bytes -I /usr/lib/ocaml/ocamlgraph
-I /usr/lib/ocaml/pcre -I /usr/lib/ocaml/tyxml -I /usr/lib/ocaml/uutf
/usr/lib/ocaml/unix.cmxa /usr/lib/ocaml/pcre/pcre.cmxa
/usr/lib/ocaml/ocamlgraph/graph.cmxa /usr/lib/ocaml/str.cmxa
/usr/lib/ocaml/uutf/uutf.cmxa /usr/lib/ocaml/tyxml/tyxml.cmxa
/usr/lib/ocaml/ben/benl.cmxa myocamlbuild.ml
/usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
 File "myocamlbuild.ml", line 1:
 Error: Files /usr/lib/ocaml/unix.cmxa and /usr/lib/ocaml/unix.cmxa
both define a module named Unix

Building the template from the templates directory works, but doesn't
generate any changes from the previous build.

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-14 Thread Mehdi Dogguy

On 2018-05-14 08:01, Sebastiaan Couwenberg wrote:
Unfortunately that doesn't apply cleanly on top of 0.7.4 for stretch. 
If

you can provide a rebased commit for 0.7.4 I'm willing to test that.



No problem. Here it is (attached). Thanks for your tests!

Kind Regards,

--
Mehdi--- a/_tags
+++ b/_tags
@@ -2,4 +2,4 @@
 <**/*.ml*>: annot
 : for-pack(Benlib)
 : use_libbenl
-<**/*.{byte,native}>: use_libbenl
+: use_libbenl
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -96,6 +96,18 @@ let () =
 flag ["ocaml"; "compile"; "native"] (S[A"-inline"; A"1000"]);
 flag ["ocaml"; "link"; "native"] (S[A"-inline"; A"1000"]);
 
+(* Templates *)
+rule "template: cmx -> cmxs"
+  ~prod:"%.cmxs"
+  ~dep:"%.cmx"
+  ~insert:`top
+  ~doc:"This rule allows to build a .cmxs from a .cmx, without 
including all its dependencies." begin
+fun env _ ->
+  let cmx = env "%.cmx" in
+  let cmxs = env "%.cmxs" in
+  Cmd(S[!Options.ocamlopt; A "-shared"; A "-I"; A "templates"; A 
cmx; A "-o"; A cmxs])
+  end;
+
 (* why isn't this done by default? *)
 flag ["library"; "link"; "thread"] (A"-thread");
 


Bug#876478: ben tracker --global-conf ignores settings

2018-05-14 Thread Sebastiaan Couwenberg
On 05/14/2018 12:37 AM, Mehdi Dogguy wrote:
> On 2018-05-13 21:10, Sebastiaan Couwenberg wrote:
>>
>> I've applied that commit on top of ben (0.7.4) from stretch, and it
>> resolves this issue. The Packages & Sources files are no longer
>> downloaded again when `ben tracker ...` is executed, and the various
>> settings from the global.conf files are used again.
>>
> 
> FWIW, I've got a better fix:
> 
> https://salsa.debian.org/debian/ben/commit/c298da34ec0f4ebc0e68e51a220c2fd9b04fa6fd
> 
> 
> It fixes the issue at its root, and doesn't only workaround one specific
> case.

Unfortunately that doesn't apply cleanly on top of 0.7.4 for stretch. If
you can provide a rebased commit for 0.7.4 I'm willing to test that.

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Mehdi Dogguy

On 2018-05-13 21:10, Sebastiaan Couwenberg wrote:


I've applied that commit on top of ben (0.7.4) from stretch, and it
resolves this issue. The Packages & Sources files are no longer
downloaded again when `ben tracker ...` is executed, and the various
settings from the global.conf files are used again.



FWIW, I've got a better fix:

https://salsa.debian.org/debian/ben/commit/c298da34ec0f4ebc0e68e51a220c2fd9b04fa6fd

It fixes the issue at its root, and doesn't only workaround one specific 
case.


--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Mehdi Dogguy

On 2018-05-13 21:10, Sebastiaan Couwenberg wrote:

On 05/13/2018 08:32 PM, Mehdi Dogguy wrote:

On 2018-05-13 15:44, Sebastiaan Couwenberg wrote:
Those are the files in the current working directory, and may be from 
a

different distribution.

All the global.conf files use a separate cache-dir but this setting 
has

no effect any more.

The same goes for the list of architectures and ignored ones, these
settings are no longer used. It looks like the hardcoded defaults are
used instead.


Indeed. I think I found the culprit. Can you test this commit?

https://salsa.debian.org/debian/ben/commit/aba1f9a8e567502da18c11b8b89dc45f9eed4c19


I've applied that commit on top of ben (0.7.4) from stretch, and it
resolves this issue. The Packages & Sources files are no longer
downloaded again when `ben tracker ...` is executed, and the various
settings from the global.conf files are used again.



Great.


Will this fix find its way into a stretch-pu?



I'll try to submit it. Not sure if Release Managers would accept it.

Kind Regards,

--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Sebastiaan Couwenberg
On 05/13/2018 08:32 PM, Mehdi Dogguy wrote:
> On 2018-05-13 15:44, Sebastiaan Couwenberg wrote:
>> Those are the files in the current working directory, and may be from a
>> different distribution.
>>
>> All the global.conf files use a separate cache-dir but this setting has
>> no effect any more.
>>
>> The same goes for the list of architectures and ignored ones, these
>> settings are no longer used. It looks like the hardcoded defaults are
>> used instead.
> 
> Indeed. I think I found the culprit. Can you test this commit?
> 
> https://salsa.debian.org/debian/ben/commit/aba1f9a8e567502da18c11b8b89dc45f9eed4c19

I've applied that commit on top of ben (0.7.4) from stretch, and it
resolves this issue. The Packages & Sources files are no longer
downloaded again when `ben tracker ...` is executed, and the various
settings from the global.conf files are used again.

Will this fix find its way into a stretch-pu?

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Mehdi Dogguy

On 2018-05-13 15:44, Sebastiaan Couwenberg wrote:

Those are the files in the current working directory, and may be from a
different distribution.

All the global.conf files use a separate cache-dir but this setting has
no effect any more.

The same goes for the list of architectures and ignored ones, these
settings are no longer used. It looks like the hardcoded defaults are
used instead.



Indeed. I think I found the culprit. Can you test this commit?

https://salsa.debian.org/debian/ben/commit/aba1f9a8e567502da18c11b8b89dc45f9eed4c19

Kind Regards,

--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Sebastiaan Couwenberg
On 05/13/2018 03:23 PM, Mehdi Dogguy wrote:
> Hi Sebastiaan,
> 
> On 2018-05-13 14:13, Sebastiaan Couwenberg wrote:
>> On 05/13/2018 01:59 PM, Mehdi Dogguy wrote:
>>> On 2018-05-13 13:51, Sebastiaan Couwenberg wrote:
 On 05/13/2018 01:25 PM, Mehdi Dogguy wrote:
> On 2017-09-22 18:37, Bas Couwenberg wrote:
>> Package: ben
>> Version: 0.7.4+b4
>> Severity: important
>>
>> Dear Maintainer,
>>
>> Since the upgrade to stretch my ben setup no longer works as before.
>>
>> The `ben tracker --global-conf /global.conf` commands don't use
>> the cache file as configured in the global.conf file, and instead
>> download the Sources & Packages files again (which were downloaded
>> before
>> using `ben download -c /global.conf`).
>>
>> The downloaded files also use the current working directory
>> instead of
>> the cache-dir configured in global.conf
>>
>
> Do you have "use-cache = true;" in your global.conf file?

 Yes.

>>>
>>> Can you please share your setup so that I can reproduce it and debug it?
>>> (scripts, configuration files)
>>
>> https://linuxminded.nl/tmp/ben.tar.gz
>>
>> That contains my entire ben directory.
>>
> 
> Great, thanks!
> 
> I noticed you had the following line at the beginning of your
> ben-tracker-*.sh
> scripts:
> 
>   rm -f ben.cache Packages_* Sources
> 
> Since those scripts are executed after ben-download-*.sh scripts, it may
> explain
> the behaviour your are experiencing.

Those are the files in the current working directory, and may be from a
different distribution.

All the global.conf files use a separate cache-dir but this setting has
no effect any more.

The same goes for the list of architectures and ignored ones, these
settings are no longer used. It looks like the hardcoded defaults are
used instead.

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Mehdi Dogguy

Hi Sebastiaan,

On 2018-05-13 14:13, Sebastiaan Couwenberg wrote:

On 05/13/2018 01:59 PM, Mehdi Dogguy wrote:

On 2018-05-13 13:51, Sebastiaan Couwenberg wrote:

On 05/13/2018 01:25 PM, Mehdi Dogguy wrote:

On 2017-09-22 18:37, Bas Couwenberg wrote:

Package: ben
Version: 0.7.4+b4
Severity: important

Dear Maintainer,

Since the upgrade to stretch my ben setup no longer works as 
before.


The `ben tracker --global-conf /global.conf` commands don't 
use

the cache file as configured in the global.conf file, and instead
download the Sources & Packages files again (which were downloaded
before
using `ben download -c /global.conf`).

The downloaded files also use the current working directory instead 
of

the cache-dir configured in global.conf



Do you have "use-cache = true;" in your global.conf file?


Yes.



Can you please share your setup so that I can reproduce it and debug 
it?

(scripts, configuration files)


https://linuxminded.nl/tmp/ben.tar.gz

That contains my entire ben directory.



Great, thanks!

I noticed you had the following line at the beginning of your 
ben-tracker-*.sh

scripts:

  rm -f ben.cache Packages_* Sources

Since those scripts are executed after ben-download-*.sh scripts, it may 
explain

the behaviour your are experiencing.

Regards,

--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Sebastiaan Couwenberg
On 05/13/2018 01:59 PM, Mehdi Dogguy wrote:
> On 2018-05-13 13:51, Sebastiaan Couwenberg wrote:
>> On 05/13/2018 01:25 PM, Mehdi Dogguy wrote:
>>> On 2017-09-22 18:37, Bas Couwenberg wrote:
 Package: ben
 Version: 0.7.4+b4
 Severity: important

 Dear Maintainer,

 Since the upgrade to stretch my ben setup no longer works as before.

 The `ben tracker --global-conf /global.conf` commands don't use
 the cache file as configured in the global.conf file, and instead
 download the Sources & Packages files again (which were downloaded
 before
 using `ben download -c /global.conf`).

 The downloaded files also use the current working directory instead of
 the cache-dir configured in global.conf

>>>
>>> Do you have "use-cache = true;" in your global.conf file?
>>
>> Yes.
>>
> 
> Can you please share your setup so that I can reproduce it and debug it?
> (scripts, configuration files)

https://linuxminded.nl/tmp/ben.tar.gz

That contains my entire ben directory.

Thanks for looking into this.

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Mehdi Dogguy

On 2018-05-13 13:51, Sebastiaan Couwenberg wrote:

On 05/13/2018 01:25 PM, Mehdi Dogguy wrote:

On 2017-09-22 18:37, Bas Couwenberg wrote:

Package: ben
Version: 0.7.4+b4
Severity: important

Dear Maintainer,

Since the upgrade to stretch my ben setup no longer works as before.

The `ben tracker --global-conf /global.conf` commands don't use
the cache file as configured in the global.conf file, and instead
download the Sources & Packages files again (which were downloaded 
before

using `ben download -c /global.conf`).

The downloaded files also use the current working directory instead 
of

the cache-dir configured in global.conf



Do you have "use-cache = true;" in your global.conf file?


Yes.



Can you please share your setup so that I can reproduce it and debug it?
(scripts, configuration files)


Kind Regards,

Bas


--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Sebastiaan Couwenberg
On 05/13/2018 01:25 PM, Mehdi Dogguy wrote:
> On 2017-09-22 18:37, Bas Couwenberg wrote:
>> Package: ben
>> Version: 0.7.4+b4
>> Severity: important
>>
>> Dear Maintainer,
>>
>> Since the upgrade to stretch my ben setup no longer works as before.
>>
>> The `ben tracker --global-conf /global.conf` commands don't use
>> the cache file as configured in the global.conf file, and instead
>> download the Sources & Packages files again (which were downloaded before
>> using `ben download -c /global.conf`).
>>
>> The downloaded files also use the current working directory instead of
>> the cache-dir configured in global.conf
>>
> 
> Do you have "use-cache = true;" in your global.conf file?

Yes.

Kind Regards,

Bas



Bug#876478: ben tracker --global-conf ignores settings

2018-05-13 Thread Mehdi Dogguy

Hi,

On 2017-09-22 18:37, Bas Couwenberg wrote:

Package: ben
Version: 0.7.4+b4
Severity: important

Dear Maintainer,

Since the upgrade to stretch my ben setup no longer works as before.

The `ben tracker --global-conf /global.conf` commands don't use
the cache file as configured in the global.conf file, and instead
download the Sources & Packages files again (which were downloaded 
before

using `ben download -c /global.conf`).

The downloaded files also use the current working directory instead of
the cache-dir configured in global.conf



Do you have "use-cache = true;" in your global.conf file?

--
Mehdi



Bug#876478: ben tracker --global-conf ignores settings

2017-09-22 Thread Bas Couwenberg
Package: ben
Version: 0.7.4+b4
Severity: important

Dear Maintainer,

Since the upgrade to stretch my ben setup no longer works as before.

The `ben tracker --global-conf /global.conf` commands don't use
the cache file as configured in the global.conf file, and instead
download the Sources & Packages files again (which were downloaded before
using `ben download -c /global.conf`).

The downloaded files also use the current working directory instead of
the cache-dir configured in global.conf

This makes it impossible to use multiple configurations for different
transition trackers.

Kind Regards,

Bas

-- System Information:
Debian Release: 9.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ben depends on:
ii  bzip2   1.0.6-8.1
ii  curl7.52.1-5
ii  libben-ocaml [libben-ocaml-e1ii7]   0.7.4+b4
ii  libc6   2.24-11+deb9u1
ii  libjs-jquery3.1.1-2
ii  libpcre32:8.39-3
ii  libpq5  9.6.4-0+deb9u1
ii  libtyxml-ocaml [libtyxml-ocaml-c63d2]   3.5.0-1
ii  ocaml-base-nox [ocaml-base-nox-4.02.3]  4.02.3-9

Versions of packages ben recommends:
ii  dose-distcheck  5.0.1-8

ben suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/ben/media/styles.css (from ben package)