Commit graph

181 commits

Author SHA1 Message Date
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
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
jlam
cc4b314fcf Update pkgtools/pkg_install to 20040813 (latest release from the HEAD
branch of src).  Changes from version 20040730 include:

Modify pkg_info so that it will only print information on uninstalled
binary packages in the current working directory if -. is given on
the command line. If no -. is given, pkg_info will look for its
information in the ${PKG_DBDIR}.  This addresses a long-held gripe on
the part of a number of people, including myself (agc), which completely
violated the POLS.

Add a -q switch to pkg_admin, which allows it to work in a quiet
manner.  Fixes the change request in PR 26583, but in a different
manner, preserving existing behaviour and making the new behaviour
dependent upon a command line option.
2004-08-20 20:09:53 +00:00
jlam
b41799e081 Typo: it's <regex.h>, not <regext.h>. 2004-08-13 14:49:59 +00:00
jlam
92b94878f8 Add checks for all of the system headers used in the sources. Also include
missing <netdb.h> in lib/ftpio.c for MAXHOSTNAMELEN definition on Solaris.
2004-08-13 14:35:24 +00:00
jlam
fa97dd7fdd Sync with version 20040730 from src/usr.sbin/pkg_install on the HEAD:
> Re-work the code which checks the recorded build versions of a binary
> package to make pkg_add work properly when no +BUILD_INFO file exists.
>
> Modify the return value from read_buildinfo() to return 1 for success
> and 0 for failure.
>
> Use symbolic constants, rather than integers.
>
> If we can't read the build information, always tell of this fact.
>
> Bump version to 20040730
>
> Addresses PR 26429; a different version of these mods were verified to
> allow a +BUILD_INFO-less binary package to be added by Martin Husemann.
2004-08-06 16:57:03 +00:00
minskim
d9205a030c Import 20040601.
- Handle symlinks in a view correctly.
  - Remove superfluous escapes in BRE.

This closes PR pkg/24190.
2004-06-01 17:32:20 +00:00
minskim
2b6ee83857 Use statvfs if sys/statvfs.h is available. Based on patches provided
by Kibum Han in PR pkg/25560.

PKGVERSION will be bumped shortly when 20040601 is imported.
2004-06-01 17:29:09 +00:00
grant
c50af98acb sync with src/ rev. 1.101:
fix typo.
2004-05-08 16:54:28 +00:00
jlam
fe56564bbd Import pkg_install-20040508. Fixes the -N flag to not cause the -Q
codepath to be executed by correcting the SHOW_* macro definitions.  Also
fix up some function prototypes so this builds with -Wall.  Fixes from
pkg/25494.
2004-05-08 14:51:23 +00:00
jlam
6d1d20e2c3 Import pkg_install-20040507 from src/usr.sbin/pkg_install:
Add a new flag -Q (for "query") to pkg_info(1) to query the build
information for the definitions of specific variables that were saved
from build time, e.g.

	$ pkg_info -Q PKGPATH glib
	devel/glib
	$ pkg_info -Q PROVIDES glib
	/usr/pkg/lib/libglib.so.13
	/usr/pkg/lib/libgmodule.so.13
	/usr/pkg/lib/libgthread.so.13
2004-05-07 16:40:41 +00:00
tv
930f375cd4 20040428: In pkg_add, set the umask nice and early, and remove an absolute
setting of mode in a mkdir command.
2004-04-28 15:38:17 +00:00
tv
3fa7f59e65 Sync to 20040421: fix an uninitialized array member access in pkg_add. 2004-04-21 20:11:55 +00:00
rh
c7e5425240 Update pkg_install to 20040411, pulling up the changes in the NetBSD source
tree:

