Commit graph

670 commits

Author SHA1 Message Date
joerg
e08e39667b pkg_install-20080208:
Explicitly check in show_var that the buffer is non-NULL.
This can stops pkg_info -Q foo from segfaulting for explicitly
installed packages. Reported by Stoned Elipot.
2008-02-07 23:40:52 +00:00
joerg
4f81810ae0 Include fcntl.h for Solaris. From Andri Piik in private mail. 2008-02-05 18:57:09 +00:00
joerg
9866d214df pen.c only uses statvfs.h and the necessary headers are included by
libnbcompat.h already. So don't include sys/param.h and sys/mount.h in
it and remove the configure test for sys/mount.h.
While here, remove some #if 0'd code from pen.c.
2008-02-04 14:28:27 +00:00
joerg
8ada92d5fc pkg_install-20080204:
Try to remove all +* files from the pkgdb first. If the log directory is
not empty afterwards, be noisy, but try rm -rf on it for the force case.
2008-02-04 14:03:10 +00:00
joerg
7bdc02c45c pkg_install-20080202:
Convert pkg_info to use libarchive instead of tar for binary package
handling. As a side effect pkg_info on remote packages will use
one FTP instance per argument, but will try to fetch only the meta data.
This reduces time for pkg_info -X on a full binary repository from 36.9s
to 18.1s for the cache hot case (PKG_TMPDIR on tmpfs for the old
pkg_info). Thanks to tnn@ for testing.
2008-02-02 16:21:45 +00:00
joerg
ed48acb8ad Explicitly check that meta data files are regular. 2008-02-02 15:47:52 +00:00
hubertf
5c695ce274 Sign over my copyright to TNF. 2008-01-29 15:39:30 +00:00
joerg
258724b565 pkg_install-20080126: Make pkg_add pass down -I and -m when recursively
adding packages.
2008-01-26 23:30:24 +00:00
rillig
95ce0db1bf When updating a package, the "(perhaps the packing list is incorrectly
specified?)" warning isn't correct, so don't print this assumption at
all.
2008-01-26 09:23:31 +00:00
rillig
2ef4aec279 Fixed typos. 2008-01-13 22:31:25 +00:00
adrianp
44c6e6e2dd Add 'audit-packages -F <file>' to process a list of packages/patterns
from a file.
Update and sort options in the man page
2008-01-07 22:27:59 +00:00
rillig
5299226d71 If a command line argument is used, it should be mentioned by exactly
this name (pkg-name) and not some related description, to make searching
easy.
2008-01-04 14:24:38 +00:00
rillig
eeebd3ec03 When calling open(2), don't try to get an error message from libarchive,
since it won't know anything about it. (hi joerg!)
2008-01-03 22:31:20 +00:00
joerg
a0e4ad1e20 Prepare for update of NetBSD and pkgsrc-2007Q4 by tagging current state
as 20071224. Changes include:
- better diagnostic for conflicting packages
- explicitly check already installed packages for conflicts with
to-be-installed package
- document pkg_admin rebuild-tree in usage
- man page fixes
- forcefully remove pkgdb entries (needed for user-usage in some cases)
2007-12-23 23:58:27 +00:00
rillig
545e51df61 The +CONTENTS file is checked for conflicts, not +REQUIRED_BY. 2007-12-19 02:22:54 +00:00
rillig
5a54dec7a9 Documented struct package_conflict and added a note about the
inefficiency when reading all the +REQUIRED_BY files.
2007-12-17 09:42:03 +00:00
tnn
0d152f7013 document 'rebuild-tree' in usage() 2007-12-10 10:34:42 +00:00
rillig
872ab1f25d style 2007-11-30 00:39:39 +00:00
rillig
bae1429f34 Do not install a package if some of the installed packages would
conflict with it. This fixes PR 37451.
2007-11-30 00:30:39 +00:00
rillig
bb376f4684 Remove the package metadata even if it is read-only, without prompting
the user.
2007-11-29 22:50:05 +00:00
wiz
ccf4f0a7e4 Add two missing .Ek. 2007-11-14 22:57:07 +00:00
rillig
485e264ceb Provide more useful details in the error message for conflicting packages:
- The package that cannot be installed
- The pattern of the conflict
- The name of the installed (conflicting) package.
2007-11-13 19:53:11 +00:00
martti
9afb20a137 Added commented-out LICENSE=something. 2007-11-11 11:35:48 +00:00
joerg
b97a055750 Don't use the build time version to find packages, we want to pick up
the newest version. Bump version to 20071109.
2007-11-08 23:24:56 +00:00
joerg
e725e20c42 Bump version or revision of all packages that have a runtime dependency
on gzip.
2007-11-08 19:39:42 +00:00
joerg
91812f0d5f Also add -E to usage(). From PR 37265. 2007-11-05 09:39:38 +00:00
joerg
6a334feaf4 pkg_install does the right things with the files, so CHECK_PERMS is not
useful and creates cyclic dependencies if pkg_install is outdated.
From Peter Bex.
2007-11-03 14:49:00 +00:00
joerg
e7633a92f1 Tag pkg_install as 20071103. 2007-11-03 13:54:14 +00:00
joerg
e47f81c12a Remove obsolete option r from usage() and man page. I can't even
remember what is was for. From Yakovetsky Vlad in PR 37265.
2007-11-02 16:03:37 +00:00
rillig
5ea2c37615 Added quotes around the filenames, as suggested by joerg@.
While here, removed an unnecessary variable.
2007-11-01 23:08:29 +00:00
rillig
23369be14a When rename(2) fails, it is useful to know some details about the
filenames that have been involved.

Do not use assert() for error checking.
2007-11-01 21:57:37 +00:00
rillig
9d0009f173 Fixed the problem with package name matching that Klaus Heinz discovered
in http://mail-index.netbsd.org/tech-pkg/2007/10/14/0004.html

The pattern "pkg_install" matched "pkg-install-20070828", but "pkg*all"
didn't. Now it does.
2007-10-14 23:24:24 +00:00
rillig
095814e759 Updated the URLs for ftp.NetBSD.org, so that they will work after the
upcoming clean-up.
2007-10-13 19:38:27 +00:00
martti
bd986edbc7 Remove trailing spaces. 2007-10-09 19:19:08 +00:00
kano
abdb54b351 fix obsolete URLs for www.NetBSD.org
close PR pkg/37071
reviewd by xtraeme@
2007-10-07 12:59:11 +00:00
rillig
b59af9beee There is no master/slave mode anymore. 2007-09-29 13:24:32 +00:00
joerg
dfcb17cf7f - Be less aggressive when resizing the version field, just resize if
the old size is not enough. Fixes PR 37031.
- Disable dependency tracking in libarchive build. Supposed to address
  PR 36953.

