Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / lib
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Do not check for or include sys/param.h This resolves issues on platforms which MACHINE & MACHINE_ARCH is explicitly defined, such as OpenBSD/amd64 & Bitrig/amd64 where we would like to build with MACHINE_ARCH=x86_64 but can't as a platform check fails when installing packages after bootstrap pkg_add: Warning: package `digest-20121220' was built for a platform: pkg_add: OpenBSD/x86_64 5.8 (pkg) vs. OpenBSD/amd64 5.8 (this host) Tested on Mac OS X Tiger/PowerPC OpenBSD Bitrig Solaris 10/SPARC FreeBSD 10.2-RELEASE & 11-CURRENT DragonFlyBSD Debian 8 OmniOS Reviewed by joerg@
pkg_install-20100915: Allow https URLs. From mbalmer. Reset maintainership.
pkg_install-20090911: - Cleanup configure.ac to not check for headers and functions not used - Always use nbcompat/db.h on !NetBSD (PR 41865) - Don't bother setting termwidth in pkg_info, it is never used.
pkg_install-20090727: Make pkg_install WARNS=4 clean and fix a number of lint warnings. Based on reports from veego about warnings with older GCC releases in pkg_delete, where a variable is potentially used uninitialized.
Constify.
Merge pkg_install-20090201 from pkg_install-renovation branch.
- DB support is always included from libnbcompat if needed
- pkg_view and linkfarm are not installed any more; they are not moved
into the attic yet, so they can easily be installed as separte package
- common configuration file to customise the behavior of various
components; this supersedes the old audit-packages.conf
- support for PKSC7 signatures (using X509 certs) and GPG signatures for
packages in a secure way. See pkg_admin(8) for how to create them and
pkg_install.conf(5) for the options to use them
- audit-packages and download-vulnerability-list are wrapper scripts
around pkg_admin. They try to mimic the classic options if used sanely.
"pkg_admin audit" is now an order of magnitude faster than before
- pkg_add uses libarchive and libfetch instead of external ftp and tar:
- progress bar is currently missing for downloads
- "pkg_add -" is no longer supported
- no adhoc check for conficts between dependencies and already
installed packages
- "pkg_add -s" has been replaced with an option in pkg_install.conf,
verification of plain detached GPG signatures is no longer supported
- optional check for vulnerabilities before adding a package
- if /var and /usr/pkg are on different fileystems it is twice as fast
now
- conflicts due to overlapping plists are checked before installation
- pkg_add no longer plays with the process limits
- pkg_add and pkg_delete have a new destdir option; scripts have to
either be modified to use PKG_DESTDIR or should be disabled
- pkg_add -u for now can't be used to update to the exact same version
- internal "rm -rf" and "mkdir_p" code
- all memory allocation failures are not explicitly fatal
- if a file is not removed due to a failed checksum, still remove the
entry from pkgdb
pkg_install-20090201: - sync DESCR and MESSAGE with HEAD and the branch state - sync Makefile - regen configure - cleanup __RCSID - merge audit logic in pkg_add and pkg_admin into new audit_packages function. As side effect, pkg_add will list all vulnerabilities before asking the user whether it should continue - sort config_variable array
pkg_install-20080916: Quote arguments of @exec and @unexec correctly.
pkg_install-20080821: - Recognize file:// urls to prevent double quoting. - Fix some err/errx botchups. - Add configuration options for verbose logging of net IO, enabling of active FTP (switching to passive FTP as default) and for ignoring proxy settings. - When iterating over PACKAGES to find a match, warn if an entry can't processed (e.g. bad URL).
Add a clean pkg_add implementation on top of libarchive and libfetch. Known regressions: - "pkg_add -" (aka reading from stdin) is currently not supported - "pkg_add -s" is not supported either - no progress reports for the downloads - binary packages with hardlinks created by pkg_create before pkg_install-20080422 will not extract correctly (libarchive issue) - no adhoc check for potential conflicts between dependencies and already installed packages Features: - Twice as fast for the typical case of /var/tmp and /usr/pkg on different filesystems - Standalone - implicit conflict detection before actual installation.
Revert last change, it was not intended to go into HEAD.
Add a clean pkg_add implementation on top of libarchive and libfetch. Known regressions: - "pkg_add -" (aka reading from stdin) is currently not supported - "pkg_add -s" is not supported either - no progress reports for the downloads - binary packages with hardlinks created by pkg_create before pkg_install-20080422 will not extract correctly (libarchive issue) - no adhoc check for potential conflicts between dependencies and already installed packages Features: - Twice as fast for the typical case of /var/tmp and /usr/pkg on different filesystems - Standalone - implicit conflict detection before actual installation.
* When adding or checking a package using pkg_admin(1), give a more
meaningful warning if the file is a symlink whose target doesn't exist.
The message has now been changed from:
pkg_admin: netbsd32_compat30-extras: File `/usr/pkg/emul/netbsd32/usr/lib/libm387.so' is in +CONTENTS but not on filesystem!
to:
pkg_admin: Symlink `/usr/pkg/emul/netbsd32/usr/lib/libm387.so' exists and is in +CONTENTS but target does not exist!
* Pass values for --sysconfdir (and --prefix) to the configure script
instead of passing them through CPPFLAGS. Both SYSCONFDIR and PREFIX
are only used by audit-packages, and the audit-packages Makefile
already handles passing these values inherited from the configure
script. This avoids compiler warnings that, e.g. SYSCONFDIR has been
redefined on the command line.
* Fix quoting for arguments to the configure script -- :Q instead of
\"\".
Bump version to 20070828. Reviewed by <joerg>.
When looking for a package with a wildcard pattern, don't add the suffix. find_best_matching_file does that already and doing it twice is actually counterproductive. Bump to 20070821.
Restore ignorance of entry types for lsbest and lsall for now. The check for already installed packages depends on being able to run them in PKGDB_DIR. This is clearly obnoxius, but leave it for later.
- Introduce find_best_matching_file and match_local_files. This replace the functionality offered by findmatchingname and findbestmatching name. They optionally strip the suffix from the filename before matching it, instead of modifying the pattern directly. Drop the old functions. - Fix a bug in pkg_order where the version strings where inverted - Make pkg_admin lsbest and lsall use the new functions. - Make ftpio use pkg_order directly. Bump version to 20070812.
Sync with NetBSD base: Some FTP server don't expand [] in NLIST, most noticable is vsftpd. Avoid this by splitting the wildcard search pattern into two commands. Sync some other minor changes. Bump to 20070416.
Pull over v1.77 from src/usr.sbin:
revision 1.77
date: 2006/03/26 18:11:22; author: christos; state: Exp; lines: +3 -3
PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
Specify the full path to tar when unpacking a package. Modify pfcexec so the new process file name can be different from argv[0]. This fix is from Peter Postma, and it addresses PR#32228
Remove unused variables, fix variable names to avoid shadowing globals, and add PAX_CMD fallback macro.
Reduce the use of the system() function in pkg_install to avoid quoting problems. Instead, use exec*() functions. Replace PUSHOUT() macro and string buffers with a function that operates on data structures. If it is necessary to copy files into place from staging area, then use pax to copy them. Add functions in pexec.c to create a pipe for sending data to a child process. Replace pipe code in create/perform.c with these functions. Use these functions instead of command-line arguments when copying files into place from staging area. Three system() references remain: @exec, @unexec, and vsystem().
Update pkgtools/pkg_install to 20050204 (latest release from the HEAD
branch of src). Changes from version 20050106:
Teach pkg_add(1) and pkg_delete(1) to pass PKG_METADATA_DIR and
PKG_REFCOUNT_DBDIR in the environment when running the +* scripts.
PKG_METADATA_DIR is the location of the +* files after the package is
registered. PKG_REFCOUNT_DBDIR is the location of the reference counts
database directory. If PKG_REFCOUNT_DBDIR is left unset, then it
defaults the the location of the package database directory with
".refcount" appended to the path, e.g. /var/db/pkg.refcount.
pkgviews users should explicitly set PKG_REFCOUNT_DBDIR in the shell
environment to ensure that all packages will use the same refcount
database.
These changes allow the +INSTALL and +DEINSTALL script to keep state
in +* files within ${PKG_METADATA_DIR}, and to store reference counts
in ${PKG_REFCOUNT_DBDIR} to handle usage of resources outside of
${LOCALBASE}.
Pull in portability changes from src, and bump version to 20041226: Introduce a new abstraction in the C code, called MaxPathSize. All previous occurrences of MAXPATHLEN and FILENAME_MAX have been changed to use MaxPathSize instead. If MAXPATHLEN is not defined, then assume a default value of 1024 (this is primarily for use on the Hurd). The reason for this is that some older platforms define FILENAME_MAX to be 14, although MAXPATHLEN is 1024. On BSD-derived systems, FILENAME_MAX And MAXPATHLEN are both 1024. Bump pkg_install version to 20041226. These modifications have been tested so far on a NetBSD-current bulk build.
Update pkgtools/pkg_install to 20040114. Changes from version 20040106
include:
* use ${MACHINE_ARCH} instead of what uname() puts into utsname.machine.
the former represents the CPU architecture, which is what is recorded
in binary packages; also allow the OS name to be overridden, as pkgsrc
doesn't always use the value of utsname.sysname.
* allow adding depoted packages if another package with the same
${PKGBASE} is already installed as this is explicitly allowed for in
pkgviews.
Sync pkgtools/pkg_install with src/usr.sbin/pkg_install from 20031220. New features include OS/arch/version checking and a large speed improvement to pkg_info.
Sync pkgtools/pkg_install with src/usr.sbin/pkg_install from 20031121.
Sync pkgtools/pkg_install with src/usr.sbin/pkg_install from 20031003. New features include fetching binary packages using HTTP (thanks wiz!) and some minor speed optimizations for pkg_delete.
sync with NetBSD-current after updates from wiz.
sync with NetBSD-current's pkg_install-20030923.
Sync to latest pkg_install sources from the HEAD for pkg_delete optimizations and man page fixes. Also use recent src2nbcompat to reverse the order that "config.h" and <nbcompat.h> are included in *.[ch] files.
Update pkg_install to 20030823, which has the changes to support package views. Pkgsrc changes include: * Convert to use pkgtools/libnbcompat so that it's easier to keep this in sync with src/usr.sbin/pkg_install. * Add a src2nbcompat script that converts src/usr.sbin/pkg_install into an appropriate start for pkgtools/pkg_install. The script removes the Makefiles, adds CPP inclusion guards around each #include <...> line, and includes <nbcompat.h> at the top of each *.c file. This should make it even easier to keep sources in sync with the HEAD.
catch up to bootstrap. bump PKGTOOLS_VERSION to 20030411.
belatedly sync with src: Allow '%D' to be used when no last_file available. Fixes binary package installation of gnome-dirs. crank PKGTOOLS_VERSION to 20030202.
Synch with basesrc: Use EXIT_FAILURE, rather than hardcoding a value of '1' in err(3) and errx(3). Plug a memory leak by modifying the signature of _pkgdb_getPKGDB_FILE() to take a buffer and its size, and fill in that buffer and return it. Add an enumerated type which is used in pkgdb_open() to specify read-only or read-write mode. Modify the return value of pkgdb_open() to have a more logical boolean value.
Import autoconf'd pkg_install source from
othersrc/bootstrap-pkgsrc/pkg_install into ${FILESDIR}.
Using autoconf greatly simplifies maintenance of this package across
multiple platforms. Placing the extracted source under ${FILESDIR}
will eventually let us use the same source for bootstrapping as
well, though we're not ready for this yet.
Initial revision