From 33f64c85077822ded7798ce76035a66cacd90301 Mon Sep 17 00:00:00 2001 From: Woodpecker CI Date: Tue, 2 Jun 2026 15:54:43 +0000 Subject: Woodpecker CI 7d266fc1171fb55f8758d5170d40e5032058163e [SKIP CI] --- docs/apkg_helpers.html | 238 ++++++++++++++++++++++++++++++ docs/bootloader.html | 242 +++++++++++++++++++++++++++++++ docs/index.html | 4 + docs/install.html | 4 + docs/networking.html | 4 + docs/packagemanager.html | 4 + docs/using_autils.html | 353 +++++++++++++++++++++++++++++++++++++++++++++ docs/writing_abuild.html | 367 +++++++++++++++++++++++++++++++++++++++++++++++ ports.html | 4 +- 9 files changed, 1218 insertions(+), 2 deletions(-) create mode 100644 docs/apkg_helpers.html create mode 100644 docs/bootloader.html create mode 100644 docs/using_autils.html create mode 100644 docs/writing_abuild.html diff --git a/docs/apkg_helpers.html b/docs/apkg_helpers.html new file mode 100644 index 00000000..cc56ebee --- /dev/null +++ b/docs/apkg_helpers.html @@ -0,0 +1,238 @@ + + + + + + Alice Linux - docs + + + + +
+ +
+<- back to docs + +

apkg helper scripts

+

autils includes several helper scripts that work alongside apkg for package inspection, cleanup, and maintenance. See man <program> for full details on each command.

+

apkg-chroot

+

Enter a chroot environment with virtual filesystems mounted. Useful for building packages or performing system maintenance inside an alternative root.

+
apkg-chroot /mnt/alice                  # launch interactive shell
+apkg-chroot /mnt/alice apkg -i mypkg    # run a command inside the chroot
+
+

Must be run as root. Mounts /dev, /proc, /sys, /run, copies /etc/resolv.conf, and cleans up all mounts on exit.

+

apkg-clean

+

List stale .spm package files and orphaned source tarballs that are no longer referenced by any current package recipe. Pipe to xargs rm to actually clean up.

+
apkg-clean             # list all unreferenced files
+apkg-clean -p          # list only stale packages
+apkg-clean -s          # list only stale sources
+apkg-clean | xargs rm  # remove them
+
+

apkg-deps

+

Show runtime library dependencies of an installed package. Uses ldd to find shared libraries needed by the package's binaries, then maps those libraries back to the packages that provide them.

+
apkg-deps mypkg
+
+

Useful for discovering implicit runtime dependencies not listed in the formal depends file. Excludes the package itself and base system packages (gcc, musl, binutils, glibc).

+

apkg-foreign

+

List installed packages that are not found in any configured repository. These may have been installed from an external source or had their recipes removed.

+
apkg-foreign
+
+

Takes no arguments; outputs one package name per line.

+

apkg-genabuild

+

Scaffold a new package recipe from a source URL. Parses the name and version from the URL and creates a directory with skeleton abuild and info files.

+
apkg-genabuild https://example.com/mypkg-1.2.3.tar.gz
+apkg-genabuild https://github.com/user/repo/archive/v1.0.tar.gz myname
+
+

Special handling for GitHub tag archives, PyPI packages (prefixes python-), and CPAN packages (prefixes perl-). An optional second argument overrides the derived package name.

+

apkg-orphan

+

List orphan packages: packages that are installed and exist in a repository, but have no other installed package depending on them. These may be safe to remove.

+
apkg-orphan
+
+

Takes no arguments; outputs one package name per line.

+

apkg-purge

+

Remove a package and all its dependencies that are no longer needed by any other installed package. This is a "deep" removal compared to apkg -r which only removes the specified package.

+
apkg-purge mypkg       # dry-run: show what would be removed
+apkg-purge -p mypkg    # actually purge from the system
+
+

apkg-redundantdeps

+

Find redundant entries in depends files. A dependency is redundant if another listed dependency already pulls it in transitively.

+
apkg-redundantdeps mypkg       # check one package
+apkg-redundantdeps              # check all packages
+apkg-redundantdeps -f mypkg     # fix by removing redundant entries
+apkg-redundantdeps -f           # fix all packages
+
+ +<- back to docs +
+

Copyright © Alice Linux, 2024-2026