Bump version to 20070927.
2007-09-27 13:30:27 +00:00
joerg
79ba801833 Don't cache the allocated argv in a local static variable, just allocate
and free it.
2007-09-18 15:44:18 +00:00
joerg
5046845687 Remove EXPECT_DEBUG code and if(0)'ed call of setbuf. 2007-09-18 15:40:47 +00:00
joerg
7177f144cd Make allocation errors fatal. Better than leaking memory in the error
case.
2007-09-18 15:38:10 +00:00
adrianp
7c6a237bbe Add and document FETCH_PRE_ARGS, idea from David Sainty in PR #23899.
This allows such settings as the following in audit-packages.conf:
FETCH_PRE_ARGS="env ftp_proxy://ftp.myproxy.com"
Which will be set before FETCH_CMD is run.
2007-09-17 22:40:27 +00:00
joerg
b770135e28 Fix a major memory leak in Dewey that existed sine ~forever.
This was made a lot more critical with the changes to use the iteration
API, as that is running a lot more Dewey comparisions.

Thanks to adrianp and wiz for the reports.

Bump to 20070916.
2007-09-16 19:03:52 +00:00
joerg
72c8bdc51b Bump to 20070911 for pkg_add -u fixes. 2007-09-11 14:55:52 +00:00
rillig
d091934e69 Replaced undefined behavior with an error message. We don't expect
absolute paths in the PLIST anyway.
2007-09-11 13:46:10 +00:00
rillig
6a27b7d10c Removed unused variable. 2007-09-11 13:39:05 +00:00
rillig
e3b68da0ff Applying sizeof() to a string parameter does not return the size of the
buffer, but the size of a pointer to a buffer. This makes pkg_add -u
work again. It failed before, trying to rename the +REQUIRED_BY file to
"/us" or "/va", depending on the value of PKGDBDIR.
2007-09-11 12:33:13 +00:00
jlam
2761568ac2 Convert to use the features framework. 2007-09-08 21:57:57 +00:00
rillig
470ab0a92f Removed the warning about pkg_add or pkg_delete "not running as root"
completely. It only made the code more bloated, and a user trying to add
or delete packages would get lots of "Permission denied" warnings
anyway.
2007-09-08 09:58:14 +00:00
rillig
775b3e4acb Avoid EPERM errors from tar when installing packages as an unprivileged
user.
2007-09-08 09:45:22 +00:00
rillig
716ddb1f45 In unprivileged builds, the user running pkg_add and pkg_delete is
almost always an unprivileged user. So there's no point in printing a
warning in that case.
2007-09-07 15:45:14 +00:00
joerg
5c78e10908 If waitpid was interrupt for some reason, restart it. Error out on all
other negative return values or when errno != EINTR.
2007-09-06 21:16:12 +00:00
jlam
ac74037944 * 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>.
2007-08-29 15:42:39 +00:00
dillo
dfb18cea5b Add FILE_NAME, the name of the binary package file.
Prompted by Jeremy, okayed by Joerg.
2007-08-29 14:15:50 +00:00
joerg
9286e87ae0 Drop -RELEASE and similiar components of the OS version on FreeBSD as
well.
2007-08-24 15:25:08 +00:00
wiz
4afb1ce7a3 regen. 2007-08-23 21:58:52 +00:00
wiz
065afff669 Replace reference to (obsolete) -M with tar(1). Bump date.
Requested by joerg.
2007-08-23 21:58:24 +00:00
adrianp
92d3b5842c Fix a bug in the processing of GPG in audit-packages.conf. This should fix
PR# 36773 opened by David A. Holland.
While we're here look for settings with no values in audit-packages.conf
and ignore them.
Tighten up processing of audit-packages.conf for the situation where
settings are specified multiple times. (report from joerg@).
2007-08-22 23:23:22 +00:00
joerg
731c214320 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.
2007-08-21 07:11:42 +00:00
joerg
14b81a3089 Start abstracting pkgdb access by introducing pkgdb_pkg_file.
The function returns the path name of the given file for the package.
The memory needs to be freed by the caller.
2007-08-15 02:08:40 +00:00
joerg
66657d027d Make _pkgdb_getPKGDB_DIR return const char * and fix fallout. 2007-08-15 01:49:02 +00:00
joerg
8d30fc2491 Bail out if the PLIST contains no @name field. This check existed since
the initial revision in 2002, so assume it just works...
2007-08-15 01:21:46 +00:00
joerg
ab17300d32 Split off the part dealing with already installed packages into
a subfunction.

Bail out if the package name doesn't have a version name.
Bail out if the internal rename failed (it was an assert before).
Invert some of the branches to cut off three levels of indirection.
2007-08-15 01:16:27 +00:00
joerg
6a1fd2334f Add new option -m to pkg_add. This allows to override MACHINE_ARCH
for the purpose of installing a package and enables cross-compiled
pkgsrc to not use -f all the time.

Bump version to 20070815.
2007-08-14 22:47:51 +00:00
joerg
6a86f42a52 Merge tmppkg into main variable block and remove indentation. 2007-08-13 19:15:37 +00:00
joerg
0363bc546f Check explictly for argc == 0 to find out if options where specified.
Don't depend on NULL termination of argv, count instead.
Remove more traces of slave mode.
2007-08-13 19:13:13 +00:00
joerg
8ab021fab7 pkg_admin: when retrying with a wildcard pattern, use the computed
pattern and not the base name.
pkg_info: add -E option to return the best matching installed package.

Bump to 20070813.
2007-08-12 22:09:02 +00:00
joerg
386755f3cb 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.
2007-08-12 18:54:08 +00:00
joerg
567020fab0 Reference correct variable. 2007-08-12 17:51:36 +00:00
joerg
7df87b070e - 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.
2007-08-12 16:47:17 +00:00
adrianp
5bc5a2248d * Use stdout for printing results of vulnerable/eol packages found.
Reported by Greg Troxel on tech-pkg@
* Add -q which operates the same as 'pkg_info -q' and only displays
  the package name of any vulnerable/eol packages found.
  Suggestion by joerg@
* man page updates for -q
* Document the required permissions for audit-packages and
  download-vulnerability-list in the man page.
2007-08-10 22:50:46 +00:00
joerg
3c81e91396 Remove comment about importing from NetBSD. 2007-08-10 22:42:13 +00:00
gdt
52887c8e10 Reword description of rebuild-tree, and point to pkg_delete -f as a
possible cause of inconsistencies. Remove comment about make replace,
since it does not, absent pkgsrc/mk bugs, result in incorrect
dependency records.
2007-08-10 22:39:13 +00:00
gdt
2c897a092e pkg_delete In the list of options, note -ff option to remove {\bf
preserved} packages, and caution the reader that it is dangerous.
Ride hours-earlier version bump.
2007-08-10 22:29:49 +00:00
joerg
ded9371ddc Not my day. If I write "return 0 when at least one match was found",
actually return 0...
2007-08-10 21:43:58 +00:00
joerg
0fa5f07e10 Add "rebuild-tree" command to pkg_admin. It recomputes the dependencies
and builds the +REQUIRED_BY files from that.

