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

CodiMD: init at 1.2.0, add module & test #46655

Merged
merged 3 commits into from Sep 17, 2018
Merged

Conversation

WilliButz
Copy link
Member

@WilliButz WilliButz commented Sep 14, 2018

Motivation for this change

This adds the collaborative markdown editor CodiMD, which is the OpenSource version of HackMD. For available features see https://demo.codimd.org/features.

Things done

CodiMD uses a vendored/forked version of CodeMirror as its editor, which is manually packaged in codimd/CodeMirror/.

For now I included an open PR as a patch, so that the service works properly. The module exposes all currently available options and generates a json config which is passed to the CodiMD service.

The test consists of two subtest, one for sqlite and the other for postgres.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@WilliButz
Copy link
Member Author

For me this supersedes #32275, so I finally close the other PR :)

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: codimd

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@WilliButz WilliButz changed the title init CodiMD at 1.2.0, add module & test CodiMD: init at 1.2.0, add module & test Sep 14, 2018
@GrahamcOfBorg
Copy link

Unexpected error: command failed with exit code 1 on x86_64-linux (full log)

Attempted: codimd

Partial log (click to expand)

npm WARN schema-utils@0.4.5 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none was installed.
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/d87046kaw8jml63x9ngqrvs0pd6ms2qc-node-uglifyjs-webpack-plugin-1.2.7
patching script interpreter paths in /nix/store/d87046kaw8jml63x9ngqrvs0pd6ms2qc-node-uglifyjs-webpack-plugin-1.2.7
/nix/store/d87046kaw8jml63x9ngqrvs0pd6ms2qc-node-uglifyjs-webpack-plugin-1.2.7/lib/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-es/bin/uglifyjs: interpreter directive changed from " /usr/bin/env node" to "/nix/store/4madjv9fh420frjsmimdbsgzxxq2xvx9-nodejs-6.14.4/bin/node"
checking for references to /build in /nix/store/d87046kaw8jml63x9ngqrvs0pd6ms2qc-node-uglifyjs-webpack-plugin-1.2.7...
building '/nix/store/1lxdkq6d2v8q0ab3bpgc36hahmyl3ni3-codimd-env.drv'...
created 315 symlinks in user environment
cannot build derivation '/nix/store/zzhl43b3hihkljmzk46j5q70x1m3mdi1-codimd-1.2.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/zzhl43b3hihkljmzk46j5q70x1m3mdi1-codimd-1.2.0.drv' failed

@WilliButz
Copy link
Member Author

Unexpected error: command failed with exit code 1 on x86_64-linux

Because of my recent change in the upstream PR to CodiMD, which I include via fetchpatch, the hash changed.

@GrahamcOfBorg
Copy link

Timed out, unknown build status on aarch64-linux (full log)

Attempted: codimd

Partial log (click to expand)

[ 69%] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/JSSourceBufferList.cpp.o
building of '/nix/store/w2mi5hdppz7wn93gc066x6ddclfpdwxa-qtwebkit-5.212-alpha-01-26-2018.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/2pg7fy6xnklvpjkg28b3d3c41cdqj8x9-phantomjs-2.1.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pvcrjh7kdc3kzaqb8ikvyn1w1xhi0dvc-node-js-url-2.3.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/21d5dpd5477imp7s9jqcv98gj9q7w2mn-node-markdown-pdf-8.1.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/k7d8sc8znscdjs67whyxqfvk2ymlb1ra-node-phantomjs-prebuilt-2.1.16.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/c2myb3s41d5hgnhm3idiivl67n2v3wq5-codemirror-hackmdio-05-07-2018.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/p3hyh0gmn1sfmfsl66076d7wmzm84vrz-codimd-env.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/g18i1zc9wvw0r068r57rqp8s6afjx0az-codimd-1.2.0.drv': 2 dependencies couldn't be built
error: build of '/nix/store/g18i1zc9wvw0r068r57rqp8s6afjx0az-codimd-1.2.0.drv' failed

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: codimd

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: codimd

Partial log (click to expand)

            + 2 hidden modules
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0/lib  /nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0/bin
patching script interpreter paths in /nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0
/nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0/bin/manage_users: interpreter directive changed from "/usr/bin/env node" to "/nix/store/4madjv9fh420frjsmimdbsgzxxq2xvx9-nodejs-6.14.4/bin/node"
checking for references to /build in /nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0...
/nix/store/1rx39c3k2kaz4zqjkxjb9yw54vvbzyia-codimd-1.2.0

@GrahamcOfBorg
Copy link

Timed out, unknown build status on aarch64-linux (full log)

Attempted: codimd

Partial log (click to expand)

