Commit graph

876 commits

Author SHA1 Message Date
nia
2c981551fd pkg_install: add a cast to satisfy GCC, NFCI 2021-04-10 20:10:48 +00:00
nia
a7abeffa70 pkg_install-20210410: simplify checking for netbsd versions
only care about the first number, unless it's -current
2021-04-10 11:36:56 +00:00
nia
43676aeadb pkg_install-20210308
- update pkg_add's examples in its man page for 2021 compliance.
2021-03-08 15:25:47 +00:00
ryoon
308e0736b1 pkg_install: Bump PKGREVISON to include odbl-v1 as acceptable license 2021-03-06 04:41:53 +00:00
ryoon
18113c40e6 pkg_install: Add odbl-v1 to default acceptable license list 2021-03-06 04:37:28 +00:00
maya
cea45b27e0 pkg_install-20201218
- Support continuing to install to /var/db/pkg if it exists and the
new pkgdb doesn't.
In the future, we can warn about this once we have tested advice that
we can give to users who want to move the location of pkgdb.

- Don't do anything about /var/db/pkg on non-NetBSD-base.
This creates conflicts with other package managers that also install to
/var/db/pkg.
2020-12-18 17:10:54 +00:00
wiz
010be68b75 pkg_install: carry over bugfix from src
christos: Don't try to memcpy (size_t)-1 bytes!
2020-12-12 19:25:19 +00:00
gutteridge
be7a4f5fc5 pkg_install: remove stray extra tab in perform.c 2020-12-12 04:12:47 +00:00
gutteridge
e8b0102e3d pkg_install: spaces->tabs for consistency in perform.c 2020-12-12 01:44:17 +00:00
wiz
a87bcbeb7a pkg_install-20201212: handle error case better
When pkg_delete fails, report it and error out.
2020-12-11 15:55:35 +00:00
jperkin
ffe4d41f92 pkg_install: Introduce support for CHECK_OS_VERSION.
When set to "no", pkg_add will not issue a warning if the host OS version does
not exactly match the OS version the package was built on.  This can be useful
on many OS where the kernel release version has nothing to do with userland
compatibility, or where it may differ without being ABI incompatible.

Ultimately it would be ideal if the version checks were smart enough across all
our supported OS to not need this, but until then this is useful for users who
know what they're doing.

Bump version to 20201211.
2020-12-11 10:06:53 +00:00
wiz
9480de01b1 pkg_install: update to 20201206
Convert a core dump I've been seeing into an error abort.
2020-12-06 17:23:09 +00:00
wiz
9975deff77 pkg_install: update to 20201205
Improve warning about old database to mention moving the refcount db too.
2020-12-05 16:17:41 +00:00
wiz
6ec5f1d9e7 pkg_install: remove two unused variables 2020-12-02 12:10:50 +00:00
wiz
f49aa64eb8 pkg_install: mark show_version as noreturn since it exits 2020-12-02 12:10:38 +00:00
wiz
e1908875f4 pkg_install: Merge some changes from NetBSD src/
No effective change intended, just ifdefs for bootstrapping.
2020-12-02 10:45:47 +00:00
wiz
c85d83c09c *: move default database directory from /var/db/pkg to ${PREFIX}/pkgdb
As discussed in August 2020 and previously on pkgsrcCon 2019.

Ok pkgsrc-pmc@
2020-12-02 10:22:39 +00:00
maya
aa26c432dd Bootstrap: Fix bootstrap on FreeBSD 12.1, likely broken by an issue in lld.
It looks like lld doesn't want to statically link a libarchive without
resolving all of the symbols, even if only a few symbols are used.

In order to resolve all of the symbols, we need to also link with -lmd.
One generic way to do so is inspect Libs.private in the pkgconfig file.

While pkgsrc is likely not at fault here, having a dysfunctional bootstrap
is bad. We should check again in the future to see if this can be removed.