Bump to 20070810.
2007-08-10 21:18:31 +00:00
joerg
ea7045b735 Contrary to its comments, CheckForPkg is meant to print all matching
packages (see pkg_info -e). Restore this behaviour. Still print a
warning when the pkgdb can't be processed.

Reported by Daniel Horecki and pointed to the option by tnn@.
2007-08-10 15:37:51 +00:00
wiz
00d71b8259 regen. 2007-08-10 01:12:02 +00:00
wiz
59bfde374f More indent for tagged lists; add key to FILES and add
descriptions there.
2007-08-10 01:11:05 +00:00
joerg
0009d030c3 Actually assign variable that tells the caller that we got a match. 2007-08-10 00:03:51 +00:00
joerg
a4790010d4 Make var_set and var_get arguments always use full path names. 2007-08-09 23:54:17 +00:00
joerg
14862bcfd4 Remove @option extract-in-place support for now (will be the default
later) and document @option preserve in pkg_add(1).
2007-08-09 23:32:59 +00:00
joerg
7a51a218c2 Change interface of is_automatic_installed and
mark_as_automatic_installed to take a package name and not a full path.
Add assertions to test for this.

Drop a few islinktodir checks.

Change pkg_info to use iterate_pkg_db instead of scanning the directory
by hand. As a side effect don't try to check for the pkgdb dir first,
let pkgdb_dump and iterate_pkg_db handle that.

Make pkgdb_dump return failure if it can't open the package db.
2007-08-09 23:18:30 +00:00
joerg
710504e20a Pass a number of strings around as const char *. 2007-08-09 23:06:42 +00:00
joerg
b847c0bf73 Fix segmentation fault when the package has no variables set and
no info file. Patch from Dieter Baron in pkg/36741.
Bump version to 20070809 for today's fixes.
2007-08-09 18:03:38 +00:00
joerg
9da2f994e0 Use the passed in string and Pkgdeps when calling strsep, fixing
processing of the build options. Reported by tron@ in PR 36754 and
Mark E. Perkins on pkgsrc-users.
2007-08-09 14:14:45 +00:00
joerg
5d2cdcf3b6 When matching a non-pattern (aka a base name), assign the correct
variable. This fixes pkg_info -e and in turn pkg_tarup.
2007-08-09 12:53:35 +00:00
joerg
f9b953763b Replace note_whats_installed, add_to_list_fn and generally most
users of findbestmatchingname and findmatching name with more
descriptive and easier to use iterator functions. This functions
are a first step to abstract away pkgdb layout from most parts of
the code. It also helps to reduce side effects and point out potential
bugs in this code.

Fix a potential, but practically irrelevant buffer overflow.

No longer allow symbolic links directly in pkgdb to store the meta
data of individual packages outside. E.g. /var/db/pkg/atk-1.18.0
must be a directory and not point to it. This is not yet enforced in
all parts of the code, more changes will follow.

Bump version to 20070808.
2007-08-08 22:33:38 +00:00
tnn
8629b7a0f5 Fix build on Solaris by including fcntl.h, needed for O_RDONLY definition. 2007-08-08 12:21:14 +00:00
adrianp
0f8a3686bb s//etc/${PKG_SYSCONFDIR}/ 2007-08-05 17:21:50 +00:00
joerg
a40dec8f12 Correctly handle ordering NULL -- this greatly simplifies using it
in iteration functions. Fix a major thinko that prevented the actual
order rules from being used. Bump to 20070804.
2007-08-05 14:58:49 +00:00
joerg
b5e9c6cd26 Detect grp.h. Regen. 2007-08-05 01:27:55 +00:00
joerg
f24ae1bb8a Try hard to get 64bit offsets in all modules, fixing misunderstandings
between libarchive and pkg_create e.g. on HP-UX.

Add my copyright to build.c, it is almost completely rewritten.
2007-08-04 12:32:01 +00:00
joerg
73ba3ef5c6 Fix bootstrap issues reported by tnn@ 2007-08-03 15:44:18 +00:00
joerg
46e6de189b The forced disabling of zlib and bzip2 was meant for testing only,
remove it. *blink*
2007-08-03 15:12:43 +00:00
joerg
fb85dba2b4 Bump date for last change. 2007-08-03 13:55:29 +00:00
joerg
199aa00ff5 - only build pkg_admin, pkg_create and pkg_info for --enable-bootstrap
- for pkg_create, split-off the package creation from the plist
  processing. package creation is disabled for --enable-bootstrap
- change package creation to use libarchive
- add two options (-u and -g) to override file system ownership
- pkg_create now creates files in the tarball with correct owner/group
  based on -u/-g or @owner/@group
- add a function to compute the +CONTENTS file in memory

Bump version to 20070802.
Review of a slightly older version by jlam@
2007-08-03 13:15:58 +00:00
wiz
440dab353e regen. 2007-08-02 23:34:08 +00:00
wiz
e22d5fa05f Bump date for fixed paths. 2007-08-02 23:34:00 +00:00
wiz
f9b0a454db Update some paths on ftp.NetBSD.org.
Addresses PR 36721.
2007-08-02 23:30:20 +00:00
taca
42ca54029b Include <stdint.h> if HAVE_STDINT_H is defined, not HAVE_INTTYPES_H.
Fix build problem on SunOS 5.8.
2007-08-01 23:58:15 +00:00
joerg
f1cd925f5b -Wall is a non-standard flag, don't use it in a bootstrap package.
Bombed out on by xlC.
2007-07-31 13:32:04 +00:00
joerg
c54865f2f5 Remove a now unused extern declaration. 2007-07-30 10:33:07 +00:00
joerg
ee5d571224 Remove first obstactle in pkg_add for switching to libarchive:
MASTER/SLAVE mode is gone now.

Bump version to 20070730.
2007-07-30 08:09:14 +00:00
joerg
d3a02b798c Don't build a list for a single item, but change the pkg_perform
interface to hand it down directly.
2007-07-30 07:25:10 +00:00
joerg
ba250884a3 Push pkg_perform prototype into the individual packages. 2007-07-30 07:16:21 +00:00
seb
e40571f70c Specify PKG_DBDIR to pkg_admin and pkg_info via their -K argument
instead of environment. This allows mk/flavor/pkg/resolve-dependencies
to execute '${PKG_ADMIN}': you can encounter this problem
on platforms in need of pkgtools/pkg_install because their native
pkg_* tools are older than PKGTOOLS_REQD, id est NetBSD 2.x and earlier.

Ok'ed joerg@.
2007-07-29 17:39:31 +00:00
adrianp
5ca9237032 Remove redundant SUBST_* from package Makefile
OK'ed joerg@
2007-07-29 14:06:44 +00:00
joerg
17c965dcc3 After the obsoletion on March, remove the support for require scripts.
Also remove the documentation of the mtree parts as it is not supported.
2007-07-26 11:30:55 +00:00
joerg
43de2f8a8b As discussed in PR 36662, the include of nbcompat.h takes care of
the need to include sys/cdefs.h. Do include err.h if it exists
or we are not building for pkgsrc, otherwise use nbcompat/err.h.
2007-07-26 11:27:58 +00:00
joerg
64c41eca87 Mostly deorbit mtree support:
- pkg_create bails out with -m
- pkg_add ignores mtree specs in packages and prints a warning.
  It does not remove the file like before.
