Standardizing round 1
This commit is contained in:
parent
652d7c4795
commit
49f9f6d315
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@ aether
|
||||
aether.pub
|
||||
aether.tar.gz
|
||||
nodeslist
|
||||
*.tar.xz
|
||||
pkg/
|
||||
src/
|
||||
|
14
LICENSE
14
LICENSE
@ -16,12 +16,16 @@
|
||||
|
||||
ANINIX ADDENDUM
|
||||
|
||||
Trademark Pending 2017 (https://aninix.net/irc/)
|
||||
Trademark 2017 (https://aninix.net/)
|
||||
|
||||
The "AniNIX" name and |> logo is trademark-pending as of 2017. All
|
||||
AniNIX materials can be reproduced and re-used, though you must
|
||||
contact the admins of the network to get written permission to use
|
||||
the AniNIX name.
|
||||
The "AniNIX" name and |> logo are trademarked as of 2017/11/21.
|
||||
AniNIX materials may be reproduced and re-used (though you must
|
||||
contact the admins of the network to get written permission to use
|
||||
the AniNIX name or logo) so long as such reproduction or re-use
|
||||
does not inhibit the original AniNIX use of the same.
|
||||
|
||||
Attribution is appreciated for other materials but not legally
|
||||
required or necessary.
|
||||
|
||||
"AniNIX" trademark serial: 87177883
|
||||
|> Logo trademark serial: 87177887
|
||||
|
17
Makefile
17
Makefile
@ -1,12 +1,5 @@
|
||||
SHELL := /bin/bash
|
||||
BACKUPDIR := /usr/local/backup
|
||||
INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash
|
||||
|
||||
compile:
|
||||
${INSTALLER} -S openssl gzip tar openssh
|
||||
|
||||
install: compile
|
||||
@echo You must specify client or server in a call to make.
|
||||
|
||||
client: user aether.bash
|
||||
cp aether.bash /home/aether/aether.bash
|
||||
@ -19,6 +12,12 @@ client: user aether.bash
|
||||
chown aether:aether /var/log/aether.log
|
||||
make checkperm
|
||||
|
||||
compile:
|
||||
@echo Nothing to do
|
||||
|
||||
install: compile
|
||||
@echo You must specify client or server in a call to make.
|
||||
|
||||
server: keys scripts user ./aether-gen.bash ./aether.pub ./server-backup
|
||||
bash ./aether-gen.bash
|
||||
cp ./aether.pub /home/aether/.ssh/authorized_keys
|
||||
@ -45,7 +44,7 @@ node-command:
|
||||
@echo MAKE SURE TO ADD THE NODE TO /usr/local/etc/Aether/nodes.list
|
||||
|
||||
keys:
|
||||
if [ ! -f ./aether ]; then ssh-keygen -t rsa -P "" -f aether
|
||||
if [ ! -f ./aether ]; then ssh-keygen -t rsa -P "" -f aether; fi
|
||||
|
||||
scripts: ./server-backup ./remote-backup
|
||||
cp ./server-backup /root/bin
|
||||
@ -82,4 +81,4 @@ clean:
|
||||
rm -Rf /usr/local/backup; fi
|
||||
|
||||
test:
|
||||
echo bye | sftp -o IdentityFile=/home/aether/.ssh/aether aether@aninix.net
|
||||
python3 -m pytest
|
||||
|
46
PKGBUILD
Normal file
46
PKGBUILD
Normal file
@ -0,0 +1,46 @@
|
||||
depends=('bash>=4.4','openssl','gzip','tar','openssh')
|
||||
makedepends=('make>=4.2')
|
||||
checkdepends=()
|
||||
optdepends=()
|
||||
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')"
|
||||
pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)"
|
||||
pkgrel=1
|
||||
pkgrel() {
|
||||
echo $(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 ))
|
||||
}
|
||||
epoch="$(git log | grep -c commit)"
|
||||
pkgdesc="$(head -n 1 README.md)"
|
||||
arch=("x86_64")
|
||||
url="$(git config remote.origin.url | sed 's/.git$//')"
|
||||
license=('custom')
|
||||
groups=()
|
||||
provides=("${pkgname}")
|
||||
conflicts=()
|
||||
replaces=("${pkgname,,}", "aninix-${pkgname,,}")
|
||||
backup=()
|
||||
options=()
|
||||
install=
|
||||
changelog=
|
||||
source=()
|
||||
noextract=()
|
||||
md5sums=()
|
||||
validpgpkeys=()
|
||||
|
||||
prepare() {
|
||||
git pull
|
||||
}
|
||||
|
||||
build() {
|
||||
make -C ..
|
||||
}
|
||||
|
||||
check() {
|
||||
chmod -R u+r ../pkg
|
||||
make -C .. test
|
||||
}
|
||||
|
||||
package() {
|
||||
export pkgdir="${pkgdir}"
|
||||
make -C .. install
|
||||
install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
3
README
3
README
@ -1,3 +0,0 @@
|
||||
The Aether project is a way to back up server configuration, source code, and file lists to remote locations. These remote locations should be securely controlled by the same administrative staff as the server owner.
|
||||
|
||||
To create the aether and aether.pub files, run "make keys". This should not be repeated.
|
29
README.md
Normal file
29
README.md
Normal file
@ -0,0 +1,29 @@
|
||||
The Aether project is a way to back up server configuration, source code, and file lists to remote locations. These remote locations should be securely controlled by the same administrative staff as the server owner.
|
||||
|
||||
# Etymology
|
||||
The Aether project is the AniNIX's implementation of the "cloud." While its admins consider the computing cloud to be Computers Living On Unknown Datacenters, aka. with unknown controls and thereby insecure, distributing backups to many locations makes the AniNIX more resilient.
|
||||
|
||||
Dictionary.com translates Aether as the Greek personification of the clear sky, and this project lives a wide array of locations across the nebulous Internet, giving it no physical form to hold onto.
|
||||
|
||||
# Installing
|
||||
You have two options to install this project:
|
||||
* Arch Linux and related distros: Run `makepkg -sri`
|
||||
* Other operating systems: Run `make install`
|
||||
|
||||
# Initial setup
|
||||
To create the aether and aether.pub files, run "make keys". This should not be repeated.
|
||||
|
||||
# Adding backup configurations
|
||||
Individual projects wanting to be backed up by the Aether system should add a file to their package into `/usr/local/etc/Aether/backups/`.
|
||||
|
||||
# Relevant Files and Software
|
||||
Aether installs a script for rsync-based remote backups. We implement this policy through the two 4TB hard-drives, at least one of which is always off-site, that can be plugged into the [Maat](/Wiki/Hosts/Maat.md) hotswap bay along with a virtual machine that mounts the ArchLinux iso and the drive in the bay.
|
||||
|
||||
# Available Clients
|
||||
The only client is direct server access on one of the client nodes.
|
||||
|
||||
# Equivalents or Competition
|
||||
Equivalent services are DropBox, Google Drive, or Barracuda.
|
||||
|
||||
# Notes
|
||||
Those deploying Aether should maintain a nodeslist file that only root can read.
|
11
tests/test_units.py
Normal file
11
tests/test_units.py
Normal file
@ -0,0 +1,11 @@
|
||||
import pytest
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# TODO Still need to devise a testing strategy (https://foundation.aninix.net/AniNIX/Aether/issues/1)
|
||||
def test_aether():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("echo bye | sftp -o IdentityFile=./aether aether@aninix.net", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
Loading…
Reference in New Issue
Block a user