Browse Source

First commit in ages. Too many things changed to count.

I'm pushing this repo onto a hashbang.sh server, so I can auto-build my git packages.
master
mid-kid 9 years ago
parent
commit
5b1c615f5b
  1. 225
      astronaut/astronaut
  2. 161
      astronaut/freshnaut
  3. 18
      astronaut/functions/say_hello.sh
  4. 69
      astronaut/hello.sat
  5. 18
      astronaut/template.sat
  6. 21
      astronaut/xbps-astronaut
  7. 9
      graveyard/first_attempt.cause_of_death
  8. 18
      graveyard/first_attempt/satellites/acl.sat
  9. 18
      graveyard/first_attempt/satellites/attr.sat
  10. 16
      graveyard/first_attempt/satellites/binutils.sat
  11. 16
      graveyard/first_attempt/satellites/coreutils.sat
  12. 15
      graveyard/first_attempt/satellites/file.sat
  13. 23
      graveyard/first_attempt/satellites/gcc.sat
  14. 19
      graveyard/first_attempt/satellites/glibc.sat
  15. 16
      graveyard/first_attempt/satellites/gmp.sat
  16. 7
      graveyard/first_attempt/satellites/groups/package-management
  17. 8
      graveyard/first_attempt/satellites/groups/toolchain
  18. 14
      graveyard/first_attempt/satellites/linux-api.sat
  19. 15
      graveyard/first_attempt/satellites/mpc.sat
  20. 15
      graveyard/first_attempt/satellites/mpfr.sat
  21. 16
      graveyard/first_attempt/satellites/shadow.sat
  22. 16
      graveyard/first_attempt/satellites/tar.sat
  23. 17
      graveyard/first_attempt/satellites/tzdata.sat
  24. 17
      graveyard/first_attempt/satellites/util-linux.sat
  25. 15
      graveyard/first_attempt/satellites/zlib.sat
  26. 29
      graveyard/first_attempt/tools/chroot
  27. 2
      graveyard/first_attempt/tools/library-check.sh
  28. 42
      graveyard/first_attempt/tools/mktools
  29. 54
      graveyard/first_attempt/tools/prepchroot
  30. 2
      graveyard/first_attempt/tools/satellites/astronaut.sat
  31. 3
      graveyard/first_attempt/tools/satellites/bash.sat
  32. 7
      graveyard/first_attempt/tools/satellites/binutils-1.sat
  33. 7
      graveyard/first_attempt/tools/satellites/binutils-2.sat
  34. 5
      graveyard/first_attempt/tools/satellites/busybox.sat
  35. 17
      graveyard/first_attempt/tools/satellites/ca-certificates.sat
  36. 13
      graveyard/first_attempt/tools/satellites/check.sat
  37. 5
      graveyard/first_attempt/tools/satellites/curl.sat
  38. 7
      graveyard/first_attempt/tools/satellites/dejagnu.sat
  39. 3
      graveyard/first_attempt/tools/satellites/expect.sat
  40. 50
      graveyard/first_attempt/tools/satellites/extrafiles/busybox/busybox.config
  41. 31
      graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-ca.sh
  42. 0
      graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-cert.pl
  43. 53
      graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/remove-expired-certs.sh
  44. 21
      graveyard/first_attempt/tools/satellites/extrafiles/stow/etc-stowrc.patch
  45. 0
      graveyard/first_attempt/tools/satellites/extrafiles/stow/fix-warning-message-perl5.20.patch
  46. 7
      graveyard/first_attempt/tools/satellites/gawk.sat
  47. 37
      graveyard/first_attempt/tools/satellites/gcc-1.sat
  48. 39
      graveyard/first_attempt/tools/satellites/gcc-2.sat
  49. 10
      graveyard/first_attempt/tools/satellites/glibc.sat
  50. 8
      graveyard/first_attempt/tools/satellites/libstdcxx.sat
  51. 13
      graveyard/first_attempt/tools/satellites/linux-api.sat
  52. 3
      graveyard/first_attempt/tools/satellites/m4.sat
  53. 3
      graveyard/first_attempt/tools/satellites/make.sat
  54. 8
      graveyard/first_attempt/tools/satellites/openssl.sat
  55. 5
      graveyard/first_attempt/tools/satellites/perl.sat
  56. 5
      graveyard/first_attempt/tools/satellites/stow.sat
  57. 8
      graveyard/first_attempt/tools/satellites/tcl-core.sat
  58. 28
      graveyard/first_attempt/tools/version-check.sh
  59. 106
      graveyard/internaut
  60. 6
      graveyard/internaut.cause_of_death
  61. 13
      satellites/astronaut.sat
  62. 13
      satellites/bin/ctrulib.sat
  63. 14
      satellites/bin/devkitarm.sat
  64. 3
      satellites/bin/extrafiles/devkitarm/devkitarm.sh
  65. 13
      satellites/bin/extrafiles/palemoon/palemoon.desktop
  66. 24
      satellites/bin/palemoon.sat
  67. 11
      satellites/bin/unetbootin.sat
  68. 1
      satellites/extrafiles/astronaut
  69. 16
      satellites/functions/compile/cmake.sh
  70. 4
      satellites/functions/compile/python.sh
  71. 6
      satellites/functions/compile/qt.sh
  72. 10
      satellites/functions/download/git.sh
  73. 21
      satellites/functions/vcs/git.sh
  74. 14
      satellites/markdown.sat
  75. 14
      satellites/python3.4-crc16.sat
  76. 14
      satellites/python3.4-websocket-client.sat
  77. 18
      satellites/qwbfsmanager.sat
  78. 14
      satellites/speedtest-cli.sat
  79. 12
      satellites/vcs/armips.sat
  80. 13
      satellites/vcs/ctr.sat
  81. 13
      satellites/vcs/ctrff.sat
  82. 13
      satellites/vcs/ctrtool.sat
  83. 12
      satellites/vcs/ctrulib-git.sat
  84. 1
      satellites/vcs/functions
  85. 13
      satellites/vcs/makerom.sat
  86. 12
      satellites/vcs/sockfile.sat
  87. 51
      tools/prepchroot
  88. 12
      tools/satellites/ca-certificates.sat
  89. 12
      tools/satellites/check.sat
  90. 13
      tools/satellites/linux-api.sat

225
astronaut/astronaut

@ -1,72 +1,83 @@
#!/bin/sh #!/bin/sh -e
set -e
# Configuration # Configuration
dir_build="$PWD/build" dir_build="$PWD/build" # Temporary directory to build packages
dir_source="$PWD/source" dir_source="$PWD/source" # Directory where the package sources will be placed
dir_install="$PWD/install" dir_install="$PWD/install" # Directory where the package will be installed
cmd_download="curl -#L -o {dst} {src}" prefix="/usr" # Prefix directory
cmd_extract="tar xf {src}" cmd_download="curl -# -L -o {dst} {src}" # Command to execute to download files
enable_movedirs=false cmd_extract="tar -x -C {dst} -f {src}" # Command to execute to extract files
enable_check=true enable_check=true # Run the test suite of packages
if [ -f /etc/astronaut.conf ]; then unset dir_satellites # Directory where the satellite files are placed.
. /etc/astronaut.conf [ -f /etc/astronaut.conf ] && . /etc/astronaut.conf
fi [ -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf"
# Options not in the configuration
_download_only=false
unset _header_end_hooks
_vcs_only=false
vcs_compile=false
#_nuke_dir_install (This can be set from wrappers)
# Some printing functions # Some printing functions
show_help() { _show_help() {
echo "This astronaut will help you build some satellites. echo "This astronaut will help you build some satellites.
Just describe what he's got to do in a satellite file. Just describe what he's got to do in a satellite file.
Usage: $0 [-sbi <dir>] [-cCmM] <satellite> Usage: $0 [-sbip <dir>] [-IcCd] <satellite>
-s Set source directory -h/? Show this message
-b Set build directory [WARNING: Will be deleted before build] -b Set build directory [WARNING: Will be deleted before build]
-s Set source directory
-i Set install directory -i Set install directory
-c Enable package checking -p Set prefix directory
-C Disable package checking -I Nuke install directory before build
-m Enable moving directories to match custom tree -c/C Enable/Disable package checking
-M Disable moving directories to match custom tree" -d Only download package files
-v Only build vcs package if any updates have been made to it"
} }
msg() { _msg() {
echo "=> $@" echo "=> $@"
} }
exiterr() { _exiterr() {
echo "===> Houston, we've got a problem: $@" 1>&2 echo "===> Houston, we've got a problem: $@" 1>&2
exit 1 exit 1
} }
# Gather info # Gather info
while getopts "h?s:b:i:cCmM" opt; do while getopts "h?s:b:i:p:IcCdv" opt; do
case "$opt" in case "$opt" in
h|\?) h|\?)
show_help _show_help
exit 0 exit 0
;; ;;
s) s)
mkdir -p "$OPTARG"
dir_source="$(realpath "$OPTARG")" dir_source="$(realpath "$OPTARG")"
;; ;;
b) b)
mkdir -p "$OPTARG"
dir_build="$(realpath "$OPTARG")" dir_build="$(realpath "$OPTARG")"
;; ;;
i) i)
mkdir -p "$OPTARG"
dir_install="$(realpath "$OPTARG")" dir_install="$(realpath "$OPTARG")"
;; ;;
p)
prefix="$(realpath "$OPTARG")"
;;
I)
_nuke_dir_install=true
;;
c) c)
enable_check=true enable_check=true
;; ;;
C) C)
enable_check=false enable_check=false
;; ;;
m) d)
enable_movedirs=true _download_only=true
;; ;;
M) v)
enable_movedirs=false _vcs_only=true
;; ;;
esac esac
done done
@ -75,57 +86,50 @@ shift $((OPTIND-1))
[ "$1" = "--" ] && shift [ "$1" = "--" ] && shift
if [ ! "$1" ]; then if [ ! "$1" ]; then
show_help _show_help
exit 1 exit 1
fi fi
satellite="$(realpath "$1")"
if [ ! -f "$satellite" ]; then
exiterr "Can't find satellite file"
fi
# Tools for the astronaut # Tools for the astronaut
mksum() { _mksum() {
echo "$(md5sum "$@" 2> /dev/null | cut -d' ' -f1)" echo "$(md5sum "$@" 2> /dev/null | cut -d' ' -f1)"
} }
download() { download() {
local name="$(basename "$1" | cut -d? -f1)" mkdir -p "$dir_source/$name"
local path="$dir_source/$name"
local checksum="" local filename="$(basename "$1" | cut -d? -f1)"
if [ "$2" -a -f "$path" ]; then local path="$dir_source/$name/$filename"
checksum="$(mksum "$path")"
fi [ "$2" -a -f "$path" ] && local checksum="$(_mksum "$path")"
if [ ! -f "$path" -o "$checksum" != "$2" ]; then
msg "Downloading $name" if [ ! -e "$path" -o "$checksum" != "$2" ]; then
if [ "$3" ]; then _msg "Downloading $filename"
local cmd="$3"
else [ "$3" ] && local cmd="$3" || local cmd="$cmd_download"
local cmd="$cmd_download"
fi
$(echo "$cmd" | sed -e 's@{dst}@'"$path"'@g' -e 's@{src}@'"$1"'@g') $(echo "$cmd" | sed -e 's@{dst}@'"$path"'@g' -e 's@{src}@'"$1"'@g')
checksum="$(mksum "$path")" checksum="$(_mksum "$path")"
if [ "$2" -a "$checksum" != "$2" ]; then if [ "$2" -a "$checksum" != "$2" ]; then
msg "Checksum: $checksum" _msg "Checksum: $checksum"
exiterr "Checksum failed" _exiterr "Checksum failed"
fi fi
fi fi
} }
extract() { extract() {
msg "Extracting $1" _msg "Extracting $1"
if [ "$2" ]; then [ "$2" ] && local dest="$2" || local dest="."
local cmd="$2" [ "$3" ] && local cmd="$3" || local cmd="$cmd_extract"
else $(echo "$cmd" | sed -e 's@{src}@'"$dir_source/$name/$1"'@g' -e 's@{dst}@'"$dest"'@g')
local cmd="$cmd_extract"
fi
$(echo "$cmd" | sed -e 's@{src}@'"$dir_source/$1"'@g')
} }
getfile() { getfile() {
cp "$dir_source/$1" "$dir_build/$1" cp -r "$dir_source/$name/$1" "$dir_build/$1"
}
extrafile() {
cp "$(dirname "$_satellite")/extrafiles/$_satname/$1" "$dir_build/$1"
} }
dlextract() { dlextract() {
@ -138,45 +142,84 @@ dlfile() {
getfile "$(basename "$1" | cut -d? -f1)" getfile "$(basename "$1" | cut -d? -f1)"
} }
extrafile() {
cp "$(dirname "$satellite")/extrafiles/$name/$1" "$dir_build/$1"
}
do_check() { do_check() {
if [ "$1" ]; then if [ "$1" ]; then
if $enable_check; then [ "$enable_check" = true ] && $@
$@
fi
else else
if $enable_check; then [ "$enable_check" = true ]
return 0 return $?
fi fi
return 1 }
import() {
unset _hooks
. "$(dirname "$_satellite")/functions/$1.sh"
if [ "$_hooks" ]; then
_header_end_hooks="$_header_end_hooks $_hooks"
fi fi
} }
# Create the satellite _run_header_end_hooks() {
rm -rf "$dir_build" for _hook in $_header_end_hooks; do
mkdir -p "$dir_source" $_hook
mkdir -p "$dir_build" done
mkdir -p "$dir_install" unset _hook
cd "$dir_build"
. "$satellite"
movefiles() {
mkdir -p "$2"
mv $(find "$1" -maxdepth 1 -mindepth 1) "$2"
rm -rf "$1"
} }
if $enable_movedirs; then # Set some functions in accordance to the _download_only option.
if [ "$(uname -m)" == "x86_64" ]; then header_end() { _run_header_end_hooks; }
if [ -d "$dir_install/lib64" ]; then if [ "$_vcs_only" = true ]; then
movefiles "$dir_install/lib64" "$dir_install/lib" header_end() {
_run_header_end_hooks
if [ ! "$vcs_compile" = true ]; then
exit
fi
}
fi
if [ "$_download_only" = true ]; then
# Disable some functions
extract() { :; }
getfile() { :; }
extrafile() { :; }
# Exit at the end of the header
header_end() {
_run_header_end_hooks
exit
}
fi
_satellite="$(realpath "$1")"
_satname="$(basename "$_satellite" .sat)"
# Try to find the satellite file if it can't be found.
if [ ! -f "$_satellite" ]; then
if [ -d "$dir_satellites" ]; then
file="$(find "$dir_satellites" -type f \( -name "$_satname.sat" -o -name "$_satname" \) -print -quit)"
if [ -f "$file" ]; then
_satellite="$(realpath "$file")"
_satname="$(basename "$_satellite" .sat)"
fi fi
if [ -d "$dir_install/usr/lib64" ]; then
movefiles "$dir_install/usr/lib64" "$dir_install/lib"
fi fi
# If it still can't be found, exit.
if [ ! -f "$_satellite" ]; then
_exiterr "Can't find satellite"
fi fi
fi fi
# Create the directories
if [ "$_download_only" = false ]; then
# This variable can be set by a wrapper script in need to nuke the install dir.
if [ "$_nuke_dir_install" = true ]; then
rm -rf "$dir_install"
fi
rm -rf "$dir_build"
mkdir -p "$dir_build"
mkdir -p "$dir_install"
cd "$dir_build"
fi
# Create the satellite
. "$_satellite"