- remove now obsolete documentation.

pkg_info still prints the information and pkg_admin ignores the files.
Make the dependency on the tools a runtime dependency.
Take maintainership of pkg_install and bump version to 20070725.
2007-07-25 15:01:45 +00:00
adrianp
2637bfc26b Check we can write to ${PKGVULNDIR} before attempting a download.
Reported by wiz@
2007-07-24 18:57:02 +00:00
adrianp
ae1629c33a Include nbcompat.h to sort out err.h
Add a conditional include for cdefs.h
This resolves the remainder of the issues in PR #36662
Thanks to Stuart Shelton for testing and feedback.
2007-07-23 12:29:32 +00:00
tnn
954b179cfd Move variable declaration to top of function body to make this build with
older versions of gcc. From Anonymous on IRC.
2007-07-22 13:22:21 +00:00
adrianp
39b2b8ef53 Add missed file in last update 2007-07-21 10:21:38 +00:00
adrianp
74d71ced16 Misc man page fixes
Update to autoconf 2.61
Add checks for AC_TYPE_UINT{8,16,32,64}_T
Add checks for stdint.h
Change how config file notification works
If no IGNORE_URLS directive is found then just say that
Check that pkg-vulnerabilities exists before we try any operations on it
Use st_ctime as opposed to st_ctimespec.tv_sec as the former is SUSv3
This update should fix PR #36655 and go part way to fixing PR #36662

Thanks to tnn@ and joerg@ for suggested fixes and Yakovetsky Vladimir and
 Stuart Shelton for testing and patches.
2007-07-21 10:21:04 +00:00
joerg
5fc8c04e5a Split pattern related functions from lib/str.c off into lib/opattern.c.
Rename pmatch to pkg_match and add new function pkg_order that
implements the order logic used by pkg_add internally.

Change the interface of findmatchingname's callback to take the pattern
used for the matching as first argument. The new pkg_order function
takes it and it doesn't hurt in other cases. Adjust callers and
corresponding callbacks accordingly.

Remove an unused matchfn typedef in dewey.c.

Bump to 20070720. OK jlam@
2007-07-20 22:22:52 +00:00
wiz
fdfa17436f New sentence, new line. Sort options. 2007-07-18 23:33:19 +00:00
joerg
1e9a4230a4 Change download-vulnerability-list.sh to use exec_prefix in the
sense of pkg_tools_prefix and prefix in the sense of LOCALBASE.
This allows individual overriding for NetBSD.

Add the forgotten part to allow DESTDIR builds and the pkgsrc.7 man
page.
2007-07-16 13:23:02 +00:00
joerg
bc4117d57f Retire helper scripts for merge from src, this is now the authoritive
version.
2007-07-16 11:40:10 +00:00
joerg
9df3e415c9 Merge remaining small changes from NetBSD, most of all the pkgsrc.7 man
page. Fix build on !NetBSD. Rebuild man pages with nroff -mandoc on
NetBSD current for consistency. Make it DESTDIR safe. Remove the note
that src/usr.sbin/pkg_install is the authoritive version, it won't be
any longer.
2007-07-16 09:57:56 +00:00
joerg
289ba68704 Merge r1.37 from NetBSD:
PR/36274: Jukka Salmi: pkg_add(8) -t option broken, template passed in
is treated as a directory. While there simplify and shorten the code...
2007-07-16 09:54:55 +00:00
joerg
ca03bfb945 Merge 1.75 of lib/ftpio.c from NetBSD:
When fixing vsftpd, other FTP server were broken as they return
different error codes for unmatching glob patterns. Basically ignore the
error code and just try the other pattern. chdir errors are still
considered fatal.

Bump version to 20070715.
2007-07-14 22:57:15 +00:00
adrianp
8f09fd52a9 Bump pkg_install 2007-07-14 20:19:48 +00:00
adrianp
16b215dd7e Update to pkg_install-20070714
Merge of audit-packages with various improvements:
* Version 20070714
	Initial release of re-write in C
	Add support for notfication of eol packages (-e)
	Multiple levels of verbosity (e.g. -v -v)
	Specify a custom config file to use (-c)
	Query running config values (-Q)
	Default to download .gz compress pkg-vulnerabilities file
	Support for .bz2 compress pkg-vulnerabilities file
	Verify signature on downloaded files (-s)

Thanks to tron@, jschauma@, agc@, joerg@ and pkgsrc-security@ for feedback
and testing.
2007-07-14 20:17:06 +00:00
joerg
eb66d11868 Remove PKG_TOOLS_PREFIX handling for mtree, pax, pkg_install and
tnftp. Modifying files and possibly removing them from the base system
is doing more harm than use. Bump revision or version of each
package.
2007-07-10 15:19:17 +00:00
wiz
c7bc2fe5bf Sync with pkgsrc (1.46). 2007-05-19 14:42:10 +00:00
joerg
bbe0e4e1ae Sync with src: PRIu64 -> MY_PRIu64 + fallback value of PRIu64. 2007-04-20 14:25:13 +00:00
tnn
18f57f251c re-add fix from r1.11 after sync 2007-04-20 13:48:16 +00:00
tnn
f844d8b5e3 re-add fix from r1.42 after sync 2007-04-20 13:36:25 +00:00
joerg
52ba06bdee 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.
2007-04-16 12:55:34 +00:00
joerg
1b6ca55b58 Sync config.{guess,sub} with mk/gnu-configure. 2007-03-12 00:48:28 +00:00
joerg
77305c28ef Sync with NetBSD base version:
- obsolete support for require scripts
- nuke support for the following options of pkg_create:
  -X (excludefile)
  -r (require script)
  -h (Force follow symlink)
- add option for pkg_create to specify additional @blddep packages.

This brings us to version 20070308.
2007-03-11 22:05:03 +00:00
wiz
1c7c116e8b Sync with src. 2007-02-07 06:49:22 +00:00
reed
087c665604 Update pkg_summary(5) man page to mention how it can
be generated (from NetBSD).
Add a PKGREVISION.
2007-02-06 01:30:11 +00:00
joerg
611e7f92de Merge add/extract.c, rev 1.39:
If a plist contains @owner or @group entries and first rename failed,
  pushout was called with NULL argument. This has the semantic of using a
  working directory of "/", even though already read plist entries are
  relative to prefix. The calls to chown and chgrp therefore end up with
  the wrong arguments for the current directory. To compensate for this,
  don't pushout the first time. As plists are not supposed to have
  multiple @cwd entries anymore, this could most likely be simplified, but
  that is outside the scope of this commit.

Merge lib/plist.c, rev 1.51:
  When processing symlinks in pkg_delete and the call to readlink failed,
  it often helps to know why, so use warn instead of warnx.

