pkgin/pkgin ae054fd. CHANGES.md

Remove version 23.12.0 from changes.

This version was only ever pushed to GitHub and didn't make its way into
pkgsrc, so just remove this entry to avoid any confusion in update
messages.  The tag and commits still exist for completeness sake.
DeltaFile
+0-6CHANGES.md
+0-61 files

pkgin/pkgin f56cabe. download.c main.c

Revert "Require valid certs for https:// repositories."

This reverts commit 5033ff74255a7615331e4c59e6230d7abd7506e3.

This commit was intended to match a parallel change in libfetch, however
what ended up in libfetch was something different, and so this commit no
longer does anything as there is no "V" flag support.

Instead, users should use the SSL_NO_VERIFY_PEER environment variable if
they wish to skip verification in pkgin and any other application that
uses libfetch.

Given this version of pkgin never made it into pkgsrc I'm ok with it
being ripped out with no backwards compatibility.
DeltaFile
+3-23download.c
+2-11main.c
+2-5pkgin.1.in
+1-5README.md
+0-2pkgin.h
+8-465 files

pkgin/pkgin 387d616external plist.c iterate.c

external: Add header guards for nbcompat includes.

Fixes building on macOS with no nbcompat present.
DeltaFile
+4-1external/plist.c
+2-0external/iterate.c
+2-0external/lpkg.c
+8-13 files

pkgin/pkgin 37e764d. actions.c

Logs should always have ISO8601 timestamps in UTC
DeltaFile
+3-3actions.c
+3-31 files

pkgin/pkgin ebdb299. configure Makefile.in

autoconf: Regenerate.

This also bumps autoconf to 2.72 so additional noise there.
DeltaFile
+548-508configure
+2-27Makefile.in
+9-12config.h.in
+2-2aclocal.m4
+561-5494 files

pkgin/pkgin dac4275. configure.ac Makefile.am

autoconf: Further improve previous change.

Rather than saving flags for each individual component to add later,
just use autoconf's builtin handling.  There's no meaningful difference
in argument handling for it to be worth it.

Remove openssl checks, and enhance the libfetch test to try linking
against openssl libraries if the first test without fails.  pkgin itself
does not use openssl, only indirectly through libfetch, so it didn't
really make sense to have to specify it.

Some miscellanous whitespace cleanups while here.
DeltaFile
+23-73configure.ac
+1-16Makefile.am
+24-892 files

pkgin/pkgin 69c825f. configure.ac

configure.ac: Avoid existence checks in system we're building for.

It is not important that, e.g., /usr/pkg/include/fetch.h exist in the
build environment; it is important that #include <fetch.h> and
linking against -lfetch work.  When cross-building, these files need
to be resolved relative to the destdir, so checking for
/usr/pkg/include/fetch.h is just wrong.  So use AC_CHECK_HEADER,
AC_CHECK_LIB instead of `test -f' and `test -d'.

Allow caller to specify the exact preprocessor flags, linker flags,
and required libraries via LIBxxx_INCLUDES/LDFLAGS/LIBS if needed;
this way if, e.g., libfetch is statically linked and thus requires
the caller to explicitly link with -lssl -lcrypto, the caller can
specify that via `LIBFETCH_LIBS="-lfetch -lssl -lcrypto"'.

This change also renders the `-with-...' options non-mandatory; what
is mandatory is that the header be includable and the library be
linkable.


    [11 lines not shown]
DeltaFile
+50-66configure.ac
+50-661 files

pkgin/pkgin 3136b23. configure config.h.in

autoreconf -fiv
DeltaFile
+307-158configure
+12-0config.h.in
+319-1582 files

pkgin/pkgin 777eeb9. configure CHANGES.md

Release 23.12.0.
DeltaFile
+10-10configure
+6-0CHANGES.md
+1-1configure.ac
+17-113 files

pkgin/pkgin 5033ff7. download.c main.c

Require valid certs for https:// repositories.

