1
0
This commit is contained in:
dtb 2021-12-30 10:06:52 -05:00
parent a98278a541
commit ca348329f1
8 changed files with 93 additions and 20 deletions

3
lsd/dist/config.sh vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/false
MUSL_UPSTREAM="git://git.musl-libc.org/musl"

View File

@ -1,19 +1,16 @@
.TH TRINITX 7
.SH PRONUNCIATION
Trinity, but replace the final syllable with tech.
"Try LSD"
.SH SYNOPSIS
.I Trinitx
.I TriLSD
is a UNIX-like software distribution built upon the Linux kernel and the
musl C standard library, with nearly all configuration options left to the
user's own device.
.SH BASE SYSTEM
.I Trinitx
.I TriLSD
explicitly relies on the existence of the following programs and
packages:
dash(1),
@ -26,24 +23,40 @@ bsdtar(1),
and util-linux.
.PP
In addition,
.I Trinitx
.I TriLSD
needs a core utilities package.
The GNU coreutils are a popular choice but Busybox or your own may be used.
.PP
.I Trinitx
.I TriLSD
also needs an initialization system.
OpenRC is the suggested choice but others may be used.
SystemD is discouraged; it's mentioned for its popularity and frowned upon for
its generally lax security.
.SH HISTORY
.SH PACKAGE MANAGEMENT
.I TriLSD
does not come with a package manager; the user may choose whatever
system-independent package manager they prefer.
.PP
Certain system tools that aren't necessarily packaged in system-independent
package managers (pkgsrc comes to mind) can be updated with the
.RB try (1)
command.
.SH CONTRIBUTING
Pay attention to projects' guidelines for distributions.
.PP
musl guidelines: https://wiki.musl-libc.org/guidelines-for-distributions.html
.SH HISTORY
The
.I Trinitx
project was started 2021-12-28.
.I TriLSD
project was started 2021-12-28 as Trinitx.
.SH COPYRIGHT
.I Trinitx
.I TriLSD
documentation and all in-house tools are part of the public domain.
Components of the distribution are of course subject to their own licenses.
.SH SEE ALSO
.RB try (1)

55
lsd/dist/documentation/try.1 vendored Normal file
View File

@ -0,0 +1,55 @@
.TH TRINITX 1
.SH NAME
try \- distribution management
.SH SYNOPSIS
.B try
.RB { install , sync_musl , unrepo }
.SH DESCRIPTION
.I try
exists to conduct system tasks normally conducted by operating systems
themselves and for which there's no easy alternative (though the system is not
tightly coupled with these utilities and they can easily be replaced).
.SH FUNCTIONS
.SS INSTALL
Installs the software distribution base into an environment variable specified
prefix. If
.I install
is not called in the form
.IP
\fCPREFIX=/ try install\fP
.LP
it will print a diagnostic message and exit; PREFIX must not be empty.
.SS SYNC_MUSL
Fetches musl from the upstream source and installs it into the PREFIX. PREFIX
may not be specified but behavior will be unspecified (probably function as if
PREFIX is '/') if it's not.
.SS UNREPO
Deletes git repository files from PREFIX if they exist; this is a
post-installation task and need only be performed once. PREFIX may not be
specified; if it isn't, it'll function as if PREFIX is '/'.
.SH CONFIGURATION
.I try
may be configured via
.B config.sh
in the same directory.
.SH LOCATIONS
.I try
distribution-specific files are always located in $PREFIX/dist.
For example, the
.I try
script is always at $PREFIX/dist/try, and configuration is always at
$PREFIX/dist/config.sh.
.SH COPYRIGHT
Public domain.
.SH SEE ALSO
.RB trilsd (7)

2
lsd/dist/install vendored
View File

@ -1,4 +1,4 @@
#!/bin/true
#!/bin/false
set -e
depend_on nonzero

8
lsd/dist/macro.sh vendored
View File

@ -1,7 +1,4 @@
#!/bin/true
# constant definitions
MUSL_UPSTREAM="git://git.musl-libc.org/musl"
#!/bin/false
depend_on(){
! command -v "$1" >/dev/null \
@ -15,6 +12,7 @@ fetch_upstream(){
scheme="$(scheme_from_uri "$url")"
case "$scheme" in
git)
depend_on git
git clone "$url"
;;
*)
@ -24,6 +22,8 @@ fetch_upstream(){
esac
}
depend_on cut
scheme_from_uri(){
# There are no colons in scheme names and no ways to separate schemes
# from scheme-specific content without colons (RFC 3986).

2
lsd/dist/sync_musl vendored
View File

@ -1,4 +1,4 @@
#!/bin/true
#!/bin/false
set -e
depend_on cd

View File

4
lsd/dist/unrepo vendored
View File

@ -1,4 +1,6 @@
#!/bin/true
#!/bin/false
depend_on rm
rm -rf "$PREFIX/.git"
rm -f "$PREFIX/LICENSE"