Bump version to 20061103.
2006-11-03 09:35:14 +00:00
schwarz
53de6e942a make sure INSTALL gets passed to the Makefile 2006-08-19 14:38:52 +00:00
gson
9d4c7f77de Import the following change to add/perform.c from src to pkgsrc:
Fix uninitialized variable which was causing pkg_add -u to randomly
 dump core.  This may fix PR pkg/30292.

Also bump the pkgsrc PKGTOOLS_VERSION to 20060720.
2006-07-20 11:29:48 +00:00
jlam
808fe7ac5f USE_DIGEST is no more. 2006-07-18 23:06:41 +00:00
rillig
c47985fa7d Merged from src:
> In header files, there shall be no variable definitions, only
> declarations. Found by MIPSpro.
2006-07-11 07:45:40 +00:00
dillo
7a046011cb Pull across from source:
Fix pkg_info -Q on binary packages; noted by rillig.
Bump version to 20060701.

Okayed during freeze by wiz.
2006-07-01 19:37:25 +00:00
hubertf
448b30d04d Update usage() - sync with manpage, add missing options, etc. 2006-06-27 23:36:13 +00:00
jlam
5f9a3a1b99 This package overrides the "update" target (is that wise?) and runs
its own set of commands.  One of these invoked "deinstall" with
UPDATE_RUNNING set to "YES"; however, UPDATE_RUNNING was made into a
pkgsrc private variable a little while ago.  Fix "update" by setting
_UPDATE_RUNNING instead.  This fixes PR pkg/33716.
2006-06-13 13:57:10 +00:00
jlam
2cc3f64abb Add a new variable CHECK_FILES_SUPPORTED which is a package-settable
variable to show whether the package supports running the check-files
target.

Set CHECK_FILES_SUPPORTED to "no" in pkgtools/pkg_install in the case
where the PREFIX does not match ${LOCALBASE} it's likely the tools are
being installed in some place that's completely outside pkgsrc control,
and check-files fails horribly in that case.
2006-06-09 16:12:08 +00:00
jlam
65b866d2f4 Make pkg_install build on platforms that don't define the PRIu64 integer
format modifier.  We include "defs.h" in the files that use PRIu64 as
that is the header that contains stand-in definition.
2006-05-10 04:25:30 +00:00
dillo
ffd2c03b44 Sync with src: HOMEPAGE is optinal, noted by wiz.
Regen catman page.
2006-04-25 13:33:18 +00:00
wiz
cc17cf1e8e Sync with usr.sbin/pkg_install/lib/pkg_summary.5 v1.2: Sort. 2006-04-24 22:05:13 +00:00
dillo
10da79a1a1 Sync with src, version 20060424:
Add support for creating summary file containing all information
	about a package repository needed by package managing software.
	This allows better use of remote binary package repositories.

	Discussed on tech-pkg.
2006-04-24 13:52:04 +00:00
hubertf
8f17059838 Sync with NetBSD's src/usr.sbin/pkg_install Version 20060418,
mostly for the timeout fix in ftpio.c.
2006-04-18 20:41:44 +00:00
wiz
9ee6553610 Sync with src/usr.sbin v1.63:
Formatting nits.
2006-04-08 23:06:21 +00:00
reed
295b6a402f Welcome to version 20060405.
pkg_add also check for USE_ABI_DEPENDS.

Check if USE_ABI_DEPENDS or IGNORE_RECOMMENDED was set
when this package was built. IGNORE_RECOMMENDED is now historical.

For the cat man page, I manually made it say "pkgsrc" instead of
"NetBSD".

I committed to NetBSD's src/usr.sbin/pkg_install/ first :)
2006-04-06 06:49:30 +00:00
wiz
0bbdf0f44f Sync with src/usr.sbin v1.70:
http_expand_URL(): fclose() the fdopen()'ed filedescriptor
before leaving the function (for all cases).

Actual fix and sanity checking by Dillo & Wiz
Coverity CID 2340
2006-04-05 18:17:31 +00:00
wiz
cc332cafad Sync with src/usr.sbin v1.62:
When recognizing a broken package version/name,
make sure to error out really, don't just print a warning
and the run into further problems.