161
astronaut/freshnaut

@ -0,0 +1,161 @@
#!/bin/sh -e
# A script to check for satellite updates.
# It just downloads the documents which should be updated when the software has an update.
# It's a shitty method, but it kinda works... Other than having a lot of false-positives.
_show_help() {
echo "This program will help keep your satellites fresh and up to date.
Usage: $0 <[\$dir_satellites] [\$_dir_fresh]|ignore <diff> <ignorediff>>
\$dir_satellites = The directory where all the satellites are you want to update.
\$_dir_fresh = The directory that will be used to keep all the files for checking.
ignore = Use this option to generate an ignorediff.
diff = A diff file. Generated without -u or any other fancy options.
ignorediff = A file containing the differences to be ignored (this file will be appended to).
The variables (starting with \$) can also be set from a configuration file."
}
get_variable() {
printf "
download() { :; }
extract() { :; }
getfile() { :; }
extrafile() { :; }
dlextract() { :; }
dlfile() { :; }
header_end() { echo \$$1; exit; }
. %s
" $2 | sh
}
download() {
$(echo "$cmd_download" | sed -e 's@{dst}@'"$2"'@g' -e 's@{src}@'"$1"'@g') 2> /dev/null
}
diff_extractlines() {
# Extract all the line numbers from a diff.
stage=0
for line in $(echo "$1" | awk '{print $1}'); do
if [ "$stage" = 0 ]; then
if [ "$line" != ">" -a "$line" != "<" ]; then
echo "$line"
stage=1
fi
elif [ "$stage" = 1 ]; then
if [ "$line" != ">" -a "$line" != "<" ]; then
if [ "$line" = "---" ]; then
stage=0
else
echo "$line"
fi
fi
fi
done
}
apply_ignorediff() {
# Filter a diff, only return the differences that shouldn't be ignored.
# TODO: This function is slow, due to the usage of awk on every line. A solution for this problem would be great.
stage=0
ignore=0
echo "$1" | while read line; do
first="$(echo "$line" | awk '{print $1}')"
if [ "$stage" = 0 ]; then
if [ "$first" != ">" -a "$first" != "<" ]; then
stage=1
ignore=0
if grep -e "^$line\$" "$2" > /dev/null; then
ignore=1
fi
fi
elif [ "$stage" = 1 ]; then
if [ "$first" != ">" -a "$first" != "<" ]; then
if [ "$line" = "---" ]; then
stage=0
else
ignore=0
if grep -e "^$line\$" "$2" > /dev/null; then
ingore=1
fi
fi
fi
fi
if [ "$ignore" = 0 ]; then
echo "$line"
fi
done
}
# Do something completely different when this option is provided.
if [ "$1" = "ignore" ]; then
if [ $# -lt 3 ]; then
_show_help
exit 1
fi
diff_extractlines "$(cat "$2")" >> "$3"
# Don't do anything else
exit
fi
# Load the config
cmd_download="curl -L -o {dst} {src}" # Command to execute to download files
[ -f /etc/astronaut.conf ] && . /etc/astronaut.conf
[ -f "$HOME/.astronaut.conf" ] && . "$HOME/.astronaut.conf"
# Override config with command-line parameters.
[ "$1" ] && dir_satellites="$1"
[ "$2" ] && _dir_fresh="$2"
if [ ! "$dir_satellites" -o ! "$_dir_fresh" ]; then
_show_help
exit 1
fi
mkdir -p "$_dir_fresh"
for sat in "$dir_satellites"/*.sat; do
update_url="$(get_variable update_url "$sat")"
name="$(basename "$sat" .sat)"
if [ "$update_url" ]; then
printf "Checking: $name..."
cols="$(expr $(tput cols) - $(printf "Checking: $name..." | wc -c))"
download "$update_url" "$_dir_fresh/$name.fresh"
if [ -f "$_dir_fresh/$name" ]; then
check="$(diff "$_dir_fresh/$name" "$_dir_fresh/$name.fresh" || true)"
if [ -f "$_dir_fresh/$name.ignorediff" ]; then
check="$(apply_ignorediff "$check" "$_dir_fresh/$name.ignorediff")"
fi
if [ "$check" ]; then
printf "%${cols}s\n" "Update detected"
echo "$check" >> "$_dir_fresh/$name-$(date +%Y%m%d%H%M%S).diff"
else
printf "\n"
fi
else
printf "%${cols}s\n" "First update check, creating new file"
download "$update_url" "$_dir_fresh/$name.checkfresh"
check="$(diff "$_dir_fresh/$name.fresh" "$_dir_fresh/$name.checkfresh" || true)"
if [ "$check" ]; then
echo "$(diff_extractlines "$check")" >> "$_dir_fresh/$name.ignorediff"
echo "> Created ignorediff"
fi
rm "$_dir_fresh/$name.checkfresh"
fi
mv "$_dir_fresh/$name.fresh" "$_dir_fresh/$name"
fi
done

18
astronaut/functions/say_hello.sh

@ -0,0 +1,18 @@
# This is a functions file. You can use this kind of files to share code between satellites.
# You define a function here, and it becomes available in any script that imports it.
say_hello() {
# Any function or variable that shouldn't be seen by the satellite is prefixed with "_func_"
_func_tmp="Hello, there!"
echo "Function ran! $_func_tmp"
}
# Any hook is prefixed with "_hook_"
_hook_hello() {
echo "The hook ran at header_end!"
}
# This is a space-separated list of all the hooks.
_hooks="_hook_hello"
# Hooks are functions with code that is run at header_end, regardless if you're in download-only mode. So don't go messing in the build directory here.
# This is purely to set variables (like update_url), maybe download code, or something else.

69
astronaut/hello.sat

@ -1,36 +1,66 @@
# Example of a satellite file, which is just a shell script with a cool name. # Example of a satellite file, which is just a shell script with a cool name.
import "say_hello" # Import some functions. See functions/say_hello.sh for more info.
# Info (Please declare it, as it will be used outside of this script, too) # Info (Please declare it, as it will be used outside of this script, too)
name=hello name=hello # Name of the software, not the package name.
version=2.9 # Same source files will be used for the same software, despite the package name being different.
version=2.10
update_url="https://ftp.gnu.org/gnu/$name/" # URL to a downloadable plain-text file which updates when a new version is available.
# Get them files vcs_compile=true # Set this to true if it's a vcs package, and we've just downloaded an update for it. This is meant to be used in functions/header_end hooks, and has to be set before header_end is called (or by a header_end hook).
# URL [REQUIRED], MD5sum [REQUIRED], Custom command
download "http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.gz" \
"67607d2616a0faaf5bc94c59dca7c3cb" \
"curl -L -o {dst} {src}"
# Name [REQUIRED], Custom command # Astronaut will generally prefix internal variables with "_". There are, however, a few exceptions.
extract "$name-$version.tar.gz" \ # Some of those you can touch, some not.
"tar xvf {src}" # "You shouldn't even look, unless you're hacking really bad, but definitely don't touch"-variables:
# - dir_build (You cd into it automatically. Just use relative paths or $PWD.)
# - dir_source (This is handled by the commands detailed below. You should have no use for it.)
# "Look, but don't touch"-variables:
# - dir_install
# - prefix
# "You'll only make your own life more difficult if you use them wrong, so I don't care what you do"-variables:
# (Only use these to change the behaviour of some commands over the whole script.)
# - cmd_download
# - cmd_extract
# - enable_check
# - vcs_compile
# Abbreviation for the above functions. Does not allow custom commands # Get them files.
#dlextract "http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.gz" \ # URL [REQUIRED], MD5sum, Custom command
# "67607d2616a0faaf5bc94c59dca7c3cb" download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"6cd0ffea3884a4e79330338dcc2987d6" \
"curl -L -o {dst} {src}"
# Copy some file you downloaded over to the build directory # Abbreviation download and extract. Does not allow custom commands.
#getfile "Waffles.txt" #dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
# "6cd0ffea3884a4e79330338dcc2987d6"
# Abbreviation for downloading a file and copying it over # Abbreviation for downloading a file and copying it over.
#dlfile "http://example.com/Waffles.txt" \ #dlfile "http://example.com/Waffles.txt" \
# "MD5SUM" # "MD5SUM"
# Copy local file to build directory. Path relative to the location of the satellite file # Copy local file to build directory. File should be stored in $(basedir <satellite file>)/extrafiles/$name/
#extrafile "Herpaderp.txt" #extrafile "Herpaderp.txt"
header_end # End of the header.
# The only commands that should be in the header are:
# - download
# - dlextract
# - dlfile
# - extrafile
# getfile and extract are technically allowed, but not encouraged.
# Name [REQUIRED], Destination, Custom command
extract "$name-$version.tar.gz" \
"." \
"tar xvfC {src} {dst}"
# Copy some file you downloaded over to the build directory.
#getfile "Waffles.txt"
# Compilation instructions # Compilation instructions
cd "$name-$version" cd "$name-$version"
./configure --prefix=/usr ./configure --prefix="$prefix"
make make
# Know if the user wants the package to be checked # Know if the user wants the package to be checked
@ -42,4 +72,7 @@ fi
make DESTDIR="$dir_install" install make DESTDIR="$dir_install" install
# Call the function we imported. For more info see the top of the file, and functions/say_hello.sh
say_hello
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

18
astronaut/template.sat

@ -0,0 +1,18 @@
# Template satellite file without all the comments.
name=hello
version=2.10
update_url="https://ftp.gnu.org/gnu/$name/"
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"6cd0ffea3884a4e79330338dcc2987d6"
header_end
cd "$name-$version"
./configure --prefix="$prefix"
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

21
astronaut/xbps-astronaut

@ -0,0 +1,21 @@
#!/bin/sh -e
# A hacky script to generate .xbps files using satellites.
# It's a fairly simple wrapper to astronaut, that generates a xbps package at the end.
# This may also serve as an example on how you can wrap astronaut to package in any format.
# Sure, no dependency resolution, and the packages won't make it in any official repositories,
# but it isn't meant for that anyway.
_topdir=$PWD
_astronaut="$(dirname "$0")/astronaut"
[ ! -f "$_astronaut" ] && _astronaut="astronaut"
_nuke_dir_install=true
. "$_astronaut"
# _dir_xbps should be set from a configuration file (e.g. ~/.astronaut.conf), and points to wherever you want your packages to be placed.
[ "$_dir_xbps" ] && mkdir -p "$_dir_xbps" && cd "$_dir_xbps" || cd "$_topdir"
xbps-create --compression none -A "$(uname -m)" -n "$_satname-${version}_astro" -s "Generated with xbps-astronaut" -H "$update_url" "$dir_install"
rm -rf "$dir_install"
xbps-rindex -f -a "$_satname-${version}_astro.$(uname -m).xbps"

9
graveyard/first_attempt.cause_of_death

@ -0,0 +1,9 @@
First attempt died on 18 november 2015.
Latest update is unknown.
Birth date is unknown.
Description:
The first attempt was the first attempt I made at making a distro.
Cause of death:
Because the latest changes only being version bumps, and me having never actually tested those changes, and after I've made some substantial changes in how satellites are written (adding functions, support for vcs, header_end hooks, etc.), I've decided that if I ever take up making a distro again, I'll rewrite all of these satellites from scratch anyway.

18
graveyard/first_attempt/satellites/acl.sat

@ -0,0 +1,18 @@
name=acl
version=2.2.52
update_url="http://download.savannah.gnu.org/releases/$name/"
enable_check=false # These tests require a specific filesystem.
dlextract "http://download.savannah.gnu.org/releases/$name/$name-$version.src.tar.gz" \
"a61415312426e9c2212bd7dc7929abda"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make -j1 tests
make DIST_ROOT="$dir_install" install install-lib install-dev
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

18
graveyard/first_attempt/satellites/attr.sat

@ -0,0 +1,18 @@
name=attr
version=2.4.47
update_url="http://download.savannah.gnu.org/releases/$name/"
enable_check=false # These tests require a specific filesystem.
dlextract "http://download.savannah.gnu.org/releases/$name/$name-$version.src.tar.gz" \
"84f58dec00b60f2dc8fd1c9709291cc7"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make -j1 tests root-tests
make DIST_ROOT="$dir_install" install install-lib install-dev
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/binutils.sat

@ -0,0 +1,16 @@
name=binutils
version=2.25.1
enable_check=false
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"ac493a78de4fee895961d025b7905be4"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/coreutils.sat

@ -0,0 +1,16 @@
name=coreutils
version=8.24
update_url="https://ftp.gnu.org/gnu/$name/"
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"40efdbce865d2458d8da0a9dcee7c16c"
header_end
cd "$name-$version"
./configure --prefix=/usr --enable-no-install-program=kill
make
do_check make check # NEED: user nobody, group nogroup, diff -c
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/file.sat

@ -0,0 +1,15 @@
name=file
version=5.24
dlextract "ftp://ftp.astron.com/pub/$name/$name-$version.tar.gz" \
"ec161b5a0d2aef147fb046e5630b1408"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

23
graveyard/first_attempt/satellites/gcc.sat

@ -0,0 +1,23 @@
name=gcc
version=5.2.0
enable_check=false
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"a51bcfeb3da7dd4c623e27207ed43467"
header_end
mkdir "$name-build"; cd "$name-build"
SED=sed "../$name-$version/configure" --prefix=/usr --enable-languages=c,c++ --with-system-zlib --disable-bootstrap --disable-multilib
make
if do_check; then
ulimit -s 32768
make -k check
fi
make DESTDIR="$dir_install" install
ln -s gcc "$dir_install/usr/bin/cc"
mkdir -p "$dir_install/usr/lib/bfd-plugins"
ln -s "../../libexec/gcc/$(gcc -dumpmachine)/5.2.0/liblto_plugin.so" "$dir_install/usr/lib/bfd-plugins/"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

19
graveyard/first_attempt/satellites/glibc.sat

@ -0,0 +1,19 @@
name=glibc
version=2.22
enable_check=false
dlextract "https://ftp.gnu.org/gnu/libc/$name-$version.tar.xz" \
"e51e02bf552a0a1fbbdc948fb2f5e83c"
header_end
mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# It likes leaving this file here. Something it really shouldn't.
rm "$dir_install/etc/ld.so.cache"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/gmp.sat

@ -0,0 +1,16 @@
name=gmp
shortver=6.0.0
version=${shortver}a
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76"
header_end
cd "$name-$shortver"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

7
graveyard/first_attempt/satellites/groups/package-management

@ -0,0 +1,7 @@
tar
perl
stow
openssl
ca-certificates
curl
astronaut

8
graveyard/first_attempt/satellites/groups/toolchain

@ -0,0 +1,8 @@
linux-api
glibc # Adjust the toolchain after (http://linuxfromscratch.org/lfs/view/stable/chapter06/adjusting.html)
binutils
gmp # From here, run ldconfig after every package install.
mpfr
mpc
zlib # Dependency of gcc
gcc

14
graveyard/first_attempt/satellites/linux-api.sat

@ -0,0 +1,14 @@
name=linux
version=4.1.6
dlextract "https://www.kernel.org/pub/$name/kernel/v4.x/$name-$version.tar.xz" \
"1dae0c808e34164cab3dfd57be88bd53"
header_end
cd "$name-$version"
make mrproper
make INSTALL_HDR_PATH="$dir_install/usr" headers_install
find "$dir_install/usr/include" \( -name .install -o -name ..install.cmd \) -delete
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/mpc.sat

@ -0,0 +1,15 @@
name=mpc
version=1.0.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"d6a1d5f8ddea3abd2cc3e98f58352d26"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/mpfr.sat

@ -0,0 +1,15 @@
name=mpfr
version=3.1.3
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"6969398cd2fbc56a6af570b5273c56a9"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/shadow.sat

@ -0,0 +1,16 @@
name=shadow
version=4.2.1
update_url="https://pkg-shadow.alioth.debian.org/"
dlextract "https://pkg-shadow.alioth.debian.org/releases/$name-$version.tar.xz" \
"2bfafe7d4962682d31b5eba65dba4fc8"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

16
graveyard/first_attempt/satellites/tar.sat

@ -0,0 +1,16 @@
name=tar
version=1.28
update_url="https://ftp.gnu.org/gnu/$name/"
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"49b6306167724fe48f419a33a5beb857"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/satellites/tzdata.sat

@ -0,0 +1,17 @@
name=tzdata
version=2015f
dlextract "https://www.iana.org/time-zones/repository/releases/$name$version.tar.gz" \
"e3b82732d20e973e48af1c6f13df9a1d"
header_end
timezones="africa antarctica asia australasia backward backzone etcetera europe factory northamerica pacificnew southamerica systemv"
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo" $timezones
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo/posix" $timezones
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo/right" -L leapseconds $timezones
zic -y ./yearistype -d "$dir_install/usr/share/zoneinfo" -p America/New_York
cp zone1970.tab iso3166.tab "$dir_install/usr/share/zoneinfo"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

17
graveyard/first_attempt/satellites/util-linux.sat

@ -0,0 +1,17 @@
name=util-linux
majver=2.26
version=$majver.2
update_url="https://www.kernel.org/pub/linux/utils/$name/"
dlextract "https://www.kernel.org/pub/linux/utils/$name/v$majver/$name-$version.tar.xz" \
"9bdf368c395f1b70325d0eb22c7f48fb"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install # NEEDS: group tty
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

15
graveyard/first_attempt/satellites/zlib.sat

@ -0,0 +1,15 @@
name=zlib
version=1.2.8
dlextract "http://zlib.net/$name-$version.tar.xz" \
"28f1205d8dd2001f26fec1e8c2cebe37"
header_end
cd "$name-$version"
./configure --prefix=/usr
make
do_check make check
make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

29
tools/chroot → graveyard/first_attempt/tools/chroot

@ -14,20 +14,11 @@ fi
rocket="$(realpath "$rocket")" rocket="$(realpath "$rocket")"
checkmount() {
local point="$(eval echo \${$#})"
if cut -d' ' -f2 /proc/mounts | grep "$point" > /dev/null; then
true
else
mount $@
fi
}
mkdir -p "$rocket/dev" "$rocket/proc" "$rocket/sys" "$rocket/run" mkdir -p "$rocket/dev" "$rocket/proc" "$rocket/sys" "$rocket/run"
checkmount --bind /dev "$rocket/dev" mount --bind /dev "$rocket/dev" 2> /dev/null || true
checkmount -t devpts devpts "$rocket/dev/pts" mount --bind /dev/pts "$rocket/dev/pts" 2> /dev/null || true # Bind-mounting this because not doing so breaks some things.
checkmount -t proc proc "$rocket/proc" mount -t proc proc "$rocket/proc" 2> /dev/null || true
checkmount -t tmpfs tmpfs "$rocket/run" mount -t tmpfs tmpfs "$rocket/run" 2> /dev/null || true
if [ -h "$rocket/dev/shm" ]; then if [ -h "$rocket/dev/shm" ]; then
mkdir -p "$rocket/$(readlink "$rocket/dev/shm")" mkdir -p "$rocket/$(readlink "$rocket/dev/shm")"
fi fi
@ -35,15 +26,17 @@ fi
mkdir -p "$rocket/etc" mkdir -p "$rocket/etc"
cp /etc/resolv.conf "$rocket/etc/resolv.conf" cp /etc/resolv.conf "$rocket/etc/resolv.conf"
# FORCE_UNSAFE_CONFIGURE is needed for building some packages as root
chroot "$rocket" /tools/bin/env -i \ chroot "$rocket" /tools/bin/env -i \
HOME=/root \ HOME=/root \
TERM="$TERM" \ TERM="$TERM" \
PS1="(buildenv) \u:\w \$ " \ PS1="(buildenv) \u:\w \$ " \
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/tools/bin \ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/tools/bin:/tools/sbin \
MAKEFLAGS="$MAKEFLAGS" \ MAKEFLAGS="$MAKEFLAGS" \
FORCE_UNSAFE_CONFIGURE=1 \
/tools/bin/ash -l /tools/bin/ash -l
umount "$rocket/dev/pts" umount "$rocket/dev/pts" || true
umount "$rocket/dev" umount "$rocket/dev" || true
umount "$rocket/proc" umount "$rocket/proc" || true
umount "$rocket/run" umount "$rocket/run" || true

2
tools/library-check.sh → graveyard/first_attempt/tools/library-check.sh

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Copied from LFS 7.6 # Copied from LFS 7.7
for lib in lib{gmp,mpfr,mpc}.la; do for lib in lib{gmp,mpfr,mpc}.la; do
echo $lib: $(if find /usr/lib* -name $lib| echo $lib: $(if find /usr/lib* -name $lib|
grep -q $lib;then :;else echo not;fi) found grep -q $lib;then :;else echo not;fi) found

42
tools/mktools → graveyard/first_attempt/tools/mktools

@ -1,21 +1,28 @@
#!/bin/sh #!/bin/sh
# Tool to build tools to build final system # Tool to build tools to build the temporary system
set -e set -e
umask 022 umask 022
download_only=false
if [ "$1" = "download" ]; then
download_only=true
fi
command -v astronaut >/dev/null 2>&1 || { command -v astronaut >/dev/null 2>&1 || {
echo 'Can'\''t find astronaut in $PATH' 1>&2 echo 'Can'\''t find astronaut in $PATH' 1>&2
exit 1 exit 1
} }
if [ ! "$rocket" ]; then if [ "$download_only" = false ]; then
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2 echo 'Please set the $rocket variable' 1>&2
exit 1 exit 1
fi fi
if [ "$(readlink /tools)" != "$(realpath "$rocket")/tools" ]; then if [ "$(readlink /tools)" != "$(realpath "$rocket")/tools" ]; then
echo "Please create a symlink from /tools to $(realpath "$rocket")/tools" 1>&2 echo "Please create a symlink from /tools to $(realpath "$rocket")/tools" 1>&2
exit 1 exit 1
fi
fi fi
# Options for supported shells # Options for supported shells
@ -27,6 +34,11 @@ fi
satellite_dir="$(dirname "$(realpath "$0")")/satellites" satellite_dir="$(dirname "$(realpath "$0")")/satellites"
envrun() { envrun() {
if [ "$download_only" = true ]; then
$@
return
fi
env -i \ env -i \
HOME="$HOME" \ HOME="$HOME" \
TERM="$TERM" \ TERM="$TERM" \
@ -39,11 +51,18 @@ envrun() {
} }
astrobuild() { astrobuild() {
envrun astronaut -M -i "$rocket" "$satellite_dir/$1.sat" if [ "$download_only" = true ]; then
envrun astronaut -d "$satellite_dir/$1.sat"
else
envrun astronaut -i "$rocket" "$satellite_dir/$1.sat"
fi
} }
mkdir -p "$rocket/tools/lib" # Needed for x86_64
ln -sf lib "$rocket/tools/lib64" if [ "$download_only" = false ]; then
mkdir -p "$rocket/tools/lib"
ln -sf lib "$rocket/tools/lib64"
fi
# Just enter the environment # Just enter the environment
#envrun #envrun
@ -55,7 +74,7 @@ astrobuild "binutils-1"
astrobuild "gcc-1" astrobuild "gcc-1"
astrobuild "linux-api" astrobuild "linux-api"
astrobuild "glibc" astrobuild "glibc"
astrobuild "libstdc" astrobuild "libstdcxx"
astrobuild "binutils-2" astrobuild "binutils-2"
astrobuild "gcc-2" astrobuild "gcc-2"
@ -65,14 +84,17 @@ astrobuild "bash"
astrobuild "gawk" astrobuild "gawk"
astrobuild "make" astrobuild "make"
astrobuild "m4" astrobuild "m4"
astrobuild "tcl"
# Testing
astrobuild "tcl-core"
astrobuild "expect" astrobuild "expect"
astrobuild "dejagnu" astrobuild "dejagnu"
astrobuild "check" astrobuild "check"
# Package management
astrobuild "perl" astrobuild "perl"
astrobuild "stow"
astrobuild "openssl" astrobuild "openssl"
astrobuild "ca-certificates" astrobuild "ca-certificates"
astrobuild "curl" astrobuild "curl"
astrobuild "stow"
astrobuild "astronaut" astrobuild "astronaut"

54
graveyard/first_attempt/tools/prepchroot

@ -0,0 +1,54 @@
#!/bin/sh
umask 022
set -e
if [ "$(id -u)" != "0" ]; then
echo "Please run this script as root" 1>&2
exit 1
fi
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
echo "Changing ownership of $rocket to root"
chown -R 0.0 "$rocket"
echo "Creating device nodes"
mkdir -p "$rocket/dev"
umount -R "$rocket/dev" 2> /dev/null || true
mknod -m 600 "$rocket/dev/console" c 5 1 2> /dev/null || true
mknod -m 666 "$rocket/dev/null" c 1 3 2> /dev/null || true
echo "Creating directories"
install -dm750 "$rocket/root"
install -dm1777 "$rocket/tmp"
mkdir -p "$rocket/etc" "$rocket/usr/pkg" "$rocket/usr/sat"
echo "Creating temporary symlinks"
mkdir -p "$rocket/usr/pkg/tmp-coreutils/bin"
ln -f "$rocket/tools/bin/busybox" "$rocket/usr/pkg/tmp-coreutils/bin/pwd"
mkdir -p "$rocket/usr/pkg/tmp-sh/bin"
ln -f "$rocket/tools/bin/busybox" "$rocket/usr/pkg/tmp-sh/bin/sh"
mkdir -p "$rocket/usr/pkg/tmp-bash/bin"
ln -f "$rocket/tools/bin/bash" "$rocket/usr/pkg/tmp-bash/bin/bash"
mkdir -p "$rocket/usr/pkg/tmp-ca-certificates/etc/ssl"
ln -sf /tools/ssl/certs "$rocket/usr/pkg/tmp-ca-certificates/etc/ssl/certs"
mkdir -p "$rocket/usr/pkg/tmp-gcc/usr/lib"
ln -f "$rocket/tools/lib/libgcc_s.so" "$rocket/usr/pkg/tmp-gcc/usr/lib/libgcc_s.so"
ln -f "$rocket/tools/lib/libgcc_s.so.1" "$rocket/usr/pkg/tmp-gcc/usr/lib/libgcc_s.so.1"
ln -f "$rocket/tools/lib/libstdc++.so" "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so"
ln -f "$rocket/tools/lib/libstdc++.so.6" "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so.6"
ln -f "$rocket/tools/lib/libstdc++.so.6.0.21" "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so.6.0.21"
echo "Creating users and groups"
echo 'root:x:0:0:root:/root:/bin/sh
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false' > "$rocket/etc/passwd"
echo 'root:x:0:
tty:x:1:
nogroup:x:99:' > "$rocket/etc/group"
echo "Configuring stow"
echo '-d /usr/pkg
-t /' > "$rocket/etc/stowrc"

2
tools/satellites/astronaut.sat → graveyard/first_attempt/tools/satellites/astronaut.sat

@ -1,4 +1,6 @@
# This is a hacky satellite. Please refrain of making more like this if possible. # This is a hacky satellite. Please refrain of making more like this if possible.
header_end
msg "Installing astronaut" msg "Installing astronaut"
install -Dm755 "$(command -v "$0")" "$dir_install/tools/bin/astronaut" install -Dm755 "$(command -v "$0")" "$dir_install/tools/bin/astronaut"

3
tools/satellites/bash.sat → graveyard/first_attempt/tools/satellites/bash.sat

@ -1,8 +1,9 @@
name=bash name=bash
version=4.3.30 version=4.3.30
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"a27b3ee9be83bd3ba448c0ff52b28447" "a27b3ee9be83bd3ba448c0ff52b28447"
header_end
cd "$name-$version" cd "$name-$version"

7
tools/satellites/binutils-1.sat → graveyard/first_attempt/tools/satellites/binutils-1.sat

@ -1,8 +1,9 @@
name=binutils name=binutils
version=2.25 version=2.25.1
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"e0f71a7b2ddab0f8612336ac81d9636b" "ac493a78de4fee895961d025b7905be4"
header_end
mkdir "$name-build"; cd "$name-build" mkdir "$name-build"; cd "$name-build"

7
tools/satellites/binutils-2.sat → graveyard/first_attempt/tools/satellites/binutils-2.sat

@ -1,8 +1,9 @@
name=binutils name=binutils
version=2.25 version=2.25.1
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"e0f71a7b2ddab0f8612336ac81d9636b" "ac493a78de4fee895961d025b7905be4"
header_end
mkdir "$name-build"; cd "$name-build" mkdir "$name-build"; cd "$name-build"

5
tools/satellites/busybox.sat → graveyard/first_attempt/tools/satellites/busybox.sat

@ -1,9 +1,10 @@
name=busybox name=busybox
version=1.23.1 version=1.23.2
dlextract "http://www.busybox.net/downloads/$name-$version.tar.bz2" \ dlextract "http://www.busybox.net/downloads/$name-$version.tar.bz2" \
"337d1a15ab1cb1d4ed423168b1eb7d7e" "7925683d7dd105aabe9b6b618d48cc73"
extrafile "busybox.config" extrafile "busybox.config"
header_end
sed 's@./_install@'"$dir_install/tools"'@' busybox.config > "$name-$version/.config" sed 's@./_install@'"$dir_install/tools"'@' busybox.config > "$name-$version/.config"
cd "$name-$version" cd "$name-$version"

17
graveyard/first_attempt/tools/satellites/ca-certificates.sat

@ -0,0 +1,17 @@
name=ca-certificates
version=$(date +%Y%m%d)
dlfile "https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt"
extrafile "make-ca.sh"
extrafile "make-cert.pl"
extrafile "remove-expired-certs.sh"
header_end
./make-ca.sh
./remove-expired-certs.sh certs
mkdir -p "$dir_install/tools/ssl/certs"
cp certs/*.pem "$dir_install/tools/ssl/certs"
c_rehash "$dir_install/tools/ssl/certs"
cp ca-certificates.crt "$dir_install/tools/ssl/certs"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
graveyard/first_attempt/tools/satellites/check.sat

@ -0,0 +1,13 @@
name=check
version=0.10.0
dlextract "https://sourceforge.net/projects/$name/files/$name/$version/$name-$version.tar.gz" \
"53c5e5c77d090e103a17f3ed7fd7d8b8"
header_end
cd "$name-$version"
PKG_CONFIG= ./configure --prefix=/tools
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

5
tools/satellites/curl.sat → graveyard/first_attempt/tools/satellites/curl.sat

@ -1,8 +1,9 @@
name=curl name=curl
version=7.40.0 version=7.44.0
dlextract "http://curl.haxx.se/download/$name-$version.tar.bz2" \ dlextract "http://curl.haxx.se/download/$name-$version.tar.bz2" \
"1efecb5b0e43c17d968f0d228bbbbbbd" "6b952ca00e5473b16a11f05f06aa8dae"
header_end
cd "$name-$version" cd "$name-$version"

7
tools/satellites/dejagnu.sat → graveyard/first_attempt/tools/satellites/dejagnu.sat

@ -1,8 +1,9 @@
name=dejagnu name=dejagnu
version=1.5.2 version=1.5.3
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"8386e04e362345f50ad169f052f4c4ab" "5bda2cdb1af51a80aecce58d6e42bd2f"
header_end
cd "$name-$version" cd "$name-$version"

3
tools/satellites/expect.sat → graveyard/first_attempt/tools/satellites/expect.sat

@ -1,8 +1,9 @@
name=expect name=expect
version=5.45 version=5.45
dlextract "http://sourceforge.net/projects/$name/files/Expect/$version/$name$version.tar.gz" \ dlextract "https://sourceforge.net/projects/$name/files/Expect/$version/$name$version.tar.gz" \
"44e1a4f4c877e9ddc5a542dfa7ecc92b" "44e1a4f4c877e9ddc5a542dfa7ecc92b"
header_end
cd "$name$version" cd "$name$version"

50
tools/satellites/extrafiles/busybox/busybox.config → graveyard/first_attempt/tools/satellites/extrafiles/busybox/busybox.config

@ -1,7 +1,7 @@
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Busybox version: 1.22.1 # Busybox version: 1.23.2
# Sun Dec 7 14:30:18 2014 # Thu Aug 27 07:40:27 2015
# #
CONFIG_HAVE_DOT_CONFIG=y CONFIG_HAVE_DOT_CONFIG=y
@ -12,7 +12,7 @@ CONFIG_HAVE_DOT_CONFIG=y
# #
# General Configuration # General Configuration
# #
# CONFIG_DESKTOP is not set CONFIG_DESKTOP=y
# CONFIG_EXTRA_COMPAT is not set # CONFIG_EXTRA_COMPAT is not set
# CONFIG_INCLUDE_SUSv2 is not set # CONFIG_INCLUDE_SUSv2 is not set
# CONFIG_USE_PORTABLE_CODE is not set # CONFIG_USE_PORTABLE_CODE is not set
@ -36,6 +36,8 @@ CONFIG_LAST_SUPPORTED_WCHAR=0
# CONFIG_UNICODE_BIDI_SUPPORT is not set # CONFIG_UNICODE_BIDI_SUPPORT is not set
# CONFIG_UNICODE_NEUTRAL_TABLE is not set # CONFIG_UNICODE_NEUTRAL_TABLE is not set
# CONFIG_UNICODE_PRESERVE_BROKEN is not set # CONFIG_UNICODE_PRESERVE_BROKEN is not set
# CONFIG_PAM is not set
CONFIG_FEATURE_USE_SENDFILE=y
# CONFIG_LONG_OPTS is not set # CONFIG_LONG_OPTS is not set
# CONFIG_FEATURE_DEVPTS is not set # CONFIG_FEATURE_DEVPTS is not set
# CONFIG_FEATURE_CLEAN_UP is not set # CONFIG_FEATURE_CLEAN_UP is not set
@ -73,6 +75,7 @@ CONFIG_EXTRA_LDLIBS=""
# #
# CONFIG_DEBUG is not set # CONFIG_DEBUG is not set
# CONFIG_DEBUG_PESSIMIZE is not set # CONFIG_DEBUG_PESSIMIZE is not set
# CONFIG_UNIT_TEST is not set
# CONFIG_WERROR is not set # CONFIG_WERROR is not set
CONFIG_NO_DEBUG_LIB=y CONFIG_NO_DEBUG_LIB=y
# CONFIG_DMALLOC is not set # CONFIG_DMALLOC is not set
@ -183,6 +186,7 @@ CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_HOSTID=y CONFIG_HOSTID=y
CONFIG_ID=y CONFIG_ID=y
CONFIG_GROUPS=y CONFIG_GROUPS=y
CONFIG_SHUF=y
CONFIG_TEST=y CONFIG_TEST=y
CONFIG_FEATURE_TEST_64=y CONFIG_FEATURE_TEST_64=y
CONFIG_TOUCH=y CONFIG_TOUCH=y
@ -191,6 +195,7 @@ CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_TR=y CONFIG_TR=y
CONFIG_FEATURE_TR_CLASSES=y CONFIG_FEATURE_TR_CLASSES=y
CONFIG_FEATURE_TR_EQUIV=y CONFIG_FEATURE_TR_EQUIV=y
CONFIG_UNLINK=y
CONFIG_BASE64=y CONFIG_BASE64=y
# CONFIG_WHO is not set # CONFIG_WHO is not set
# CONFIG_USERS is not set # CONFIG_USERS is not set
@ -298,6 +303,11 @@ CONFIG_FEATURE_WC_LARGE=y
CONFIG_WHOAMI=y CONFIG_WHOAMI=y
CONFIG_YES=y CONFIG_YES=y
#
# Common options
#
CONFIG_FEATURE_VERBOSE=y
# #
# Common options for cp and mv # Common options for cp and mv
# #
@ -384,6 +394,9 @@ CONFIG_FEATURE_VI_SETOPTS=y
CONFIG_FEATURE_VI_SET=y CONFIG_FEATURE_VI_SET=y
CONFIG_FEATURE_VI_WIN_RESIZE=y CONFIG_FEATURE_VI_WIN_RESIZE=y
CONFIG_FEATURE_VI_ASK_TERMINAL=y CONFIG_FEATURE_VI_ASK_TERMINAL=y
CONFIG_FEATURE_VI_UNDO=y
CONFIG_FEATURE_VI_UNDO_QUEUE=y
CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256
CONFIG_FEATURE_ALLOW_EXEC=y CONFIG_FEATURE_ALLOW_EXEC=y
# #
@ -400,6 +413,7 @@ CONFIG_FEATURE_FIND_MAXDEPTH=y
CONFIG_FEATURE_FIND_NEWER=y CONFIG_FEATURE_FIND_NEWER=y
CONFIG_FEATURE_FIND_INUM=y CONFIG_FEATURE_FIND_INUM=y
CONFIG_FEATURE_FIND_EXEC=y CONFIG_FEATURE_FIND_EXEC=y
CONFIG_FEATURE_FIND_EXEC_PLUS=y
CONFIG_FEATURE_FIND_USER=y CONFIG_FEATURE_FIND_USER=y
CONFIG_FEATURE_FIND_GROUP=y CONFIG_FEATURE_FIND_GROUP=y
CONFIG_FEATURE_FIND_NOT=y CONFIG_FEATURE_FIND_NOT=y
@ -421,6 +435,7 @@ CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
# #
# Init Utilities # Init Utilities
@ -457,6 +472,7 @@ CONFIG_INIT_TERMINAL_TYPE=""
# CONFIG_ADDUSER is not set # CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set # CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_FEATURE_CHECK_NAMES is not set # CONFIG_FEATURE_CHECK_NAMES is not set
CONFIG_LAST_ID=0
CONFIG_FIRST_SYSTEM_ID=0 CONFIG_FIRST_SYSTEM_ID=0
CONFIG_LAST_SYSTEM_ID=0 CONFIG_LAST_SYSTEM_ID=0
# CONFIG_ADDGROUP is not set # CONFIG_ADDGROUP is not set
@ -468,7 +484,6 @@ CONFIG_LAST_SYSTEM_ID=0
# CONFIG_GETTY is not set # CONFIG_GETTY is not set
# CONFIG_LOGIN is not set # CONFIG_LOGIN is not set
# CONFIG_LOGIN_SESSION_AS_CHILD is not set # CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_PAM is not set
# CONFIG_LOGIN_SCRIPTS is not set # CONFIG_LOGIN_SCRIPTS is not set
# CONFIG_FEATURE_NOLOGIN is not set # CONFIG_FEATURE_NOLOGIN is not set
# CONFIG_FEATURE_SECURETTY is not set # CONFIG_FEATURE_SECURETTY is not set
@ -526,6 +541,7 @@ CONFIG_DEFAULT_DEPMOD_FILE=""
# Linux System Utilities # Linux System Utilities
# #
# CONFIG_BLOCKDEV is not set # CONFIG_BLOCKDEV is not set
# CONFIG_FATATTR is not set
# CONFIG_FSTRIM is not set # CONFIG_FSTRIM is not set
# CONFIG_MDEV is not set # CONFIG_MDEV is not set
# CONFIG_FEATURE_MDEV_CONF is not set # CONFIG_FEATURE_MDEV_CONF is not set
@ -597,6 +613,7 @@ CONFIG_DEFAULT_DEPMOD_FILE=""
# CONFIG_SCRIPTREPLAY is not set # CONFIG_SCRIPTREPLAY is not set
# CONFIG_SETARCH is not set # CONFIG_SETARCH is not set
# CONFIG_SWAPONOFF is not set # CONFIG_SWAPONOFF is not set
# CONFIG_FEATURE_SWAPON_DISCARD is not set
# CONFIG_FEATURE_SWAPON_PRI is not set # CONFIG_FEATURE_SWAPON_PRI is not set
# CONFIG_SWITCH_ROOT is not set # CONFIG_SWITCH_ROOT is not set
# CONFIG_UMOUNT is not set # CONFIG_UMOUNT is not set
@ -631,6 +648,10 @@ CONFIG_DEFAULT_DEPMOD_FILE=""
# Miscellaneous Utilities # Miscellaneous Utilities
# #
# CONFIG_CONSPY is not set # CONFIG_CONSPY is not set
# CONFIG_CROND is not set
# CONFIG_FEATURE_CROND_D is not set
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR=""
# CONFIG_LESS is not set # CONFIG_LESS is not set
CONFIG_FEATURE_LESS_MAXLINES=0 CONFIG_FEATURE_LESS_MAXLINES=0
# CONFIG_FEATURE_LESS_BRACKETS is not set # CONFIG_FEATURE_LESS_BRACKETS is not set
@ -645,6 +666,8 @@ CONFIG_FEATURE_LESS_MAXLINES=0
# CONFIG_NANDDUMP is not set # CONFIG_NANDDUMP is not set
# CONFIG_RFKILL is not set # CONFIG_RFKILL is not set
# CONFIG_SETSERIAL is not set # CONFIG_SETSERIAL is not set
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_UBIATTACH is not set # CONFIG_UBIATTACH is not set
# CONFIG_UBIDETACH is not set # CONFIG_UBIDETACH is not set
# CONFIG_UBIMKVOL is not set # CONFIG_UBIMKVOL is not set
@ -667,10 +690,6 @@ CONFIG_FEATURE_BEEP_LENGTH_MS=0
# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set # CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
# CONFIG_FEATURE_CHAT_CLR_ABORT is not set # CONFIG_FEATURE_CHAT_CLR_ABORT is not set
# CONFIG_CHRT is not set # CONFIG_CHRT is not set
# CONFIG_CROND is not set
# CONFIG_FEATURE_CROND_D is not set
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR=""
# CONFIG_CRONTAB is not set # CONFIG_CRONTAB is not set
# CONFIG_DC is not set # CONFIG_DC is not set
# CONFIG_FEATURE_DC_LIBM is not set # CONFIG_FEATURE_DC_LIBM is not set
@ -712,8 +731,6 @@ CONFIG_FEATURE_CROND_DIR=""
# CONFIG_RX is not set # CONFIG_RX is not set
# CONFIG_SETSID is not set # CONFIG_SETSID is not set
# CONFIG_STRINGS is not set # CONFIG_STRINGS is not set
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_TIME is not set # CONFIG_TIME is not set
# CONFIG_TIMEOUT is not set # CONFIG_TIMEOUT is not set
# CONFIG_TTYSIZE is not set # CONFIG_TTYSIZE is not set
@ -749,13 +766,13 @@ CONFIG_FEATURE_CROND_DIR=""
# CONFIG_FTPD is not set # CONFIG_FTPD is not set
# CONFIG_FEATURE_FTP_WRITE is not set # CONFIG_FEATURE_FTP_WRITE is not set
# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set # CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
# CONFIG_FEATURE_FTP_AUTHENTICATION is not set
# CONFIG_FTPGET is not set # CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set # CONFIG_FTPPUT is not set
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set # CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
# CONFIG_HOSTNAME is not set # CONFIG_HOSTNAME is not set
# CONFIG_HTTPD is not set # CONFIG_HTTPD is not set
# CONFIG_FEATURE_HTTPD_RANGES is not set # CONFIG_FEATURE_HTTPD_RANGES is not set
# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set # CONFIG_FEATURE_HTTPD_SETUID is not set
# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set # CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set # CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
@ -812,6 +829,7 @@ CONFIG_IFUPDOWN_IFSTATE_PATH=""
# CONFIG_NSLOOKUP is not set # CONFIG_NSLOOKUP is not set
# CONFIG_NTPD is not set # CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set # CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_FEATURE_NTPD_CONF is not set
# CONFIG_PSCAN is not set # CONFIG_PSCAN is not set
# CONFIG_ROUTE is not set # CONFIG_ROUTE is not set
# CONFIG_SLATTACH is not set # CONFIG_SLATTACH is not set
@ -845,6 +863,7 @@ CONFIG_IFUPDOWN_IFSTATE_PATH=""
CONFIG_DHCPD_LEASES_FILE="" CONFIG_DHCPD_LEASES_FILE=""
# CONFIG_UDHCPC is not set # CONFIG_UDHCPC is not set
# CONFIG_FEATURE_UDHCPC_ARPING is not set # CONFIG_FEATURE_UDHCPC_ARPING is not set
# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
# CONFIG_FEATURE_UDHCP_PORT is not set # CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0 CONFIG_UDHCP_DEBUG=0
# CONFIG_FEATURE_UDHCP_RFC3397 is not set # CONFIG_FEATURE_UDHCP_RFC3397 is not set
@ -854,11 +873,11 @@ CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
# CONFIG_UDPSVD is not set # CONFIG_UDPSVD is not set
# CONFIG_VCONFIG is not set # CONFIG_VCONFIG is not set
CONFIG_WGET=y # CONFIG_WGET is not set
CONFIG_FEATURE_WGET_STATUSBAR=y # CONFIG_FEATURE_WGET_STATUSBAR is not set
CONFIG_FEATURE_WGET_AUTHENTICATION=y # CONFIG_FEATURE_WGET_AUTHENTICATION is not set
# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
CONFIG_FEATURE_WGET_TIMEOUT=y # CONFIG_FEATURE_WGET_TIMEOUT is not set
# CONFIG_ZCIP is not set # CONFIG_ZCIP is not set
# #
@ -963,6 +982,7 @@ CONFIG_ASH_GETOPTS=y
CONFIG_ASH_BUILTIN_ECHO=y CONFIG_ASH_BUILTIN_ECHO=y
CONFIG_ASH_BUILTIN_PRINTF=y CONFIG_ASH_BUILTIN_PRINTF=y
CONFIG_ASH_BUILTIN_TEST=y CONFIG_ASH_BUILTIN_TEST=y
CONFIG_ASH_HELP=y
CONFIG_ASH_CMDCMD=y CONFIG_ASH_CMDCMD=y
# CONFIG_ASH_MAIL is not set # CONFIG_ASH_MAIL is not set
# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set # CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set

31
tools/satellites/extrafiles/ca-certificates/make-ca.sh → graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-ca.sh

@ -10,26 +10,16 @@
# #
# Version 20120211 # Version 20120211
if [ "$1" ]; then certdata="certdata.txt"
certdata="$1"
else
certdata="./certdata.txt"
fi
if [ "$2" ]; then
certdir="$2"
else
certdir="./certs"
fi
if [ ! -r $certdata ]; then if [ ! -r $certdata ]; then
echo "Can't find certdata" 1>&2 echo "$certdata must be in the local directory"
exit 1 exit 1
fi fi
TEMPDIR=$(mktemp -d) TEMPDIR=$(mktemp -d)
TRUSTATTRIBUTES="CKA_TRUST_SERVER_AUTH" BUNDLE="ca-certificates.crt"
CONVERTSCRIPT="./make-cert.pl" CONVERTSCRIPT="make-cert.pl"
mkdir "${TEMPDIR}/certs" mkdir "${TEMPDIR}/certs"
@ -53,8 +43,8 @@ done
unset CERTBEGINLIST CERTDATA CERTENDLIST certbegin certend unset CERTBEGINLIST CERTDATA CERTENDLIST certbegin certend
mkdir -p "$certdir" mkdir -p certs
rm -f "$certdir/*" # Make sure the directory is clean rm -f certs/* # Make sure the directory is clean
for tempfile in ${TEMPDIR}/certs/*.tmp; do for tempfile in ${TEMPDIR}/certs/*.tmp; do
# Make sure that the cert is trusted... # Make sure that the cert is trusted...
@ -77,19 +67,18 @@ for tempfile in ${TEMPDIR}/certs/*.tmp; do
cp "${tempfile}" tempfile.cer cp "${tempfile}" tempfile.cer
perl ${CONVERTSCRIPT} > tempfile.crt perl ${CONVERTSCRIPT} > tempfile.crt
keyhash=$(openssl x509 -noout -in tempfile.crt -hash) keyhash=$(openssl x509 -noout -in tempfile.crt -hash)
mv tempfile.crt "$certdir/${keyhash}.pem" mv tempfile.crt "certs/${keyhash}.pem"
rm -f tempfile.cer "${tempfile}" rm -f tempfile.cer "${tempfile}"
echo "Created ${keyhash}.pem" echo "Created ${keyhash}.pem"
done done
# Remove blacklisted files # Remove blacklisted files
# MD5 Collision Proof of Concept CA # MD5 Collision Proof of Concept CA
if test -f "$certdir/8f111d69.pem"; then if test -f certs/8f111d69.pem; then
echo "Certificate 8f111d69 is not trusted! Removing..." echo "Certificate 8f111d69 is not trusted! Removing..."
rm -f "$certdir/8f111d69.pem" rm -f certs/8f111d69.pem
fi fi
# Finally, generate the bundle and clean up. # Finally, generate the bundle and clean up.
cat "$certdir"/*.pem > "$certdir/ca-certificates.crt" cat certs/*.pem > ${BUNDLE}
echo "Created ca-certificates.crt"
rm -r "${TEMPDIR}" rm -r "${TEMPDIR}"

0
tools/satellites/extrafiles/ca-certificates/make-cert.pl → graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/make-cert.pl

53
graveyard/first_attempt/tools/satellites/extrafiles/ca-certificates/remove-expired-certs.sh

@ -0,0 +1,53 @@
#!/bin/sh
# Begin /usr/sbin/remove-expired-certs.sh
#
# Version 20120211
# Make sure the date is parsed correctly on all systems
mydate()
{
local y=$( echo $1 | cut -d" " -f4 )
local M=$( echo $1 | cut -d" " -f1 )
local d=$( echo $1 | cut -d" " -f2 )
local m
if [ ${d} -lt 10 ]; then d="0${d}"; fi
case $M in
Jan) m="01";;
Feb) m="02";;
Mar) m="03";;
Apr) m="04";;
May) m="05";;
Jun) m="06";;
Jul) m="07";;
Aug) m="08";;
Sep) m="09";;
Oct) m="10";;
Nov) m="11";;
Dec) m="12";;
esac
certdate="${y}${m}${d}"
}
OPENSSL=/usr/bin/openssl
DIR=/etc/ssl/certs
if [ $# -gt 0 ]; then
DIR="$1"
fi
certs=$( find ${DIR} -type f -name "*.pem" -o -name "*.crt" )
today=$( date +%Y%m%d )
for cert in $certs; do
notafter=$( $OPENSSL x509 -enddate -in "${cert}" -noout )
date=$( echo ${notafter} | sed 's/^notAfter=//' )
mydate "$date"
if [ ${certdate} -lt ${today} ]; then
echo "${cert} expired on ${certdate}! Removing..."
rm -f "${cert}"
fi
done

21
graveyard/first_attempt/tools/satellites/extrafiles/stow/etc-stowrc.patch

@ -0,0 +1,21 @@
diff -ur stow-2.2.0-orig/bin/stow.in stow-2.2.0/bin/stow.in
--- stow-2.2.0-orig/bin/stow.in 2015-08-20 18:05:18.543173733 +0200
+++ stow-2.2.0/bin/stow.in 2015-08-20 18:05:58.844669895 +0200
@@ -577,15 +577,14 @@
# Parameters: none
# Returns : a list of default options
# Throws : no exceptions
-# Comments : prepends the contents of '~/.stowrc' and '.stowrc' to the command
+# Comments : prepends the contents of '/etc/stowrc', '~/.stowrc' and '.stowrc' to the command
# : line so they get parsed just like normal arguments. (This was
# : hacked in so that Emil and I could set different preferences).
#=============================================================================
sub get_config_file_options {
my @defaults = ();
- for my $file ("$ENV{HOME}/.stowrc", '.stowrc') {
+ for my $file ('/etc/stowrc', "$ENV{HOME}/.stowrc", '.stowrc') {
if (-r $file) {
- warn "Loading defaults from $file\n";
open my $FILE, '<', $file
or die "Could not open $file for reading\n";
while (my $line = <$FILE>){

0
tools/satellites/extrafiles/stow/fix-warning-message-perl5.20.patch → graveyard/first_attempt/tools/satellites/extrafiles/stow/fix-warning-message-perl5.20.patch

7
tools/satellites/gawk.sat → graveyard/first_attempt/tools/satellites/gawk.sat

@ -1,8 +1,9 @@
name=gawk name=gawk
version=4.1.1 version=4.1.3
dlextract "http://ftp.gnu.org/gnu/gawk/gawk-4.1.1.tar.xz" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"a2a26543ce410eb74bc4a508349ed09a" "97f8f44149ea9b9e94be97f68988be87"
header_end
cd "$name-$version" cd "$name-$version"

37
tools/satellites/gcc-1.sat → graveyard/first_attempt/tools/satellites/gcc-1.sat

@ -1,25 +1,26 @@
name=gcc name=gcc
version=4.9.2 version=5.2.0
gmp_version=6.0.0 gmp_shortver=6.0.0
gmp_minver=a gmp_version=${gmp_shortver}a
mpfr_version=3.1.2 mpfr_version=3.1.3
mpc_version=1.0.2 mpc_version=1.0.3
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"4df8ee253b7f3863ad0b86359cd39c43" "a51bcfeb3da7dd4c623e27207ed43467"
download "http://ftp.gnu.org/gnu/gmp/gmp-$gmp_version$gmp_minver.tar.xz" \ download "https://ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76" "1e6da4e434553d2811437aa42c7f7c76"
download "http://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \ download "https://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \
"e3d203d188b8fe60bb6578dd3152e05c" "6969398cd2fbc56a6af570b5273c56a9"
download "http://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \ download "https://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \
"68fadff3358fb3e7976c7a398a0af4c3" "d6a1d5f8ddea3abd2cc3e98f58352d26"
header_end
cd "$name-$version" cd "$name-$version"
extract "gmp-$gmp_version$gmp_minver.tar.xz" extract "gmp-$gmp_version.tar.xz"
extract "mpfr-$mpfr_version.tar.xz" extract "mpfr-$mpfr_version.tar.xz"
extract "mpc-$mpc_version.tar.gz" extract "mpc-$mpc_version.tar.gz"
mv "gmp-$gmp_version" gmp mv "gmp-$gmp_shortver" gmp
mv "mpfr-$mpfr_version" mpfr mv "mpfr-$mpfr_version" mpfr
mv "mpc-$mpc_version" mpc mv "mpc-$mpc_version" mpc
@ -37,13 +38,12 @@ do
touch $file.orig touch $file.orig
done done
sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
mkdir "../$name-build"; cd "../$name-build" mkdir "../$name-build"; cd "../$name-build"
"../$name-$version/configure" \ "../$name-$version/configure" \
--target="$target" \ --target="$target" \
--prefix=/tools \ --prefix=/tools \
--with-glibc-version=2.11 \
--with-sysroot="$dir_install" \ --with-sysroot="$dir_install" \
--with-newlib \ --with-newlib \
--without-headers \ --without-headers \
@ -56,13 +56,10 @@ mkdir "../$name-build"; cd "../$name-build"
--disable-threads \ --disable-threads \
--disable-libatomic \ --disable-libatomic \
--disable-libgomp \ --disable-libgomp \
--disable-libitm \
--disable-libquadmath \ --disable-libquadmath \
--disable-libsanitizer \
--disable-libssp \ --disable-libssp \
--disable-libvtv \ --disable-libvtv \
--disable-libcilkrts \ --disable-libstdcxx \
--disable-libstdc++-v3 \
--enable-languages=c,c++ --enable-languages=c,c++
make; make DESTDIR="$dir_install" install make; make DESTDIR="$dir_install" install

39
tools/satellites/gcc-2.sat → graveyard/first_attempt/tools/satellites/gcc-2.sat

@ -1,28 +1,32 @@
name=gcc name=gcc
version=4.9.2 version=5.2.0
gmp_version=6.0.0 gmp_shortver=6.0.0
gmp_minver=a gmp_version=${gmp_shortver}a
mpfr_version=3.1.2 mpfr_version=3.1.3
mpc_version=1.0.2 mpc_version=1.0.3
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"4df8ee253b7f3863ad0b86359cd39c43" "a51bcfeb3da7dd4c623e27207ed43467"
download "http://ftp.gnu.org/gnu/gmp/gmp-$gmp_version$gmp_minver.tar.xz" \ download "https://ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76" "1e6da4e434553d2811437aa42c7f7c76"
download "http://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \ download "https://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \
"e3d203d188b8fe60bb6578dd3152e05c" "6969398cd2fbc56a6af570b5273c56a9"
download "http://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \ download "https://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \
"68fadff3358fb3e7976c7a398a0af4c3" "d6a1d5f8ddea3abd2cc3e98f58352d26"
header_end
cd "$name-$version" cd "$name-$version"
extract "gmp-$gmp_version$gmp_minver.tar.xz" extract "gmp-$gmp_version.tar.xz"
extract "mpfr-$mpfr_version.tar.xz" extract "mpfr-$mpfr_version.tar.xz"
extract "mpc-$mpc_version.tar.gz" extract "mpc-$mpc_version.tar.gz"
mv "gmp-$gmp_version" gmp mv "gmp-$gmp_shortver" gmp
mv "mpfr-$mpfr_version" mpfr mv "mpfr-$mpfr_version" mpfr
mv "mpc-$mpc_version" mpc mv "mpc-$mpc_version" mpc
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
"$(dirname "$($target-gcc -print-libgcc-file-name)")/include-fixed/limits.h"
for file in \ for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do do
@ -37,11 +41,6 @@ do
touch $file.orig touch $file.orig
done done
sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
"`dirname "$($target-gcc -print-libgcc-file-name)"`/include-fixed/limits.h"
mkdir "../$name-build"; cd "../$name-build" mkdir "../$name-build"; cd "../$name-build"
CC="$target-gcc" \ CC="$target-gcc" \

10
tools/satellites/glibc.sat → graveyard/first_attempt/tools/satellites/glibc.sat

@ -1,17 +1,19 @@
name=glibc name=glibc
version=2.21 version=2.22
dlextract "http://ftp.gnu.org/gnu/libc/glibc-2.20.tar.xz" \ dlextract "https://ftp.gnu.org/gnu/libc/$name-$version.tar.xz" \
"948a6e06419a01bd51e97206861595b0" "e51e02bf552a0a1fbbdc948fb2f5e83c"
header_end
mkdir "$name-build"; cd "$name-build" mkdir "$name-build"; cd "$name-build"
"../$name-$version/configure" \ "../$name-$version/configure" \
--prefix=/tools \ --prefix=/tools \
--host="$target" \ --host="$target" \
--build="$(../glibc-2.20/scripts/config.guess)" \ --build="$(../$name-$version/scripts/config.guess)" \
--disable-profile \ --disable-profile \
--enable-kernel=2.6.32 \ --enable-kernel=2.6.32 \
--enable-obsolete-rpc \
--with-headers=/tools/include \ --with-headers=/tools/include \
libc_cv_forced_unwind=yes \ libc_cv_forced_unwind=yes \
libc_cv_ctors_header=yes \ libc_cv_ctors_header=yes \

8
tools/satellites/libstdc.sat → graveyard/first_attempt/tools/satellites/libstdcxx.sat

@ -1,8 +1,9 @@
name=gcc name=gcc
version=4.9.2 version=5.2.0
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/gcc/$name-$version/$name-$version.tar.bz2" \
"4df8ee253b7f3863ad0b86359cd39c43" "a51bcfeb3da7dd4c623e27207ed43467"
header_end
mkdir "$name-build"; cd "$name-build" mkdir "$name-build"; cd "$name-build"
@ -10,7 +11,6 @@ mkdir "$name-build"; cd "$name-build"
--host="$target" \ --host="$target" \
--prefix=/tools \ --prefix=/tools \
--disable-multilib \ --disable-multilib \
--disable-shared \
--disable-nls \ --disable-nls \
--disable-libstdcxx-threads \ --disable-libstdcxx-threads \
--disable-libstdcxx-pch \ --disable-libstdcxx-pch \

13
graveyard/first_attempt/tools/satellites/linux-api.sat

@ -0,0 +1,13 @@
name=linux
version=4.1.6
dlextract "https://www.kernel.org/pub/$name/kernel/v4.x/$name-$version.tar.xz" \
"1dae0c808e34164cab3dfd57be88bd53"
header_end
cd "$name-$version"
make mrproper
make INSTALL_HDR_PATH="$dir_install/tools" headers_install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

3
tools/satellites/m4.sat → graveyard/first_attempt/tools/satellites/m4.sat

@ -1,8 +1,9 @@
name=m4 name=m4
version=1.4.17 version=1.4.17
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz" \
"12a3c829301a4fd6586a57d3fcf196dc" "12a3c829301a4fd6586a57d3fcf196dc"
header_end
cd "$name-$version" cd "$name-$version"

3
tools/satellites/make.sat → graveyard/first_attempt/tools/satellites/make.sat

@ -1,8 +1,9 @@
name=make name=make
version=4.1 version=4.1
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"57a7a224a822f94789a587ccbcedff69" "57a7a224a822f94789a587ccbcedff69"
header_end
cd "$name-$version" cd "$name-$version"

8
tools/satellites/openssl.sat → graveyard/first_attempt/tools/satellites/openssl.sat

@ -1,13 +1,13 @@
name=openssl name=openssl
version=1.0.2 version=1.0.2d
dlextract "https://www.openssl.org/source/$name-$version.tar.gz" \ dlextract "https://www.openssl.org/source/$name-$version.tar.gz" \
"f7175c9cd3c39bb1907ac8bba9df8ed3" "38dd619b2e77cbac69b99f52a053d25a"
header_end
cd "$name-$version" cd "$name-$version"
./config --prefix=/tools shared ./config --prefix=/tools shared
# This makefile fails when building in parallel make all; make INSTALL_PREFIX="$dir_install" install_sw
make -j1 all; make -j1 INSTALL_PREFIX="$dir_install" install_sw
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: # vim:set tabstop=4 shiftwidth=4 syntax=sh et:

5
tools/satellites/perl.sat → graveyard/first_attempt/tools/satellites/perl.sat

@ -1,8 +1,9 @@
name=perl name=perl
version=5.20.1 version=5.22.0
dlextract "http://www.cpan.org/src/5.0/$name-$version.tar.gz" \ dlextract "http://www.cpan.org/src/5.0/$name-$version.tar.gz" \
"7a195abb7d6769f751e90c7d30dcf2e0" "e32cb6a8dda0084f2a43dac76318d68d"
header_end
cd "$name-$version" cd "$name-$version"

5
tools/satellites/stow.sat → graveyard/first_attempt/tools/satellites/stow.sat

@ -1,13 +1,16 @@
name=stow name=stow
version=2.2.0 version=2.2.0
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \ dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2" \
"5bb56592eff9aaf9dfb6c975b3004240" "5bb56592eff9aaf9dfb6c975b3004240"
extrafile "fix-warning-message-perl5.20.patch" extrafile "fix-warning-message-perl5.20.patch"
extrafile "etc-stowrc.patch"
header_end
cd "$name-$version" cd "$name-$version"
patch -p1 -i "../fix-warning-message-perl5.20.patch" patch -p1 -i "../fix-warning-message-perl5.20.patch"
patch -p1 -i "../etc-stowrc.patch"
./configure --prefix=/tools ./configure --prefix=/tools
make DESTDIR="$dir_install" install-exec-am install-pmDATA install-dist_pmstowDATA make DESTDIR="$dir_install" install-exec-am install-pmDATA install-dist_pmstowDATA

8
tools/satellites/tcl.sat → graveyard/first_attempt/tools/satellites/tcl-core.sat

@ -1,9 +1,11 @@
name=tcl name=tcl
fullname=$name-core
majver=8.6 majver=8.6
version=$majver.3 version=$majver.4
dlextract "http://prdownloads.sourceforge.net/$name/$name$version-src.tar.gz" \ dlextract "https://sourceforge.net/projects/tcl/files/Tcl/$version/$fullname$version-src.tar.gz" \
"db382feca91754b7f93da16dc4cdad1f" "8b8c9d85469d8dbe32e51117b8ef11e3"
header_end
cd "$name$version/unix" cd "$name$version/unix"

28
tools/version-check.sh → graveyard/first_attempt/tools/version-check.sh

@ -1,24 +1,34 @@
#!/bin/bash #!/bin/bash
# Simple script to list version numbers of critical development tools # Simple script to list version numbers of critical development tools
# Copied from LFS 7.6 # Copied from LFS 7.7
export LC_ALL=C export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4 #TODO: check if it's necessary for building the temporary tools. bash --version | head -n1 | cut -d" " -f2-4
echo "/bin/sh -> `readlink -f /bin/sh`" echo "/bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3- echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1 bison --version | head -n1
if [ -e /usr/bin/yacc ];
then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"; if [ -h /usr/bin/yacc ]; then
else echo "yacc not found"; fi echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
elif [ -x /usr/bin/yacc ]; then
echo yacc is `/usr/bin/yacc --version | head -n1`
else
echo "yacc not found"
fi
bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6- bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2 echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1 diff --version | head -n1
find --version | head -n1 find --version | head -n1
gawk --version | head -n1 gawk --version | head -n1
if [ -e /usr/bin/awk ];
then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`"; if [ -h /usr/bin/awk ]; then
else echo "awk not found"; fi echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
elif [ -x /usr/bin/awk ]; then
echo yacc is `/usr/bin/awk --version | head -n1`
else
echo "awk not found"
fi
gcc --version | head -n1 gcc --version | head -n1
g++ --version | head -n1 g++ --version | head -n1
@ -32,6 +42,7 @@ patch --version | head -n1
echo Perl `perl -V:version` echo Perl `perl -V:version`
sed --version | head -n1 sed --version | head -n1
tar --version | head -n1 tar --version | head -n1
makeinfo --version | head -n1
xz --version | head -n1 xz --version | head -n1
curl --version | head -n1 curl --version | head -n1
@ -40,4 +51,3 @@ if [ -x dummy ]
then echo "g++ compilation OK"; then echo "g++ compilation OK";
else echo "g++ compilation failed"; fi else echo "g++ compilation failed"; fi
rm -f dummy.c dummy rm -f dummy.c dummy

106
graveyard/internaut

@ -0,0 +1,106 @@
#!/bin/sh -e
# This is a very hacky script to generate satellites.
# A honestly shitty attempt to auto-generate satellites.
astronaut="$(dirname "$0")/astronaut"
[ ! -f "$astronaut" ] && astronaut="astronaut"
# TODO: These variables won't always be valid
dir_build="$PWD/build"
dir_source="$PWD/source"
dir_install="$PWD/install"
tempdir="/tmp/internaut"
rm -rf "$tempdir"
mkdir -p "$tempdir"
intshell() {
# This is the most hacky part in the script, so bear with me.
# Why this is even a thing, is because I need two things:
# - Run some commands on start
# - Capture all input
# I'm sure "tee ouput | bash --rcfile filewithcommands" would effectively do the same thing, but fuck bash.
echo "Entering shell..."
cmdfifo="$tempdir/cmdfifo"
waitfifo="$tempdir/waitfifo"
mkfifo "$cmdfifo" 2> /dev/null || true
mkfifo "$waitfifo" 2> /dev/null || true
sh -s < "$cmdfifo" "$pkgfile" &
shpid=$!
echo ". \"$astronaut\"; set +e; echo \$PWD > \"$waitfifo\"; cat \"$waitfifo\"" > "$cmdfifo"
while ps -p $shpid > /dev/null; do
printf "$(cat "$waitfifo")> "
read cmd
case "$cmd" in
exit) ;;
!*) cmd="$(echo "$cmd" | cut -c 2-)" ;;
*) echo "$cmd" >> "$pkgfile" ;;
esac
echo "$cmd" > "$cmdfifo"
echo "echo \$PWD > \"$waitfifo\"; cat \"$waitfifo\"" > "$cmdfifo"
printf '' > "$waitfifo"
done
rm -f "$waitfifo" "$cmdfifo"
echo 'End shell.'
}
# The rest of this script is your olde gather info stuff.
printf 'Package name: '
read pkgname
pkgfile="$PWD/$pkgname.sat"
echo "# Generated with internaut. Please revise and edit." > "$pkgfile"
echo >> "$pkgfile"
printf 'Software name [enter for same as package]: '
read name
if [ "$name" ]; then
echo "name=$name" >> "$pkgfile"
else
echo "name=$pkgname" >> "$pkgfile"
fi
printf 'Version: '
read version
echo "version=$version" >> "$pkgfile"
printf 'Update URL: '
read update_url
echo "update_url=\"$update_url\"" >> "$pkgfile"
echo >> "$pkgfile"
# Now we ask the user to fetch the files they need.
echo '=> Header'
intshell
# Generate the md5sums, append them to the satellite, for manual inspection.
for file in $(find "$dir_source" -type f); do
printf '# ' >> "$pkgfile"
md5sum "$file" >> "$pkgfile"
done
printf 'header_end\n\n' >> "$pkgfile"
# Now we ask the user to build and install the program in question.
echo '=> Build'
intshell
# Replacing all the instances of the name and the version with the variable.
#sed -i -e "s/$name/\$name/g" -e "s/$version/\$version/g" -e "s/name=\$name/name=$name/g" -e "s/version=\$version/version=$version/g" "$pkgfile"
# TODO: Why dun dis shit work?
# The usual vim config line.
printf '\n# vim:set tabstop=4 shiftwidth=4 syntax=sh et:\n' >> "$pkgfile"
rm -rf "$tempdir"

6
graveyard/internaut.cause_of_death

@ -0,0 +1,6 @@
Internaut died on 14 november 2015.
It's latest known update was 31 october of the same year.
Birth date is unknown.
Cause of death:
I initially wanted something that could generate satellites easily, and after hacking together internaut, I may have used it one or two times, but that was it. I haven't touched it in a few months and it's latest update has been to change the way the astronaut program is found. It just isn't practical, and the implementation is awful. After deciding I wanted to make some changes to the way satellites work, I've come to realize that maintaining it is more work than it's worth.

13
satellites/astronaut.sat

@ -0,0 +1,13 @@
name=astronaut
version=$(date +%Y%m%d)
extrafile "astronaut"
extrafile "freshnaut"
extrafile "xbps-astronaut"
header_end
install -D "astronaut" "$dir_install/$prefix/bin/astronaut"
install -D "freshnaut" "$dir_install/$prefix/bin/freshnaut"
install -D "xbps-astronaut" "$dir_install/$prefix/bin/xbps-astronaut"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
satellites/bin/ctrulib.sat

@ -0,0 +1,13 @@
name=ctrulib
libname=libctru
version=0.6.0
update_url="https://sourceforge.net/projects/devkitpro/files/$libname/"
download "https://sourceforge.net/projects/devkitpro/files/$libname/$version/$libname-$version.tar.bz2" \
"2dffb7826ae3d30a32c9ad773b133a07"
header_end
mkdir -p "$dir_install/opt/devkitPRO/$libname"
extract "$libname-$version.tar.bz2" "$dir_install/opt/devkitPRO/$libname"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

14
satellites/bin/devkitarm.sat

@ -0,0 +1,14 @@
name=devkitARM
version=r44
update_url="https://sourceforge.net/projects/devkitpro/files/$name/"
download "https://sourceforge.net/projects/devkitpro/files/$name/${name}_$version/${name}_$version-x86_64-linux.tar.bz2" \
"1609d74be8e167c32d9a6194c704ae36"
extrafile "devkitarm.sh"
header_end
mkdir -p "$dir_install/opt/devkitPRO"
extract "${name}_$version-x86_64-linux.tar.bz2" "$dir_install/opt/devkitPRO"
install -Dm644 devkitarm.sh "$dir_install/etc/profile.d/devkitarm.sh"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

3
satellites/bin/extrafiles/devkitarm/devkitarm.sh

@ -0,0 +1,3 @@
export DEVKITPRO=/opt/devkitPRO
export DEVKITARM="$DEVKITPRO/devkitARM"
export PATH="$DEVKITARM/bin:$PATH"

13
satellites/bin/extrafiles/palemoon/palemoon.desktop

@ -0,0 +1,13 @@
[Desktop Entry]
Version=1.0
Name=Pale Moon Web Browser
Comment=Browse the World Wide Web
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=palemoon %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=palemoon
Categories=Network;WebBrowser;Internet
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

24
satellites/bin/palemoon.sat

@ -0,0 +1,24 @@
name=palemoon
version=25.7.3
update_url="https://linux.palemoon.org/download/mainline/"
download "https://linux.palemoon.org/files/$version/$name-$version.en-US.linux-x86_64.tar.bz2" \
"a0b11f6c3a78592fa27904dce9f7942c"
extrafile "palemoon.desktop"
header_end
mkdir -p "$dir_install/opt" "$dir_install/$prefix/bin" "$dir_install/$prefix/share/applications" \
"$dir_install/$prefix/share/icons/hicolor/16x16/apps" \
"$dir_install/$prefix/share/icons/hicolor/32x32/apps" \
"$dir_install/$prefix/share/icons/hicolor/48x48/apps" \
"$dir_install/$prefix/share/icons/hicolor/128x128/apps" \
extract "$name-$version.en-US.linux-x86_64.tar.bz2" "$dir_install/opt"
ln -s "/opt/$name/$name" "$dir_install/$prefix/bin/$name"
ln -s "/opt/$name/browser/chrome/icons/default/default16.png" "$dir_install/$prefix/share/icons/hicolor/16x16/apps/$name.png"
ln -s "/opt/$name/browser/chrome/icons/default/default32.png" "$dir_install/$prefix/share/icons/hicolor/32x32/apps/$name.png"
ln -s "/opt/$name/browser/chrome/icons/default/default48.png" "$dir_install/$prefix/share/icons/hicolor/48x48/apps/$name.png"
ln -s "/opt/$name/browser/icons/mozicon128.png" "$dir_install/$prefix/share/icons/hicolor/128x128/apps/$name.png"
cp "palemoon.desktop" "$dir_install/$prefix/share/applications/palemoon.desktop"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

11
satellites/bin/unetbootin.sat

@ -0,0 +1,11 @@
name=unetbootin
version=613
update_url="https://unetbootin.github.io/linux_download.html"
dlfile "https://launchpad.net/$name/trunk/$version/+download/$name-linux64-$version.bin" \
"d5d1cddc144fc64d8291c33ebd4f457b"
header_end
install -D $name-linux64-$version.bin "$dir_install/$prefix/bin/$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

1
satellites/extrafiles/astronaut

@ -0,0 +1 @@
../../../astronaut

16
satellites/functions/compile/cmake.sh

@ -0,0 +1,16 @@
compile_cmake_base() {
mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX="$prefix" -DCMAKE_BUILD_TYPE=Release $@ ..
make
}
compile_cmake() {
compile_cmake_base $@
make DESTDIR="$dir_install" install
}
compile_cmake_installbin() {
_func_file="$1"; shift
compile_cmake_base $@
install -D "$_func_file" "$dir_install/$prefix/bin/$_file"
}

4
satellites/functions/compile/python.sh

@ -0,0 +1,4 @@
compile_python() {
_func_ver="$1"; shift
python$_func_ver setup.py install --prefix="$prefix" --root="$dir_install" $@
}

6
satellites/functions/compile/qt.sh

@ -0,0 +1,6 @@
compile_qt() {
_func_ver="$1"; shift
qmake-qt$_func_ver PREFIX="$prefix" build_mode=release build_type=shared $@
make
make INSTALL_ROOT="$dir_install" install
}

10
satellites/functions/download/git.sh

@ -0,0 +1,10 @@
download_git() {
if [ ! -d "$dir_source/$name/$2" ]; then
rm -rf "$dir_source/$name/$2"
git clone --recursive --depth=1 -b "$2" "$1" "$dir_source/$name/$2"
else
cd "$dir_source/$name/$2"
git checkout "tags/$2"
cd "$OLDPWD"
fi
}

21
satellites/functions/vcs/git.sh

@ -0,0 +1,21 @@
vcs_git() {
if [ ! -d "$dir_source/$name/vcs" ]; then
rm -rf "$dir_source/$name/vcs"
git clone --recursive --depth=1 "$1" "$dir_source/$name/vcs"
vcs_compile=true
fi
}
_hook_git() {
cd "$dir_source/$name/vcs"
git remote update
if [ "$(git rev-parse @)" != "$(git rev-parse @{u})" ]; then
git pull
vcs_compile=true
fi
version="$(git rev-list HEAD --count)-$(git rev-parse --short HEAD)"
cd "$OLDPWD"
}
_hooks="_hook_git"

14
satellites/markdown.sat

@ -0,0 +1,14 @@
name=Markdown
version=1.0.1
update_url="https://daringfireball.net/projects/markdown/"
download "https://daringfireball.net/projects/downloads/${name}_$version.zip" \
"f17b3c2b2830c6fd2fe0098226e59a2f"
header_end
# TODO: Support other formats, such as zip, with the extract command.
extract "${name}_$version.zip" "" \
"unzip -qd {dst} {src}"
install -D "${name}_$version/$name.pl" "$dir_install/$prefix/bin/markdown"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

14
satellites/python3.4-crc16.sat

@ -0,0 +1,14 @@
import "compile/python"
name=pycrc16
version=0.1.1
update_url="https://api.github.com/repos/gennady/$name/tags"
dlextract "https://github.com/gennady/$name/archive/v$version.tar.gz" \
"0e6432cea6cd71a151cfe7fba96b67c9"
header_end
cd "$name-$version"
compile_python 3.4
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

14
satellites/python3.4-websocket-client.sat

@ -0,0 +1,14 @@
import "compile/python"
name=websocket-client
version=0.34.0
update_url="https://api.github.com/repos/liris/$name/tags"
dlextract "https://github.com/liris/$name/archive/v$version.tar.gz" \
"d7b222cb75877a5ddd5a0260f09af2e6"
header_end
cd "$name-$version"
compile_python 3.4
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

18
satellites/qwbfsmanager.sat

@ -0,0 +1,18 @@
# This program includes libfresh, but since it's only needed by this, and has seen no versioned release, I'll just include it in this package.
import "compile/qt"
import "download/git"
name=qwbfsmanager
version=1.2.5
update_url="https://api.github.com/repos/pasnox/$name/tags"
# Downloading this way to get dependencies.
download_git "https://github.com/pasnox/$name" "v$version"
header_end
getfile "v$version"; cd "v$version"
sed -i -e "s/CONFIG \*= fresh//" qwbfs.pro qwbfs/qwbfs.pro # Make sure we always use the bundled library.
compile_qt 5
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

14
satellites/speedtest-cli.sat

@ -0,0 +1,14 @@
import "compile/python"
name=speedtest-cli
version=0.3.4
update_url="https://api.github.com/repos/sivel/$name/tags"
dlextract "https://github.com/sivel/$name/archive/v$version.tar.gz" \
"45344501fab5e19492ae3ef1de4ed9ae"
header_end
cd "$name-$version"
compile_python 3.4
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

12
satellites/vcs/armips.sat

@ -0,0 +1,12 @@
import "vcs/git"
import "compile/cmake"
name=armips
vcs_git "https://github.com/Kingcom/$name"
header_end
getfile "$name"; cd "$name"
compile_cmake_installbin "$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
satellites/vcs/ctr.sat

@ -0,0 +1,13 @@
import "vcs/git"
name=ctr
vcs_git "https://github.com/b1l1s/$name"
header_end
getfile "$name"; cd "$name"
mkdir -p "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/include" "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/lib"
make DEVKITARM="$dir_install/opt/devkitPRO/devkitARM" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
satellites/vcs/ctrff.sat

@ -0,0 +1,13 @@
import "vcs/git"
name=ctrff
vcs_git "https://github.com/b1l1s/$name"
header_end
getfile "$name"; cd "$name"
mkdir -p "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/include" "$dir_install/opt/devkitPRO/devkitARM/arm-none-eabi/lib"
make DEVKITARM="$dir_install/opt/devkitPRO/devkitARM" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
satellites/vcs/ctrtool.sat

@ -0,0 +1,13 @@
import "vcs/git"
name=Project_CTR
vcs_git "https://github.com/profi200/$name"
header_end
getfile "$name"; cd "$name/ctrtool"
make
install -D ctrtool "$dir_install/$prefix/bin/ctrtool"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

12
satellites/vcs/ctrulib-git.sat

@ -0,0 +1,12 @@
import "vcs/git"
name=ctrulib
vcs_git "https://github.com/smealum/$name"
header_end
getfile "$name"; cd "$name/libctru"
make DEVKITPRO="$dir_install/opt/devkitPRO" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

1
satellites/vcs/functions

@ -0,0 +1 @@
../functions

13
satellites/vcs/makerom.sat

@ -0,0 +1,13 @@
import "vcs/git"
name=Project_CTR
vcs_git "https://github.com/profi200/$name"
header_end
getfile "$name"; cd "$name/makerom"
make
install -D makerom "$dir_install/$prefix/bin/makerom"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

12
satellites/vcs/sockfile.sat

@ -0,0 +1,12 @@
import "compile/cmake"
import "vcs/git"
name=sockfile
vcs_git "https://github.com/mid-kid/$name"
header_end
getfile "$name"; cd "$name"
compile_cmake_installbin "$name"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

51
tools/prepchroot

@ -1,51 +0,0 @@
#!/bin/sh
umask 022
set -e
if [ "$(id -u)" != "0" ]; then
echo "Please run this script as root" 1>&2
exit 1
fi
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
echo "Changing ownership of $rocket to root"
chown -R 0.0 "$rocket"
echo "Creating device nodes"
mkdir -p "$rocket/dev"
if cut -d' ' -f2 /proc/mounts | grep "$rocket/dev" > /dev/null; then
umount -R "$rocket/dev"
fi
mknod -m 600 "$rocket/dev/console" c 5 1 2> /dev/null || true
mknod -m 666 "$rocket/dev/null" c 1 3 2> /dev/null || true
echo "Creating directories"
install -dm750 "$rocket/root"
install -dm1777 "$rocket/tmp"
mkdir -p "$rocket/etc" "$rocket/usr/pkg" "$rocket/usr/sat"
#if [ "$(uname -m)" == "x86_64" ]; then
# ln -sf lib "$rocket/lib64"
# ln -sf lib "$rocket/usr/lib64"
#fi
echo "Creating temporary symlinks"
mkdir -p "$rocket/usr/pkg/tmp-coreutils/bin"
ln -sf ../../../../tools/bin/sh "$rocket/usr/pkg/tmp-coreutils/bin/sh"
ln -sf ../../../../tools/bin/pwd "$rocket/usr/pkg/tmp-coreutils/bin/pwd"
mkdir -p "$rocket/usr/pkg/tmp-bash/bin"
ln -sf ../../../../tools/bin/bash "$rocket/usr/pkg/tmp-bash/bin/bash"
mkdir -p "$rocket/usr/pkg/tmp-ca-certificates/etc/ssl"
ln -sf ../../../../../tools/lib/ssl/certs "$rocket/usr/pkg/tmp-ca-certificates/etc/ssl/certs"
mkdir -p "$rocket/usr/pkg/tmp-gcc/usr/lib"
ln -sf ../../../../../tools/lib/libgcc_s.so "$rocket/usr/pkg/tmp-gcc/usr/lib/libgcc_s.so"
ln -sf ../../../../../tools/lib/libgcc_s.so.1 "$rocket/usr/pkg/tmp-gcc/usr/lib/libgcc_s.so.1"
ln -sf ../../../../../tools/lib/libstdc++.so "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so"
ln -sf ../../../../../tools/lib/libstdc++.so.6 "$rocket/usr/pkg/tmp-gcc/usr/lib/libstdc++.so.6"
echo "Creating users and groups"
echo 'root:x:0:0:root:/root:/bin/sh' > "$rocket/etc/passwd"
echo 'root:x:0:' > "$rocket/etc/group"

12
tools/satellites/ca-certificates.sat

@ -1,12 +0,0 @@
name=ca-certificates
version=$(date +%d%m%Y)
dlfile "https://mxr.mozilla.org/mozilla-central/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1"
extrafile "make-ca.sh"
extrafile "make-cert.pl"
mkdir -p "$dir_install/tools/lib/ssl/certs"
sh ./make-ca.sh ./certdata.txt "$dir_install/tools/lib/ssl/certs"
c_rehash "$dir_install/tools/lib/ssl/certs"
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

12
tools/satellites/check.sat

@ -1,12 +0,0 @@
name=check
version=0.9.14
dlextract "http://sourceforge.net/projects/$name/files/$name/$version/$name-$version.tar.gz" \
"38263d115d784c17aa3b959ce94be8b8"
cd "$name-$version"
PKG_CONFIG= ./configure --prefix=/tools
make; make DESTDIR="$dir_install" install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:

13
tools/satellites/linux-api.sat

@ -1,13 +0,0 @@
srcname=linux
name=$srcname-api
version=3.19
dlextract "https://www.kernel.org/pub/$srcname/kernel/v3.x/$srcname-$version.tar.xz" \
"ce49828adecf8908eb3a9ffc5b860d44"
cd "$srcname-$version"
make mrproper
make INSTALL_HDR_PATH="$dir_install/tools" headers_install
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:
Loading…
Cancel
Save