Make pkg_add recognise binary packages built with ignored recommendations
(IGNORE_RECOMMENDED set in the presence of RECOMMENDED pre-requisites).
This change is fully backward-compatible: binary packages have set the
corresponding BUILD_INFO since RECOMMENDED was implemented.  Packages
built before that time will install as before.
Bump PKGTOOLS_VERSION to 20040411.
This closes PR pkg/24712 by Thomas Klausner.
2004-04-11 06:56:11 +00:00
tv
5f8f17eb0b Merge 20040409: Parameterize the umask calls so that defs.*.mk can change
it on a per-opsys basis (and so that mk.conf can override it to match what
the pkgsrc builder is using).
2004-04-09 18:38:12 +00:00
agc
2a8f9c23d4 Bring over a fix from main sources:
revision 1.5
date: 2004/04/06 05:56:07;  author: agc;  state: Exp;  lines: +14 -11
Fix signature verification after pkg_add and friends were changed to use
fexec() - trying to exec "gpg --verify %s" won't work with fexec, so split
up the command into separate words.
2004-04-07 22:44:23 +00:00
tv
9e75df93f9 Sync with 20040330. 2004-03-30 15:28:08 +00:00
tv
225ca50407 Remove warning on Interix; OK'd by hubertf. 2004-03-29 20:28:05 +00:00
tv
b8ca4f15f3 Remove umask call and remove warning on Interix; OK'd by hubertf. 2004-03-29 20:27:46 +00:00
tv
857ccccb5d Eek, revert previous; these weren't supposed to be committed. 2004-03-29 02:25:06 +00:00
tv
1ccbfa9d6c Obey CPPFLAGS. 2004-03-29 02:24:11 +00:00
wiz
8c2fda69bb 1.39 from usr.sbin/pkg_install/info/main.c:
Check pkgdb_open for correct return value.
From Peter Postma in PR 24863.
2004-03-22 11:44:24 +00:00
grant
8dcc56addb catch up with bootstrap-pkgsrc changes.
Just a comment doesn't seem to suffice in all cases.  For no-op commands,
use an explicit "true" invocation to avoid problems.  (A future merge of
current bmake may fix this issue.)
2004-03-11 13:33:57 +00:00
grant
a680366537 just use ${OPSYS} and ${MACHINE_ARCH} from the environment. this means
we can set it in the environment if bootstrapping or have pkgsrc do it
for us.
2004-02-11 11:31:26 +00:00
grant
29fb945cb1 sync with NetBSD-current's pkg_install from 20040207. 2004-02-07 10:37:52 +00:00
jlam
8a84165b29 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.
2004-01-14 23:55:29 +00:00
grant
94be7fc32c don't bother checking for md5.h, as the result overrides libnbcompat's
more appropriate test.

fixes build problem noted on RedHat.
2004-01-12 22:20:36 +00:00
wiz
2897352fde Fix typo; new sentence, new line;
drop trailing spaces; add comma in enumeration.
2004-01-06 16:23:29 +00:00
hubertf
3da9e01015 Rework a bit to describe the pkg wildcards in their own
section, etc.
2004-01-06 16:15:54 +00:00
hubertf
f53fa863f8 pkg_install now prints post-install message by default, if available. 2004-01-06 15:53:41 +00:00
hubertf
af99e2c61f In the "quick depends pre-scan", first print all bad matching depends,
then exit (instead printing one conflicting pkg/version on each run).
2004-01-04 01:49:38 +00:00
grant
d5a22b3847 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.
2003-12-20 04:23:05 +00:00
grant
887e8c6503 Sync pkgtools/pkg_install with src/usr.sbin/pkg_install from 20031121. 2003-12-08 13:50:50 +00:00
jlam
3607b06f5c 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.
2003-10-29 23:00:27 +00:00
grant
caeb81ba77 move src2nbcompat from pkg_install to libnbcompat. 2003-10-12 01:17:50 +00:00
grant
80f555cb2e add TAR_CMD to DEFS to ensure we use the full path to tar.
noted by Pierre Bourgin on tech-pkg.
2003-10-06 10:12:42 +00:00
grant
dbe2b165b6 sync with NetBSD-current after updates from wiz. 2003-09-23 13:22:37 +00:00
grant
71c17ddbd6 bump date 2003-09-23 07:46:07 +00:00
grant
3c5895a2f6 add --with-{ftp,mtree,pax,tar} to allow overriding the commands that
pkg_install calls, and pass the full path for each from the pkg Makefile.