Coverity CID 2739.
2006-04-05 18:17:08 +00:00
wiz
66ecb76eb5 Bump date, so that version in src and pkgsrc have the same
version _and_ the same code.
2006-04-04 06:38:29 +00:00
wiz
55a059b0bc Pull over v1.4 from src/usr.sbin:
revision 1.4
date: 2006/03/17 01:10:53;  author: hubertf;  state: Exp;  lines: +5 -2
Fix filedescriptor leak
Coverity CID 1625
2006-04-04 06:37:15 +00:00
wiz
90179254d2 Pull over v1.59-v1.61 from src/usr.sbin:
revision 1.61
date: 2006/03/17 17:46:44;  author: hubertf;  state: Exp;  lines: +4 -3
Put check if "best" is empty back into the right place, messed up
in previous commit.
Noted by yamt@
----------------------------
revision 1.60
date: 2006/03/17 02:20:46;  author: hubertf;  state: Exp;  lines: +10 -4
findbestmatchingname_fn(): catch possible problems if best (vp)
contains some strange name (shouldn't happen, but ...)

Coverity CID 869
----------------------------
revision 1.59
date: 2006/03/17 02:10:55;  author: hubertf;  state: Exp;  lines: +8 -7
findbestmatchingname_fn(): only do something sensible if the pointer
handed in is actually usable (not NULL)

Fixes Coverity ID 870
2006-04-04 06:36:12 +00:00
wiz
786e9a25a2 Pull over v1.36 from src/usr.sbin:
revision 1.36
date: 2006/03/17 01:58:25;  author: hubertf;  state: Exp;  lines: +11 -3
We can't sprintf() into a NULL pointer - catch that properly
for ALL cases.

Coverity CID 861
2006-04-04 06:34:25 +00:00
wiz
ae42a7bdb3 Sync with src/usr.sbin: whitespace diffs only. 2006-04-04 06:32:59 +00:00
wiz
c9a1f04e00 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
2006-04-04 06:31:22 +00:00
wiz
0d252fca2c Pull over v1.5 and v1.6 from src/usr.sbin:
revision 1.6
date: 2005/11/13 20:37:23;  author: agc;  state: Exp;  lines: +1 -10
Get rid of cvs merge botch in previous.
----------------------------
revision 1.5
date: 2005/11/13 20:07:41;  author: agc;  state: Exp;  lines: +25 -8
The Dewey number comparison routines were added by myself in 2002 in
revision 1.32 of pkg_install/lib/str.c, and have absolutely nothing to
do with the original FreeBSD utilities.

Place the appropriate (3 clause) copyright on this file.
2006-04-04 06:30:10 +00:00
wiz
680f66a11d Pull over v1.68 from src/usr.sbin:
revision 1.68
date: 2006/03/17 02:31:44;  author: hubertf;  state: Exp;  lines: +4 -3
pkg_do(): only use cp2 if it's really set to something useful

Coverity CID 1176
2006-04-04 06:28:22 +00:00
wiz
8d27f5d82e Pull over 1.36 from src/usr.sbin:
revision 1.36
date: 2005/12/03 01:08:38;  author: hubertf;  state: Exp;  lines: +3 -3
Only warn about running as non-root when -v is given
(or when running in non-unprivilegedmode, but how to detect?)
2006-04-04 06:27:13 +00:00
wiz
3774c1a14d Pull over v1.51 from src/usr.sbin:
revision 1.51
date: 2006/03/06 20:00:10;  author: reed;  state: Exp;  lines: +4 -4
Fix the "Cannot chdir" error message to actually show the
problem directory name for lsbest and lsall.

For example:

# pkg_admin -d /usr/packages/DragonFly/1.4.0/i386/All lsbest 'gmake>0'
pkg_admin: Cannot chdir to /var/db/pkg: No such file or directory

Should show:
pkg_admin: Cannot chdir to /usr/packages/DragonFly/1.4.0/i386/All: No such file or directory
2006-04-04 06:25:59 +00:00
wiz
864c7d4c33 Pull over 1.117 from src/usr.sbin:
revision 1.117
date: 2006/03/17 02:37:31;  author: hubertf;  state: Exp;  lines: +6 -2
Add sanity check if there's a @cwd in the +CONTENT file.
If not abort, because we wouldn't know where to put the files.

Coverity CID 1358
2006-04-04 06:24:39 +00:00
jlam
daad0f3d6c Modify the pkginstall framework so that it manages all aspects of
INSTALL/DEINSTALL script creation within pkgsrc.

If an INSTALL or DEINSTALL script is found in the package directory,
it is automatically used as a template for the pkginstall-generated
scripts.  If instead, they should be used simply as the full scripts,
then the package Makefile should set INSTALL_SRC or DEINSTALL_SRC
explicitly, e.g.:

	INSTALL_SRC=	${PKGDIR}/INSTALL
	DEINSTALL_SRC=	# emtpy

As part of the restructuring of the pkginstall framework internals,
we now *always* generate temporary INSTALL or DEINSTALL scripts.  By
comparing these temporary scripts with minimal INSTALL/DEINSTALL
scripts formed from only the base templates, we determine whether or
not the INSTALL/DEINSTALL scripts are actually needed by the package
(see the generate-install-scripts target in bsd.pkginstall.mk).

In addition, more variables in the framework have been made private.
The *_EXTRA_TMPL variables have been renamed to *_TEMPLATE, which are
more sensible names given the very few exported variables in this
framework.  The only public variables relating to the templates are:

	INSTALL_SRC		INSTALL_TEMPLATE
	DEINSTALL_SRC		DEINSTALL_TEMPLATE
				HEADER_TEMPLATE

The packages in pkgsrc have been modified to reflect the changes in
the pkginstall framework.
2006-03-14 01:14:26 +00:00
erh
e8d1f2d71c Fix -uu handling so recursive updates of already installed packages work,
even if the initial package to install isn't installed yet.
Bump the version to 20060313.
2006-03-13 22:08:22 +00:00
jlam
bb4f311e85 Use pkginstall to generate the INSTALL script instead. 2006-03-10 22:38:30 +00:00
jlam
9c8b5ede43 Point MAINTAINER to pkgsrc-users@NetBSD.org in the case where no
developer is officially maintaining the package.

The rationale for changing this from "tech-pkg" to "pkgsrc-users" is
that it implies that any user can try to maintain the package (by
submitting patches to the mailing list).  Since the folks most likely
to care about the package are the folks that want to use it or are
already using it, this would leverage the energy of users who aren't
developers.
2006-03-04 21:28:51 +00:00
joerg
fa0e987ec8 Add conditional code to ignore the non-numeric part of an OS version
for the sake of compatibility tests in pkg_add.
E.g. DragonFly versions like
        1.4.0-RELEASE
are reduced to
        1.4.0

This code is currently enabled for DragonFly only.
2006-01-25 00:20:09 +00:00
wiz
d182d0d618 Sync with usr.sbin/pkg_install 1.58:
Use MaxPathSize instead of PATH_MAX.
2006-01-08 12:25:06 +00:00
rillig
dcf63d1b4b Fixed pkglint warnings about incorrect quoting and unsorted PLIST. 2006-01-06 19:46:26 +00:00
christos
c6761ed17e Handle newer versions of Berkeley DB. Our algorithm is:
- if you have > db1 the probably you have db_185.h which means
  that dbopen is really __db185_open, and we'll prefer that.
- else if you have db1, then you have db1/db.h and dbopen
- else if you have db.h, then this is either the one from db1 and it will
  work with -ldb having dbopen, or it will not.

Note that the compatibility option on __db185_open() will actually not create
or update db1.85/1.86 files, but it will use the current format of the db
library. This compatibility layer is source code only.
2006-01-04 23:33:23 +00:00
dillo
2b4de40b79 sync with src (revision 1.115):
(pkg_do) When marking already installed package as manually installed,
         only print message if we succeeded.

Noted by wiz.
2005-12-08 19:41:04 +00:00
ben
d0a9fc6a67 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
2005-12-06 01:08:09 +00:00
ben
92973d6092 Correct PAX_CMD to be pax. 2005-11-28 01:50:21 +00:00
ben
256e66a2e3 Conditionally include header files, and include nbcompat.h
Addresses PR#32149
2005-11-23 14:59:44 +00:00
ben
8926549f00 Sync with src. Remove unused variable argc from apply_perms(). 2005-11-23 14:33:50 +00:00
ben
f1c7672081 Remove unused variables, fix variable names to avoid shadowing globals,
and add PAX_CMD fallback macro.
2005-11-23 04:49:51 +00:00
ben
df7be8ce2f 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().
2005-11-22 15:44:59 +00:00
erh
31448b1b1c Fix for part of PR#32092: add SKIP_AUDIT_PACKAGES=yes so pkg_install can
be updated even if audit-packages is out of date.  The audit-packages package
already has this.
2005-11-17 17:05:30 +00:00
dillo
0401832751 Sync with src/usr.sbin/pkg_install:
Fix first part of PR 32068: pkg_info -Q broken for local binary packages
        Add BUILD_INFO_FNAME to the files to extract for SHOW_BI_VAR.
Bump version.
2005-11-14 09:42:38 +00:00
dillo
71bd927ebf Remove obsolete file from OBJS also.
Fixes PR 32071 by HEO SeonMeyong.
2005-11-14 09:17:40 +00:00
wiz
c6865dc161 Sync with basesrc: do not use errx in dewey.c; handle -1 return value
from dewey_match in pmatch.
2005-11-13 19:51:14 +00:00
wiz
e61b7d0cf9 Remove obsolete file. 2005-11-13 19:50:31 +00:00
wiz
30ce384efb Sync with basesrc 1.3:
Remove some unnecessary header includes.
2005-11-08 20:17:56 +00:00
dillo
aefacfcc2f Update to 20051107: Fix pkg_info -B against binary packages. 2005-11-07 23:51:14 +00:00
wiz
68f185e993 Sync with basesrc:
Replace wait(2) with equivalent waitpid(2); for Linux, reported by wulf@
on tech-pkg.
2005-11-07 22:57:48 +00:00
tv
97e479d1b2 Aren't we forgetting something here?
(Insert config.h, nbcompat.h, and bracket the other includes with
#if HAVE_<file>.)
2005-11-07 18:53:53 +00:00
jlam
604a8bc477 Use the hard-coded ${PKG_TOOLS_BIN} variable as the correct location of
the pkg_admin binary.
2005-11-07 06:52:24 +00:00
jlam
f2c3651333 INSTALL_SCRIPT_ENV wasn't being defined to include a definition for
PKG_PREFIX, which was causing the INSTALL script to fail when run from
the post-install-script target.
2005-11-07 06:32:58 +00:00
jlam
f24a3e971c In the "update" target, use "${UPDATE_TARGET}" to install the new
pkg_install tools.  This allows customizing UPDATE_TARGET=package to
produce a binary package instead of just installing the package.
2005-11-06 22:17:53 +00:00
jlam
c0fc027891 Remove @exec from PLIST and put the action into an INSTALL script instead.
Also, simplify the package by making use of the PKGMANDIR-handling in
pkgsrc to remove the custom MANDIR code from the package Makefile and
the PLIST.

Technically, this type of a change would require a PKGREVISION bump,
but as this is the pkg_* tools package and there were no changes to the
binaries, we refrain from doing so.
2005-11-06 22:15:44 +00:00
wiz
13950de799 Use config.h and add appropriate #if HAVE_FOO_H. 2005-11-06 12:37:43 +00:00
wiz
d768d9008a Add new files. 2005-11-05 13:30:31 +00:00
wiz
251eae9011 Not needed. 2005-11-05 13:20:31 +00:00
wiz
d69676ddee Sync with base system as of Sat Nov 5 13:19:32 UTC 2005.
Welcome to 20051103!
Now with "automatic" support.
2005-11-05 13:20:08 +00:00
joerg
cb701234ba Treat FTP error 450 like 550, otherwise pkg_add from a proftpd server
can hang.

Submitted-by: Eirik Nygaard
2005-10-30 21:27:47 +00:00
reed
bb35b0ea3d Remove CONFIGURE_ARGS setting --mandir as this is now done for
GNU_CONFIGURE.

Also add a note: This breaks for those who set their own LOCALBASE
to /usr and also define PKGMANDIR to different than share/man.
2005-10-07 18:05:07 +00:00
rillig
5946936ffc Replaced "# defined" with "yes" in Makefile variables like GNU_CONFIGURE,
NO_BUILD, USE_LIBTOOL.
2005-09-28 20:52:18 +00:00
hubertf
fd107baf6b Pull over change from src/usr.sbin/pkg_install:
| Modified Files:
|         src/usr.sbin/pkg_install/add: perform.c
|
| Log Message:
| cleanup: preserve errno. Needed so err() functions ran after running
|          cleanup(0) print the correct error message.
|
|
| To generate a diff of this commit:
| cvs rdiff -r1.109 -r1.110 src/usr.sbin/pkg_install/add/perform.c
2005-07-25 13:13:00 +00:00
hubertf
c762ea0231 Pull over this change from src/usr.sbin/pkg_install (-current):
| Modified Files:
|         src/usr.sbin/pkg_install/add: extract.c
|
| Log Message:
| Fix 'pkg_add -R' handling - not registering really means not touching
| the pkgdb too - useful for pkg_add as non-root!
|
|
| To generate a diff of this commit:
| cvs rdiff -r1.34 -r1.35 src/usr.sbin/pkg_install/add/extract.c
2005-07-25 13:03:59 +00:00
hubertf
3d4abdba19 Sync over files from src/usr.sbin/pkg_install to fix PR pkg/30658:
Warn, but don't error out on pkgs that were built with IGNORE_RECOMMENDED.

Bump version to 20050718.
2005-07-18 09:14:04 +00:00
jlam
6725d83ed5 Use += to not override previous USE_TOOLS setting. 2005-06-13 17:19:12 +00:00
dmcmahill
b16a2ef3e0 add autoconf test for missing (like in openbsd-3.6) or broken (like
in AIX-4.3.2) PRIu64.  If it is missing or broken, provide one.  Should
address PR30375.  Welcome to pkg_install-20050607
2005-06-10 01:37:21 +00:00
jlam
f7bc8ecc4c List shell tools that are needed by the pkg_view and linkfarm scripts. 2005-06-07 16:34:50 +00:00
wiz
540ce344e5 Include netdb.h for Solaris. From Neil Hoggarth in PR 30399. 2005-06-02 10:31:11 +00:00
wiz
5baac3d7e2 Sync with base 1.53: Comment out too noisy warning. 2005-05-30 19:45:02 +00:00
wiz
810ffe10ac Update to 20050530:
Sync with base system: Ranges support and some other stuff that wasn't
pulled over.
2005-05-30 13:23:31 +00:00
minskim
36e75fce9c Sync with 20050529 in src/.
If a pattern does not have any suffix, assume that it matches both
".tbz" and ".tgz".  This allows to install binary package dependencies
that are not exact matches, but satisfy requirements.
2005-05-29 19:20:53 +00:00
dmcmahill
04a3acbd97 - pull in the changes from usr.sbin which prevent an over flow
of a 32 bit signed number when pkg_add-ing a binary package
  file larger than 512 Mb.

- Bump PKGTOOLS_VERSION (NOT!!! PKGTOOLS_REQD) to 20050527
2005-05-28 02:50:45 +00:00
jlam
bc453eae61 Note that this package wants mtree, pax, and tar. 2005-05-16 00:09:33 +00:00
rillig
a73ab09866 Output the error string when renaming a dependency file fails. This has
happened to me when I had a misnamed directory in the pkgdb directory.
2005-05-10 00:04:09 +00:00
wiz
695ecfab67 Sync with usr.sbin/pkg_install/add/pkg_add.1 v1.59. 2005-05-06 23:03:41 +00:00
tv
f816d81489 Remove USE_BUILDLINK3 and NO_BUILDLINK; these are no longer used. 2005-04-11 21:44:48 +00:00
hubertf
da4b4c92b9 Address PR pkg/24744 by Jarmo Jaakkola <jarmo.jaakkola@iki.fi>:
* ftp.fi.netbsd.org returns "257" in return to a "cd" command, accept that
   (in addition to 250 and 550). Seems to be allowed per RFC 959.
 * Make buffer for reply bigger (not too big, as it may hit performance).
 * Bump PKGTOOLS_VERSION (NOT!!! PKGTOOLS_REQD) to 20050318
2005-03-20 15:55:54 +00:00
rillig
dfd5cc37b0 Never access argv[i+1] before you know that argv[i] != NULL. Approved
by wiz.
2005-03-11 21:20:15 +00:00
agc
7de1e6abd3 Bring over the clearer mismatch warning message from src.
+ state that the message is just a warning
+ make it clearer what an OS mismatch is
2005-03-07 08:41:58 +00:00
grant
485637d8af sync with src:
initialise a variable before using it. pkg_info binpkg.tgz would pass
garbage on the command line to tar(1).
2005-02-21 01:21:39 +00:00
grant
daa5a43372 sync with src:
cast return value of min_free() to uint64_t.

fixes pkg_add <binarypkg> on Solaris 8.
2005-02-20 09:17:25 +00:00
uebayasi
b24eb99218 Redo previous; follow the new idiom of quoting variables ("\"${XYZ}"\")
which may be passed to command line, and may contain white spaces.
2005-02-14 02:30:39 +00:00
uebayasi
0552777918 Quote command strings to be passed to configure script. 2005-02-12 04:45:48 +00:00
grant
17e5afb82c regen from man page update. pointed out by jlam@ - thanks! 2005-02-11 23:35:02 +00:00
grant
fbcc961f58 pull in binary pkg handling changes from src:
rework pkg_info(8) operating on binary packages, deprecating the `-.'
argument as it is no longer required (but is retained as a no-op for
backward compatibility).

the behaviour is now what is expected and intended:

        - when the pkg argument is path (absolute or relative) to a
          binary pkg, pkg_info operates on it.
        - when no pkg argument is given, or the argument is not a
          binary pkg path, pkg_info operates on the installed packages.

`pkg_info foo-1.0.tgz', `pkg_info /path/to/foo-1.0.tgz', etc. now work
correctly when foo-1.0.tgz is in the cwd.

bump PKGTOOLS_VERSION to 20050210.
2005-02-10 23:51:18 +00:00
jlam
94d6c64d03 Pull in documentation improvements and a minor change to allow building
with WARNS=2 from src/usr.sbin/pkg_install.  No functional change and
no version bump.
2005-02-05 00:28:58 +00:00
jlam
cb184155ea 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}.
2005-02-04 09:10:13 +00:00
jlam
92762b96b0 Pull in documentation/whitespace fixes and improvements from the HEAD
revision of src/usr.sbin/pkg_install as of 20050204.  I ran:

	cd pkgsrc/pkg_install/files
	./pkg_install2nbcompat .

Then I ran "cvs diff" and looked for portability-related changes that
were removed as a result of the import and resurrected them from the
repository.
2005-02-04 01:19:03 +00:00
jlam
e179abe26b s/pax/pkg_install/ in the usage message. 2005-02-03 23:53:23 +00:00
jklos
4e8025127a The "make update" target did not clean up after itself, which has caused
problems when people run "make update" without checking to see if anything
old was still around. "make update" now cleans after installing.
2005-01-22 01:03:45 +00:00
agc
ed7e9566bd Sync changes with src/:
+ always echo the command which is about to be executed during a pkg_add
  or pkg_delete, not just when verbose mode is on.

+ extract files on ftp pkg_adds with the 'p' flag to tar, to preserve
  modes of entries in the binary package.  (Addresses PR 28826 from
  Tyler Retzlaff)

Bump version to 20050106
2005-01-07 11:58:12 +00:00
tv
049d18c583 Don't "cp -p" for *source* files. Builds are usually done as an unprivileged
user, so it's not nice to try to use an option that will try to chown if
the repository isn't owned by the builder.

(Some OS's do in fact cause an error when the chown in "cp -p" fails.)
2005-01-06 05:32:29 +00:00
agc
1c7c506fd8 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.
2004-12-29 12:16:56 +00:00
grant
495ab8cee9 update config.{sub,guess} for various bootstrap tools. fixes build on
newer platforms such as DragonFly.

fixes PR pkg/28579 from Todd Willey.
2004-12-12 00:46:28 +00:00
erh
3c1d11809a Document the double "-u" option for updating dependant packages.
Bump the version to 20041210.
2004-12-10 21:14:40 +00:00
erh
a5434ec8c2 Explicitly override the update target to cause the deinstall step to happen
after the package is built.  This is necessary because the pkg_delete binary
that is used is the one from the WRKDIR, not the installed one.
2004-12-09 21:29:06 +00:00
erh
aeb668c148 Make binary updates work better when there are dependant packages to
update also.  Specifying -u twice will now update the named package
and its dependencies.
Also make sure Fake really means Fake, even if update is specified.
2004-12-09 20:10:34 +00:00
grant
abdd668506 sync with src:
no trailing comma at end of enum.
2004-11-20 06:41:35 +00:00
agc
dce9b7c3cc Bring over manual page patches from src/
Document the "pre" magic string, and bump date for this change.
Re-generate the preformatted manual page having done this.
2004-11-10 17:50:10 +00:00
wiz
10d31bd267 Recognize "pre" as pre-release version. Bump version to 20041110. 2004-11-10 16:50:39 +00:00
wiz
c7749236c9 regen. 2004-11-03 14:05:01 +00:00
wiz
c05432cbfd Sync with basesrc. 2004-11-03 14:03:53 +00:00
erh
434b84b1ab Merge the usedot and ctype-function changes from src. 2004-11-02 00:44:00 +00:00
erh
f9fcee4b60 Add a -N option to pkg_delete to delete registration information for a package
but not its files.
Override PKG_DELETE when building this package so -N can be used to
upgrade an existing install.
Bump version to 20041101.
2004-11-02 00:10:15 +00:00
grant
572d0d01db sync with src:
don't explicitly call gunzip, just pass the right arguments to tar.

fixes package decompression on Solaris where gunzip is not available
(but gzip is), and also decompression of bzip2 packages on non-NetBSD.
2004-10-31 02:48:12 +00:00
erh
08a2194bc1 PR pkg/23719: allow a pkg_install package to be created so a system can be
updated using entirely binary packages.
2004-10-05 21:08:32 +00:00
jlam
eecdcc3e52 Don't use .PHONY, which isn't understood by every make. Split out the
"all" target as the first one so that a bare "make" will build the "all"
target by default.  This should fix problems seen on AIX 5.1.
2004-08-31 17:40:41 +00:00
grant
8978d686c7 regen pkg_info.cat1 after last update to man page source.
while here, regen all catman pages on NetBSD-current w/ groff 1.19,
the output is much improved over groff 1.16.
2004-08-26 09:34:58 +00:00
snj
9a1b6c9803 Suck in recent minor changes made to this file. 2004-08-23 19:52:59 +00:00
cube
49b00b88c3 Pull-up -R descripion change from src tree. 2004-08-23 19:41:55 +00:00
jlam
683567c435 Fix the version number of the package in the configure script, and modify
the Makefiles so that they can be built by really basic make programs.
2004-08-21 06:33:39 +00:00
jlam
088679d3e7 Alphabetize list of headers. 2004-08-21 05:12:10 +00:00
jlam
7ed95560bf Add a script that imports from src HEAD to a named directory. 2004-08-20 22:27:12 +00:00