Actually fixes PR pkg/55400.
2020-10-28 16:52:43 +00:00
mcf
6df575e40c pkg_install: fix stage in verbose log message
This function is also used to run with POST-INSTALL, so adjust the
log message to match the argument passed to the install script.
2020-10-09 07:37:20 +00:00
wiz
e0aa26a942 pkg_install: carry over a commit from the src tree
Module Name:    src
Committed By:   christos
Date:           Mon Sep  7 00:36:53 UTC 2020

Modified Files:
        src/external/bsd/pkg_install/dist/lib: plist.c

Log Message:
Avoid strict aliasing issue by using a separate buffer..


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pkg_install/dist/lib/plist.c
2020-09-07 23:46:42 +00:00
rillig
6f98806e2a pkgtools/pkg_install: fix pkglint warning about CHECK_PERMS 2020-08-09 21:40:42 +00:00
sjmulder
8c89e75a7e pkg_install: BOOTSTRAP guard on libarchive-using function
Initial bootstrap builds of pkg_install don't use libarchive. Guarding
this function (as other places are) with #ifndef BOOTSTRAP prevents
'implicit declaration of archive_...()' warnings on FreeBSD 12 and Xcode
beta, which due to -Werror broke the bootstrap.
2020-07-21 14:32:00 +00:00
jperkin
185902296e pkg_install: Update version to 20200701.
Includes fixes to +REQUIRED_BY generation, performance improvements,
build fixes against newer libnetpgpverify, and better error messages.

