pkgng/pkgng dbc6b67. NEWS auto.def

1.6.99.1
DeltaFile
+28-0NEWS
+1-1auto.def
+29-12 files

pkgng/pkgng a478b48docs pkg-search.8, libpkg pkg.h.in

search: add search -Scomment-description

Fixes: #2118
DeltaFile
+71-1tests/frontend/search.sh
+20-7src/search.c
+12-1libpkg/repo/binary/query.c
+12-0docs/pkg-search.8
+1-0libpkg/pkg.h.in
+116-95 files

pkgng/pkgng 5151477libpkg pkg_event.c pkg_sandbox.c, tests Kyuafile.in

sandbox: provide a default handler for PKG_EVENT_SANDBOX_GET_STRING

Fixes: #2121
DeltaFile
+8-6libpkg/pkg_event.c
+5-0libpkg/pkg_sandbox.c
+1-0tests/Kyuafile.in
+14-63 files

pkgng/pkgng 95a90f1libpkg pkg_jobs.c, tests/frontend delete.sh

delete: fix -fR

Fixes: #2124
DeltaFile
+30-0tests/frontend/delete.sh
+2-1libpkg/pkg_jobs.c
+32-12 files

pkgng/pkgng da3a159libpkg pkg_jobs.c, tests Kyuafile.in

jobs: honor PKG_FLAG_DRY_RUN in pkg_jobs_execute()

This allows other applications that the cli to rely on it.

Fixes: #2137
DeltaFile
+93-0tests/lib/pkg_jobs_dryrun.c
+3-0libpkg/pkg_jobs.c
+1-0tests/Kyuafile.in
+97-03 files

pkgng/pkgng 46aa15elibpkg pkg_jobs.c, tests/frontend lock.sh

install: emit a message when trying to install -f a locked package

Fixes: #2151
DeltaFile
+50-0tests/frontend/lock.sh
+4-2libpkg/pkg_jobs.c
+54-22 files

pkgng/pkgng 0273291scripts/periodic 460.pkg-checksum.in

pkg-checksum: actually return a useful code

Fixes: #2167
DeltaFile
+2-1scripts/periodic/460.pkg-checksum.in
+2-11 files

pkgng/pkgng cdf3254libpkg pkg_solve.c, tests/frontend force_reinstall_shlib.sh

jobs: before scheduling a DELETE jobs verify if it is really needed

When scheduling a delete job for a install/upgrade (post solver) verify
dependency are still statisfied and no conflicts with installed packages
both both conditions are met and the package wasn't explicitly request
deletion then the package is keept

Fixes: #2566, #1705
DeltaFile
+92-0libpkg/pkg_solve.c
+72-1tests/frontend/force_reinstall_shlib.sh
+164-12 files

pkgng/pkgng dfc63e2src updating.c, tests/frontend updating.sh

updating: support glob patterns in user-provided port names

The matcher() function only applied glob-to-regex conversion to patterns
found in the AFFECTS line of UPDATING, but never to the port names
provided by the user on the command line.  This meant that
"pkg updating 'lang/php7*'" would fail to match an UPDATING entry about
lang/php74-imagick because the origin was compared with strcmp().

Replace the matching logic with fnmatch() applied in both directions:
the AFFECTS word as a pattern against the origin, and the origin as a
pattern against the AFFECTS word.  This covers *, ? and [...] globs on
either side.  A regex fallback is kept for {a,b} brace expansion and
(a|b) alternation syntax which fnmatch() does not support.

The regex_cache is removed since fnmatch() requires no precompilation.

Fixes: #1786
DeltaFile
+28-64src/updating.c
+43-0tests/frontend/updating.sh
+71-642 files

pkgng/pkgng 35f78fclibpkg fetch.c pkg_audit.c

audit: don't leave behind tmp files

pkg_fetch_file_tmp now unlink the temp file immedialy after mkstemps
and return the open fd instead of closing it.
DeltaFile
+12-5libpkg/fetch.c
+1-8libpkg/pkg_audit.c
+1-1libpkg/pkg.h.in
+14-143 files

pkgng/pkgng 2acedb1tests/lib pkg_elf.c

static_non_elf: ignore on macOS since it does not produce elf

While here, silence warning from ranlib
DeltaFile
+11-9tests/lib/pkg_elf.c
+11-91 files

pkgng/pkgng bac49fblibpkg pkg_event.c

EVENT_PIPE: fix invalid json

Fixes: #2125
DeltaFile
+7-5libpkg/pkg_event.c
+7-51 files

pkgng/pkgng 0bd96a4scripts/periodic 405.pkg-base-audit.in

audit: innitialize rc to prevent arithmetic error when stat succeed

reset rc after the fetch decision block so a missing does not cause
the function to return 3

