Commit Graph

678 Commits

Author SHA1 Message Date
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
wiz 0946d2d22d Improve wording for -T. 2007-05-19 14:41:13 +00:00
christos 77306f057c 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-05-05 16:43:01 +00:00
joerg 7c4234f30b Avoid using glob-style [] patterns with NLIST. At least vsftpd doesn't
support them, but all known FTP server support wildcard matches. So just
run two commands to get the list of tgz and tbz packages.

Bump pkg_install version to 20070416.

Original commit ended up local, but keep this with the original date as
that is what pkgsrc itself is using. Thanks to Hubert for noticing.
2007-05-03 00:26:53 +00:00
joerg 5149c83981 To avoid the defs.h to disappear again, change users of PRIu64 to
MY_PRIu64 and define that to PRIu64 by default.
2007-04-20 14:22:25 +00:00
tnn c370d31c5a Sync w/ pkgsrc/pkgtools/pkg_install: Include "defs.h" to get definition
of PRIu64 on platforms that don't define it themselves.
2007-04-20 14:03:14 +00:00
joerg 2fcc3fcbe6 Add a new option to pkg_create to allow easy registration of all
dependencies. Just like -P is used for the full dependencies to create
@blddep entries in the PLIST, -T does that as well. To reduce the chance
of confusing older tools, they are sorted after the full dependencies.
Bump pkg_install version to 20070308.
2007-03-08 18:20:20 +00:00
joerg eafde1f2ac First step to killing the require script heritage: remove support
in pkg_create for them and complain in pkg_add and pkg_info.
2007-03-08 15:36:57 +00:00
joerg fc6d83e38e Remove documentation for -h as well. 2007-03-08 15:20:18 +00:00
joerg 8f8f925511 Nuke -h option for pkg_create. Following all symlinks is not useful
either and can fail for those packages which intentionally or not
install broken symlinks.
2007-03-08 00:52:04 +00:00
joerg 91ba7f5d95 Nuke -X option for pkg_create. Filtering the PLIST thrown at tar is not
really useful and easier done directly. This feature was supposedly
never used at all.

OK agc@, jlam@
2007-03-08 00:33:53 +00:00
wiz 0021a7283b Links to pkgsrc(7) instead of packages(7). Bump date. 2007-03-02 11:36:38 +00:00
wiz cc97ec4b3c Drop trailing whitespace, remove superfluous Pp. 2007-02-07 06:47:33 +00:00
reed aa7b0cce96 Add an example on how the data is generated.
Point to pkg_info(1).
Add a brief history.
2007-02-06 01:22:40 +00:00
joerg e8a733de1a Bump pkg_install version to 20061103 for plist processing fix and
more verbosity in pkg_delete.
2006-11-03 09:20:45 +00:00
joerg bab4eecdd4 When processing symlinks in pkg_delete and the call to readlink failed,
it often helps to know why, so use warn instead of warnx.
2006-11-03 09:19:15 +00:00
joerg 5409c36039 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.

Reviewed by agc@
2006-11-03 09:17:24 +00:00
gson 3c6f48ffcd Bump PKGTOOLS_VERSION for today's fix to add/perform.c. 2006-07-20 11:19:33 +00:00
gson 23198f432e Fix uninitialized variable which was causing pkg_add -u to randomly
dump core.  This may fix PR pkg/30292.
2006-07-20 08:34:32 +00:00
rillig 591ed5a67e In header files, there shall be no variable definitions, only
declarations. Found by MIPSpro.
2006-07-10 21:42:18 +00:00
dillo 4b176d8d5e Fix pkg_info -Q for binary packages, noted by rillig.
Bump version to 20060701.
2006-07-01 19:31:23 +00:00
hubertf 611d442807 Update usage() to match the manpage - most important, add missing options 2006-06-27 23:33:21 +00:00
mrg 43419a069b sprinkle a little (char *) to quell GCC4. 2006-05-11 23:50:15 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
dillo d67db6407e HOMEPAGE is not required, noted by wiz. 2006-04-25 13:28:10 +00:00
wiz 7f1b30bfd9 Sort. 2006-04-24 22:04:12 +00:00
dillo 845f7524ad 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:36:22 +00:00
hubertf 0161f34fc6 Bump for today's timeout change in ftpio.c 2006-04-18 20:40:48 +00:00
hubertf 19ef9ca981 unpackURL():
Make timeout mechanism's granularity always per-file (inside package)
instead of per-package (if not -v) or per-file (inside package, if -v).
2006-04-18 13:11:05 +00:00
hubertf 2e3214a0d4 Bump ftp timeout from 10 minutes to 1 hour.
When installing teTeX over a dog slow VPN, this can be necessary.
2006-04-11 10:36:19 +00:00
wiz 91bfc3f2c9 Formatting nits. 2006-04-08 23:05:38 +00:00
reed 0078fc2ced pkg_add also now 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.

Remove on space in warning (and add "ABI")
so will fit on standard 80 column console.
2006-04-06 06:45:08 +00:00
hubertf 3cdb8f0a5c 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:01:20 +00:00
hubertf a4ff1305f4 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 17:50:48 +00:00
wiz da9647bfba Bump date, so that version in src and pkgsrc have the same
version _and_ the same code.
2006-04-04 06:38:53 +00:00
christos 3b6811d33b 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-03-26 18:11:22 +00:00
hubertf dc01675c5a Put check if "best" is empty back into the right place, messed up
in previous commit.
Noted by yamt@
2006-03-17 17:46:44 +00:00
erh 840c5222df 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-17 05:32:11 +00:00
hubertf 986192d148 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-03-17 02:37:31 +00:00
hubertf 3c5de91c39 pkg_do(): only use cp2 if it's really set to something useful
Coverity CID 1176
2006-03-17 02:31:44 +00:00
hubertf fc4fb72e38 findbestmatchingname_fn(): catch possible problems if best (vp)
contains some strange name (shouldn't happen, but ...)

Coverity CID 869
2006-03-17 02:20:46 +00:00
hubertf 92acb1f6e9 findbestmatchingname_fn(): only do something sensible if the pointer
handed in is actually usable (not NULL)

Fixes Coverity ID 870
2006-03-17 02:10:55 +00:00
hubertf baf66cc3f1 We can't sprintf() into a NULL pointer - catch that properly
for ALL cases.

Coverity CID 861
2006-03-17 01:58:25 +00:00
hubertf 19dcd9a850 Fix filedescriptor leak
Coverity CID 1625
2006-03-17 01:10:53 +00:00
reed 1b379e628e 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-03-06 20:00:10 +00:00
joerg 32ce5ba905 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 disabled by default on NetBSD.
2006-01-25 00:17:34 +00:00
wiz d0fb2fc679 Use MaxPathSize instead of PATH_MAX (like everywhere else here). 2006-01-08 12:20:54 +00:00
christos 5d62e1710e sync with pkgsrc version. 2006-01-04 23:36:14 +00:00
dillo 4793781929 (pkg_do) When marking already installed package as manually installed,
only print message if we succeeded.

Noted by wiz.
2005-12-08 19:26:28 +00:00
ben d221099506 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:07:30 +00:00