Compare commits
10 Commits
tlim_quote
...
v1.2018121
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49606c19f7 | ||
|
|
ccd4f92e0b | ||
|
|
70e8c625e5 | ||
|
|
e17c44aa61 | ||
|
|
f681872c4d | ||
|
|
3594a3124e | ||
|
|
fd3ad2fcea | ||
|
|
3a491aad01 | ||
|
|
b3b0604be7 | ||
|
|
6408b622bf |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
||||
Release v1.20181219
|
||||
|
||||
* New OS support: Add support for NetBSD and SunOS (SmartOS)
|
||||
* Testing: Improve confidence test.
|
||||
* .blackbox is now the default config directory for new repos. (#272)
|
||||
* Add blackbox_decrypt_file (#270)
|
||||
* Improved compatibility: change"/bin/[x]" to "/usr/bin/env [x]" (#265)
|
||||
* Add blackbox_less. (#263)
|
||||
* add nix method of install (#261)
|
||||
* Linked setting up of GPG key (#260)
|
||||
|
||||
|
||||
Release v1.20180618
|
||||
|
||||
* Restore `make manual-install` with warning. (#258)
|
||||
|
||||
@@ -134,6 +134,8 @@ BlackBox automatically determines which VCS you are using and does the right thi
|
||||
- MacOS X
|
||||
- Cygwin (Thanks, Ben Drasin!) **See Note Below**
|
||||
- MinGW (git bash on windows) **See Note Below**
|
||||
- NetBSD
|
||||
- SmartOS
|
||||
|
||||
To add or fix support for a VCS system, look for code at the end of `bin/_blackbox_common.sh`
|
||||
|
||||
|
||||
@@ -25,6 +25,17 @@ Build Tasks
|
||||
Stable Releases
|
||||
===============
|
||||
|
||||
Step 0. Test the software
|
||||
|
||||
Run this command to run the unit and system tests:
|
||||
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
NOTE: The tests require pinentry-tty. On macOS with NIX this
|
||||
can be installed via: `nix-env -i pinentry`
|
||||
|
||||
Marking the software to be "stable":
|
||||
|
||||
Step 1. Update CHANGELOG.md
|
||||
|
||||
@@ -411,6 +411,12 @@ function md5sum_file() {
|
||||
Darwin | FreeBSD )
|
||||
md5 -r "$1" | awk '{ print $1 }'
|
||||
;;
|
||||
NetBSD )
|
||||
md5 -q "$1"
|
||||
;;
|
||||
SunOS )
|
||||
digest -a md5 "$1"
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
md5sum "$1" | awk '{ print $1 }'
|
||||
;;
|
||||
@@ -427,10 +433,13 @@ function cp_permissions() {
|
||||
Darwin )
|
||||
chmod $( stat -f '%p' "$1" ) "${@:2}"
|
||||
;;
|
||||
FreeBSD )
|
||||
FreeBSD | NetBSD )
|
||||
chmod $( stat -f '%p' "$1" | sed -e "s/^100//" ) "${@:2}"
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
SunOS )
|
||||
chmod $( stat -c '%a' "$1" ) "${@:2}"
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* | SunOS )
|
||||
if [[ -e /etc/alpine-release ]]; then
|
||||
chmod $( stat -c '%a' "$1" ) "${@:2}"
|
||||
else
|
||||
|
||||
@@ -57,7 +57,7 @@ function create_self_deleting_tempfile() {
|
||||
: "${TMPDIR:=/tmp}" ;
|
||||
filename=$(mktemp -t _stacklib_.XXXXXXXX )
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
Linux | CYGWIN* | MINGW* | NetBSD | SunOS )
|
||||
filename=$(mktemp)
|
||||
;;
|
||||
* )
|
||||
@@ -78,7 +78,7 @@ function create_self_deleting_tempdir() {
|
||||
: "${TMPDIR:=/tmp}" ;
|
||||
filename=$(mktemp -d -t _stacklib_.XXXXXXXX )
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
Linux | CYGWIN* | MINGW* | NetBSD | SunOS )
|
||||
filename=$(mktemp -d)
|
||||
;;
|
||||
* )
|
||||
@@ -102,7 +102,7 @@ function make_self_deleting_tempfile() {
|
||||
: "${TMPDIR:=/tmp}" ;
|
||||
name=$(mktemp -t _stacklib_.XXXXXXXX )
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
Linux | CYGWIN* | MINGW* | NetBSD | SunOS )
|
||||
name=$(mktemp)
|
||||
;;
|
||||
* )
|
||||
@@ -127,7 +127,7 @@ function make_tempdir() {
|
||||
# which needs to fit within sockaddr_un.sun_path (see unix(7)).
|
||||
name=$(mktemp -d -t SO )
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
Linux | CYGWIN* | MINGW* | NetBSD | SunOS )
|
||||
name=$(mktemp -d)
|
||||
;;
|
||||
* )
|
||||
@@ -160,14 +160,14 @@ function fail_if_not_running_as_root() {
|
||||
function fail_if_in_root_directory() {
|
||||
# Verify nobody has tricked us into being in "/".
|
||||
case $(uname -s) in
|
||||
Darwin | FreeBSD )
|
||||
Darwin | FreeBSD | NetBSD )
|
||||
if [[ $(stat -f'%i' / ) == $(stat -f'%i' . ) ]] ; then
|
||||
echo 'SECURITY ALERT: The current directory is the root directory.'
|
||||
echo 'Exiting...'
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
Linux | CYGWIN* | MINGW* )
|
||||
Linux | CYGWIN* | MINGW* | SunOS )
|
||||
if [[ $(stat -c'%i' / ) == $(stat -c'%i' . ) ]] ; then
|
||||
echo 'SECURITY ALERT: The current directory is the root directory.'
|
||||
echo 'Exiting...'
|
||||
|
||||
@@ -39,7 +39,12 @@ export -f exported_internal_shred_file
|
||||
DEREFERENCED_BIN_DIR="${0%/*}"
|
||||
MAX_PARALLEL_SHRED=10
|
||||
|
||||
bash_args=
|
||||
if bash --help | grep import-functions >/dev/null 2>/dev/null; then
|
||||
bash_args=--import-functions
|
||||
fi
|
||||
|
||||
export IFS=
|
||||
tr '\n' '\0' <"$BB_FILES" | xargs -0 -I{} -n 1 -P $MAX_PARALLEL_SHRED bash -c "exported_internal_shred_file $DEREFERENCED_BIN_DIR \"{}\"" $DEREFERENCED_BIN_DIR/fake
|
||||
tr '\n' '\0' <"$BB_FILES" | xargs -0 -I{} -P $MAX_PARALLEL_SHRED bash $bash_args -c "exported_internal_shred_file $DEREFERENCED_BIN_DIR \"{}\"" $DEREFERENCED_BIN_DIR/fake
|
||||
|
||||
echo '========== DONE.'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../bin
|
||||
export PATH="${blackbox_home}:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:${blackbox_home}"
|
||||
export PATH="${blackbox_home}:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:/usr/pkg/bin:/usr/pkg/gnu/bin:${blackbox_home}"
|
||||
|
||||
export LANG=C.UTF-8 # Required ro "gpg --export" to work properly.
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ function md5sum_file() {
|
||||
Darwin | FreeBSD )
|
||||
md5 -r "$1" | awk '{ print $1 }'
|
||||
;;
|
||||
NetBSD )
|
||||
md5 -q "$1"
|
||||
;;
|
||||
SunOS )
|
||||
digest -a md5 "$1"
|
||||
;;
|
||||
Linux )
|
||||
md5sum "$1" | awk '{ print $1 }'
|
||||
;;
|
||||
@@ -72,10 +78,10 @@ function assert_file_group() {
|
||||
assert_file_exists "$file"
|
||||
|
||||
case $(uname -s) in
|
||||
Darwin|FreeBSD )
|
||||
Darwin | FreeBSD | NetBSD )
|
||||
found=$(stat -f '%Dg' "$file")
|
||||
;;
|
||||
Linux )
|
||||
Linux | SunOS )
|
||||
found=$(stat -c '%g' "$file")
|
||||
;;
|
||||
CYGWIN* )
|
||||
@@ -102,11 +108,11 @@ function assert_file_perm() {
|
||||
assert_file_exists "$file"
|
||||
|
||||
case $(uname -s) in
|
||||
Darwin|FreeBSD )
|
||||
Darwin | FreeBSD | NetBSD )
|
||||
found=$(stat -f '%Sp' "$file")
|
||||
;;
|
||||
# NB(tlim): CYGWIN hasn't been tested. It might be more like Darwin.
|
||||
Linux | CYGWIN* )
|
||||
Linux | CYGWIN* | SunOS )
|
||||
found=$(stat -c '%A' "$file")
|
||||
;;
|
||||
* )
|
||||
|
||||
Reference in New Issue
Block a user