pkgng/pkgng 8c6b880libpkg pkg_repo.c

pkg_repo_archive_extract_archive: Remove the unused rc var
DeltaFile
+4-10libpkg/pkg_repo.c
+4-101 files

pkgng/pkgng dbf190cscripts/completion _pkg.in

Fix available repositories completion
DeltaFile
+1-1scripts/completion/_pkg.in
+1-11 files

pkgng/pkgng 1f3a809libpkg Makefile.in, mk prog.mk lib.mk

mk: let the environ choose the install command
DeltaFile
+8-0mk/defs.mk.in
+1-1src/Makefile.in
+1-1mk/prog.mk
+1-1mk/lib.mk
+1-1libpkg/Makefile.in
+12-45 files

pkgng/pkgng f97ef9fexternal/libecc Makefile.in, libpkg Makefile.in pkg_checksum.c

Remove the embedded sha256 for the libecc version.

To reduce code, go ahead and use the hash implementation from libecc instead
of using a duplicated version in the tree.
DeltaFile
+0-152libpkg/sha256.c
+0-34libpkg/sha256.h
+14-12libpkg/pkg_checksum.c
+1-4external/libecc/Makefile.in
+1-1libpkg/Makefile.in
+16-2035 files

pkgng/pkgng 8493609libpkg pkg_jobs_universe.c pkg.h.in, libpkg/private pkg.h

pkg: keep URL package downloads on an open descriptor
DeltaFile
+78-47libpkg/pkg_jobs.c
+34-6libpkg/pkg_add.c
+12-19src/add.c
+8-0libpkg/pkg.h.in
+6-0libpkg/private/pkg.h
+4-1libpkg/pkg_jobs_universe.c
+142-732 files not shown
+145-738 files

pkgng/pkgng 13f9f98tests/frontend create.sh

create: use bsdtar in override_prefix test
DeltaFile
+2-2tests/frontend/create.sh
+2-21 files

pkgng/pkgng ec7e8ce.builds alpine.yml, tests/frontend test_subr.sh rootdir.sh

alpine: fix the 15 failing tests