+
+ + diff --git a/docs/bootloader.html b/docs/bootloader.html new file mode 100644 index 00000000..debd8c6f --- /dev/null +++ b/docs/bootloader.html @@ -0,0 +1,242 @@ + + + + + + Alice Linux - docs + + + + +
+ +
+<- back to docs + +

Bootloader

+

This document covers installing and configuring the two bootloaders available in Alice Linux: Limine and GRUB.

+

Limine

+

Limine is a modern, lightweight bootloader supporting BIOS and UEFI.

+

Install the package:

+
# apkg -I limine
+
+

BIOS

+

Deploy Limine to the target disk:

+
# limine bios-install /dev/sdX
+
+

UEFI

+

Copy the Limine EFI executable to the EFI system partition:

+
# mkdir -p /boot/EFI/BOOT
+# cp /usr/share/limine/BOOTX64.EFI /boot/EFI/BOOT
+
+

Configuration

+

Create /boot/limine.conf:

+
timeout: 5
+
+/Alice Linux
+    protocol: linux
+    kernel_path: boot():/vmlinuz
+    cmdline: root=/dev/sda2 rw loglevel=3 quiet
+    module_path: boot():/initrd-linux
+
+

Use boot() to reference the partition where /boot resides, or specify the partition directly with uuid() or a path like hd(0,2).

+

For full configuration options, see the Limine documentation.

+

GRUB

+

GRUB is the GNU Grand Unified Bootloader, supporting UEFI on x86_64 only.

+

Install the package:

+
# apkg -I grub
+
+

Install

+

Install GRUB for UEFI (requires the EFI system partition mounted at /boot):

+
# grub-install --target=x86_64-efi --efi-directory=/boot
+
+

Configuration

+

Generate the GRUB configuration file:

+
# grub-mkconfig -o /boot/grub/grub.cfg
+
+

GRUB settings are controlled by /etc/default/grub. Key options:

+ +

After editing /etc/default/grub, regenerate the config:

+
# grub-mkconfig -o /boot/grub/grub.cfg
+
+ +<- back to docs +
+

Copyright © Alice Linux, 2024-2026

+
+ + diff --git a/docs/index.html b/docs/index.html index c204516b..5ba0e91b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -183,9 +183,13 @@

This section covers the main parts of Alice Linux: installation, package management, networking, service supervision, etc.


Copyright © Alice Linux, 2024-2026

diff --git a/docs/install.html b/docs/install.html index 51063424..c04cae3a 100644 --- a/docs/install.html +++ b/docs/install.html @@ -179,6 +179,8 @@ home / docs / ports / commits / download / development / community / donate
+<- back to docs +

Install Alice

Here is a guide to installing Alice Linux on your computer using the chroot method. You can do this from your existing Linux distribution or from a live environment, such as Alice Live or another Linux distribution. Make sure your chosen environment has the necessary partitioning tools, filesystem tools, and extraction tools.

Get Alice rootfs tarball

@@ -389,6 +391,8 @@ Create a symlink from /etc/sv/<service> to /var/service
  • Use revdep to scan for broken libraries and binaries after system upgrades and package removals. You can use revdep -v to print out missing required libraries, and use apkg -f -u $(revdep) to scan and rebuild broken packages.
  • Run updateconf to update config files in /etc after package upgrades.
  • + +<- back to docs

    Copyright © Alice Linux, 2024-2026

    diff --git a/docs/networking.html b/docs/networking.html index 324ea4f9..d641a353 100644 --- a/docs/networking.html +++ b/docs/networking.html @@ -179,6 +179,8 @@ home / docs / ports / commits / download / development / community / donate
    +<- back to docs +

    Networking

    This document describes how to configure networking on Alice Linux using eiwd/wpa_supplicant + udhcpc/dhcpcd.


    @@ -309,6 +311,8 @@ DisablePeriodicScan=true # ln -s /etc/sv/wpa_supplicant /var/service # ln -s /etc/sv/udhcpc /var/service
    + +<- back to docs

    Copyright © Alice Linux, 2024-2026

    diff --git a/docs/packagemanager.html b/docs/packagemanager.html index 076a0141..af1e1b6c 100644 --- a/docs/packagemanager.html +++ b/docs/packagemanager.html @@ -179,6 +179,8 @@ home / docs / ports / commits / download / development / community / donate
    +<- back to docs +

    Package Manager

    In Alice, two package manager are used, spm and autils. And why two package manager? spm was written for generic package manager for linux distribution. And autils is written specifically for Alice and requires spm in order to install, remove and update packages while managing conflicts. The command apkg (part of autils) is used to fetch and build packages from ports and their abuild files.

    spm

    @@ -483,6 +485,8 @@ $ apkg-redundantdeps (remove redundant dependencies for depends list) $ apkg-redundantdeps -f + +<- back to docs

    Copyright © Alice Linux, 2024-2026

    diff --git a/docs/using_autils.html b/docs/using_autils.html new file mode 100644 index 00000000..55fdc805 --- /dev/null +++ b/docs/using_autils.html @@ -0,0 +1,353 @@ + + + + + + Alice Linux - docs + + + + +
    + +
    +<- back to docs + +

    Using autils

    +

    autils is a collection of POSIX shell scripts for source-based package management on Alice Linux.

    +

    For full command details, see the man pages: man apkg, man reposync, etc.

    +

    Installation

    +
    make install
    +
    +

    This installs all scripts to /usr/bin and man pages to /usr/share/man/man8. Override with:

    +
    make install DESTDIR=/tmp/root PREFIX=/usr/local
    +
    +

    Core concepts

    +

    The package manager, apkg, builds packages from source using abuild recipe files and installs them as .spm packages via the spm(8) backend. Package recipes live in git repositories referenced by the APKG_REPO environment variable.

    +

    Configuration is done through environment variables: there is no config file.

    +

    Basic usage

    +

    Building a package

    +

    From inside a recipe directory:

    +
    cd /path/to/repo/mypkg
    +apkg
    +
    +

    This fetches sources, verifies checksums, builds, and creates a .spm in $APKG_PACKAGE_DIR.

    +

    Installing and upgrading

    +
    apkg -i mypkg          # build and install
    +apkg -i                # same, from inside the recipe directory
    +apkg -I firefox        # install with automatic dependency resolution
    +apkg -u mypkg          # upgrade (rebuild and reinstall)
    +apkg -f mypkg          # force rebuild even if .spm already exists
    +apkg -o mypkg          # download sources only, don't build
    +
    +

    Removing packages

    +
    apkg -r mypkg          # remove a package
    +apkg-purge mypkg       # show what would be removed (dry-run)
    +apkg-purge -p mypkg    # remove package and its unneeded dependencies
    +
    +

    Searching and listing

    +
    apkg -s icon           # search packages by name pattern
    +apkg -s -v icon        # search with version info
    +apkg -a                # list all installed packages
    +apkg -a -v             # list installed packages with versions
    +apkg -S libpng.so      # find which package owns a file
    +apkg -l                # list outdated packages on the system
    +
    +

    Dependency queries

    +
    apkg -d mypkg          # list direct dependencies of a package
    +apkg -D mypkg          # list all dependencies recursively, in install order
    +apkg -j mypkg          # list packages that depend on mypkg
    +
    +

    System upgrade

    +
    apkg -U
    +
    +

    This checks all installed packages for outdated versions, resolves the full dependency tree, installs any new packages, then upgrades existing ones. Set APKG_NOPROMPT=1 to skip the confirmation prompt (useful for scripting). Packages listed in APKG_MASK are skipped.

    +

    Checksums and file lists

    +
    apkg -g mypkg          # regenerate .shasum file
    +apkg -k mypkg          # regenerate .files list from the .spm
    +
    +

    Triggers

    +

    After installing or upgrading packages, apkg can refresh system caches:

    +
    apkg -t                # run triggers for all installed packages
    +apkg -t mypkg          # run only triggers relevant to mypkg
    +
    +

    Triggers include: fontconfig cache, GDK-Pixbuf loaders, GIO modules, GSettings schemas, GTK input method modules, icon theme cache, udev hardware database, X font indices, desktop MIME cache, and shared MIME database. Each trigger only fires if the package actually provides files that need it.

    +

    Helper scripts

    +

    Package inspection

    +
    apkg-deps mypkg        # show runtime library dependencies (via ldd)
    +apkg-foreign           # list installed packages not found in any repo
    +apkg-orphan            # list packages with no dependents installed
    +
    +

    Cleanup

    +
    apkg-clean             # list stale .spm and source files
    +apkg-clean | xargs rm  # actually remove them
    +apkg-clean -p          # list only stale packages
    +apkg-clean -s          # list only stale sources
    +
    +

    Dependency maintenance

    +
    apkg-redundantdeps mypkg       # find transitive deps listed explicitly
    +apkg-redundantdeps              # check all packages
    +apkg-redundantdeps -f mypkg     # fix by removing redundant entries
    +
    +

    Scaffolding

    +
    apkg-genabuild https://example.com/pkg-1.2.3.tar.gz
    +apkg-genabuild https://github.com/user/repo/archive/v1.0.tar.gz
    +
    +

    Derives name and version from the URL and creates a directory with a skeleton abuild. Recognizes GitHub tag archives, PyPI packages (prefixes python-), and CPAN packages (prefixes perl-). An optional second argument overrides the name.

    +

    Standalone utilities

    +

    revdep: find broken library links

    +

    Scans system binaries and libraries for missing shared library dependencies. Run after major upgrades, especially those with library version bumps.

    +
    revdep         # plain output
    +revdep -v      # verbose progress
    +
    +

    Note: revdep only reports problems; it does not rebuild anything. Use apkg -f to rebuild affected packages.

    +

    updateconf: merge .new config files

    +

    When packages are upgraded, new default config files are installed with a .new suffix to avoid overwriting local changes. Run updateconf as root to interactively handle them:

    +
    updateconf
    +
    +

    For each .new file it shows a diff and prompts:

    + +

    reposync: sync git repositories

    +

    Syncs git-based package repos using REPOSYNC_* environment variables:

    +
    export REPOSYNC_CORE="https://codeberg.org/emmett1/alicelinux.git|main|/var/lib/alicelinux"
    +export REPOSYNC_EXTRA="https://codeberg.org/emmett1/extra.git|main|/var/lib/alicelinux/extra"
    +reposync
    +
    +

    Options:

    + +

    Working in a chroot

    +
    apkg-chroot /mnt/alice                  # enter interactive shell
    +apkg-chroot /mnt/alice apkg -i mypkg    # run apkg inside chroot
    +
    +

    Mounts /dev, /proc, /sys, /run, copies /etc/resolv.conf, and cleans up on exit. Must be run as root.

    +

    Environment variables

    +

    Core paths

    + +

    Build behavior

    + +

    Logging

    + +

    Compiler

    + +

    Common workflows

    +

    Building and installing a new package

    +
    cd $APKG_REPO
    +apkg-genabuild https://example.com/mypkg-1.0.tar.gz
    +cd mypkg
    +# edit abuild as needed, add depends file
    +apkg -I mypkg
    +
    +

    Full system maintenance

    +
    reposync                     # sync repos
    +apkg -U                      # system upgrade
    +revdep                       # check for broken libraries
    +updateconf                   # merge config files
    +apkg-clean | xargs rm        # clean up stale files
    +apkg-orphan                  # review packages to potentially remove
    +
    +

    Debugging a failed build

    +
    APKG_KEEP_WORKDIR=1 apkg -f mypkg
    +# inspect $APKG_WORK_DIR/apkg-src-mypkg and apkg-pkg-mypkg
    +
    + +<- back to docs +
    +

    Copyright © Alice Linux, 2024-2026

    +
    + + diff --git a/docs/writing_abuild.html b/docs/writing_abuild.html new file mode 100644 index 00000000..3dd20471 --- /dev/null +++ b/docs/writing_abuild.html @@ -0,0 +1,367 @@ + + + + + + Alice Linux - docs + + + + +
    + +
    +<- back to docs + +

    Writing an abuild recipe

    +

    An abuild file is a POSIX shell snippet that tells apkg how to build a package. The directory containing it must have the same name as the package.

    +

    See man apkg for full details on all options and environment variables, and man apkg-genabuild for the recipe scaffolding tool.

    +

    To quickly scaffold a new recipe from a source URL, use apkg-genabuild:

    +
    apkg-genabuild https://example.com/mypkg-1.2.3.tar.gz
    +
    +

    This creates the directory and a skeleton abuild with name, version, release, and source already populated.

    +

    Directory structure

    +
    mypkg/
    +  abuild        - package recipe (required)
    +  info          - package metadata template (description, homepage, license, maintainer)
    +  depends       - dependency list, one per line (optional)
    +  preinstall    - script run before the package is built (optional)
    +  postinstall   - script run after the package is installed (optional)
    +  .shasum       - source checksums, auto-generated (regenerate with `apkg -g`)
    +  .files        - package file list, auto-generated (regenerate with `apkg -k`)
    +
    +

    Minimal recipe

    +
    name=mypkg
    +version=1.2.3
    +release=1
    +source="https://example.com/$name-$version.tar.gz"
    +
    +

    Required variables

    + +

    Source formats

    +

    The source variable accepts a whitespace-separated list. Five formats are supported:

    + +

    Multiple sources can be specified:

    +
    source="https://example.com/$name-$version.tar.gz
    +        fix-build.patch
    +        default-config::noextract"
    +
    +

    If source is empty, apkg creates a dummy package: useful for meta packages that exist only to pull in dependencies.

    +

    Optional variables

    +

    Build control

    + +

    Package content control

    + +

    Runit services

    + +
    sv="run finish mydaemon.run mydaemon.finish"
    +
    +

    Build hooks

    +

    Custom build function

    +

    If a build() function is defined, it completely replaces the auto-detected build system. Two variables are available:

    + +

    Several DESTDIR-style variables are pre-exported: DESTDIR, DEST_DIR, INSTALLROOT, install_root, INSTALL_ROOT.

    +
    build() {
    +    cd "$SRC/$name-$version"
    +    ./configure --prefix=/usr --sysconfdir=/etc
    +    make
    +    make DESTDIR="$PKG" install
    +}
    +
    +

    build() runs with set -ex, so the script exits on any error and prints each command.

    +

    Pre/post build hooks

    +

    Without a build() function, you can use prebuild() and postbuild():

    +
    prebuild() {
    +    sed -i 's/broken/fixed/g' src/whatever.c
    +}
    +
    +postbuild() {
    +    mv "$PKG/usr/bin/wrongname" "$PKG/usr/bin/rightname"
    +}
    +
    +

    The execution order is: prebuild() → auto-detected build system → postbuild().

    +

    Build system auto-detection

    +

    When no build() is defined and no build_type is set, apkg checks for these files in order:

    +
      +
    1. meson.build: meson with LTO, PIE, wrap_mode=nodownload, buildtype=plain
    2. +
    3. configure: autotools ./configure --prefix=/usr --sysconfdir=/etc ...
    4. +
    5. CMakeLists.txt: cmake with Release build type, prefers ninja
    6. +
    7. setup.py: python3 setup.py build && install --root=$PKG
    8. +
    9. Makefile.PL: perl Makefile.PL && make && make install
    10. +
    11. Makefile / makefile / GNUmakefile: raw make with standard variables
    12. +
    +

    The exact flags for each build system are documented in doc/defaultbuildopts.

    +

    Post-build processing

    +

    After compilation, apkg automatically:

    + +

    The info file

    +

    apkg-genabuild creates an info file alongside the abuild with package metadata:

    +
    description:
    +homepage:
    +license:
    +maintainer: name <name at mail dot com>
    +
    +

    Fill in each field as appropriate. The maintainer line uses the format name <email>.

    +

    The depends file

    +

    One dependency per line. Lines starting with # are comments. Dependencies are just package names: no version constraints.

    +
    # Direct dependencies of mypkg
    +zlib
    +libpng
    +freetype
    +
    +

    Dependencies are recursive: when installing with -I, apkg will resolve the full tree. Only list direct dependencies; transitive ones are handled automatically. Use apkg-redundantdeps to find and clean up transitive entries.

    +

    preinstall / postinstall scripts

    +

    These are optional executable scripts in the recipe directory:

    + +

    If APKG_ROOT is set (alternative install root), these scripts run inside a chroot.

    +

    Checksums and file lists

    + +

    Complete example

    +
    name=hello
    +version=2.12.1
    +release=1
    +source="https://ftp.gnu.org/gnu/hello/$name-$version.tar.gz"
    +
    +build() {
    +    cd "$SRC/$name-$version"
    +    ./configure --prefix=/usr
    +    make
    +    make DESTDIR="$PKG" install
    +}
    +
    +

    With a depends file:

    +
    zlib
    +
    +

    With a postinstall script:

    +
    #!/bin/sh
    +echo "hello was installed!"
    +
    +

    Tips

    + + +<- back to docs +
    +

    Copyright © Alice Linux, 2024-2026

    +
    + + diff --git a/ports.html b/ports.html index 76a7b083..769d6c79 100644 --- a/ports.html +++ b/ports.html @@ -191,7 +191,7 @@ - + @@ -209,7 +209,7 @@ - + -- cgit v1.2.3
    reponameversiondependencies
    coreautils0.2-1
    coreautils0.1-1
    coreb3sum1.3.1-1
    corebaselayout1-1
    corebison3.8.2-1
    coremake4.4.1-1
    coremusl1.2.6-2
    corepatch2.8-1
    corespm0.1-1
    corespm20250626-1
    corexz5.8.3-1
    corezlib-ng2.3.3-1
    corezstd1.5.7-1