README.md

Package Tools

pkgtools is a set of programs to create, install, remove, and update packages on the root file system.

Table of contents

Bootstrap script

The bootstrap script aspecialy created for autotools install automation. To install autotools into source directory on build machine (i.e. when build == host) the bootstrap script can be run without arguments. In this case autotools will be installed from current root file system.

For the cross environment the –target-dest-dir options allows to install some stuf from development root file system:

$ TARGET_DEST_DIR=/home/developer/prog/trunk-672/dist/.s9xx-glibc/enybox-x2 \
  ./bootstrap --target-dest-dir=${TARGET_DEST_DIR}

For example, in this case the dialog.m4 script will be taken from the $/usr/share/aclocal directory.

Install

On the build machine the installation process seems like that

$ tar xJvf pkgtools-0.2.2.tar.xz
$ mkdir build
$ cd build
$ ../pkgtools-0.2.2/configure --prefix=/usr
$ make
$ make install DESTDIR=$PKG exec_prefix=/

Note that the exec_prefix=/ used for canonical installation of pkgtools utilities into $/sbin/ directory instead of $/usr/sbin/ which is not corresponds to FHS.

Configurations

Pkgtools support GnuPG signing of packages and also simple user interface based on dialog library.

OpenPGP support options:

  --with-gpg2=no
  --with-gpg2=yes
  --with-gpg2=${TARGET_DEST_DIR}/usr

If the –with-gpg2 option is not specified then GnuPG support is disabled.

Dialog options:

  --with-dialog=no
  --with-dialog=yes
  --with-dialog=${TARGET_DEST_DIR}/usr
  --with-dialog-test=no
  --with-dialog-test=yes

Dialog support is enabled by default. The option –with-dialog=no disables the dialog support.

Distribution options:

  --with-distro-name[=NAME]        The name of distribution
  --with-distro-version[=VERSION]  The distribution version

To show all available options you can make use of

$ ./configure --help

Cross compilation example

TARGET_DEST_DIR=/home/developer/prog/trunk-672/dist/.s9xx-glibc/enybox-x2
TOOLCHAIN_PATH=/opt/toolchains/aarch64-S9XX-linux-glibc/1.1.4/bin
TARGET=aarch64-s9xx-linux-gnu

DIALOG_CONFIG=${TARGET_DEST_DIR}/usr/bin/dialog-config \
STRIP="${TOOLCHAIN_PATH}/${TARGET}-strip" \
CC="${TOOLCHAIN_PATH}/${TARGET}-gcc --sysroot=${TARGET_DEST_DIR}" \
./configure --prefix=/usr
  --build=x86_64-pc-linux-gnu \
  --host=${TARGET} \
  --with-gpg2=${TARGET_DEST_DIR}/usr \
  --with-dialog=${TARGET_DEST_DIR}/usr \
  --with-dialog-test=yes

Also we can make use of additional variables such as CFLAGS, LDFLAGS:

LDFLAGS="-L${TARGET_DEST_DIR}/lib -L${TARGET_DEST_DIR}/usr/lib"
TARGET_INCPATH="-L${TARGET_DEST_DIR}/usr/include"
CFLAGS="${TARGET_INCPATH}"
CPPFLAGS="${TARGET_INCPATH}"

Dialog

The original dialog sources have some bugs such as memory leaks and also the dialog package doesn’t have correct autotools scripts. If you want to use libdialog with pkgtools then you have to install the dialog package with our patch. This patch provides dialog.m4 and more convenient dialog-config script for dialog-1.3-20210621.tgz source package.

License

Code and documentation copyright 2009-2023 Andrey V. Kosteltsev.
Code and documentation released under the radix-linux.su License.

The text of this license can be found on our website at:

https://radix-linux.su/licenses/LICENSE-1.0-en_US.txt
https://radix-linux.su/licenses/LICENSE-1.0-en_US.txt

Описание

Package Tools – is a set of utilities to create, install, and update RcL packages (mirror).

Конвейеры
0 успешных
0 с ошибкой