Fixes: #2153
DeltaFile
+5-1scripts/periodic/405.pkg-base-audit.in
+5-11 files

pkgng/pkgng 35584e6libpkg pkg_audit.c, src audit.c

Fix heap buffer overread when vuxml is empty
DeltaFile
+4-0libpkg/pkg_audit.c
+1-0src/audit.c
+5-02 files

pkgng/pkgng 637c144libpkg pkg_elf.c, tests/lib pkg_elf.c

elf: really analyse the content of an .a

Don't claim it is architecture dependant if it is not

Fixes: #2008
DeltaFile
+52-0tests/lib/pkg_elf.c
+23-3libpkg/pkg_elf.c
+75-32 files

pkgng/pkgng ccbaad9src audit.c

audit: close the db late

Trying to fix a TSAM reported issue
While here plug a LSAN reported memory leak
DeltaFile
+2-2src/audit.c
+2-21 files

pkgng/pkgng 2aa6216src upgrade.c, tests/frontend upgrade.sh

upgrade: fix yet another endless upgrade loop of pkg

Fixes:  #2023
DeltaFile
+36-0tests/frontend/upgrade.sh
+1-1src/upgrade.c
+37-12 files

pkgng/pkgng bc7e444libpkg pkg_add.c, tests/frontend upgrade.sh

pkg_add: remove existing file before renaming temp directory

When extracting a package, if a file or symlink exists at the
target path of a temporary directory, renameat() fails. This can
happen when a package replaces a symlink with a real directory
(e.g., symlink-to-directory transitions between package versions).

Remove the existing entry before the rename, matching the logic
already applied for regular files later in pkg_extract_finalize().

Fixes:   #2041
DeltaFile
+38-0tests/frontend/upgrade.sh
+4-0libpkg/pkg_add.c
+42-02 files

pkgng/pkgng 33ce293src utils.c

plug memory leak
DeltaFile
+1-0src/utils.c
+1-01 files

pkgng/pkgng 6a93ea1libpkg pkgdb.c pkg.h.in, src version.c create.c

db: only open the db readonly when write is not needed

Fixes: #1562
DeltaFile
+3-2libpkg/pkgdb.c
+2-2src/version.c
+2-1libpkg/pkg.h.in
+1-1src/create.c
+1-1src/info.c
+1-1src/query.c
+10-84 files not shown
+14-1210 files

pkgng/pkgng 44e68adlibpkg pkg_jobs.c, tests/frontend install.sh

install: accept http:// https:// file:// url to install pkg

Fixes: #1584
DeltaFile
+42-0libpkg/pkg_jobs.c
+28-1tests/frontend/install.sh
+70-12 files

pkgng/pkgng daaede3docs pkg-check.8

check(8): document how to reinstall corrupted packages

Fixes:  #1604
DeltaFile
+5-0docs/pkg-check.8
+5-01 files

pkgng/pkgng b07ec57docs pkg-upgrade.8

upgrade(8): document how to reinstall a single package

Fixes: #1281
DeltaFile
+5-0docs/pkg-upgrade.8
+5-01 files

pkgng/pkgng 5e8bc8csrc query.c, tests/frontend query.sh

query: for multiline print en empty line if no information to display

Fixes: #1037
DeltaFile
+34-1tests/frontend/query.sh
+13-0src/query.c
+47-12 files

pkgng/pkgng 7d88028tests/frontend install.sh

install: add new tests for the behaviour change
DeltaFile
+119-1tests/frontend/install.sh
+119-11 files

pkgng/pkgng 85173eedocs pkg-install.8, src install.c

install: small behaviour change!

pkg install foo
if foo is already installed and marked a automatic will propose
to mark it as non automatic
pkg install -A foo
if foo is already installed and marked as non automatic will propose
to mark it as automatic

Fixes:  #1090
DeltaFile
+40-2src/install.c
+13-3docs/pkg-install.8
+53-52 files

pkgng/pkgng f2f1f4dsrc rquery.c

plug memory leaks reported by lsan
DeltaFile
+14-1src/rquery.c
+14-11 files

pkgng/pkgng 501f6d8src set.c, tests/frontend set.sh

set: -n never matches the first argument vs origin anymore

Fixes: #1187
DeltaFile
+27-0tests/frontend/set.sh
+2-1src/set.c
+29-12 files

pkgng/pkgng a376adelibpkg pkgdb.c

pkgdb_close: remove sqlite3_shutdown

pkgdb_close already clean enough, sqlite3_shutdown is not threadsafe
and supposed to be called only once while pkgdb_close can be called
multiple times
DeltaFile
+0-1libpkg/pkgdb.c
+0-11 files

pkgng/pkgng f93cfeflibpkg pkg_audit.c

audit: plug memory leak
DeltaFile
+2-0libpkg/pkg_audit.c
+2-01 files