diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | README | 58 | ||||
-rw-r--r-- | README.md | 60 | ||||
-rw-r--r-- | config.mk | 24 | ||||
-rw-r--r-- | spec/01_lib_spec.sh | 2 | ||||
-rwxr-xr-x | tests/repository/faulty-pkg/build | 3 | ||||
-rw-r--r-- | tests/repository/faulty-pkg/checksums | 0 | ||||
-rw-r--r-- | tests/repository/faulty-pkg/sources | 1 | ||||
-rw-r--r-- | tests/repository/faulty-pkg/version | 1 | ||||
-rwxr-xr-x | tools/mkdist.sh | 30 | ||||
-rw-r--r-- | www/index.md | 39 |
11 files changed, 135 insertions, 89 deletions
@@ -27,11 +27,7 @@ CHANGELOG.md: fossil wiki export Changelog | sed '1cCHANGELOG\n=========' > CHANGELOG.md dist: docs/cpt.info CHANGELOG.md - mkdir "cpt-${VERSION}" - cp -r ${DISTFILES} "cpt-${VERSION}" - tar cf "cpt-${VERSION}.tar" "cpt-${VERSION}" - xz -z "cpt-${VERSION}.tar" - rm -rf -- "cpt-${VERSION}" + ./tools/mkdist.sh "${VERSION}" install: all test "${DOCS}" != yes || ${MAKE} -C docs install @@ -0,0 +1,58 @@ +Carbs Packaging Tools +===================== + +Package management toolset for Carbs Linux. Forked from KISS[1]. All usage +information can be obtained from the manual page. Refer to the ChangeLog[2] to +learn what's new. + + +Dependencies +------------ + +To build and use cpt, you need the following software: + +- rsync +- curl +- POSIX base utilities [coreutils, busybox, sbase, etc.] +- pax or tar [GNU tar, busybox, toybox, libarchive, etc.] +- Common compression utilities such as `gzip`, `bzip2`, `xz`, etc. + + +In order to build the documentation from source, you will need the following +software: + +- GNU Texinfo (for generating `.info` pages) +- GNU Emacs (for generating `.texi` and `.txt` pages) + +However, distributed tarballs come with info pages, and `.texi` and `.txt` files +are committed directly into the repository, meaning that you don't need Texinfo +if you are using a tarball, and you don't need Emacs as long as you don't edit +the documentation. + +You can also completely disable the build/installation of the documentation by +either passing `DOCS=no` to `make` or editing `config.mk` to disable it. + + +Installation +------------ + +In order to install CPT, you can run the following with `make`: + + make + make PREFIX=/usr install + + +Documentation +------------- + +The documentation for each tool along with some examples can be found on +manpages installed with the package manager. User manual of CPT can be found +online[3], or installed as both plain-text and as info pages. Without any +changes to the Makefile configuration those files can be found at: + +- /usr/local/share/docs/cpt/cpt.txt +- /usr/local/share/info/cpt.info + +[1]: https://github.com/kisslinux/kiss +[2]: https://fossil.carbslinux.org/cpt/log +[3]: https://carbslinux.org/docs/cpt diff --git a/README.md b/README.md deleted file mode 100644 index b7db05a..0000000 --- a/README.md +++ /dev/null @@ -1,60 +0,0 @@ -Carbs Packaging Tools --------------------------------------------------------------------------------- - -Package management toolset for Carbs Linux. Forked from [KISS]. All usage -information can be obtained from the manual page. For changes please refer to -the `CHANGELOG.md` file. - -[KISS]: https://github.com/kisslinux/kiss - - -Dependencies --------------------------------------------------------------------------------- - -To build and use cpt, you need the following software: - -- `rsync` -- `curl` -- POSIX base utilities [`coreutils`, `busybox`, `sbase`, etc.] -- `pax` or `tar` [GNU tar, busybox, toybox, libarchive, etc.] -- Common compression utilities such as `gzip`, `bzip2`, `xz`, etc. - - -In order to build the documentation, you will need the following software: - -- `texinfo` (for generating `.info` pages) -- `Emacs` (for generating `.texi` and `.txt` pages) - -However, distributed tarballs come with info pages, and `.texi` and `.txt` files -are committed directly into the repository, meaning that you don't need -`texinfo` if you are using a tarball, and you don't need Emacs as long as you -don't edit the documentation. - -You can also completely disable the build/installation of the documentation by -either passing `DOCS=no` to `make` or editing `config.mk` to disable it. - - -Directory Structure --------------------------------------------------------------------------------- - - / -- README, LICENSE, CHANGELOG - contrib/ -- for Shell scripts that wrap around cpt. - docs/ -- for documentation. - man/ -- for manual pages. - src/ -- for the tools that make up the package manager. - - -Defining Base --------------------------------------------------------------------------------- - -Tools such as cpt-orphans and cpt-reset define the base from the file -`/etc/cpt-base`. An example cpt-base file can be found from the root directory -of the repository, which is the default base for Carbs Linux. A user can modify -this file to fit their needs and redefine their base for the system. For -example, a user can decide that they want `sbase` instead of `busybox` for their -base, so if they reset their system, busybox will be removed instead of sbase. - -This file is used to ship a predefined base, while leaving the base to a user's -choice. However, it isn't installed by the Makefile so that the packagers may -define their own base, or so that a user can install cpt without using it as -their main package manager. @@ -1,5 +1,5 @@ # Carbs Packaging Tools -VERSION = 6.0.2 +VERSION = dev # Installation paths PREFIX = /usr/local @@ -16,25 +16,3 @@ MAKEINFO = makeinfo # Comment or change if you don't want to build/install the documentation DOCS = yes - -# Files to be added into the distribution tarball -DISTFILES = \ - .build.yml \ - .dir-locals.el \ - .editorconfig \ - .fossil-settings \ - .gitignore \ - .shellspec \ - CHANGELOG.md \ - LICENSE \ - Makefile \ - README.md \ - config.mk \ - contrib \ - cpt-base \ - docs \ - man \ - spec \ - src \ - tests \ - tools diff --git a/spec/01_lib_spec.sh b/spec/01_lib_spec.sh index c90eac1..0ff2752 100644 --- a/spec/01_lib_spec.sh +++ b/spec/01_lib_spec.sh @@ -104,7 +104,7 @@ Describe 'CPT Library' Describe '_stat()' It 'outputs the owner of the given file' - When call _stat README.md + When call _stat LICENSE The output should eq "$(id -un)" End End diff --git a/tests/repository/faulty-pkg/build b/tests/repository/faulty-pkg/build new file mode 100755 index 0000000..4cf1c4f --- /dev/null +++ b/tests/repository/faulty-pkg/build @@ -0,0 +1,3 @@ +#!/bin/sh -e + +exit 1 diff --git a/tests/repository/faulty-pkg/checksums b/tests/repository/faulty-pkg/checksums new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/repository/faulty-pkg/checksums diff --git a/tests/repository/faulty-pkg/sources b/tests/repository/faulty-pkg/sources new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/repository/faulty-pkg/sources @@ -0,0 +1 @@ + diff --git a/tests/repository/faulty-pkg/version b/tests/repository/faulty-pkg/version new file mode 100644 index 0000000..2fb73a0 --- /dev/null +++ b/tests/repository/faulty-pkg/version @@ -0,0 +1 @@ +1 1 diff --git a/tools/mkdist.sh b/tools/mkdist.sh new file mode 100755 index 0000000..c21e964 --- /dev/null +++ b/tools/mkdist.sh @@ -0,0 +1,30 @@ +#!/bin/sh -e + +out() { printf '%s\n' "$@" >&2 ;} +die() { printf '\033[1;31mERR: \033[m%s\n' "$@" >&2; exit 1;} + +case "$1" in ''|-*) + die "Run this script by calling 'make dist' from the" \ + "root repository directory" +esac + +fossil stat >/dev/null 2>&1 || { + printf '\033[1;31mERR: \033[m%s\n' \ + "Distribution tarballs can only be generated using the Fossil repository." \ + "Exiting..." >&2 + exit 1 +} + +basedir=cpt-$1 +mkdir -p "$basedir" + +fossil ls | while read -r file; do + case "$file" in + */*) mkdir -p "$basedir/${file%/*}" + esac + cp "$file" "$basedir/$file" +done + +tar cf "$basedir.tar" "$basedir" +xz -z "$basedir.tar" +rm -rf -- "$basedir" diff --git a/www/index.md b/www/index.md new file mode 100644 index 0000000..abc5953 --- /dev/null +++ b/www/index.md @@ -0,0 +1,39 @@ +# Home + +CPT is the package management toolset written for Carbs Linux. Its aim is to +provide a stable, powerful, and easily used library for package management that +complements the tools that come with it. It has the following features: + +- **POSIX shell library** - with its shell library, it is really easy to create + advanced scripts that wrap around the package manager and extend its + functionality. + +- **Powerful, but simple** - even with the multitudes of functionalities that + CPT provides, the tools provided aim to be as "low-interaction" as possible + and get out of your way. No user should spend countless hours on wiki pages + just to understand the proper way of installing a "masked" package. If the + user seeks to modify the build of a package, easy tools should be provided, + but those tools should not be required for basic functionality. + +- **Simple packaging system** - CPT has a easy to understand, simple, and static + packaging system, that makes it really easy to write and maintain packages. + Instead of complex `PKGBUILD` scripts or weird templates, packages are formed + of multiple little files that are easily written and easily parsed, even + without needing the help of the package manager itself. + +- **Easy Repository Management** - CPT makes it easy to create or use multiple + repositories at the same time. Repositories are added and prioritised by the + `$CPT_PATH` variable, an environment value that is already familiar to many + users with the `$PATH` variable. + +- **Serve repositories with your method** - Package repositories can be served + in a variety of formats, they can be either local, served with Git, Mercurial, + or through the `rsync` method, with Fossil integration to be added soon. + +<hr> + +### Latest Release: 6.0.2 ([2021-04-05](/timeline?c=6.0.2)) + +- [Download](/uvlist?byage=1) +- [Changelog](/wiki?name=Changelog) +- [User Manual](https://carbslinux.org/docs/cpt) |