From 3c3f7e761e72fc2658e1919feecc6a57f55d9b0b Mon Sep 17 00:00:00 2001 From: benjamin-tlon <42358674+benjamin-tlon@users.noreply.github.com> Date: Wed, 24 Apr 2019 17:27:27 -0700 Subject: [PATCH] Misc cleanup blocking CC-Release. (#1249) * Move extraneous stuff out of pkg/urbit/* * s/urb/herb/g * Removed some boilerplate for `urbit` builds. * Build urbit tests and run them in the nix build. --- Makefile | 4 +- {pkg/urbit/Spec => doc/spec}/flw.txt | 0 {pkg/urbit/Spec => doc/spec}/http-ports.txt | 0 {pkg/urbit/Spec => doc/spec}/nock/4.txt | 0 {pkg/urbit/Spec => doc/spec}/nock/5.txt | 0 {pkg/urbit/Spec => doc/spec}/u3.md | 0 {pkg/urbit/extras => extras}/extras_README | 0 .../hoon-mode.el/hoon-mode.el | 0 .../hoon.vim/ftdetect/hoonfiletype.vim | 0 .../hoon.vim/ftplugin/hoon.vim | 0 .../hoon.vim/indent/hoon.vim | 0 .../hoon.vim/syntax/hoon.vim | 0 .../hoonSublime/Comments.tmPreferences | 0 .../hoonSublime/hoon.YAML-tmLanguage | 0 .../hoonSublime/hoon.tmLanguage | 0 nix/ops/brass/builder.sh | 8 +- nix/ops/brass/default.nix | 2 +- nix/ops/fakeship/builder.sh | 4 +- nix/ops/fakeship/default.nix | 2 +- nix/ops/solid/builder.sh | 8 +- nix/ops/solid/default.nix | 2 +- nix/ops/test/builder.sh | 22 +- nix/ops/test/default.nix | 2 +- nix/pkgs/default.nix | 36 +- nix/pkgs/urbit/builder.sh | 2 + nix/pkgs/urbit/default.nix | 16 +- nix/pkgs/urbit/shell.nix | 1 + pkg/{urb => herb}/.gitignore | 0 pkg/{urb => herb}/LICENSE | 0 pkg/{urb => herb}/README.md | 6 +- pkg/{urb => herb}/default.nix | 10 +- pkg/{urb/urb => herb/herb} | 0 pkg/urbit/.gitignore | 2 + pkg/urbit/.travis.yml | 62 -- pkg/urbit/.travis/.gitattributes | 2 - pkg/urbit/.travis/.gitignore | 1 - .../.travis/check-trailing-whitespace.sh | 15 - pkg/urbit/.travis/get-brass-pill.sh | 19 - pkg/urbit/.travis/package-lock.json | 753 ------------------ pkg/urbit/.travis/package.json | 14 - pkg/urbit/.travis/pin-brass-pill.txt | 1 - pkg/urbit/.travis/print-core-backtrace.sh | 17 - pkg/urbit/.travis/test.js | 68 -- pkg/urbit/Makefile | 19 +- pkg/urbit/debian/changelog | 5 - pkg/urbit/debian/compat | 1 - pkg/urbit/debian/control | 12 - pkg/urbit/debian/copyright | 27 - pkg/urbit/debian/debhelper-build-stamp | 1 - pkg/urbit/debian/docs | 2 - pkg/urbit/debian/install | 1 - pkg/urbit/debian/rules | 5 - pkg/urbit/debian/source/format | 1 - pkg/urbit/gdb-test-hash | 4 - pkg/urbit/scripts/bootstrap | 4 - pkg/urbit/scripts/build | 5 - pkg/urbit/tests/test.c | 273 ------- sh/load-arvo | 6 +- 58 files changed, 78 insertions(+), 1367 deletions(-) rename {pkg/urbit/Spec => doc/spec}/flw.txt (100%) rename {pkg/urbit/Spec => doc/spec}/http-ports.txt (100%) rename {pkg/urbit/Spec => doc/spec}/nock/4.txt (100%) rename {pkg/urbit/Spec => doc/spec}/nock/5.txt (100%) rename {pkg/urbit/Spec => doc/spec}/u3.md (100%) rename {pkg/urbit/extras => extras}/extras_README (100%) rename {pkg/urbit/extras => extras}/hoon-mode.el/hoon-mode.el (100%) rename {pkg/urbit/extras => extras}/hoon.vim/ftdetect/hoonfiletype.vim (100%) rename {pkg/urbit/extras => extras}/hoon.vim/ftplugin/hoon.vim (100%) rename {pkg/urbit/extras => extras}/hoon.vim/indent/hoon.vim (100%) rename {pkg/urbit/extras => extras}/hoon.vim/syntax/hoon.vim (100%) rename {pkg/urbit/extras => extras}/hoonSublime/Comments.tmPreferences (100%) rename {pkg/urbit/extras => extras}/hoonSublime/hoon.YAML-tmLanguage (100%) rename {pkg/urbit/extras => extras}/hoonSublime/hoon.tmLanguage (100%) rename pkg/{urb => herb}/.gitignore (100%) rename pkg/{urb => herb}/LICENSE (100%) rename pkg/{urb => herb}/README.md (60%) rename pkg/{urb => herb}/default.nix (79%) rename pkg/{urb/urb => herb/herb} (100%) delete mode 100644 pkg/urbit/.travis.yml delete mode 100644 pkg/urbit/.travis/.gitattributes delete mode 100644 pkg/urbit/.travis/.gitignore delete mode 100755 pkg/urbit/.travis/check-trailing-whitespace.sh delete mode 100644 pkg/urbit/.travis/get-brass-pill.sh delete mode 100644 pkg/urbit/.travis/package-lock.json delete mode 100644 pkg/urbit/.travis/package.json delete mode 100644 pkg/urbit/.travis/pin-brass-pill.txt delete mode 100644 pkg/urbit/.travis/print-core-backtrace.sh delete mode 100644 pkg/urbit/.travis/test.js delete mode 100644 pkg/urbit/debian/changelog delete mode 100644 pkg/urbit/debian/compat delete mode 100644 pkg/urbit/debian/control delete mode 100644 pkg/urbit/debian/copyright delete mode 100644 pkg/urbit/debian/debhelper-build-stamp delete mode 100644 pkg/urbit/debian/docs delete mode 100644 pkg/urbit/debian/install delete mode 100755 pkg/urbit/debian/rules delete mode 100644 pkg/urbit/debian/source/format delete mode 100644 pkg/urbit/gdb-test-hash delete mode 100755 pkg/urbit/scripts/bootstrap delete mode 100755 pkg/urbit/scripts/build delete mode 100644 pkg/urbit/tests/test.c diff --git a/Makefile b/Makefile index 2d64b5dccf..ccea8879be 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,13 @@ PKGS = minima extrema rusthello prog .PHONY: build build-all install release test clean build: - nix-build -A urbit -A urb --no-out-link + nix-build -A urbit -A herb --no-out-link build-all: nix-build --no-out-link install: - nix-env -f . -iA urbit -iA urbit-debug -iA urb + nix-env -f . -iA urbit -iA urbit-debug -iA herb release: sh/release urbit linux32 diff --git a/pkg/urbit/Spec/flw.txt b/doc/spec/flw.txt similarity index 100% rename from pkg/urbit/Spec/flw.txt rename to doc/spec/flw.txt diff --git a/pkg/urbit/Spec/http-ports.txt b/doc/spec/http-ports.txt similarity index 100% rename from pkg/urbit/Spec/http-ports.txt rename to doc/spec/http-ports.txt diff --git a/pkg/urbit/Spec/nock/4.txt b/doc/spec/nock/4.txt similarity index 100% rename from pkg/urbit/Spec/nock/4.txt rename to doc/spec/nock/4.txt diff --git a/pkg/urbit/Spec/nock/5.txt b/doc/spec/nock/5.txt similarity index 100% rename from pkg/urbit/Spec/nock/5.txt rename to doc/spec/nock/5.txt diff --git a/pkg/urbit/Spec/u3.md b/doc/spec/u3.md similarity index 100% rename from pkg/urbit/Spec/u3.md rename to doc/spec/u3.md diff --git a/pkg/urbit/extras/extras_README b/extras/extras_README similarity index 100% rename from pkg/urbit/extras/extras_README rename to extras/extras_README diff --git a/pkg/urbit/extras/hoon-mode.el/hoon-mode.el b/extras/hoon-mode.el/hoon-mode.el similarity index 100% rename from pkg/urbit/extras/hoon-mode.el/hoon-mode.el rename to extras/hoon-mode.el/hoon-mode.el diff --git a/pkg/urbit/extras/hoon.vim/ftdetect/hoonfiletype.vim b/extras/hoon.vim/ftdetect/hoonfiletype.vim similarity index 100% rename from pkg/urbit/extras/hoon.vim/ftdetect/hoonfiletype.vim rename to extras/hoon.vim/ftdetect/hoonfiletype.vim diff --git a/pkg/urbit/extras/hoon.vim/ftplugin/hoon.vim b/extras/hoon.vim/ftplugin/hoon.vim similarity index 100% rename from pkg/urbit/extras/hoon.vim/ftplugin/hoon.vim rename to extras/hoon.vim/ftplugin/hoon.vim diff --git a/pkg/urbit/extras/hoon.vim/indent/hoon.vim b/extras/hoon.vim/indent/hoon.vim similarity index 100% rename from pkg/urbit/extras/hoon.vim/indent/hoon.vim rename to extras/hoon.vim/indent/hoon.vim diff --git a/pkg/urbit/extras/hoon.vim/syntax/hoon.vim b/extras/hoon.vim/syntax/hoon.vim similarity index 100% rename from pkg/urbit/extras/hoon.vim/syntax/hoon.vim rename to extras/hoon.vim/syntax/hoon.vim diff --git a/pkg/urbit/extras/hoonSublime/Comments.tmPreferences b/extras/hoonSublime/Comments.tmPreferences similarity index 100% rename from pkg/urbit/extras/hoonSublime/Comments.tmPreferences rename to extras/hoonSublime/Comments.tmPreferences diff --git a/pkg/urbit/extras/hoonSublime/hoon.YAML-tmLanguage b/extras/hoonSublime/hoon.YAML-tmLanguage similarity index 100% rename from pkg/urbit/extras/hoonSublime/hoon.YAML-tmLanguage rename to extras/hoonSublime/hoon.YAML-tmLanguage diff --git a/pkg/urbit/extras/hoonSublime/hoon.tmLanguage b/extras/hoonSublime/hoon.tmLanguage similarity index 100% rename from pkg/urbit/extras/hoonSublime/hoon.tmLanguage rename to extras/hoonSublime/hoon.tmLanguage diff --git a/nix/ops/brass/builder.sh b/nix/ops/brass/builder.sh index 8c8677a5f9..408dc99bbd 100755 --- a/nix/ops/brass/builder.sh +++ b/nix/ops/brass/builder.sh @@ -15,13 +15,13 @@ cleanup () { trap cleanup EXIT -urb ./zod -p hood -d '+hood/autoload |' -urb ./zod -p hood -d "+hood/mount %" +herb ./zod -p hood -d '+hood/autoload |' +herb ./zod -p hood -d "+hood/mount %" rm -r ./zod/home cp -r $ARVO ./zod/home -urb ./zod -p hood -d "+hood/commit %home" -urb ./zod -P brass.pill -d '+brass' +herb ./zod -p hood -d "+hood/commit %home" +herb ./zod -P brass.pill -d '+brass' mv brass.pill $out diff --git a/nix/ops/brass/default.nix b/nix/ops/brass/default.nix index 45253b9b6a..50b8e98ce3 100644 --- a/nix/ops/brass/default.nix +++ b/nix/ops/brass/default.nix @@ -3,7 +3,7 @@ pkgs.stdenv.mkDerivation rec { name = "brass"; builder = ./builder.sh; - buildInputs = [ urbit tlon.urb pkgs.coreutils ]; + buildInputs = [ urbit tlon.herb pkgs.coreutils ]; FAKEZOD = fakezod; ARVO = arvo; diff --git a/nix/ops/fakeship/builder.sh b/nix/ops/fakeship/builder.sh index 8a00b164ac..1a5c422311 100755 --- a/nix/ops/fakeship/builder.sh +++ b/nix/ops/fakeship/builder.sh @@ -5,13 +5,13 @@ set -ex urbit -d -F $SHIP -B "$PILL" $out check () { - [ 3 -eq "$(urb $out -d 3)" ] + [ 3 -eq "$(herb $out -d 3)" ] } if check then echo "Boot success." >&2 - urb $out -p hood -d '+hood/exit' || true + herb $out -p hood -d '+hood/exit' || true else echo "Boot failure." >&2 kill $(< $out/.vere.lock) || true diff --git a/nix/ops/fakeship/default.nix b/nix/ops/fakeship/default.nix index 133a1ba3b1..7d534fd20b 100644 --- a/nix/ops/fakeship/default.nix +++ b/nix/ops/fakeship/default.nix @@ -3,7 +3,7 @@ pkgs.stdenv.mkDerivation rec { name = "fake" + ship; builder = ./builder.sh; - buildInputs = [ urbit tlon.urb ]; + buildInputs = [ urbit tlon.herb ]; PILL = brass; SHIP = ship; } diff --git a/nix/ops/solid/builder.sh b/nix/ops/solid/builder.sh index 0c94c14a55..345c92d188 100755 --- a/nix/ops/solid/builder.sh +++ b/nix/ops/solid/builder.sh @@ -15,8 +15,8 @@ cleanup () { trap cleanup EXIT -urb ./zod -p hood -d '+hood/autoload |' -urb ./zod -p hood -d "+hood/mount %" +herb ./zod -p hood -d '+hood/autoload |' +herb ./zod -p hood -d "+hood/mount %" rm -r ./zod/home cp -r $ARVO ./zod/home @@ -25,7 +25,7 @@ cp -r $ARVO ./zod/home # cp $ARVO/gen/solid.hoon ./zod/home/gen/ # cp $ARVO/lib/pill.hoon ./zod/home/lib/ -urb ./zod -p hood -d "+hood/commit %home" -urb ./zod -P urbit.pill -d '+solid, =dub &' +herb ./zod -p hood -d "+hood/commit %home" +herb ./zod -P urbit.pill -d '+solid, =dub &' mv urbit.pill $out diff --git a/nix/ops/solid/default.nix b/nix/ops/solid/default.nix index 9834568910..370aaf4a3d 100644 --- a/nix/ops/solid/default.nix +++ b/nix/ops/solid/default.nix @@ -3,7 +3,7 @@ pkgs.stdenv.mkDerivation rec { name = "solid"; builder = ./builder.sh; - buildInputs = [ urbit tlon.urb pkgs.coreutils ]; + buildInputs = [ urbit tlon.herb pkgs.coreutils ]; FAKEZOD = fakezod; ARVO = arvo; diff --git a/nix/ops/test/builder.sh b/nix/ops/test/builder.sh index 45cda7d3e1..8034ea55ec 100644 --- a/nix/ops/test/builder.sh +++ b/nix/ops/test/builder.sh @@ -20,29 +20,29 @@ shutdown () { trap shutdown EXIT -urb ./ship -p hood -d '+hood/autoload |' -urb ./ship -p hood -d '+hood/mount %' +herb ./ship -p hood -d '+hood/autoload |' +herb ./ship -p hood -d '+hood/mount %' rm -r ./ship/home cp -r $ARVO ./ship/home -urb ./ship -p hood -d '+hood/commit %home' +herb ./ship -p hood -d '+hood/commit %home' # Start the test app -urb ./ship -p hood -d '+hood/start %test' +herb ./ship -p hood -d '+hood/start %test' # Run the %cores tests -urb ./ship -d '~& ~ ~& %start-test-cores ~' -urb ./ship -p test -d ':- %cores /' -urb ./ship -d '~& %finish-test-cores ~' +herb ./ship -d '~& ~ ~& %start-test-cores ~' +herb ./ship -p test -d ':- %cores /' +herb ./ship -d '~& %finish-test-cores ~' # Run the %renders tests -urb ./ship -d '~& ~ ~& %start-test-renders ~' -urb ./ship -p test -d ':- %renders /' -urb ./ship -d '~& %finish-test-renders ~' +herb ./ship -d '~& ~ ~& %start-test-renders ~' +herb ./ship -p test -d ':- %renders /' +herb ./ship -d '~& %finish-test-renders ~' # Run the test generator -urb ./ship -d '+test, =seed `@uvI`(shaz %reproducible)' | +herb ./ship -d '+test, =seed `@uvI`(shaz %reproducible)' | tee test-generator-output shutdown diff --git a/nix/ops/test/default.nix b/nix/ops/test/default.nix index 3a18414952..b6f4c26d84 100644 --- a/nix/ops/test/default.nix +++ b/nix/ops/test/default.nix @@ -3,7 +3,7 @@ pkgs.stdenv.mkDerivation rec { name = "test"; builder = ./builder.sh; - buildInputs = [ urbit tlon.urb pkgs.coreutils ]; + buildInputs = [ urbit tlon.herb pkgs.coreutils ]; SHIP = ship; ARVO = arvo; diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index ee384fcc9e..1f7fa7fbf2 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -4,26 +4,20 @@ let deps = import ../deps { inherit pkgs; }; + ent = import ./ent { inherit pkgs; }; + arvo = import ./arvo { inherit pkgs; }; + herb = import ../../pkg/herb { inherit pkgs; }; + + mkUrbit = { debug }: + import ./urbit { + inherit pkgs ent debug; + inherit (deps) argon2 murmur3 uv ed25519 sni scrypt softfloat3; + inherit (deps) secp256k1 h2o; + }; + + urbit = mkUrbit { debug=false; }; + urbit-debug = mkUrbit { debug=true; }; + in -rec { - arvo = import ./arvo { inherit pkgs; }; - ent = import ./ent { inherit pkgs; }; - urb = import ../../pkg/urb { inherit pkgs; }; - - urbit = import ./urbit { - inherit pkgs ent; - inherit (deps) argon2 murmur3 uv ed25519 sni scrypt softfloat3; - inherit (deps) secp256k1 h2o; - name = "urbit"; - debug = false; - }; - - urbit-debug = import ./urbit { - inherit pkgs ent; - inherit (deps) argon2 murmur3 uv ed25519 sni scrypt softfloat3; - inherit (deps) secp256k1 h2o; - name = "urbit-debug"; - debug = true; - }; -} +{ inherit ent arvo herb urbit urbit-debug; } diff --git a/nix/pkgs/urbit/builder.sh b/nix/pkgs/urbit/builder.sh index 3b9ee115e4..bb04e4df58 100644 --- a/nix/pkgs/urbit/builder.sh +++ b/nix/pkgs/urbit/builder.sh @@ -6,7 +6,9 @@ cd src bash ./configure +make clean make urbit urbit-worker -j8 +make test mkdir -p $out/bin cp urbit $out/bin/$exename diff --git a/nix/pkgs/urbit/default.nix b/nix/pkgs/urbit/default.nix index b536eef94e..8c80427d4a 100644 --- a/nix/pkgs/urbit/default.nix +++ b/nix/pkgs/urbit/default.nix @@ -1,12 +1,14 @@ { pkgs, - name ? "urbit", - debug ? false, + debug, argon2, ed25519, ent, h2o, murmur3, scrypt, secp256k1, sni, softfloat3, uv }: let + name = + if debug then "urbit-debug" else "urbit"; + deps = with pkgs; [ curl gmp libsigsegv ncurses openssl zlib ]; @@ -14,16 +16,6 @@ let vendor = [ argon2 softfloat3 ed25519 ent h2o scrypt uv murmur3 secp256k1 sni ]; - # osx = - # with pkgs; - # lib.optionals stdenv.isDarwin ( - # with darwin.apple_sdk.frameworks; - # [ Cocoa CoreServices ]); - - # NIX_LDFLAGS = - # pkgs.lib.optionalString pkgs.stdenv.isDarwin - # "-framework CoreServices -framework CoreFoundation"; - in pkgs.stdenv.mkDerivation { diff --git a/nix/pkgs/urbit/shell.nix b/nix/pkgs/urbit/shell.nix index 310b3eba1b..4a6ea350e4 100644 --- a/nix/pkgs/urbit/shell.nix +++ b/nix/pkgs/urbit/shell.nix @@ -8,6 +8,7 @@ in import ./default.nix { inherit pkgs; + debug = false; inherit (tlon) ent; inherit (deps) argon2 ed25519 h2o murmur3 scrypt secp256k1 sni softfloat3 uv; diff --git a/pkg/urb/.gitignore b/pkg/herb/.gitignore similarity index 100% rename from pkg/urb/.gitignore rename to pkg/herb/.gitignore diff --git a/pkg/urb/LICENSE b/pkg/herb/LICENSE similarity index 100% rename from pkg/urb/LICENSE rename to pkg/herb/LICENSE diff --git a/pkg/urb/README.md b/pkg/herb/README.md similarity index 60% rename from pkg/urb/README.md rename to pkg/herb/README.md index 097d8b843e..d0f2eab8f1 100644 --- a/pkg/urb/README.md +++ b/pkg/herb/README.md @@ -1,4 +1,4 @@ -# urb +# Herb Unix control of Urbit @@ -7,10 +7,10 @@ Unix control of Urbit To run without installing anything: ```bash -nix-shell --pure --command 'python ./urb -d "(add 3 4)"' +nix-shell --pure --command 'python ./herb -d "(add 3 4)"' ``` -To install `urb`: +To install `herb`: ```bash nix-env -if . diff --git a/pkg/urb/default.nix b/pkg/herb/default.nix similarity index 79% rename from pkg/urb/default.nix rename to pkg/herb/default.nix index 2aff0056bd..b1dd819a6a 100644 --- a/pkg/urb/default.nix +++ b/pkg/herb/default.nix @@ -21,19 +21,19 @@ let in pkgs.stdenv.mkDerivation rec { - name = "urb"; + name = "herb"; buildInputs = [ pyenv ]; unpackPhase = "true"; installPhase = '' mkdir -p $out/bin - cp ${./urb} $out/bin/urb.py + cp ${./herb} $out/bin/herb.py - cat > $out/bin/urb < $out/bin/herb < Fri, 8 Jun 2018 14:31:08 -0700 diff --git a/pkg/urbit/debian/compat b/pkg/urbit/debian/compat deleted file mode 100644 index f599e28b8a..0000000000 --- a/pkg/urbit/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/urbit/debian/control b/pkg/urbit/debian/control deleted file mode 100644 index 430ff65e3c..0000000000 --- a/pkg/urbit/debian/control +++ /dev/null @@ -1,12 +0,0 @@ -Source: urbit -Section: net -Priority: extra -Maintainer: Ted Blackman -Build-Depends: debhelper (>= 9), libgmp3-dev, libsigsegv-dev, openssl, libssl-dev,libtool, meson, re2c, libcurl4-gnutls-dev -Standards-Version: 3.9.5 -Homepage: http://urbit.org - -Package: urbit -Architecture: any -Depends: libgmp3-dev, libsigsegv-dev, openssl, libcurl4-gnutls-dev -Description: An operating function diff --git a/pkg/urbit/debian/copyright b/pkg/urbit/debian/copyright deleted file mode 100644 index 72fb2d7eb8..0000000000 --- a/pkg/urbit/debian/copyright +++ /dev/null @@ -1,27 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: urbit -Source: - -Files: * -License: MIT - The MIT License (MIT) - . - Copyright (c) 2017 Urbit - . - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. diff --git a/pkg/urbit/debian/debhelper-build-stamp b/pkg/urbit/debian/debhelper-build-stamp deleted file mode 100644 index 7d4ce33b15..0000000000 --- a/pkg/urbit/debian/debhelper-build-stamp +++ /dev/null @@ -1 +0,0 @@ -urbit diff --git a/pkg/urbit/debian/docs b/pkg/urbit/debian/docs deleted file mode 100644 index d99978a9bc..0000000000 --- a/pkg/urbit/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -LICENSE.txt -README.md diff --git a/pkg/urbit/debian/install b/pkg/urbit/debian/install deleted file mode 100644 index 474c77259c..0000000000 --- a/pkg/urbit/debian/install +++ /dev/null @@ -1 +0,0 @@ -bin/urbit usr/bin diff --git a/pkg/urbit/debian/rules b/pkg/urbit/debian/rules deleted file mode 100755 index 3ee6d911cc..0000000000 --- a/pkg/urbit/debian/rules +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/make -f -%: - dh $@ - -override_dh_auto_install: diff --git a/pkg/urbit/debian/source/format b/pkg/urbit/debian/source/format deleted file mode 100644 index 163aaf8d82..0000000000 --- a/pkg/urbit/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/pkg/urbit/gdb-test-hash b/pkg/urbit/gdb-test-hash deleted file mode 100644 index d2ba41a732..0000000000 --- a/pkg/urbit/gdb-test-hash +++ /dev/null @@ -1,4 +0,0 @@ -file bin/test_hash -handle SIGSEGV nostop noprint -start - diff --git a/pkg/urbit/scripts/bootstrap b/pkg/urbit/scripts/bootstrap deleted file mode 100755 index 3a8a74e560..0000000000 --- a/pkg/urbit/scripts/bootstrap +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -git submodule init -git submodule update diff --git a/pkg/urbit/scripts/build b/pkg/urbit/scripts/build deleted file mode 100755 index 879618f28d..0000000000 --- a/pkg/urbit/scripts/build +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -mkdir ./build &> /dev/null -meson . ./build --buildtype=release "$@" -ninja -C build diff --git a/pkg/urbit/tests/test.c b/pkg/urbit/tests/test.c deleted file mode 100644 index 86a75ec038..0000000000 --- a/pkg/urbit/tests/test.c +++ /dev/null @@ -1,273 +0,0 @@ -/* w/test.c -** -*/ -#define C3_GLOBAL - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "all.h" - -#if 1 -/* u3_walk_load(): load file or bail. -*/ -static u3_noun -u3_walk_load(c3_c* pas_c) -{ - struct stat buf_b; - c3_i fid_i = open(pas_c, O_RDONLY, 0644); - c3_w fln_w, red_w; - c3_y* pad_y; - - if ( (fid_i < 0) || (fstat(fid_i, &buf_b) < 0) ) { - fprintf(stderr, "%s: %s\r\n", pas_c, strerror(errno)); - return u3m_bail(c3__fail); - } - fln_w = buf_b.st_size; - pad_y = c3_malloc(buf_b.st_size); - - red_w = read(fid_i, pad_y, fln_w); - close(fid_i); - - if ( fln_w != red_w ) { - free(pad_y); - return u3m_bail(c3__fail); - } - else { - u3_noun pad = u3i_bytes(fln_w, (c3_y *)pad_y); - free(pad_y); - - return pad; - } -} -#endif - -#if 0 -static c3_w* -_test_walloc(c3_w siz_w) -{ - c3_w *ptr_w = u3a_walloc(siz_w); - c3_w i_w; - - c3_assert(siz_w >= 1); - *ptr_w = siz_w; - - for ( i_w = 1; i_w < siz_w; i_w++ ) { - ptr_w[i_w] = u3r_mug((0xffff & (c3_p)(ptr_w)) + i_w); - } - return ptr_w; -} - -static void -_test_free(c3_w* ptr_w) -{ - c3_w i_w, siz_w = *ptr_w; - - for ( i_w = 1; i_w < siz_w; i_w++ ) { - c3_assert(ptr_w[i_w] == u3r_mug((0xffff & (c3_p)(ptr_w)) + i_w)); - } - u3a_free(ptr_w); -} - -#define NUM 16384 - -// Simple allocation test. -// -void -test(void) -{ - c3_w* one_w[NUM]; - c3_w* two_w[NUM]; - c3_w i_w; - - for ( i_w = 0; i_w < NUM; i_w++ ) { - c3_w siz_w = c3_max(1, u3r_mug(i_w) & 0xff); - - one_w[i_w] = _test_walloc(siz_w); - two_w[i_w] = _test_walloc(siz_w); - } - _road_sane(); - - for ( i_w = 0; i_w < NUM; i_w++ ) { - _test_free(two_w[NUM - (i_w + 1)]); - _road_sane(); - } - for ( i_w = 0; i_w < NUM; i_w++ ) { - c3_w siz_w = c3_max(1, u3r_mug(i_w + 1) & 0xff); - - two_w[i_w] = _test_walloc(siz_w); - _road_sane(); - } - - for ( i_w = 0; i_w < NUM; i_w++ ) { - _test_free(one_w[NUM - (i_w + 1)]); - _road_sane(); - } - for ( i_w = 0; i_w < NUM; i_w++ ) { - c3_w siz_w = c3_max(1, u3r_mug(i_w + 2) & 0xff); - - one_w[i_w] = _test_walloc(siz_w); - _road_sane(); - } - - for ( i_w = 0; i_w < NUM; i_w++ ) { - _test_free(one_w[NUM - (i_w + 1)]); - _road_sane(); - } - for ( i_w = 0; i_w < NUM; i_w++ ) { - _test_free(two_w[NUM - (i_w + 1)]); - _road_sane(); - } - - printf("allocations %d, iterations %d\n", ALL_w, ITE_w); -} -#endif - -#if 1 -static void -_test_hash(void) -{ - // u3m_dump(); - { - u3h_root* har_u = u3h_new(); - c3_w i_w; - c3_w max_w = (1 << 20); - - for ( i_w = 0; i_w < max_w; i_w++ ) { - u3_noun key = u3nc(0, i_w); - - u3h_put(har_u, key, (i_w + 1)); - u3z(key); - } - for ( i_w = 0; i_w < max_w; i_w++ ) { - u3_noun key = u3nc(0, i_w); - u3_noun val = u3h_get(har_u, key); - - if ( val != (i_w + 1) ) { - if ( u3_none == val ) { - printf("at %d, nothing\n", i_w); - } - else printf("at %d, oddly, is %d\n", i_w, val); - c3_assert(0); - } - u3z(key); - } - u3h_free(har_u); - } - // u3m_dump(); -} -#endif - -#if 1 -static void -_test_jam(void) -{ - // u3m_dump(); - { - u3_noun pil = u3_walk_load("urb/urbit.pill"); - u3_noun cue, jam; - - printf("cueing pill - %d bytes\n", u3r_met(3, pil)); - cue = u3ke_cue(pil); - printf("cued - mug %x\n", u3r_mug(cue)); - -#if 1 - jam = u3ke_jam(cue); - printf("jammed - %d bytes\n", u3r_met(3, jam)); - cue = u3ke_cue(jam); - printf("cued - mug %x\n", u3r_mug(cue)); -#endif - - u3z(cue); - } - // u3m_dump(); -} -#endif - -static void -_test_leap(void) -{ -#if 1 - // u3m_dump(); - { - u3_noun pil; - u3_noun cue, jam; - c3_w gof_w = u3m_golf(); - - pil = u3_walk_load("urb/urbit.pill"); - u3m_leap(0); - printf("cueing pill - %d bytes\n", u3r_met(3, pil)); - cue = u3ke_cue(pil); - printf("cued - %p, mug %x\n", u3a_to_ptr(cue), u3r_mug(cue)); - u3m_fall(); - - cue = u3a_take(cue); - printf("taken - %p, mug %x\n", u3a_to_ptr(cue), u3r_mug(cue)); - u3m_flog(gof_w); - u3z(pil); - -#if 1 - jam = u3ke_jam(cue); - printf("jammed - %d bytes\n", u3r_met(3, jam)); - cue = u3ke_cue(jam); - printf("cued - mug %x\n", u3r_mug(cue)); -#endif - - u3z(cue); - } - // u3m_dump(); -#endif -} - -static void -_test_test(void) -{ - u3_noun fol = u3ke_cue(u3_walk_load("pill/west.pill")); - u3_noun val; - - printf("test_test: formula mug %x\n", u3r_mug(fol)); - val = u3n_nock_on(u3nc(42, 17), fol); - printf("val %d\n", val); - u3z(val); -} - -int FOO; - -// A simple memory tester. -// -int -main(int argc, char *argv[]) -{ - printf("hello, world: len %dMB\n", (1 << U3_OS_LoomBits) >> 18); - // _test_words(); - - u3m_init(); - u3m_pave(c3y, c3n); - // u3j_boot(); - - // u3m_dump(); - - printf("booted.\n"); - - { - _test_leap(); - // _test_hash(); - // _test_jam(); - } - // u3m_clear(); - - // u3m_dump(); -} diff --git a/sh/load-arvo b/sh/load-arvo index 2c21aadb40..674f62e59d 100755 --- a/sh/load-arvo +++ b/sh/load-arvo @@ -10,12 +10,12 @@ ship=$1 test -d $ship/.urb test -f $ship/.vere.lock -urb $ship -p hood -d '+hood/autoload |' +herb $ship -p hood -d '+hood/autoload |' -urb $ship -p hood -d "+hood/mount %" +herb $ship -p hood -d "+hood/mount %" rm -r $ship/home cp -r pkg/arvo $ship/home -urb $ship -p hood -d "+hood/commit %home" +herb $ship -p hood -d "+hood/commit %home"