New `-i' option to allow insecure transport.

Requires libfetch>=2.40.
DeltaFile
+23-3download.c
+11-2main.c
+5-2pkgin.1.in
+5-1README.md
+2-0pkgin.h
+46-85 files

pkgin/pkgin 0bb4739. configure CHANGES.md

Release 23.8.1.
DeltaFile
+10-10configure
+5-0CHANGES.md
+1-1configure.ac
+16-113 files

pkgin/pkgin 8de4e70. pkgindb_queries.c main.c

Fix keep/unkeep regression in 23.8.0.

Changing pkg_keep() to accept a single argument broke running "keep" and
"unkeep" with multiple arguments.  While here, fix the exit status so
that failures are now reported correctly.
DeltaFile
+8-4pkgindb_queries.c
+8-2main.c
+16-62 files

pkgin/pkgin 0fb025c. CHANGES.md configure

Release 23.8.0.
DeltaFile
+41-0CHANGES.md
+10-10configure
+1-1configure.ac
+52-113 files

pkgin/pkgin 0ce431d. pkgindb_queries.c

Update CHECK_DB_LATEST to the latest pkgin.sql.
DeltaFile
+3-1pkgindb_queries.c
+3-11 files

pkgin/pkgin 96777ce. order.c download.c

Order downloads alphabetically and print counters.
DeltaFile
+25-5order.c
+1-1download.c
+26-62 files

pkgin/pkgin 55e58c7. summary.c impact.c

Plug various memory leaks.
DeltaFile
+11-5summary.c
+12-2impact.c
+10-3depends.c
+33-103 files

pkgin/pkgin cec4962. pkg_str.c

Avoids globs in -[0-9]* patterns.

Fixes issue seen with e.g. postgresql9[01235-9]-[0-9]* where an
incorrect pkgbase was computed.
DeltaFile
+4-2pkg_str.c
+4-21 files

pkgin/pkgin 426b77f. pkg_check.c actions.c

Use a Plistarray for conflicts handling.

Also add DISTINCT to the LOCAL_CONFLICTS query, reduces the number of
distinct CONFLICTS entries by around 50% on the test system.  Overall,
improves performance of "pkgin -n upgrade" by around 20%.
DeltaFile
+95-17pkg_check.c
+14-12actions.c
+22-1pkgin.h
+1-1pkgindb_queries.c
+132-314 files

pkgin/pkgin f161213. impact.c

Improve and fix record_supersedes().

Fix logic error with strcmp() checking that meant we were only ever
handling a maximum of one SUPERSEDES match, and use the optional PKGBASE
returned by the SQL query to speed up find_local_pkg() searching.
DeltaFile
+7-3impact.c
+7-31 files

pkgin/pkgin bf85e64. depends.c impact.c

Implement hashed lookups for the majority of lists.

Add a new array type which is an array of SLISTs, and use them where we
will often look up packages by name.  djb_hash() is used as the hashing
function for good distribution, and each type of hash has its own size
based on performance analysis on the test system.

Many parts of the depends and impact code needed altering to work with
this, and along the way a number of bugs were fixed, mainly around
partial installs where previously we did not correctly consider reverse
dependencies and what happens if they themselves are updated.  Partial
upgrades now correctly recurse both ways for upgraded packages.

As well as fixing bugs, the main benefit of hashed lookups is
performance, and this commit speeds up "pkgin -n upgrade" by 10x on the
test system, and "pkgin -n install zlib" by 5x.
DeltaFile
+257-156depends.c
+268-134impact.c
+213-27pkglist.c
+127-26pkg_str.c
+134-9pkgin.h
+11-11actions.c
+1,010-3636 files not shown
+1,052-39612 files

pkgin/pkgin b70dc53. summary.c, external iterate.c lib.h

Improve performance of add_required_by().

This is the optimisation as described in my tech-pkg review request:

  https://mail-index.netbsd.org/tech-pkg/2023/08/07/msg027952.html

where pkgdb iterations can be configured to be ignored after finding the
first valid match.  Saves many unnecessary calls to pkg_order() and
improves performance by around 12x on my test system.
DeltaFile
+30-4external/iterate.c
+1-1external/lib.h
+1-1summary.c
+32-63 files

pkgin/pkgin de91a30. pkg_check.c actions.c

Gather up all conflicts before printing them.

Avoids the user having to type "y" for each of them just to see if there
are any other conflicts.  While here tidy things up a bit and simplify.
DeltaFile
+20-22pkg_check.c
+18-13actions.c
+38-352 files

pkgin/pkgin ed4b6e1. actions.c download.c

Implement counters for downloads.
DeltaFile
+13-5actions.c
+7-5download.c
+1-1pkgin.h
+21-113 files

pkgin/pkgin 365a23a. actions.c messages.h

Add counter for removals too.
DeltaFile
+12-7actions.c
+0-1messages.h
+12-82 files

pkgin/pkgin b2a5b74. pkglist.c impact.c

Various compiler warning fixes.
DeltaFile
+6-5pkglist.c
+3-3impact.c
+2-2actions.c
+1-1main.c
+1-1autoremove.c
+1-1fsops.c
+14-136 files

pkgin/pkgin b88700b. summary.c main.c

Plug a bunch of memory leaks.

Found using the macOS leaks(1) command running against the test suite.
DeltaFile
+13-1summary.c
+11-2main.c
+8-0actions.c
+3-3impact.c
+2-1download.c
+2-0autoremove.c
+39-73 files not shown
+45-79 files

pkgin/pkgin 7dd8dec. actions.c pkglist.c

Add pkgfs to Pkglist, path to downloaded file.

Saves a duplicate string in different places.  While here ensure all
char Pkglist entries are freed.
DeltaFile
+16-20actions.c
+6-2pkglist.c
+3-2pkgin.h
+25-243 files

pkgin/pkgin 7940de0. actions.c

Print a simple progress counter when installing.
DeltaFile
+22-6actions.c
+22-61 files

pkgin/pkgin 2a29dff. actions.c messages.h

Improve output messages when reducing disk usage.

Also go back to using defines for these messages, it's getting a little
messy.
DeltaFile
+42-24actions.c
+20-0messages.h
+62-242 files

pkgin/pkgin eaf6c75. pkgin.sql pkgindb_queries.c

Clean up ancilliary table handling.

Be consistent in how DEPENDS, CONFLICTS, etc are handled.  Avoid magic
queries that force them to have the same column names, and instead
rename the columns so they make sense for each.  Start using lowercase
column names for readability.

As an example the PROVIDES/REQUIRES tables now have a "filename" column
given they represent file paths, instead of e.g. REMOTE_REQUIRES_PKGNAME
which made no sense.

Ensure all relevant indexes are created, speeding up database queries.

New "switch-repo" test in the test suite verifies correct database
handling.
DeltaFile
+108-92pkgin.sql
+68-61pkgindb_queries.c
+41-45summary.c
+13-12pkgindb.h
+9-9depends.c
+4-4pkg_check.c
+243-2232 files not shown
+246-2268 files