cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 5c424f633a4dc02e5a669dfcfbcb915ace15b5d4
parent 00ee9e96baa5e8bfcb13f46142fc9b26fbc98c85
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon,  8 Jun 2020 10:56:19 +0300

docs: update

Diffstat:
MCHANGELOG.md | 106+++++++++++++++++++++++++++++++++++++++++++++----------------------------------
Mdoc/functions.txt | 60++++++++++++++++++++++++++++--------------------------------
Mdoc/package-system.txt | 89++++++++++++++++++++++++++++++++++++++++---------------------------------------
3 files changed, 134 insertions(+), 121 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -26,8 +26,8 @@ UNRELEASED ------------------ ### Fixed -- Fixed a segmentation fault on `kiss-stat` when a file didn't have on owner on the - `passwd` database. +- Fixed a segmentation fault on `kiss-stat` when a file didn't have on owner on + the `passwd` database. 2.1.1 - 2020-06-03 @@ -43,7 +43,8 @@ UNRELEASED ------------------ ### Added -- Added '$2' '$3' for build scripts which specifies version and architecture information. +- Added '$2' '$3' for build scripts which specifies version and architecture + information. ### Changed - `kiss-chroot` now sets architecture based on the system @@ -62,11 +63,13 @@ UNRELEASED - pre/post hooks for git pulls (pre-pull, post-pull). ### Changed -- `kiss` no longer removes empty directories if they are defined on a different package. -- `$KISS_NOPROMPT` has been renamed to `$KISS_PROMPT` and must be set to 0 in order to disable - prompts. +- `kiss` no longer removes empty directories if they are defined on a different + package. +- `$KISS_NOPROMPT` has been renamed to `$KISS_PROMPT` and must be set to 0 in + order to disable prompts. - `kiss-chbuild` now checks tarball digest. -- `kiss-chbuild` now downloads tarballs according to arch (x86_64 or i686 currently). +- `kiss-chbuild` now downloads tarballs according to arch (x86_64 or i686 + currently). - Submodule repository fetching has been modified to match compatibility. ### Removed @@ -78,10 +81,10 @@ UNRELEASED 1.22.4 - 2020-05-26 ------------------- -**NOTE:** `1.22.x` is the last minor version before `2.0.0`, meaning I will not be doing any -releases except for patches and fixes. My attention is now on implementing binary repositories. -I will be doing some 'release candidates' before release, as binary repositories will need user -feedback. +**NOTE:** `1.22.x` is the last minor version before `2.0.0`, meaning I will not +be doing any releases except for patches and fixes. My attention is now on +impllementing binary repositories. I will be doing some 'release candidates' +before release, as binary repositories will need user feedback. ### Added - Added new documents. @@ -96,9 +99,10 @@ feedback. ------------------- ### SECURITY -- Fixed a bug regarding privilige escalation using `$KISS_HOOK`. `kiss` will now use - `$KISS_ROOT/etc/kiss-hook` on installation operations (which are run by root) so that the hooks - are defined by the system administrator rather than the user. See [related proof-of-concept] +- Fixed a bug regarding privilige escalation using `$KISS_HOOK`. `kiss` will now + use `$KISS_ROOT/etc/kiss-hook` on installation operations (which are run by + root) so that the hooks are defined by the system administrator rather than the + user. See [related proof-of-concept] [related proof-of-concept]: https://github.com/kisslinux/kiss/pull/157#issuecomment-629880775 @@ -107,8 +111,8 @@ feedback. ------------------- ### Fixed -- Fixed an issue where `pkg_conflicts` would abort if `kiss-readlink` failed due to missing - components. It now fallbacks to the original directory name. +- Fixed an issue where `pkg_conflicts` would abort if `kiss-readlink` failed due + to missing components. It now fallbacks to the original directory name. @@ -129,9 +133,10 @@ feedback. ### Fixed - Fixed a `kiss-owns` typo that caused it to fail. -- Fixed a `kiss-readlink` bug where it would fail if the last component wouldn't exist. -- Fixed an error on tarball extraction where a file name containing spaces would be parsed as - two files. +- Fixed a `kiss-readlink` bug where it would fail if the last component wouldn't + exist. +- Fixed an error on tarball extraction where a file name containing spaces would + be parsed as two files. [kiss-extra]: https://github.com/carbslinux/kiss-extra @@ -146,20 +151,22 @@ feedback. ### Changed - Replaced `KISS_COLOUR` with `KISS_COLOR` to match upstream. - Renamed `colour` variable to `color` for consistency. -- The package manager no longer needs root priviliges if the `KISS_ROOT` is writable - by the user. +- The package manager no longer needs root priviliges if the `KISS_ROOT` is + writable by the user. - `kiss` now uses the host cache regardless of `KISS_ROOT`. ### Fixed -- Fixed an issue where `kiss-owns` would output the wrong package because of symbolic links. - The script now reads the link of the directory instead of the full file. +- Fixed an issue where `kiss-owns` would output the wrong package because of + symbolic links. The script now reads the link of the directory instead of the + full file. 1.21.1 - 2020-05-14 ------------------- ### Changed -- All contrib messages now output usage information when called with `--help` and `-h`. +- All contrib messages now output usage information when called with `--help` + and `-h`. - `hashcheck` function now uses `$1` instead of `${file#\*}`. ### Fixed @@ -172,12 +179,13 @@ feedback. ### Added - Added a `d|download` option to acquire the sources of given packages. If no packages are given, it acquires the sources of outdated packages. This can be - used to acquire a package's sources to build it later, or periodically downloading - outdated package sources, so the user doesn't wait for the download when updating - the system. + used to acquire a package's sources to build it later, or periodically + downloading outdated package sources, so the user doesn't wait for the download + when updating the system. - kiss now understands `.txz` tarballs. (BSD `src.txz` wink wink) - `KISS_TMPDIR` can now be used to specify a temporary build directory. This will - be useful for those of you who would want to build on ram or a different filesystem. + be useful for those of you who would want to build on ram or a different + filesystem. ### Changed - Simplified tarball extraction method. @@ -239,15 +247,15 @@ feedback. ------------------- ### Added -- Added `kiss-reporevdepends` for finding all the packages on the repository that depends - on the specified package. +- Added `kiss-reporevdepends` for finding all the packages on the repository that + depends on the specified package. ### Changed -- Removed the `-p` flag from tar while installing packages. busybox ignores it and we - don't need it. +- Removed the `-p` flag from tar while installing packages. busybox ignores it + and we don't need it. - Replaced tar flags with keys for historical compatibility. -- `kiss` now decompresses a tarball once and uses the decompressed tarball for listing - and extraction +- `kiss` now decompresses a tarball once and uses the decompressed tarball for + listing and extraction. ### Fixed - Fixed the output of docstrings in contrib scripts. @@ -258,13 +266,15 @@ feedback. ------------------- ### Added -- Added editorconfig file since we now have 4 languages (roff, Makefile, sh, C) in the repository. +- Added editorconfig file since we now have 4 languages (roff, Makefile, sh, C) + in the repository. - Added `kiss-readlink` as a `readlink -f` replacement. - Added `kiss-message` for checking package messages. - Added this CHANGELOG ### Changed -- Made tar calls portable. `kiss` is no longer limited to busybox, bsdtar, or gnu tar! +- Made tar calls portable. `kiss` is no longer limited to busybox, bsdtar, or + gnu tar! ### Removed - Dropped the usage of `readlink` in `kiss`. @@ -300,12 +310,15 @@ feedback. ### Added - Added fallbacks for sha256sum. `kiss` now fallbacks to `sha256`, and `openssl` for hash checking, respectively. -- Added `kiss-changelog` and `kiss-which` entries to the `kiss-contrib.1` manual page. +- Added `kiss-changelog` and `kiss-which` entries to the `kiss-contrib.1` manual + page. ### Fixed - Fixed `kiss` not using the preferred `tar` program on decompression. -- Fixed `pkg_conflicts()` getting stuck when you reinstall the same single package on a system. -- Fixed `pkg_conflicts()` giving an error if no packages are installed on a system. +- Fixed `pkg_conflicts()` getting stuck when you reinstall the same single + package on a system. +- Fixed `pkg_conflicts()` giving an error if no packages are installed on a + system. 1.16.1 - 2020-05-01 @@ -374,9 +387,10 @@ This release removes `rsync` from `kiss` and implements its own installation method. ### Added -- `kiss` now implements user scripts available in the `$PATH`. This can be used to - call `kiss manifest` from `kiss` itself. -- `kiss` now displays a warning if the user has a `$KISS_ROOT` that ends with a `/`. +- `kiss` now implements user scripts available in the `$PATH`. This can be used + to call `kiss manifest` from `kiss` itself. +- `kiss` now displays a warning if the user has a `$KISS_ROOT` that ends with + a `/`. - `kiss` now uses its own new package installation method. ### Removed @@ -443,18 +457,20 @@ method. ------------------- ### Added -- `kiss-cargolock-urlgen`: a tool that can read a Cargo.lock file to generate a list of urls. +- `kiss-cargolock-urlgen`: a tool that can read a Cargo.lock file to generate a + list of urls. - `kiss-cat`: a tool to concatanate package build files. - Manual page for `kiss-contrib`. ### Changed - `kiss-owns` now gives an error on directories. -- `kiss-link` can now take multiple file names and will create symbolic links of them all. +- `kiss-link` can now take multiple file names and will create symbolic links + of them all. - Simplified `kiss-link` ### Fixed - `kiss-cargo-urlgen`: Fixed an issue where if a package version contained a '-', - it could lead to wrong url generation. + it could lead to wrong url generation. 1.9.0 - 1.11.2 - 2020-04-04 diff --git a/doc/functions.txt b/doc/functions.txt @@ -1,29 +1,27 @@ FUNCTIONS +================================================================================= -This is a document for example functions to ensure portability -across different systems. These are mere examples as we currently -depend on non POSIX utilities on packages. These dependencies will -be removed as we go forward. +This is a document for example functions to ensure portability across different +systems. These are mere examples as we currently depend on non-POSIX utilities on +packages. These dependencies will be removed as we go forward. -I don't want to turn the functions in here into a library because -these are really simple, and I believe that the build scripts sho- -uld be self-contained. What's the point of creating portable func- -tions if the functions themselves depend on a library file to be -installed on a system? +I don't want to turn the functions in here into a library because these are +really simple, and I believe that the build scripts should be self-contained. +What's the point of creating portable functions if the functions themselves +depend on a library file to be installed on a system? -These obviously have their own limitations, but not every limitation -has to be solved in a single function. Use your imagination, non- -standard flags/commands may save you some keypresses, but they are -not standard, because you can already do these with your brain and -a few more keypresses. +These obviously have their own limitations, but not every limitation has to be +solved in a single function. Use your imagination, non-standard flags/commands +may save you some keypresses, but they are not standard, because you can already +do these with your brain and a few more keypresses. SED -i ------- +--------------------------------------------------------------------------------- -The -i function isn't portable across systems, and isn't defined -by POSIX. But it isn't too valuable as it can be replaced with a -simple function. I present you sed_i. This function only depends -on the fact that the file name is the last argument. +The -i function isn't portable across systems, and isn't defined by POSIX. But it +isn't too valuable as it can be replaced with a simple function. I present you +sed_i. This function only depends on the fact that the file name is the last +argument. sed_i() { @@ -40,11 +38,10 @@ on the fact that the file name is the last argument. cat _ > "$file"; rm -f _ } -In build scripts with multiple 'sed -i' usage, such a function -can be defined for and used. If only it is used a single time, -defining such a function is quite unnecessary. In such a case -prefer doing it manually. Assume the file is named 'file.h' and -we are calling 's/this/that/g'. +In build scripts with multiple 'sed -i' usage, such a function can be defined for +and used. If only it is used a single time, defining such a function is quite +unnecessary. In such a case prefer doing it manually. Assume the file is named +'file.h' and we are calling 's/this/that/g'. sed 's/this/that/g' file.h >_ @@ -52,14 +49,13 @@ we are calling 's/this/that/g'. INSTALL -D,-t -------------- - -'install' does not have a standard. Options such as '-D' and '-t', -even though they are the most used, do not exist on every impleme- -ntation. Avoid using these flags where possible. You can prefer us- -ing functions such as these. The first function is similar to '-t' -flag, where you can install multiple files to a given target. The -second function is similar to the usage without the '-t' flag, a +--------------------------------------------------------------------------------- + +'install' does not have a standard. Options such as '-D' and '-t', even though +they are the most used, do not exist on every implementation. Avoid using these +flags where possible. You can prefer using functions such as these. The first +function is similar to '-t' flag, where you can install multiple files to a given +target. The second function is similar to the usage without the '-t' flag, a single file where it will be named as the argument. diff --git a/doc/package-system.txt b/doc/package-system.txt @@ -1,9 +1,10 @@ PACKAGE SYSTEM +================================================================================= -This document talks about the packaging system works with the kiss -package manager in detail. For information regarding the usage of -the package manager itself, see the kiss(1) manual page. +This document talks about the packaging system works with the kiss package +manager in detail. For information regarding the usage of the package manager +itself, see the kiss(1) manual page. A package is formed of 4 MANDATORY files. These are, - BUILD @@ -16,27 +17,26 @@ The package manager also reacts to the existence of these files, - POST-INSTALL - MESSAGE -Any other file can be added to the package directory at the discretion -of the package maintainer. Everything in the package directory will also -be added to the package database that is located on '/var/db/kiss/installed' -These can be patches, configuration files, etc. +Any other file can be added to the package directory at the discretion of the +package maintainer. Everything in the package directory will also be added to the +package database that is located on '/var/db/kiss/installed'. These can be +patches, configuration files, etc. BUILD ------ +--------------------------------------------------------------------------------- -Typically build files are shell scripts that run commands to prepare the -source code to be installed on the target system. Even though we will be -assuming that the build file is a POSIX shell script (for portability's -sake), build files can be any executable program from binary programs to -Perl scripts. +Typically build files are shell scripts that run commands to prepare the source +code to be installed on the target system. Even though we will be assuming that +the build file is a POSIX shell script (for portability's sake), build files can +be any executable program from binary programs to Perl scripts. -The contents of a build script do not need to follow a certain rule for -the package manager, except for the fact that the user needs the permission -to execute the file. +The contents of a build script do not need to follow a certain rule for the +package manager, except for the fact that the user needs the permission to +execute the file. -An important advice is to append an '-e' to the shebang (#!/bin/sh -e) so -that the build script exits on compilation error. +An important advice is to append an '-e' to the shebang (#!/bin/sh -e) so that +the build script exits on compilation error. Build is run with three arguments $1: Location of the package directory (DESTDIR) @@ -45,14 +45,14 @@ $3: System Architecture SOURCES -------- +--------------------------------------------------------------------------------- sources file is a list of files and sources that will be put to the build directory during the build process. Those can be remote sources (such as tarballs), git repositories, and files that reside on the package directory. -The SYNTAX is pretty simple for the sources file. Here are some example -sources files taken from the packages in the repository. +The SYNTAX is pretty simple for the sources file. Here are some example 'sources' +files taken from the packages in the repository. BUSYBOX @@ -97,9 +97,9 @@ source. If it starts with a protcol url, (such as ftp:// http:// https://) it will be downloaded with curl(1). -If the source is GIT repository, it shall be prefixed with a 'git+'. git(1) will be -used to do a shallow clone of the repository. If the commit is suffixed by a history -pointer, git will checkout the relevant revision. So, +If the source is GIT repository, it shall be prefixed with a 'git+'. git(1) will +be used to do a shallow clone of the repository. If the commit is suffixed by a +history pointer, git will checkout the relevant revision. So, - git+git://example.com/pub/repo#v1.2.3 will checkout the tag named 'v1.2.3' - git+git://example.com/pub/repo#development will checkout the branch named 'development' @@ -116,20 +116,20 @@ a source to be on a specific directory, you can see the gcc package for that. CHECKSUMS ---------- +--------------------------------------------------------------------------------- checksums file is generated by the `kiss c pkg` command. It is generated -according to the order of the sources file. That's why you shouldn't be -editing it manually. The checksums file is created with the digests of the -files using the sha256 algorithm. +according to the order of the sources file. That's why you shouldn't be editing +it manually. The checksums file is created with the digests of the files using +the sha256 algorithm. VERSION -------- +--------------------------------------------------------------------------------- -The version file includes the version of the software and the release number -of the package on a space seperated format. The contents of the file should -look like below. +The version file includes the version of the software and the release number of +of the package on a space seperated format. The contents of the file should look +like below. 1.3.2 1 @@ -143,23 +143,24 @@ When a version bump occurs, the release should be reset to 1. DEPENDS -------- +--------------------------------------------------------------------------------- -This is a list of dependencies that must be installed before a package build. -You can append 'make' after a dependency to mark a package is only required -during the build process of a package. Packages marked as a make dependency -can be removed after the build. +This is a list of dependencies that must be installed before a package build. You +can append 'make' after a dependency to mark a package is only required during +the build process of a package. Packages marked as a make dependency can be +removed after the build. POST-INSTALL ------------- +--------------------------------------------------------------------------------- + +post-installs have the same requirements as the build script. They will be run +after the package is installed as root (or as the user if the user has write +permissions on KISS_ROOT). -post-installs have the same requirements as the build script. They will be -run after the package is installed as root (or as the user if the user has -write permissions on KISS_ROOT). MESSAGE -------- +--------------------------------------------------------------------------------- -This plaintext file will be outputted with 'cat(1)' after every package is ins- -talled. +This plaintext file will be outputted with 'cat(1)' after every package is +installed.