fixes issue with pkg_add and pkg_create calling non-existent or
less-than-functional tools since it relied on $PATH.
2003-09-23 07:44:48 +00:00
grant
7e46cd752c sync with NetBSD-current's pkg_install-20030923. 2003-09-23 07:13:45 +00:00
grant
33ded8ed84 no need to pass $(DEFS) to $(CC) twice. 2003-09-23 06:36:19 +00:00
grant
237cb732fa clean up autoconf generated files in view/ 2003-09-23 06:05:13 +00:00
grant
452bd6a31a config.lineno -> configure.lineno 2003-09-23 05:30:33 +00:00
grant
6c1b4e7bec shut up the 'do nothing' shell comments 2003-09-19 02:11:22 +00:00
jlam
73bf789d08 Update pkg_install to 20030914. Changes from version 20030913 are
ensuring that recursive pkg_delete'ing works by using the correct
pkg_dbdir to find packages.  This fixes recursive deleting if the
-K flag is passed to pkg_delete(1), and the named dbdir differs from
the default dbdir (/var/db/pkg).
2003-09-14 04:58:30 +00:00
jlam
e98f26b486 Update pkg_install to 20030913. Changes from version 20020912 are quieting
the file removal when deleting linkfarms if the expected file doesn't
exist.  Since the symlink isn't there, the mission is already accomplished,
so why bother with the warning?
2003-09-13 09:24:07 +00:00
jlam
06768a3ab4 Update pkg_install to version 20030912. Changes from 200230907 are
adding two new options to pkg_admin(1) to simply using this utility to
list the bare package names that match patterns when looking in PKG_DBDIR:

      -b      Print only the basenames when matching package names for
              lsall and lsbest.

      -d lsdir
              Set lsdir as the path to the directory in which to find
              matching package names for lsall and lsbest.
2003-09-13 05:50:23 +00:00
jlam
2604176f00 Pull in rev 1.49 of perform.c from src/usr.sbin/pkg_install/info. This
fixes a bug where the pkg_dbdir could no longer be a symlink to a
directory.
2003-09-10 17:31:49 +00:00
jlam
89a39a4308 Bump version to 20030907. Changes from previous version include:
* Teaching pkg_add(1) to be smarter about how to add a depoted packge.

    * "pkg_delete foo" only deletes foo if it's a unique package.

    * Make "pkg_delete -O foo" for delete file entries for foo from
      pkgdb.byfile.db actually work.

    * Teach pkg_admin(1) two new commands "add" and "delete" for working
      with pkgdb.byfile.db.

    * pkg_view(1) uses the new pkg_admin(1) commands to keep the
      pkgdb.byfile.db files consistent in each view.

    * Man page fixes.
2003-09-09 13:34:11 +00:00
jlam
a1162ddb60 Whee... pkgdb_remove_pkg returns 1 on success, so make the dummy function
return this value.
2003-09-08 05:58:10 +00:00
jlam
6235d89a6c It turns out the comment at the top of pkgdb_open is wrong. It actually
returns 0 if there is an error, and 1 otherwise.
2003-09-08 05:32:56 +00:00
jlam
f9108a4a31 Substitute for various program paths used by the linkfarm(1) and
pkg_view(1) shell scripts.
2003-09-08 04:49:05 +00:00
jlam
21307bd330 The pkgdb_* functions should be no-ops on platforms that don't have the
db*() functions, so make the dummy pkgdb_open() always return 0 for a
successful open of the package dbfile.
2003-09-08 02:09:04 +00:00
jlam
cac1917e6d Return the documented value "0" instead of EXIT_SUCCESS, which while it may
happen to be "0", isn't what's being explicitly returned.
2003-09-08 02:07:42 +00:00
jlam
81a729e266 Exit if there's a problem building in one of the subdirectories instead of
pretending nothing is wrong.
2003-09-08 01:36:45 +00:00
jlam
fcaad16176 Allow this to compile on systems without vfork by #define'ing it to fork.
This is okay since we just do vfork()/exec() in lib/ftpio.c and don't rely
on any vfork vs. fork semantics.
2003-09-04 20:34:04 +00:00
jlam
ebb438dccb Put back <sys/vfs.h> lost in last update. 2003-09-03 14:22:57 +00:00
jlam
35ae38a50f Update to pkg_install-20030824. Changes from the previous version include:
* Check for errors in reading from the file descriptor for the ftp
      process, and correct the error messages.

    * Nuke some code for older NetBSDs that's better handled in
      pkgtools/libnbcompat.

    * Don't prevent user from using views other than the default view.