Add libarchive-tools (provides bsdtar) to the Alpine image, matching
Debian.
Replace readlink -e with realpath everywhere (busybox does not have
readlink -e and coreutils (which have realpath since 2012) is now
supporting realpath in every supported linux distro by default.
Add a #!/bin/sh shebang to test_subr.sh so musl execvp runs it when
the triggers test invokes it directly.
DeltaFile
+1-5tests/frontend/rootdir.sh
+2-0tests/frontend/test_subr.sh
+1-0.builds/alpine.yml
+4-53 files

pkgng/pkgng bde69a3tests/frontend musl.bin musl.binin

tests/frontend: store musl fixture as .binin

musl.bin was committed directly instead of as musl.binin like every
other ELF fixture, so it was missing from out-of-tree builds and the
abi:elfparse / create-parsebin tests failed.
DeltaFile
+0-0tests/frontend/musl.bin
+0-0tests/frontend/musl.binin
+0-02 files

pkgng/pkgng 38cccd7libpkg pkg_repo.c

keys: fallback on the host when using -r
DeltaFile
+4-0libpkg/pkg_repo.c
+4-01 files

pkgng/pkgng b3df0e9tests Makefile.in, tests/frontend test_environment.sh.in

musl: hook properly the tests
DeltaFile
+5-0tests/frontend/test_environment.sh.in
+1-0tests/Makefile.in
+6-02 files

pkgng/pkgng af3c693libpkg pkg_elf.c, tests/frontend musl.bin create-parsebin.sh

pkg_elf: detect Linux from musl ELF interpreter

musl binaries (e.g. on Alpine Linux) do not carry the glibc GNU ABI
tag note, so pkg could not determine the OS from the ELF and aborted
with "Unable to determine ABI, /bin/sh cannot be parsed".  The host
uname fallback is unsuitable as it breaks cross-rootdir operation.

Detect Linux from the binary itself by matching the PT_INTERP loader
path: glibc (ld-linux) and musl (ld-musl) loaders identify a Linux
target, unlike FreeBSD (ld-elf) or NetBSD (ld.elf_so).  The version
stays 0.0 for musl since no ABI version is embedded.

Add a musl.bin fixture and wire it into the ELF parse and
create-parsebin tests.  Make the native test tolerate a missing
GNU ABI tag by defaulting the version to 0.0.
DeltaFile
+46-0libpkg/pkg_elf.c
+6-1tests/frontend/abi.sh
+1-1tests/frontend/create-parsebin.sh
+0-0tests/frontend/musl.bin
+53-24 files

pkgng/pkgng 22201a3src event.c

plug memory leak
DeltaFile
+5-2src/event.c
+5-21 files

pkgng/pkgng 129afef. Makefile.in, libpkg Makefile.in

restore compat lib
DeltaFile
+1-1Makefile.in
+2-0libpkg/Makefile.in
+3-12 files

pkgng/pkgng 20433d0.builds freebsd.yml alpine.yml

ci: install ATF dev packages on Alpine and FreeBSD
DeltaFile
+1-0.builds/freebsd.yml
+1-0.builds/alpine.yml
+2-02 files

pkgng/pkgng d10f575external/fetch http.c, libpkg fetch_libfetch.c

Limit HTTP mirror list input

HTTP mirror lists are parsed before pkg fetches signed repository
metadata.  The reader used getline() and appended every URL entry,
allowing a mirror-list source to consume unbounded memory.

Limit the list size, line size, and number of entries.  Close the
response instead of draining it when parsing stops early.

This only affects repositories configured with mirror_type: HTTP,
which is not the default FreeBSD repository configuration.
DeltaFile
+59-11libpkg/fetch_libfetch.c
+6-2external/fetch/http.c
+65-132 files

pkgng/pkgng d6be10alibpkg pkg_jobs.c

pkg_jobs: restore merge-diff for options and deps comparison
DeltaFile
+61-52libpkg/pkg_jobs.c
+61-521 files

pkgng/pkgng f71f7db.builds freebsd.yml debian.yml

ci: rerun tests
DeltaFile
+1-1.builds/freebsd.yml
+1-1.builds/debian.yml
+1-1.builds/alpine.yml
+3-33 files

pkgng/pkgng 6580142. configure.def, compat bsd_compat.h Makefile.in

compat: restore humanize_number and strtonum for macOS
DeltaFile
+185-0compat/humanize_number.c
+71-0compat/strtonum.c
+61-0compat/humanize_number.h
+13-0compat/Makefile.in
+8-0compat/bsd_compat.h
+1-1configure.def
+339-16 files

pkgng/pkgng 9c71ddflibpkg utils.c

pkg_closefrom: use /proc/self/fd for all Linux, drop close_range
DeltaFile
+1-9libpkg/utils.c
+1-91 files

pkgng/pkgng 5e8fa10compat reallocf.c humanize_number.h, libpkg pkg_add.c

compat: rely only on libbsd for compat code
DeltaFile
+0-185compat/humanize_number.c
+0-108compat/funopen.c
+0-71compat/strtonum.c
+0-61compat/humanize_number.h
+0-52compat/reallocf.c
+0-39libpkg/pkg_add.c
+0-5166 files not shown
+4-58912 files

pkgng/pkgng 1af6303. configure.def, external/sqlite sqlite_cfg.h

configure: drop redundant function checks, fix sqlite config

Remove function checks for symbols guaranteed by standards or present
on all supported platforms (Linux, macOS, FreeBSD, OpenBSD, NetBSD,
DragonFly):

- memmove: required by C89
  visualization
- pread/pwrite: POSIX.1-2001, present on all targets
- utimensat: POSIX.1-2008, present on all targets
- duplicate strchrnul check
DeltaFile
+1-13configure.def
+3-0external/sqlite/sqlite_cfg.h
+4-132 files

pkgng/pkgng bff1ef2. configure.def, compat Makefile.in bsd_compat.h

Add pkg_closefrom: portable, async-signal-safe fd closing

Replace the compat closefrom() with a platform-specific pkg_closefrom()
that is async-signal-safe where possible:

- Linux: close_range(2), falling back to a /proc/self/fd scan
- illumos/Solaris: /proc/self/fd scan
- BSD: native closefrom(2)
- Other platforms: blind loop up to sysconf(_SC_OPEN_MAX)
DeltaFile
+0-88compat/closefrom.c
+50-1libpkg/utils.c
+0-10configure.def
+0-4compat/bsd_compat.h
+1-2compat/Makefile.in
+1-0libpkg/private/utils.h
+52-1056 files

pkgng/pkgng bdb9c2b. configure.def, compat bsd_compat.h endian_util.h

Add pkg-specific endian decoders

pkg only uses le32dec/be32dec/le64dec/be64dec, which the BSDs provide
but Linux/macOS do not. Replace the configure HAVE_DECL_* detection and
compat/endian_util.h fallback with pkg"s own static inline decoders in
libpkg/private/endian.h, identical on every platform.
DeltaFile
+0-171compat/endian_util.h
+48-0libpkg/private/endian.h
+0-16configure.def
+5-11libpkg/pkg_elf.c
+5-11libpkg/binfmt_macho.c
+0-1compat/bsd_compat.h
+58-2101 files not shown
+59-2107 files

pkgng/pkgng a2f469atests Makefile.in, tests/lib sb.c stringset.c

Add unit tests for sb_t and stringset_t
DeltaFile
+216-0tests/lib/stringset.c
+203-0tests/lib/sb.c
+8-2tests/Makefile.in
+427-23 files

pkgng/pkgng 119ddbcexternal/sqlite sqlite3.h shell.c

sqlite: update to 3.53.4
DeltaFile
+590-317external/sqlite/sqlite3.c
+147-47external/sqlite/shell.c
+9-7external/sqlite/sqlite3.h
+746-3713 files

pkgng/pkgng 6e611e2libpkg pkg_printf.c

Fix build with gcc
DeltaFile
+16-10libpkg/pkg_printf.c
+16-101 files

pkgng/pkgng 2aa22a6src Makefile.in

Ensure libmd comes after lzma if used
DeltaFile
+4-0src/Makefile.in
+4-01 files

pkgng/pkgng 831b49flibpkg rcscripts.c pkg_jobs.c, libpkg/pkg stringset.h

Replace pkghash with stringset where needed

Replace pkghash used purely as a string set with a lighter stringset_t
DeltaFile
+209-0libpkg/stringset.c
+26-26tests/lib/rcscripts.c
+50-0libpkg/pkg/stringset.h
+17-13libpkg/triggers.c
+8-8libpkg/rcscripts.c
+8-8libpkg/pkg_jobs.c
+318-553 files not shown
+327-619 files

pkgng/pkgng 88021b4libpkg pkg_jobs.c pkg_event.c, libpkg/private pkg_printf.h

refacto: convert from xstring to sb_t

This brings speed improvement from 2 to 4 times faster for
string manipulation
DeltaFile
+311-355libpkg/pkg_printf.c
+187-182src/query.c
+156-163libpkg/pkg_event.c
+108-133libpkg/pkg_jobs.c
+86-86libpkg/private/pkg_printf.h
+77-77tests/lib/pkg_printf_test.c
+925-99646 files not shown
+1,660-1,68952 files

pkgng/pkgng 46dfd1alibpkg pkg_printf.c

Replace escape switch with lookup table
DeltaFile
+12-52libpkg/pkg_printf.c
+12-521 files