Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate packed-mn to tebako to drive development #23

Closed
ronaldtse opened this issue Sep 17, 2021 · 7 comments
Closed

Migrate packed-mn to tebako to drive development #23

ronaldtse opened this issue Sep 17, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

Metanorma's packed-mn is a single binary executable that includes the full Metanorma chain.

There are 3 platforms supported:

We want to migrate this binary to tebako and to ensure that tebako supports its functionality.

@maxirmx
Copy link
Member

maxirmx commented Nov 26, 2021

@ronaldtse
Could you please advise me. packed-mn uses clang and not gcc. Shall I follow this selection in tebako ?
Thank you

@ronaldtse
Copy link
Contributor Author

@maxirmx sure, perhaps we have to support both...?

@maxirmx
Copy link
Member

maxirmx commented Dec 3, 2021

https://github.com/metanorma/packed-mn/actions/runs/1535639165

Packaging and some basic comands work both with gcc and clang

@ronaldtse
Copy link
Contributor Author

That's fantastic!

Can you try:

git clone https://github.com/metanorma/iso-19156
cd iso-19156
metanorma site generate

?

@maxirmx
Copy link
Member

maxirmx commented Dec 4, 2021

If I do

cd iso-19156
../tebako/build/metanorma site generate

I get

Traceback (most recent call last):
        1: from /__tebako_memfs__/local/metanorma:204:in `<main>'
/__tebako_memfs__/local/metanorma:204:in `require': cannot load such file -- metanorma-ribose (LoadError)

If I do

 tebako/build/metanorma site generate iso-19156 -c iso-19156/metanorma.yml

I get