When combined with newer pkgin releases, this should now eliminate the
various "pkg_add: Can't open +CONTENTS of depending package ..." errors
that users had frequently observed during upgrades (joyent/pkgsrc#158,
joyent/pkgsrc#190, joyent/pkgsrc#256, and many IRC logs).
2020-07-01 10:15:19 +00:00
jperkin
278ac9777e pkg_install: Fix and speed up "pkg_admin rebuild-tree".
In the pkg_admin front end, instead of adding +REQUIRED_BY entries as they
are found, which previously led to duplicate entries, cache the results and
write out the files at the end.

Underneath, add a caching version of iterate_pkg_db() that avoids the same
pkgdb directory lookup for every installed package, but is only suitable for
reads.  Also add a cache for best_match lookups to avoid expensive matches
each time.

For all caches, use a simple hashing function to improve lookup performance.

In summary, as well as fixing +REQUIRED_BY files, these patches reduce the
wall/user/system time of "pkg_admin rebuild-tree" on a system with 12,762
packages installed down from 13m52s/11m20s/2m32s to just 1m4s/1m3s/0m1s.
2020-07-01 10:03:19 +00:00
jperkin
2f10b39a2d pkg_install: Handle recursive upgrades correctly.
The list of dependencies held by packages during recursive upgrades was not
refreshed after dependencies were themselves upgraded, leading to failures
attempting to read +REQUIRED_BY files in package directories that no longer
exist ("registration is incomplete!").  We now only perform the package
match after the upgrades have completed.

While here, hide the warning about dependencies not being fulfilled behind
ForceDepending, as the whole point of using that mode is to ignore such
issues with the assumption that the final state after updating will be
correct.
2020-07-01 09:46:04 +00:00
jperkin
a1bd6c01e6 pkg_install: Revert part of last commit.
We need to use the library Makefile so that libnetpgpverify is built.  Fixes
bootstrap.
2020-05-05 09:02:43 +00:00
agc
8d6726aab6 libnetpgpverify now uses its own protected symbols, update build process to
account for this.
2020-05-04 19:14:59 +00:00
plunky
894c5e9f65 add afl-3.0 as acceptable default license 2020-04-30 09:47:51 +00:00
rillig
2d8401554a pkgtools/pkg_install: add errno details when remove fails
Before, it wasn't clear why removing the file failed. It could be ENOENT
or EPERM or EBUSY, and these lead to different causes.

https://mail-index.netbsd.org/pkgsrc-users/2020/02/28/msg030552.html
2020-03-01 11:02:04 +00:00
rillig
9637f7852e all: migrate homepages from http to https
pkglint -r --network --only "migrate"

As a side-effect of migrating the homepages, pkglint also fixed a few
indentations in unrelated lines. These and the new homepages have been
checked manually.
2020-01-26 17:30:40 +00:00
jperkin
26c1bffc9f *: Recursive revision bump for openssl 1.1.1. 2020-01-18 21:48:19 +00:00
joerg
47fa1134f9 Use tab for indendation as the rest of the block. 2019-10-13 21:50:54 +00:00
joerg
7cc86d5212 Use __UNCONST to remove const attributes before free. 2019-10-13 21:49:36 +00:00
joerg
a07706e7d6 pkg_install-20191008: Add pkg_admin digest command 2019-10-11 11:57:41 +00:00
joerg
fe227f6b78 pkg_admin(1): sort commands 2019-10-08 21:33:35 +00:00
jaapb
122fe90bf0 Added CeCiLL-B license.
This is a free software license according to the FSF:
https://www.gnu.org/licenses/license-list.en.html#CeCILL-B
2019-07-02 09:28:12 +00:00
adam
eae608d908 libarchive: updated to 3.3.3
libarchive 3.3.3:
Avoid super-linear slowdown on malformed mtree files
Many fixes for building with Visual Studio
NO_OVERWRITE doesn't change existing directory attributes
New support for Zstandard read and write filters
2019-04-10 08:24:03 +00:00
sevan
fdc3a15828 Bump date for switch to cdn.NetBSD.org 2019-04-05 22:53:29 +00:00
sevan
f2e9355c35 Switch to using the CDN for fetching the pkg-vulnerabilities files.
No negative responses on tech-pkg.
ok gdt bsiegert
2019-04-05 21:36:35 +00:00
wiz
5547fd6f4f Revert previous for now. 2019-02-10 21:35:01 +00:00
wiz
40b6e19ea9 mk: allow Affero GPL by default
This follows a recent TNF board decision.
2019-02-06 14:38:02 +00:00
maya
6c25dec844 Remove clauses 3,4 from TNF-only copyright blocks.
This is based on the decision The NetBSD Foundation made in 2008 to
do so, which was already applied to src.

This change has been applied to code which is likely not in other
repositories.

ok board@, reviewed by riastradh@
2018-08-22 20:48:36 +00:00
leot
8102f20bb9 pkg_install: Sync with DEFAULT_ACCEPTABLE_LICENSES in mk/license.mk
Add `cc-by-sa-v4.0', `cc-by-v4.0' and `osl' to *default_acceptable_licenses to
sync it with DEFAULT_ACCEPTABLE_LICENSES of mk/license.mk.
2018-08-14 13:21:07 +00:00
joerg
3d1452b99c pkg_install-20180425: correctly detect package names in PKG_DBDIR
If PKG_DBDIR is /foo and a path like /foobar is given, it is not below
PKG_DBDIR, so don't translate it into a package name look up. The old
logic for giving a path to PKG_DBDIR remains for legacy compat.
2018-04-25 12:20:53 +00:00
jperkin
80b9bc0769 pkg_install: Update to 20180417.
Fix an issue in pkg_create where we may have been using corrupted owner and
group information.  Noticed on macOS where libarchive would complain about
the owner entry being too long.  Reviewed by joerg.

Also includes some manual page improvements committed recently.
2018-04-17 12:52:35 +00:00
sevan
fd36e12c89 X509_get_extended_key_usage and X509_get_extension_flags definitions are also
needed for LibreSSL.


Tested on OpenBSD/amd64 6.3
2018-04-05 21:19:32 +00:00
sevan
08fcbf11f4 regen catalog files using mandoc. 2018-03-27 22:38:04 +00:00
sevan
86a6aac4d8 Switch from nroff to using mandoc for updating catalog file in the update-catpages
target. This results in closer resemblence to the actual mdoc manuals.

Reviewed by <wiz>
2018-03-27 22:29:38 +00:00
sevan
5210fe357c Bump version for commits earlier this week.
pkg_install-20180325
- pkg_add(1): Documentation fixes
- pkg_delete: Add missing -A to usage()
2018-03-25 03:56:28 +00:00
sevan
c34b2e0d6f List options alphabetically. 2018-03-21 17:32:44 +00:00