2003-09-03 14:05:59 +00:00
jlam
8895f41caf Put back several includes lost in the update that should fix builds on
Solaris and Linux.
2003-09-03 12:32:50 +00:00
jlam
45dba79b8a The *.0 files belong in $(mandir)/cat1. 2003-09-02 22:06:25 +00:00
jlam
5cbadd5e70 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.
2003-09-02 08:28:22 +00:00
jlam
e6a9f770c3 Only copy new files into place if they're different from the original file,
modulo $NetBSD$ tag differences.
2003-09-02 08:26:35 +00:00
jlam
df790619d3 Reverse the order that the config.h file and <nbcompat.h> are included,
since the latter has all sorts of checks to make sure we don't stomp on
any macros defined in config.h, but the reverse isn't true.
2003-09-02 08:07:16 +00:00
jlam
1714c64e33 Re-add the checks for HAVE_CHFLAGS and HAVE_DBOPEN so that this can build
on systems that don't have either function.
2003-09-02 01:37:04 +00:00
jlam
68343ad3b2 Document the actions taken by the tree-conversion script. 2003-09-01 22:49:42 +00:00
wiz
9ded9e4ce9 Drop trailing space; sort sections; sort SEE ALSO. 2003-09-01 16:51:45 +00:00
wiz
709ef68ba6 Sort SEE ALSO, pkg_view(1) not pkg_views(1). 2003-09-01 16:51:31 +00:00
jlam
2b8f551f54 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.
2003-09-01 16:27:07 +00:00
grant
e173909669 also install man page source, no version bump as this is not yet in
sync with -current, and no functionality change.
2003-07-31 09:51:00 +00:00
jschauma
efd2c1e98a Synch with basesrc:
Quote % characters in macro lines.
2003-06-26 15:12:07 +00:00
jschauma
7a025a99c3 Synch with basesrc:
deleting as non-root works fine, so don't insist on running as root
2003-06-26 00:29:01 +00:00
seb
aa1f2cb228 Update to version 20030423 via patch from src/usr.sbin/pkg_install.
>Log Message:
>pkg_add fix:
>When doing quick pre-check if any conflicting dependencies are installed
>and a dependency is not found installed do not try to search for a wildcarded
>(-[0-9]* suffix) package if the dependency was already wildcarded.
>
>This prevent something like 'p5-Net-DNS-0.33' reported as an already
>installed version of 'p5-Net-[0-9]*' as a dependency.
>Before this fix 'p5-Net-[0-[0-9]*' would have been incorrectly searched for.
>
>Reviewed by hubertf@.
>
>Bump PKGTOOLS_VERSION to 20030423.
>
>
>To generate a diff of this commit:
>cvs rdiff -r1.81 -r1.82 src/usr.sbin/pkg_install/add/perform.c
>cvs rdiff -r1.26 -r1.27 src/usr.sbin/pkg_install/lib/version.h
2003-04-23 10:27:39 +00:00
grant
2f5a698630 sync with bootstrap:
make sure man pages get installed into a sane location if --mandir is
not specified.
2003-04-20 20:34:05 +00:00
grant
77ab913949 sync with bootstrap and -current:
- pkg_admin getcwd() fix.
- pkg_delete checksum mismatch warning.
- crank PKGTOOLS_VERSION.
2003-04-17 14:00:55 +00:00
grant
1d4e7078a5 sync with bootstrap, remove an unnecessary cast which found its way in
here.
2003-04-17 13:50:54 +00:00
grant
c7a2b35431 sync with current:
darwin doesn't have uint64_t, use int64_t for now.
2003-04-11 21:27:43 +00:00
grant
372e4fe573 sync with -current:
improve a message.
2003-04-11 19:58:50 +00:00
grant
4c3363d8db catch up to bootstrap.
bump PKGTOOLS_VERSION to 20030411.
2003-04-11 14:40:35 +00:00
jschauma
43f0484488 Synch with main sources:
Changes by hubertf and seb; these changes tested on NetBSD, Linux and Irix.