[ 68%] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/JSMediaStreamTrack.cpp.o
building of '/nix/store/w2mi5hdppz7wn93gc066x6ddclfpdwxa-qtwebkit-5.212-alpha-01-26-2018.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/2pg7fy6xnklvpjkg28b3d3c41cdqj8x9-phantomjs-2.1.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pvcrjh7kdc3kzaqb8ikvyn1w1xhi0dvc-node-js-url-2.3.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/21d5dpd5477imp7s9jqcv98gj9q7w2mn-node-markdown-pdf-8.1.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/k7d8sc8znscdjs67whyxqfvk2ymlb1ra-node-phantomjs-prebuilt-2.1.16.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/c2myb3s41d5hgnhm3idiivl67n2v3wq5-codemirror-hackmdio-05-07-2018.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/p3hyh0gmn1sfmfsl66076d7wmzm84vrz-codimd-env.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/6lqb5775z74yyri49119i9qnaf5pv6b6-codimd-1.2.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/6lqb5775z74yyri49119i9qnaf5pv6b6-codimd-1.2.0.drv' failed

@WilliButz
Copy link
Member Author

@GrahamcOfBorg test codimd

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.codimd

Partial log (click to expand)

codimdSqlite: exit status 0
0 out of 2 tests succeeded
test script finished in 557.16s
cleaning up
killing codimdPostgres (pid 600)
killing codimdSqlite (pid 612)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
builder for '/nix/store/99ssiwih6xsygzvpxqlkxwhk4dl5kl1w-vm-test-run-codimd.drv' failed with exit code 1
error: build of '/nix/store/99ssiwih6xsygzvpxqlkxwhk4dl5kl1w-vm-test-run-codimd.drv' failed

@WilliButz
Copy link
Member Author

Failure on x86_64-linux (full log)
Attempted: tests.codimd

I tried to reproduce this on three different hosts, all with sandboxing and everything, but couldn't oO

@GrahamcOfBorg test codimd

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.codimd

Partial log (click to expand)

codimdPostgres: running command: sync
codimdPostgres: exit status 0
2 out of 2 tests succeeded
test script finished in 27.86s
cleaning up
killing codimdSqlite (pid 597)
killing codimdPostgres (pid 609)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/jyjlnf316bl52rl3hmvria01mdwpiw96-vm-test-run-codimd

@GrahamcOfBorg
Copy link

Timed out, unknown build status on aarch64-linux (full log)

Attempted: tests.codimd

Partial log (click to expand)

cannot build derivation '/nix/store/kjpmh0m9mfndvrafh0hj8anx6rgzid5y-nixos-system-codimdSqlite-19.03.git.192a707.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/gfh1v4m8a9h6amlhw7qvrxkblgw8qbqk-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/wwnrz6kgqfvwma831bxlmvkaaagq84b7-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7rijp4mymzqkqkp9pm3jdycwv9s2y3pr-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/90ivxq2dyx29i21cgkph5k1i6d855fkx-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/0glbdw2k5rm3i3mi8gcf02kqazaj7bpi-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/prdck5m9snnarswqy09w6xpymrp3va21-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/lisdaj6idvr66hnfldg591bhgg4rja27-nixos-test-driver-codimd.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/77g0jsn6s6m5ih6hzfwklnxamq6wbdy2-vm-test-run-codimd.drv': 1 dependencies couldn't be built
error: build of '/nix/store/77g0jsn6s6m5ih6hzfwklnxamq6wbdy2-vm-test-run-codimd.drv' failed

@GrahamcOfBorg
Copy link

Timed out, unknown build status on aarch64-linux (full log)

Attempted: tests.codimd

Partial log (click to expand)

cannot build derivation '/nix/store/ca52v6crj6x8hq9khssydrpg5zrq2hiv-nixos-system-codimdSqlite-19.03.git.c2b7b3f.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/agsn5xkmjwj44sz6q03g1h7gwjswhz5i-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/zhzr75aarqzpdq2ry1i924hx69sy4a1a-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/8zjm8g1y6pvv34lg6m564607ybb4vbc8-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/k7w4xv12a0pyyzgmcxypcnb2mklwlpbn-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/mx6zyil863smna3k5480awh4w3dmbmy1-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/zbmahasmy3qnaxi5f2nvwhvv7c4r5dl6-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/5iyf2nh7pxnjjvwi0gr1mjxd5rnrdl7x-nixos-test-driver-codimd.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/8z2a9p6nckblzyp0dr5hzcg2ya7fc9vf-vm-test-run-codimd.drv': 1 dependencies couldn't be built
error: build of '/nix/store/8z2a9p6nckblzyp0dr5hzcg2ya7fc9vf-vm-test-run-codimd.drv' failed

@globin globin merged commit dd5dcc6 into NixOS:master Sep 17, 2018
@WilliButz WilliButz deleted the add-codimd branch September 17, 2018 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants