Skip to content

Commit

Permalink
ΔOS v0.7-alpha (#46)
Browse files Browse the repository at this point in the history
* init: .deos/

* init: doc/+etc/+test/

* init: boot/+include/+lib/

* init-blockstack: doc/+etc/

* init: .spec.yml

* init: shadow Make

* update: .spec.yml -> .spec.md

* update: .spec.yml

* update: .spec.yml

* update: spec.md

* update: root

* update: root

* update: spec

* update: spec

* update: spec

* update: spec

* update: spec

* update: spec

* init: venv

* add: obj/

* add-doc: freebird

* refactor: freebird

* refactor: src -> lib & include

* add: freebird config

* init: venv/+env/+dist/+tmp/

* update: devm

* update: zerotier.sh

* update: fix-python & init-sudo

* init: jupyter

* mv: src/devm -> boot

* init: host

* mv: .spec.md -> SPECIFICATION.md

* update: boot

* fix: flow

* init: virtualenv

* add: venv gitignore

* update: vm

* init: main.c

* init: picocoin

* update: Makefile

* mv: src/deos -> src/devm

* add: requirements.txt

* add: var/data

* add: TODO.md

* mv: src/devm -> src/install

* init-fix: zerotier

* add-fix: vagrant ssh shell

* add-linux: virtualenv

* update-linux: venv

* fix: zerotier

* update-venv: linux

* clean: Vagrantfile

* improve-boot: style

* install: blockstack

* rm: dead files

* clean: Vagrantfile

* init: env sync

* clean: BOOT_DEBUG logic

* update: vagrant style

* fix: spacing

* fix: spacing

* update: Vagrantfile

* update: Vagrant

* update: Makefile

* update: Vagrantfile

* add: index.mk

* rm: tmp

* cleanup

* init: .virtualenvs/

* rm: .virtualenvs/

* update: boot syntax

* fix: boot style

* add: DeOS_BOOT_PATH

* add: EXEC

* init: blockstack

* fix: venv

* update-style: boot spacing
  • Loading branch information
DeSantis authored Dec 13, 2016
1 parent ba4ecc3 commit a7f0811
Show file tree
Hide file tree
Showing 130 changed files with 1,063 additions and 729 deletions.
162 changes: 111 additions & 51 deletions .deosrc
Original file line number Diff line number Diff line change
@@ -1,67 +1,127 @@
export MAKEFLAGS=--no-print-directory
include src/install/bootstrap.mk

.DEFAULT_GOAL:=all
.PHONY:all build chmod clean install
.SUBLIME_TARGETS:all
export DeOS_BOOT_ARGS_BITCOIN:=-b
export DeOS_BOOT_ARGS_BLOCKSTACK:=-d
export DeOS_BOOT_ARGS_BOOTSTRAP:=-a
export DeOS_BOOT_ARGS_PYTHON:=-c
export DeOS_BOOT_PATH:=/deos/src/boot
export DeOS_BOOT_SCRIPT:=./src/boot/index.sh
export DeOS_BUILD_APT_UPGRADE:=$(FALSE)
export DeOS_BUILD_BITCOIN:=$(FALSE)
export DeOS_BUILD_BLOCKSTACK:=$(TRUE)
export DeOS_BUILD_PYTHON:=$(TRUE)
export DeOS_CONFIG_DEBUG:=$(FALSE)
export DeOS_HOST_OS:=$(shell uname -s)

###

DEBUG:=$(FALSE)
HOST_OS:=$(shell uname -s)

export BUILDDOCKER:=$(FALSE)
export BUILDJS:=$(FALSE)
export BUILDNGINX:=$(FALSE)
export BUILDZT:=$(FALSE)
export BUILDNOTEBOOK:=$(FALSE)
export DeOS_FILESYNC:=$(TRUE)
export DeOS_RUNSERVER:=$(FALSE)

BASEDIR:=$(CURDIR)
BIN:=$(BASEDIR)/bin
LIB:=$(BASEDIR)/src
SRC:=$(BASEDIR)/src
export BOOT:=$(BASEDIR)/boot
DELTA:=$(BASEDIR)/bin/delta
DEOS:=$(BASEDIR)/bin/deos
LIB:=$(BASEDIR)/lib
PRINT:=$(BASEDIR)/bin/printm
SRC:=$(BASEDIR)/src
VENV:=$(BASEDIR)/venv

export VM_BOX:=bento/ubuntu-16.04
export VM_BOOTSTRAP:=./src/devm/bootstrap.sh
export VM_USER:=vagrant
export VM_BASHRC:=/home/$(VM_USER)/.bashrc
export DeOS_VMBOX:=bento/ubuntu-16.04
export VM_BOOT:=./src/boot/index.sh
export VM_PATH:=/deos
export VM_HOST:=1337
export VM_GUEST:=80
export VM_PATH_ZT:=/var/lib/zerotier-one
export VM_PATH_NVM:=/home/$(VM_USER)/.nvm
export VM_SHELL:=bash -c 'BASH_ENV=/etc/profile exec bash'
export VM_SHELL_SSH:=bash -l

ifeq ($(DEBUG), $(IS_TRUE))
export DeOS_BOOT_DEBUG:=
else
export DeOS_BOOT_DEBUG:=2> /dev/null
endif

export DeOS_VM_PORT_GUEST_0:=1337
export DeOS_VM_PORT_HOST_0:=80
export DeOS_VM_PORT_GUEST_1:=5000
export DeOS_VM_PORT_HOST_1:=1335
export DeOS_VM_PORT_GUEST_2:=8888
export DeOS_VM_PORT_HOST_2:=1336

export DOCKER_APT_REPO:=https://apt.dockerproject.org/repo
export DOCKER_GPG_KEY:=58118E89F3A912897C070ADBF76221572C52609D
export DOCKER_KEY_SERV:=hkp://ha.pool.sks-keyservers.net:80
export DOCKER_PY_PATH:=/deos/var/docker/python
export DOCKER_UBUNTU:=ubuntu-xenial
export DOCKER_SOURCES:=/etc/apt/sources.list.d/docker.list
export DOCKER_VERSION:=1.8.2

export DVM_ACTIVATE:=/home/$(VM_USER)/.dvm/dvm.sh
export DVM_INSTALL:=https://download.getcarina.com/dvm/latest/install.sh

export NODE_INSTALL:=https://deb.nodesource.com/setup_7.x
export NVM_GIT_REPO:=https://github.com/creationix/nvm.git

export UBUNTU_GPG_KEY:=F76221572C52609D
export UBUNTU_KEY_SERV:=keyserver.ubuntu.com

export ZT_GPG_KEY:=https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg
export ZT_INSTALL:=https://install.zerotier.com/
export ZT_INSTALL_TMP:=/tmp/zt-install.sh
export ZT_NETWORK:=565799d8f6747f84

SSHCMD:="cd /deos; bash -i -c 'source venv/linux/python/bin/activate && bash'"
UPCMD:="vagrant up --provider virtualbox"
VMCMD:="cd /deos; bash -i -c 'ipython --profile=deos'"
GIT_BITCOIN:=git@github.com:DeSantisInc/bitcoin.git

FILES:=.deosrc\
.editorconfig\
.gitattributes\
.gitignore\
.nvmrc\
.travis.yml\
LICENSE.md\
Makefile\
README.md\
Vagrantfile\
yarn.lock\
app/yarn.lock\
bin/deos\
bin/logic\
bin/printm\
src/deos/logic.mk\
src/deos/test.mk\
src/flow/css-modules.js\
src/ipython/ipython_config.py\
src/atdlib.h\
src/deArray.c\
src/deArray.h\
src/deContainer.c\
src/deContainer.h\
src/deGroup.c\
src/deGroup.h\
src/deList.c\
src/deList.h\
src/deListNode.c\
src/deListNode.h\
src/deNetwork.c\
src/deNetwork.h\
src/main.c\
var/assets/icons/512x512.png\
var/build/es5/.gitkeep\
var/build/obj/.gitkeep

include src/deos/bitcoin.mk
include src/deos/test.mk
include src/deos/vbox.mk
include src/deos/zerotier.mk
FILES:=\
.deosrc\
.editorconfig\
.gitattributes\
.gitignore\
.nvmrc\
.travis.yml\
LICENSE.md\
Makefile\
README.md\
Vagrantfile\
yarn.lock\
app/yarn.lock\
bin/deos\
bin/logic\
bin/printm\
src/deos/logic.mk\
src/deos/test.mk\
src/flow/css-modules.js\
src/ipython/ipython_config.py\
src/atdlib.h\
src/deArray.c\
src/deArray.h\
src/deContainer.c\
src/deContainer.h\
src/deGroup.c\
src/deGroup.h\
src/deList.c\
src/deList.h\
src/deListNode.c\
src/deListNode.h\
src/deNetwork.c\
src/deNetwork.h\
src/main.c\
var/assets/icons/512x512.png\
var/build/es5/.gitkeep\
var/build/obj/.gitkeep

include src/install/index.mk
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

#[dotfolders]
.nvm/
.tmp/
.vagrant/
.virtualenvs/
.venv/
.zerotier/

#[files]
app/bundle.min.js*
app/index.min.html
bin/logic
bin/main*
npm-debug.log
yarn-error.log

Expand Down
46 changes: 45 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
export MAKEFLAGS=--no-print-directory

.DEFAULT_GOAL:=all

.PHONY:all build chmod clean install main picocoin run venv

.SUBLIME_TARGETS:all

include .deosrc

all: vm ssh #build; @($(DEOS) && echo)
all: run
@$(PRINT) yellow $@ start
ifeq ($(HOST_OS), $(IS_MAC))
(vagrant ssh -c $(SSHCMD) DeVM)
else
@(echo "'make $@' isn't yet supported on $(HOST_OS).")
endif
@$(PRINT) yellow $@ stop

run: venv
@$(PRINT) yellow $@ start
ifeq ($(HOST_OS), $(IS_MAC))
(python $(SRC)/main.py)
else
@(echo "'make $@' isn't yet supported on $(HOST_OS).")
endif
@$(PRINT) yellow $@ stop

venv:
@$(PRINT) yellow $@ start
ifeq ($(HOST_OS), $(IS_MAC))
@-(rm -rf $(VENV)/darwin/python/)
(cd $(VENV)/darwin/ && virtualenv python --no-site-packages)
(cp $(SRC)/templates/dotfiles/gitignore.txt \
$(VENV)/darwin/python/.gitignore)
else
@(echo "'make $@' isn't yet supported on $(HOST_OS).")
endif
@$(PRINT) yellow $@ stop

main:
@$(PRINT) yellow $@ start
@-(rm -rf $(BIN)/main*)
($(CC) -std=c89 -Wall -g -pthread -I$(LIB) $(SRC)/main.c -o $(BIN)/main)
(chmod +x $(BIN)/main)
($(BIN)/main)
@$(PRINT) yellow $@ stop

app:; electron ./app/

Expand Down
119 changes: 119 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# ΔOS Specification

## **Directories**

### *Private*

#### `.deos/`

- **`node_modules/`**

- *`Makefile`*

- *`package.json`*

- *`yarn.lock`*

#### `.git/`

#### `.vagrant/`

### *Public*

#### `app/`

- **`freebird/`**

#### `node_modules/`

- *`package.json`*

- *`yarn.lock`*

#### `bin/`

#### `boot/`

#### `doc/`

#### `etc/`

#### `include/`

#### `node_modules/`

#### `root/`

- **`com/`**

- **`twitter/`**

- *`.meta.yml`*

- *`.meta.yml`*

- **`id/`**

- **`atd/`**

- *`.meta.yml`*

- **`deos/`**

- *`.meta.yml`*

- *`.meta.yml`*

- *`.meta.yml`*

#### `src/`

- *`main.c`*

#### `test/`

#### `var/`

## **Files**

### *dotfiles*

- *`.deosconfig`*

- *`.deosrc`*

- *`.editorconfig`*

- *`.flowconfig`*

- *`.gitattributes`*

- *`.gitignore`*

- *`.nvmrc`*

- *`.spec.yml`*

- *`.travis.yml`*

### *build*

- *`Gulpfile.babel.js`*

- *`Makefile`*

- *`Vagrantfile`*

### *config*

- *`package.json`*

- *`setup.py`*

- *`yarn.lock`*

### *info*

- *`LICENSE.md`*

- *`README.md`*
23 changes: 23 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# TODO

* Shared state: `make`, `vagrant`, `shell`.

* Add a `webtorrent` example.

* Save the state of `zerotier`.

* Load the state of `zerotier`.

* Fix `boot/install.sh` args.

* Install and build `gtiles`.

* Save the state of `blockstack`.

* Load the state of `blockstack`.

* Sync `rmt` documentation with `doc`.

* Build `electron` within `host`.

* Add protocol handles, `deos://example.id`.
Loading

0 comments on commit a7f0811

Please sign in to comment.