Modified Files:
	src/usr.sbin/pkg_install/add: perform.c pkg_add.1

Log Message:
Implement remaining TODO item in pkg upgrade (pkg_add -u):
* Upgrade step 1/4: Check if the new version is ok with all pkgs
* (from +REQUIRED_BY) that require this pkg

Inspired by bsd.pkg.mk's upgrade(?) target.

Modified Files:
	src/usr.sbin/pkg_install/admin: main.c
	src/usr.sbin/pkg_install/info: main.c perform.c

Log Message:
Consistently check findmatchingname() return value for error condition.
Among other this fixes 'pkg_info -e whateverpkg' exit status when
/var/db/pkg is missing: it is now 1 and not 0.

Modified Files:
	src/usr.sbin/pkg_install/lib: version.h

Log Message:
Bump to "20030325" after today's changes from seb and me
2003-03-29 18:41:56 +00:00
jschauma
ef6b1ec568 Sync with main sources:
Date:           Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
	pkgdb_open
	{ pkgdb_iter, pkgdb_retrieve }
	pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.

Date:           Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.

Date:           Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
2003-03-16 19:44:09 +00:00
grant
9e16a225ad correct #ifdef misplacement. 2003-02-18 15:45:50 +00:00
grant
1231d45b34 Fix some RCS ids. 2003-02-11 16:48:22 +00:00
grant
be9eb6014e 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.
2003-02-11 16:42:06 +00:00
grant
3833154e3f belatedly sync with src:
In pkgdb_remove_pkg, only perform DB functions if HAVE_DBOPEN is defined,
else return EXIT_SUCCESS unconditionally (as in other functions dealing with
db functionality).

fixes build problem on Solaris when no libdb is available.
2003-02-11 14:40:55 +00:00
jschauma
c6bead9a14 Synch with latest changes from src (changes by agc, synch ok'd by agc)
----------------------------------------------------------------------

Add a pkgdb_remove_pkg() function and use it in pkg_delete(1).

Bump lib/version.h due to added functionality.


Order the getopt(3) options alphabetically.


Introduce the notion of "preserving" an installed package.

A preserved package may not be deleted by pkg_delete(1) (unless the -f
option is given), and the preserved capability will be carried into
any binary package. pkg_add(1) will also keep the preserved capability
if it was present in the binary package.

The "preserve" capability can be given to a package by using the
PKG_PRESERVE definition in a package Makefile in pkgsrc.

Ride on the recently-bumped lib/version.h for new functionality.
2003-01-14 15:18:32 +00:00
schmonz
dfae993934 On NetBSD, man pages were getting installed into /usr/man. That's,
like, so 80's! Pass a value more appropriate for the current decade
to --mandir via CONFIGURE_ARGS, and let ./configure set this in
the Makefiles.

Install catted man pages with the suffix ".0" rather than ".1".

Bump PKGTOOLS_VERSION.
2003-01-11 07:52:15 +00:00
schmonz
e0b7a580e0 Define NO_PKGTOOLS_REQD_CHECK, which will mean something in a moment.
Rather than override LOCALBASE, set PREFIX (after including bsd.pkg.mk).

Bump PKGTOOLS_VERSION (many changes since 20021123).
2003-01-09 13:13:04 +00:00
jschauma
4b2164510a ``On second thought, let's not go to Camelot. It is a silly place.''
(Make pkdb_open return pkgdbp!=NULL as src's does, and revert previous
patch.  As discussed with agc.)
2003-01-07 16:43:56 +00:00
jschauma
37f8100ca0 Unlike pkg_install in src, this version of pkg_install contains
a pkgdb_open that may return one of _three_ values (0,1,-1), so that
we can not simply use
if (!pkgdb_open(ReadOnly))
but need to use
if (pkgdb_open(ReadOnly) == -1)

Mea culpa.
2003-01-07 16:10:02 +00:00
grant
6917a552fa sync with src:
In pkgdb_remove(), use the return value from (*db->del), rather than
explicitly setting and checking errno.

Do some CSE in pkgdb_iter().

Use the db access functions in the proper manner.

Also fix some whitespace nits.
2003-01-07 06:42:28 +00:00