Fatal Error: No such file or directory @ rb_sysopen - /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd/../../../VERSION
Traceback (most recent call last):
        67: from /__tebako_memfs__/local/metanorma:215:in `<main>'
        66: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli.rb:34:in `start'
        65: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
        64: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
        63: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
        62: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-hollaback-0.2.1/lib/thor/hollaback.rb:68:in `run'
        61: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
        60: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:243:in `block in subcommand'
        59: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:116:in `invoke'
        58: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
        57: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
        56: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-hollaback-0.2.1/lib/thor/hollaback.rb:68:in `run'
        55: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
        54: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/commands/site.rb:25:in `generate'
        53: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/site_generator.rb:23:in `generate'
        52: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/site_generator.rb:28:in `generate'
        51: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/site_generator.rb:28:in `each'
        50: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/site_generator.rb:28:in `block in generate'
        49: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/site_generator.rb:82:in `compile'
        48: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/compiler.rb:35:in `compile'
        47: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/compiler.rb:30:in `compile'
        46: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-cli-1.5.2/lib/metanorma/cli/compiler.rb:45:in `compile_file'
        45: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-1.4.2/lib/metanorma/compile.rb:30:in `compile'
        44: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-1.4.2/lib/metanorma/compile.rb:90:in `process_input'
        43: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-1.4.2/lib/metanorma/compile.rb:107:in `process_input_adoc'
        42: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-1.4.2/lib/metanorma/processor.rb:21:in `input_to_isodoc'
        41: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-1.4.2/lib/metanorma/input/asciidoc.rb:18:in `process'
        40: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.16/lib/asciidoctor/convert.rb:120:in `convert'
        39: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/asciidoctor-2.0.16/lib/asciidoctor/document.rb:948:in `convert'
        38: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-standoc-1.11.2/lib/asciidoctor/standoc/utils.rb:13:in `convert'
        37: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-standoc-1.11.2/lib/asciidoctor/standoc/base.rb:165:in `document'
        36: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-iso-1.10.3/lib/asciidoctor/iso/base.rb:45:in `init'
        35: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-standoc-1.11.2/lib/asciidoctor/standoc/base.rb:136:in `init'
        34: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/metanorma-standoc-1.11.2/lib/asciidoctor/standoc/ref_sect.rb:131:in `init_bib_caches'
        33: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/db_cache.rb:251:in `init_bib_caches'
        32: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/db_cache.rb:251:in `new'
        31: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/db.rb:12:in `initialize'
        30: from /__tebako_memfs__/lib/ruby/2.7.0/singleton.rb:123:in `instance'
        29: from /__tebako_memfs__/lib/ruby/2.7.0/singleton.rb:123:in `synchronize'
        28: from /__tebako_memfs__/lib/ruby/2.7.0/singleton.rb:125:in `block in instance'
        27: from /__tebako_memfs__/lib/ruby/2.7.0/singleton.rb:125:in `new'
        26: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/registry.rb:21:in `initialize'
        25: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/registry.rb:27:in `register_gems'
        24: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/registry.rb:27:in `each'
        23: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/registry.rb:29:in `block in register_gems'
        22: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-1.9.5/lib/relaton/registry.rb:29:in `require'
        21: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-w3c-1.9.4/lib/relaton_w3c.rb:10:in `<top (required)>'
        20: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-w3c-1.9.4/lib/relaton_w3c.rb:10:in `require'
        19: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-w3c-1.9.4/lib/relaton_w3c/data_fethcer.rb:2:in `<top (required)>'
        18: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/relaton-w3c-1.9.4/lib/relaton_w3c/data_fethcer.rb:2:in `require'
        17: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/linkeddata-3.1.6/lib/linkeddata.rb:1:in `<top (required)>'
        16: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/linkeddata-3.1.6/lib/linkeddata.rb:26:in `<module:LinkedData>'
        15: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/linkeddata-3.1.6/lib/linkeddata.rb:26:in `require'
        14: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-n3-3.1.2/lib/rdf/n3.rb:3:in `<top (required)>'
        13: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-n3-3.1.2/lib/rdf/n3.rb:21:in `<module:RDF>'
        12: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-n3-3.1.2/lib/rdf/n3.rb:22:in `<module:N3>'
        11: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-n3-3.1.2/lib/rdf/n3.rb:22:in `require'
        10: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-n3-3.1.2/lib/rdf/n3/algebra.rb:2:in `<top (required)>'
         9: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-n3-3.1.2/lib/rdf/n3/algebra.rb:2:in `require'
         8: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/sparql-3.1.8/lib/sparql/algebra.rb:2:in `<top (required)>'
         7: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/sparql-3.1.8/lib/sparql/algebra.rb:2:in `require'
         6: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd.rb:14:in `<top (required)>'
         5: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd.rb:14:in `glob'
         4: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd.rb:14:in `block in <top (required)>'
         3: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd.rb:14:in `require'
         2: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd/version.rb:1:in `<top (required)>'
         1: from /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd/version.rb:3:in `<module:VERSION>'
/__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd/version.rb:3:in `read': No such file or directory @ rb_sysopen - /__tebako_memfs__/lib/ruby/gems/2.7.0/gems/rdf-xsd-3.1.1/lib/rdf/xsd/../../../VERSION (Errno::ENOENT)

It looks like an issue with processing .. in path and I recall that there is no tests for such paths.

@ronaldtse
Copy link
Contributor Author

ronaldtse commented Dec 5, 2021

cd iso-19156
../tebako/build/metanorma site generate

This is correct.

There is actually a bug where the package should not load "metanorma-ribose" because it is not part of the normal package.

@CAMOBAP can you help here?

UPDATE: Actually this was because the maxirmx-tebako-packager branch was not using the latest master. The offending line was removed few days ago (metanorma/packed-mn@6c083ab). I've since rebased and force pushed the branch. FYI @maxirmx .

Also added the PR here: metanorma/packed-mn#126

maxirmx added a commit that referenced this issue Dec 12, 2021
1. Supported platforms:
* Ubuntu 18
* Ubuntu 20

2. cmake script wrapped by bash file
3.  packed-mn packaging (ubuntu version) per #23
@ronaldtse
Copy link
Contributor Author

Going to close this since we now have Linux + macOS done. Thank you @maxirmx !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants