Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

76.1. perl-net-ssleay-1.96

OpenSSL bindings for perl

Version 1.96, release 1
Shelf perl-cpan — The perl interpreter and every perl-* CPAN module
Phase 40_lang (Languages), 51 of 186 in build order
Licence Artistic-2.0
Homepage https://metacpan.org/dist/Net-SSLeay
Build time 1.0 SBU
Installed size 1.6 MiB in 83 files
Recipe ports/core/perl-cpan/perl-net-ssleay/kpkgbuild

About

Net::SSLeay is the Perl binding to OpenSSL’s libssl and libcrypto, an XS module compiled against the openssl port. perl-io-socket-ssl is built on it, and the two are what git send-email loads to send over TLS.

Why it is in KDOS

The comment above the 5 ports from perl-net-ssleay to perl-authen-sasl in script/phases/40_lang/packages.d/perl-cpan.txt:

git send-email's TLS and SMTP authentication are these perl modules, which it loads only when a send needs them: without them every send over TLS or with a login fails, and nothing else notices.

Sources

Dependencies

Depends on: perl, openssl, zlib.

Required by (1): perl-io-socket-ssl.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install perl-net-ssleay'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/perl-cpan/perl-net-ssleay.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/perl-cpan/perl-net-ssleay
echo 'ab213691685fb2a576c669cbc8d9266f8165a31563ad15b7c4030b94adfc0753  perl-net-ssleay-1.96.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/perl-net-ssleay
SRC=$SRC_ROOT/perl-net-ssleay-1.96
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf perl-net-ssleay-1.96.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/openssl-4.patch"

export OPENSSL_PREFIX=/usr PERL_MM_USE_DEFAULT=1
perl Makefile.PL INSTALLDIRS=vendor
make
make DESTDIR=$PKG install
find "$PKG" -name .packlist -delete
find "$PKG" -name perllocal.pod -delete
find "$PKG" -type d -empty -delete

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/perl-net-ssleay, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf perl-net-ssleay-1.96-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/perl-net-ssleay, and runs the triggers its paths call for.

Contents

Installed directories: /usr/lib/perl5/vendor_perl/Net, /usr/lib/perl5/vendor_perl/auto/Net, /usr/share/licenses/perl-net-ssleay.

Notes

Makefile.PL exits with status 0 and writes no Makefile when it cannot find OpenSSL, so such a failure shows up at the next step, where make finds no makefile.

The find lines after the install remove .packlist and perllocal.pod, MakeMaker’s records of what it installed, which kpkg’s own database replaces, and the empty directories they leave.