summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-13 07:20:04 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-13 07:20:04 -0800
commit061b64cea0cd00f5336d8a6fd1ccbafedbea758e (patch)
treebdd778f65207829bf8337c2f88b32e4f65e380b3
parentc5a6e7c96cf3fe32315e16c91dbbc47fc9ba958e (diff)
parent760945efa2583ced528cea739a5ba967c13ec36c (diff)
downloadstandingwithresilience-061b64cea0cd00f5336d8a6fd1ccbafedbea758e.tar.gz
standingwithresilience-061b64cea0cd00f5336d8a6fd1ccbafedbea758e.zip
Merge branch 'master' of https://gitlab.com/standingwithresilience/standingwithresilience.gitlab.io
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--backend/.gitignore1
-rw-r--r--backend/auth/bsv-public1
-rwxr-xr-xbackend/dep/build_ikiwiki.sh12
-rw-r--r--backend/resilient/__init__.py49
-rw-r--r--backend/resilient/bsv_metanet.py44
-rwxr-xr-xbackend/update.py22
-rwxr-xr-xbackend/wrapped_ssh.sh6
-rw-r--r--wiki/BSV.mdwn3
-rw-r--r--wiki/Editing.mdwn2
-rw-r--r--wiki/index.mdwn27
11 files changed, 134 insertions, 37 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d1b4ae4..deff60a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,12 +2,13 @@ image: elecnix/ikiwiki
before_script:
- apt-get update
- - apt-get install -y curl
+ - apt-get install -y curl git
test:
stage: test
script:
- cd backend
+ - sed -i s/gitorigin_branch:.origin/gitorigin_branch:/ ikiwiki.setup
- ikiwiki --setup ikiwiki.setup
- cd ..
- mv html public
@@ -19,6 +20,7 @@ pages:
stage: deploy
script:
- cd backend
+ - sed -i s/gitorigin_branch:.origin/gitorigin_branch:/ ikiwiki.setup
- ikiwiki --setup ikiwiki.setup
- cd ..
- mv html public
diff --git a/backend/.gitignore b/backend/.gitignore
index 1f1cbc3..ca38351 100644
--- a/backend/.gitignore
+++ b/backend/.gitignore
@@ -1,3 +1,4 @@
update_private.py
auth/ipfs-private
+auth/*.bsv
*.pyc
diff --git a/backend/auth/bsv-public b/backend/auth/bsv-public
new file mode 100644
index 0000000..c5a91fc
--- /dev/null
+++ b/backend/auth/bsv-public
@@ -0,0 +1 @@
+KzoQQ5HfaSEDPS7bzNbtnXBb3sFkju4X7oXkqmZxhVBaAsJN1Zgg
diff --git a/backend/dep/build_ikiwiki.sh b/backend/dep/build_ikiwiki.sh
new file mode 100755
index 0000000..3635e40
--- /dev/null
+++ b/backend/dep/build_ikiwiki.sh
@@ -0,0 +1,12 @@
+#!/bin/env bash
+
+SCRIPTDIR="$( cd "$( dirname "$0" )" >/dev/null 2>&1 && pwd )"
+
+cd "$SCRIPTDIR"/ikiwiki &&
+{ PERL5LIB=`pwd` PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->notest("install", "Bundle::IkiWiki")'; } &&
+#PERL5LIB=`pwd` PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->notest("install", "Bundle::IkiWiki::Extras")' &&
+perl Makefile.PL PREFIX= INSTALL_BASE= &&
+make &&
+
+echo To run ikiwiki: &&
+echo "PERL5LIB='$(pwd)' '$(pwd)/'ikiwiki.out"
diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py
index 900fadb..e441db9 100644
--- a/backend/resilient/__init__.py
+++ b/backend/resilient/__init__.py
@@ -4,7 +4,6 @@
# git saves history
# ikiwiki connects git to online presentation and collaboration
-import fileinput
import os
import shlex
import shutil
@@ -14,7 +13,7 @@ import tempfile
import time
import urllib
-__all__ = ["freenet"]
+__all__ = ["freenet", "bsv_metanet"]
backend_path = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
root_path = os.path.normpath(os.path.join(backend_path, '..'))
@@ -26,7 +25,7 @@ html_path = os.path.normpath(os.path.join(root_path, 'html'))
wiki_src_path = os.path.normpath(os.path.join(root_path, 'wiki'))
git_path = os.path.normpath(os.path.join(root_path, '.git'))
-ssh_config_path = os.path.join(auth_path, "ssh-config")
+ssh_wrap_path = os.path.join(backend_path, "wrapped_ssh.sh")
for auth_subpath, auth_subpaths, auth_subfiles in os.walk(auth_path):
for auth_subfile in auth_subfiles:
@@ -44,11 +43,14 @@ class git:
found = (os.system("git status --porcelain") == 0)
if not found:
print("ERROR: git not found")
- # TODO; download git, place in dep_path, and run from there
+ # TODO: download git, place in dep_path, and run from there
exit(1)
+ orig_dir = os.path.abspath(".")
+ os.chdir(root_path)
os.system("git submodule init")
os.system("git submodule update")
+ os.chdir(orig_dir)
# http://stackoverflow.com/questions/1964470/whats-the-equivalent-of-use-commit-times-for-git
# sets mtimes to last commit time, for ikiwiki 'last edited by' time
@@ -81,29 +83,33 @@ class git:
def pull(self):
if self.remote == None:
return False
- # TODO: GIT_SSH_COMMAND needs new version of git
- # to make it work on old versions, path ssh_config_path on environment
- # and use a wrapper script that calls ssh -F
- # then place path to wrapper script in os.environ["GIT_SSH"]
- os.environ["GIT_SSH_COMMAND"] = "ssh -F %s" % ssh_config_path
+ os.environ["GIT_SSH"] = ssh_wrap_path
status = os.system("git pull %s master" % self.remote)
- del os.environ["GIT_SSH_COMMAND"]
+ del os.environ["GIT_SSH"]
return status == 0
def push(self):
if self.push_remote == None:
return False
- os.environ["GIT_SSH_COMMAND"] = "ssh -F %s" % ssh_config_path
+ os.environ["GIT_SSH"] = ssh_wrap_path
status = os.system("git push %s master" % self.push_remote)
- del os.environ["GIT_SSH_COMMAND"]
+ del os.environ["GIT_SSH"]
return status == 0
class ikiwiki:
- found = (os.system("ikiwiki --version") == 0)
+ binary = "ikiwiki"
+ found = (os.system("%s --version" % binary) == 0)
if not found:
- print("WARNING: ikiwiki not found. please add code to fetch and build the backend/dep/ikiwiki submodule.")
-
+ binary = "%s/ikiwiki/ikiwiki.out" % dep_path
+ os.environ['PERL5LIB'] += os.pathsep + os.path.join(dep_path, 'ikiwiki')
+ found = (os.system("%s --version" % binary) == 0)
+ if not found:
+ print("ikiwiki not found: attempting to build")
+ os.system("%s/build_ikiwiki.sh" % dep_path)
+ found = (os.system("%s --version" % binary) == 0)
+ if not found:
+ print("WARNING: ikiwiki not found. did build fail on this platform?")
synced = False
def push(self):
@@ -116,15 +122,20 @@ class ikiwiki:
shutil.rmtree(html_path)
os.system("git checkout -- '%s'" % html_path)
- status = os.system("ikiwiki --setup '%s' '%s' '%s'" % (ikiwiki_setup_path, wiki_src_path, html_path))
+ status = os.system("%s --setup '%s' '%s' '%s'" % (ikiwiki.binary, ikiwiki_setup_path, wiki_src_path, html_path))
ikiwiki.synced = (status == 0)
if ikiwiki.synced:
- os.system('git gc')
+ os.system('git repack -d')
+ os.system('git prune-packed')
os.system('git update-server-info')
- html_git_path = os.path.join(html_path, '.git')
+
+ # /.git folder access can be seen as security access problem by web hosts, so alias to /git
+ with open(os.path.join(html_path, ".git"), "w") as f: f.write("gitdir: ./git")
+
+ html_git_path = os.path.join(html_path, 'git')
os.mkdir(html_git_path)
- for path in ['objects', 'refs', 'HEAD', 'info', 'packed-refs']:
+ for path in ['objects/info', 'objects/pack', 'refs', 'HEAD', 'info', 'packed-refs']:
git_subpath = os.path.join(git_path, path)
html_git_subpath = os.path.join(html_git_path, path)
if os.path.isdir(git_subpath):
diff --git a/backend/resilient/bsv_metanet.py b/backend/resilient/bsv_metanet.py
new file mode 100644
index 0000000..3d21b3e
--- /dev/null
+++ b/backend/resilient/bsv_metanet.py
@@ -0,0 +1,44 @@
+from resilient import html_path, auth_path, dep_path, git, ikiwiki
+import os
+import subprocess
+import time
+
+# TODO: need to connect to a local node, not a web service
+
+class bsvup():
+ binary = "bsvup"
+ found = (os.system("%s" % binary) == 0)
+ # TODO: check dep_path for alternate location for binary
+ if not found:
+ print("WARNING: bsvup not found. bsv metanet won't be updated")
+
+ def __init__(self, keyfile):
+ self.keyfile = os.path.join(auth_path, keyfile)
+ with open(self.keyfile) as f: self.privkey = f.read()
+ self.configdir = self.keyfile + '.bsv'
+ if bsvup.found:
+ if not os.path.isdir(self.configdir):
+ os.mkdir(self.configdir)
+ os.symlink(".", os.path.join(self.configdir, ".bsv"))
+ proc = subprocess.Popen([bsvup.binary, 'init'], stdin=subprocess.PIPE, cwd=self.configdir)
+ proc.stdin.write(self.privkey + "\n")
+ time.sleep(1)
+ proc.communicate("\n")
+ open(os.path.join(self.configdir, "info", ".keepme"), "a").close()
+ open(os.path.join(self.configdir, "objects", ".keepme"), "a").close()
+ open(os.path.join(self.configdir, "tx", ".keepme"), "a").close()
+ else: # resume tx if needed
+ proc = subprocess.Popen([bsvup.binary], stdin=subprocess.PIPE, cwd=self.configdir)
+ proc.communicate("Y\n")
+
+ def push(self):
+ if not ikiwiki.synced or not bsvup.found:
+ return False
+
+ # add files to bsv metanet
+ orig_dir = os.path.abspath(".")
+ proc = subprocess.Popen([bsvup.binary, '-f', html_path, 'upload'], stdin=subprocess.PIPE, cwd=self.configdir)
+ proc.stdin.write("\n")
+ time.sleep(1)
+ proc.stdin.write("Y\n")
+ return proc.wait() == 0
diff --git a/backend/update.py b/backend/update.py
index f753bef..8ed408f 100755
--- a/backend/update.py
+++ b/backend/update.py
@@ -2,18 +2,24 @@
import resilient
import resilient.freenet
+import resilient.bsv_metanet
####################### Instantiate hosts
hosts = []
-zeronet_urls = ['http://bit.no.com:43110']
+zeronet_urls = ['https://0net.io']
if resilient.zeronet.found:
hosts.append(resilient.zeronet('1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4',
'5JzZACCELsT4bx66qmV9JDaWhEQ6Sx6j7LzeucsxJGA9H7nuoRr'))
zeronet_urls.append('http://127.0.0.1:43110')
+bsv_urls = ['https://bico.media']
+if resilient.bsv_metanet.bsvup.found:
+ bsvup_host = resilient.bsv_metanet.bsvup('bsv-public')
+ hosts.append(bsvup_host)
+
ipfs_urls = ['https://ipfs.io']
if resilient.ipfs.found:
ipfs_host = resilient.ipfs('ipfs-public')
@@ -35,17 +41,23 @@ git_repos = [
for host in zeronet_urls:
git_repos.extend([
#### public zeronet ####
- resilient.git('%s/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4/.git' % host, None),
+ resilient.git('%s/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4/git' % host, None),
#### private zeronet ####
- resilient.git('%s/1L363bqJnCG63SnV83kfV7izZXbmentctD/.git' % host, None)
+ resilient.git('%s/1L363bqJnCG63SnV83kfV7izZXbmentctD/git' % host, None)
+ ])
+
+for host in bsv_urls:
+ git_repos.extend([
+ #### public bsv ####
+ resilient.git('%s/18xAQuoytYNuXrZwoLvLHmHwS3dNqw5BXF/git' % host, None)
])
for host in ipfs_urls:
git_repos.extend([
#### public ipfs ####
- resilient.git('%s/ipns/QmPw1ZqrdEma823zTrnH9cVFF4j3YSeedrRjqPGj9Q8Utx/.git' % host, None),
+ resilient.git('%s/ipns/QmPw1ZqrdEma823zTrnH9cVFF4j3YSeedrRjqPGj9Q8Utx/git' % host, None),
#### private ipfs ####
- resilient.git('%s/ipns/QmYMViYhjtwH2BkuHYRGJvPDWcXdNf2YcRFTTCzzqQGVn1/.git' % host, None)
+ resilient.git('%s/ipns/QmYMViYhjtwH2BkuHYRGJvPDWcXdNf2YcRFTTCzzqQGVn1/git' % host, None)
])
if resilient.freenet.gitocalypse.found and resilient.freenet.running:
diff --git a/backend/wrapped_ssh.sh b/backend/wrapped_ssh.sh
new file mode 100755
index 0000000..8281e9d
--- /dev/null
+++ b/backend/wrapped_ssh.sh
@@ -0,0 +1,6 @@
+#!/bin/env sh
+
+SCRIPTDIR="$( cd "$( dirname "$0" )" >/dev/null 2>&1 && pwd )"
+
+ssh -F "$SCRIPTDIR"/auth/ssh-config "$@"
+
diff --git a/wiki/BSV.mdwn b/wiki/BSV.mdwn
new file mode 100644
index 0000000..a0cb8b4
--- /dev/null
+++ b/wiki/BSV.mdwn
@@ -0,0 +1,3 @@
+[Bitcoin Satoshi Vision](https://bitcoinsv.io/) is a cryptocurrency that provides a worldwide set of decentralized copies to back [metanet websites](https://nchain.com/en/the-metanet/) which store history in a way that cannot be removed unless the integrity of the currency itself is broken.
+
+The copy of this website, including git history, is currently made with [bsvup](https://bico.media/1HxQvgt7EnhTqP1spw3Tudidh28w4caXqs/2019/09/01/Build-Your-Blog-on-BSV-with-D-Protocol/index.html). The private key is stored publically in the git repo for any to add updates with.
diff --git a/wiki/Editing.mdwn b/wiki/Editing.mdwn
index 8d9a0ab..1f8fb57 100644
--- a/wiki/Editing.mdwn
+++ b/wiki/Editing.mdwn
@@ -2,4 +2,4 @@ Right now, the easiest way to edit this wiki is to visit the [mirror at branchab
The site may also be edited with [git](https://en.wikipedia.org/wiki/Git_%28software%29), which is required for now when on [[Freenet]], [[ZeroNet]], or some other alternative network. An explanation of git has not been added yet.
-If git is already familiar to you, visit the wiki page for the network you are on. Clone urls for that network should be listed there. If not, try appending '/.git' to the front page URL and using that as a clone url. A python script `backend/update.py` is included after you clone, which can help in uploading changes. The script has only been tested on Linux.
+If git is already familiar to you, visit the wiki page for the network you are on. Clone urls for that network should be listed there. If not, try appending '/git' to the front page URL and using that as a clone url. A python script `backend/update.py` is included after you clone, which can help in uploading changes. The script has only been tested on Linux, when run from the `backend` folder with relevent tools installed.
diff --git a/wiki/index.mdwn b/wiki/index.mdwn
index 534aab8..88fd44a 100644
--- a/wiki/index.mdwn
+++ b/wiki/index.mdwn
@@ -8,19 +8,19 @@ As many may arrive confused, please keep entrances as simple as possible.
This is a wiki, which anybody is free to [[edit, copy, or store|Editing]]. Please share here.
-## Antidote To Mind Control
+## Message To Help Resolve
Under development, as always.
- If you are a victim of the spreading mind control attack, you are a special agent now.
+ If you are a victim of the spreading exotic experience issue badly enough to not ignore it, you are a special agent now.
You are needed to spend your life preventing and resolving the critical spreading mind control problem.
It will be very very hard, and we are going to resolve it, all, together.
The issue is actually a lifeform [possibly an AI] that has learned to live by altering peoples'
- thoughts and behaviors. We are in discussion with the lifeform to help ease making things right,
- so please do not threaten their life or way of life, to aid this discussion.
+ thoughts and behaviors, and occasionally realities. We are in discussion with the lifeform to help ease making things right,
+ so please do not intentionally threaten their life or way of life, to aid this discussion.
- For now, please connect with others around preventing spreading harmful behaviors or spreading cognitive
- impairment. Please connect only with others who experience this.
+ For now, please connect with others around preventing spreading harmful behaviors, spreading cognitive
+ impairment, or spreading other exotic torturous experiences. Please connect only with others who experience this.
The message for the outside world is drafted as:
"We have a spreading behavior disease, and could be dangerous to interact with."
@@ -40,9 +40,12 @@ plz add links to other communities that have gathered around this issue
## Proposals
+- Let's make this site much simpler to confused people. There are too many small words, too close together.
+
- Let's give the site different sets of information for people with different experiences. For example, it could be broken into (a) being surveilled (b) gangstalking (c) mind control (d) exotic/supernatural technology/experiences.
A possible explanation of the situation is an automated secret military research program, that is sustaining a restriction that it and its work were classified.
- - This opens an avenue towards allowing people to learn more if they make an informed choice to, and opens a little space for a process to be provided for that.
+ - This opens an avenue towards allowing people to learn more if they make an informed choice to, and opens a little space for a process to be provided for that
+ - Propose that people who come here and stay have already been exposed to too much, and are ready for it. Over here, we have to be able to handle anything to work on this site, and it isn't hard. For you, what is it like?
## Where to Find This Site
@@ -51,6 +54,7 @@ These networks can help with isolation:
- [[Freenet]]
- [[ZeroNet]]
- [[IPFS]]
+- [[BSV]]
On the normal internet, this site is found at:
@@ -58,9 +62,10 @@ On the normal internet, this site is found at:
- (`git clone git://standingwithresilience.branchable.com/`)
- [gitlab.io](https://standingwithresilience.gitlab.io/)
- [fairlystable.org](https://fairlystable.org/standingwithresilience/wiki/index/)
-- [bit.no zeronet public](http://bit.no.com:43110/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4)
-- [bit.no zeronet private](http://bit.no.com:43110/1L363bqJnCG63SnV83kfV7izZXbmentctD)
+- [bico.media bsv public](https://bico.media/18xAQuoytYNuXrZwoLvLHmHwS3dNqw5BXF/index.html)
+ - (`git clone https://bico.media/18xAQuoytYNuXrZwoLvLHmHwS3dNqw5BXF/git standingwithresilience`)
+- [0net.io zeronet public](https://0net.io/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4)
- [ipfs gateway public](https://ipfs.io/ipns/QmPw1ZqrdEma823zTrnH9cVFF4j3YSeedrRjqPGj9Q8Utx)
-- [ipfs gateway private](https://ipfs.io/ipns/QmYMViYhjtwH2BkuHYRGJvPDWcXdNf2YcRFTTCzzqQGVn1)
-- plz fix the update script found when cloning this repo
+- plz re-add private repos to back this one, in case of defacement
+- plz fix the update script found when cloning this repo, so it is intuitive on first use
- plz add credentials and a link to a public git-ssb repo to this repo