Compare commits
13 Commits
0.0.1
...
5f4c96bb0a
Author | SHA1 | Date | |
---|---|---|---|
5f4c96bb0a | |||
7bc5733dea | |||
7cd36a43c1 | |||
b562e0921e | |||
019c24509f | |||
a32f402bea | |||
e148e8fe18 | |||
bfe4ff3bce | |||
fad4cd8c44 | |||
0bf88712b3 | |||
df3313798e | |||
5874a9e92c | |||
8b68f3a3ce |
27
Formats.md
Normal file
27
Formats.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Formats
|
||||
|
||||
The `slpkg` tool uses custom formats rather than zip/tar/gz and so on.
|
||||
|
||||
## Why New Formats?
|
||||
|
||||
The reasoning behind this is very simple: zip and tar are complex formats with different extensions & cross-platform concerns, whereas the package manager just needs to do the basic job of packaging & installing software files (NOT modifying archives one file at a time, NOT backwards compatibility with old archives etc.).
|
||||
|
||||
So it's much easier to implement formats for that purpose than using legacy zip or tar formats then having to add modern extensions as well as packaging metadata on top, but this also allows tight control over things like data integrity so hopefully the package manager also gives better feedback when things do break.
|
||||
|
||||
## .pkb files
|
||||
|
||||
These are human-edited text files listing package contents and other metadata needed to build a package file.
|
||||
|
||||
## .pkg files
|
||||
|
||||
These are binary files consisting of an archive header, a number of (file-like or metadata) entry headers, a string section and then a series of file contents.
|
||||
|
||||
Each part of a `.pkg` file is checksummed individually, allowing archivers years down the track to monitor any bitrot in old packages in a fine-grained way.
|
||||
|
||||
## .pkh files
|
||||
|
||||
These are the same format as their corresponding `.pkg` except only need to contain the headers & strings to index installed data.
|
||||
|
||||
## .cv1 files
|
||||
|
||||
These are compressed files in an early version compression format.
|
22
README.md
22
README.md
@@ -1,14 +1,22 @@
|
||||
# slpkg
|
||||
# slabpkg
|
||||
|
||||
SecureLang™ Package Manager
|
||||
SecureLang™ Application Binary Package Manager
|
||||
|
||||
## Features
|
||||
|
||||
* build/install/remove software packages
|
||||
* keeps a simple database of installed packages/files
|
||||
* compress/decompress individual files
|
||||
* custom formats (no zip/tar)
|
||||
* simple & portable codebase
|
||||
* Builds/installs/removes software packages
|
||||
* Keeps a simple database of installed packages/files
|
||||
* Compresses/decompresses individual files
|
||||
* Uses custom formats (no zip/tar)
|
||||
* Built-in integrity checking
|
||||
* Very simple & portable codebase, plain C
|
||||
|
||||
## Limitations
|
||||
|
||||
* Doesn't handle advanced features or system integration yet, only "lowest common denominator" feature set
|
||||
* No timestamps, minimal handling of permissions
|
||||
* Not OS-aware, doesn't check system compatibility or have a way of organising packages for different targets yet
|
||||
* Early version, so small changes to the format are to be expected
|
||||
|
||||
## TODO
|
||||
|
||||
|
5
dist/README.md
vendored
Normal file
5
dist/README.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# The dist Directory
|
||||
|
||||
This directory is used within a project source directory to collect files for packaging with `slabpkg`. This generally means the compiled program files and any other installable program data are placed in a `dist` directory.
|
||||
|
||||
This file isn't packaged but exists in the source distribution for the purposes of documentation and so that the `dist` subdirectory isn't deleted when there are no built files.
|
@@ -1720,7 +1720,7 @@ int usage(int argc, char** argv, int argi, char* error) {
|
||||
formatinfo(out);
|
||||
|
||||
fprintf(out, "DEMO INSTRUCTIONS:\n\n");
|
||||
fprintf(out, " 1. compile pkg.c\n 2. place the executable in a subdirectory named `dist`\n 3. create a file `pkg.pkb` with a line `/pkg` (executable path within `dist`)\n 4. run `./dist/pkg build pkg.pkb`\n 5. work out how to install it (try --root ... install)\n\n");
|
||||
fprintf(out, " 1. compile slabpkg.c\n 2. place the executable in a subdirectory named `dist`\n 3. create a file `slabpkg.pkb` with a line `/slabpkg` (executable path within `dist`)\n 4. run `./dist/slabpkg build slabpkg.pkb`\n 5. work out how to install it (try --root ... install)\n\n");
|
||||
|
||||
if (error) {
|
||||
fprintf(out, "ERROR:\n %s\n", error);
|
||||
@@ -1733,7 +1733,7 @@ int usage(int argc, char** argv, int argi, char* error) {
|
||||
int main(int argc, char** argv) {
|
||||
pkg_job_t job;
|
||||
int argi = 1;
|
||||
printf("SecureLang Package Manager 0.0.1\nThis currently doesn't include proper versioning or dependencies.\n");
|
||||
printf("SecureLang Application Binary Package Manager 0.0.2\nThis currently doesn't include proper versioning or dependencies.\n");
|
||||
|
||||
if (argc < 2) {
|
||||
return usage(argc, argv, argi, "Expected command (build, install, ...)");
|
2
slabpkg.pkb
Normal file
2
slabpkg.pkb
Normal file
@@ -0,0 +1,2 @@
|
||||
provides slabpkg 0.0.2
|
||||
executable /slabpkg
|
Reference in New Issue
Block a user