14335 Commits

Author SHA1 Message Date
pluknet
988d1d6a86 MFC r259870:
Do not truncate the ``command'' column in ``ps'' output.
2014-01-02 15:43:23 +00:00
jhb
33f454b5c1 MFC 258063,258064,258066,258097,258185,259134:
- Add an -s option to the regression tests that specifies a path to an
  alternate etcupdate.sh script to test.  This allows a non-installed
  version of the script to be tested more easily.
- Add a pre-world mode of updating similar to the -p option that can be
  passed to mergemaster.
- Fix a couple of issues with -F:
  - Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks.
  - Fix the -F option in the case that the only upstream change is a
    change in the FreeBSD ID and the local file is removed.
- Refresh /etc/localtime after each update using tzsetup -r.
- Regenerate /var/db/services.db when /etc/services changes.
2013-12-27 19:53:42 +00:00
jhb
bf62f8539b MFC 259013:
Fix the processor table entry structure to use a fixed-width type for
32-bit fields so it is the correct size on amd64.  Remove a workaround
for the broken structure from bhyve(8).
2013-12-24 19:10:56 +00:00
jilles
d08ecc86b4 MFC r256650: kldxref: Add static keyword to the new function only used in the
same file.

The WARNS level is not such that the omission broke the build.
2013-12-22 23:08:33 +00:00
dteske
a3e8666201 MFC r259276,259468-259470,259472,259474,259476-259478,259480-259481,259570,
259572, and 259597-259598...

r259276: Fix bug in `services' script in adding dumpdev comment to rc.conf
r259468: Ignore spurious escape generated by VMware's Ctrl-Cmd combination
r259469: Mask errors in `config' script from newaliases(1) about non-FQHN
r259470: Set atime=on for /var/mail zfsboot dataset to support mail server
r259472: Accept NULL input for zfsboot SWAP to indicate SWAP of zero bytes
r259474: Multiple changes, including bug-fixes and debugging improvements
r259476: Change default ZFS disk layout, making it easier to resize
r259477: fletcher4 is now the default (zfsboot related)
r259478: De-uglify the geli(8)-setup infobox (zfsboot related)
r259480: Fix ghosted zroot issue by always performing labelclear on swap
r259481: Auto-enable 4k sector alignmet when geli(8) is enabled (zfsboot)
r259570: Fix numerical comparison error (zfsboot)
r259572: Mask spurious rm error in bsdinstall_log from `auto' script
r259597: Fix zfsboot regression when installing to 3+ disks
r259598: Set cachefile property of bootpool so it imports to new system
2013-12-19 18:52:41 +00:00
bdrewery
2d967091e5 MFC r259266:
Fix multi-repository support by properly respecting 'enabled' flag.

  This will read the REPOS_DIR env/config setting (default is /etc/pkg
  and /usr/local/etc/pkg/repos) and use the last enabled repository.

  This can be changed in the environment using a comma-separated list,
  or in /usr/local/etc/pkg.conf with JSON array syntax of:
      REPOS_DIR: ["/etc/pkg", "/usr/local/etc/pkg/repos"]

Approved by:	bapt (mentor)
2013-12-19 12:33:24 +00:00
grehan
e704ad0c2f MFC r259302,r259413
r259302
  bhyve(8) man page

r259413
  mdoc: sort SEE ALSO
2013-12-18 03:51:04 +00:00
gjb
4dddfdac35 MFC r259426, r259427:
r259426:
  Add a pkg(8) repository configuration file for cdrom-based package
  installation.

  As part of the 'pkg-stage' target, copy the configuration file
  to the 'packages/repos/' directory on the DVD filesystem.

r259427:
  Export 'REPOS_DIR' when the selected source medium for package
  installation is cdrom.  This enables bsdconfig(8) to make use
  of the on-disc pkg(8) repository configuration, which fixes
  package selection and installation from the dvd installer.

Sponsored by:	The FreeBSD Foundation
2013-12-18 01:14:25 +00:00
eadler
607f8e622d MFC r259132,r259133,r259143:
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
	as a case insensitive flag.

	Add regression test for recently added 'i' flag in r259132.

	the i modifier was added in r259132 since POSIX recently agreed to add
	it. Switch uses of /I to /i.

PR:		standards/184641
2013-12-16 01:20:18 +00:00
gjb
1948707197 MFC r259113, r259115, r259144, r259148:
r259113 (dteske):
  Fix failed attempt to send pkg(8) stderr to /dev/null

r259115 (dteske):
  Prevent truncating /tmp/bsdinstall_log each time we
  exec a module.

r259144 (dteske):
  Fix a regression after successfully installing to encrypted
  ZFS root, the passphrase is not accepted and a message about
  "incorrect key" is displayed.

r259148 (dteske):
  Fix a regression resulting in mountroot prompt after attempting
  to install to encrypted ZFS root (caused by a typo in a
  variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME).

Sponsored by:	The FreeBSD Foundation
2013-12-14 20:55:53 +00:00
ian
3360970b01 MFC r258076, r258077:
This fixes 3 problems in syslogd related to sizing receive buffers...

  - A call was misplaced at the wrong level of nested if blocks, so that
    the buffers for unix domain sockets (/dev/log, /dev/klog) were never
    increased at all; they remained at a way-too-small default size of 4096.

  - The function that was supposed to double the size of the buffer
    sometimes did nothing, and sometimes installed a wildly-wrong buffer
    size (either too large or too small) due to an unitialized 'slen'
    variable passed to getsockopt().  Most often it doubled the UDP buffers
    from 40k to 80k because accidentally there would be harmless stack
    garbage in the unitialized variables.

  - The whole concept of blindly doubling a socket's buffer size without
    knowing what size it started at is a design flaw that has to be called a
    bug.  If the double_rbuf() function had worked at all (I.E., if the
    other two bugs didn't exist) this would lead to UDP sockets having an
    80k buffer while unix dgram sockets get an 8k buffer.  There's nothing
    about the problem being solved that requires larger buffers for UDP than
    for unix dgram sockets -- the buffering requirements are the same
    regardless of socket type.

  This change renames the double_rbuf() function to increase_rbuf() and
  increases the buffer size on all types of sockets to 80k.  80k was
  chosen only because it appears to be the size the original change was
  shooting for, and it certainly seems to be reasonably large (I might
  have picked 64k in the absence of any historical guidance).

  Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
  transient and shouldn't result in closing the socket and giving up forever.
2013-12-14 00:25:57 +00:00
trasz
77844c8786 MFC r259182:
Fix handling for empty auth-groups.  Without it, ctld child process
would either exit on assertion, or, if assertions are not enabled,
fail to authenticate the target.

Sponsored by:	The FreeBSD Foundation
2013-12-13 15:23:07 +00:00
grehan
3f29e37aef MFC r256657,r257018,r257347,r257423,r257729,r257767,
r257933,r258609,r258614,r258668,r258673,r258855

Pull in some minor bugfixes and functionality enhancements
from CURRENT. These are candidates to be moved to 10.0-release.

r258855
mdoc: quote string properly.

r258673
Don't create an initial value for the host filesystem of "/".

r258668
Allow bhyve and bhyveload to attach to tty devices.

r258614
The 22-bit Data Byte Count (DBC) field of a Physical Region Descriptor was
being read as a 32-bit quantity by the bhyve AHCI driver.

r258609
Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
actual value read by the guest.

r257933
Route the legacy timer interrupt (IRQ0) to pin 2 of the IOAPIC.

r257767
Fix an off-by-one error when iterating over the emulated PCI BARs.

r257729
Add the VM name to the process name with setproctitle().

r257423
Make the virtual ioapic available unconditionally in a bhyve virtual machine.

r257347
Update copyright to include the author of the LPC bridge emulation code.

hand-merge r257018
Tidy usage messages for bhyve and bhyveload.

r256657
Add an option to bhyveload(8) that allows setting a loader environment variable
from the command line.

Discussed with:	neel
2013-12-13 06:59:18 +00:00
eadler
82cc6046d5 MFC r259156:
mtest(8): use correct macro in mdoc

	The An macros is used for authors while the Ar macro is used for arguments.
	AFAIK mcast-addr and ifname are not authors.

PR:		docs/184649
2013-12-13 00:56:05 +00:00
dteske
17574f5acb MFC r258927: Fix a regression introduced by SVN r257842 that prevents
Encryption from being enabled.

Approved by:	re (gjb)
2013-12-07 00:33:10 +00:00
trasz
d3ef2c7747 MFC r258842:
Grammar fix.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-05 16:29:22 +00:00
trasz
f6339a17f9 MFC r258841:
Fix typos.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-05 16:14:56 +00:00
gjb
5ddf02a63e MFC r258854:
Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since
  the format of 'pkg -vv' output has changed.

Approved by:	re (hrs)
Sponsored by:	The FreeBSD Foundation
2013-12-05 01:06:05 +00:00
gjb
b7e8f6268b MFC r258550:
Do not create pkg.conf, as it is not necessary anymore
  and packagesite is deprecated

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
2013-11-30 17:33:49 +00:00
bdrewery
8769ca5500 MFC r258348:
Document 'enabled' as boolean instead of string.

Approved by:	bapt (implicit)
Approved by:	re (gjb)
2013-11-29 21:12:35 +00:00
delphij
ce8816672a MFC r257879:
Fix typo in r256646: We want to generate lists of directories in
INDEX-OLD and INDEX-NEW and compare them, not generate the same
list of directories from INDEX-OLD twice...

Pointy hats to: cperciva & everybody who didn't proofread
		EN-13:04 enough
Errata Notice:	FreeBSD-EN-13:05.freebsd-update
Approved by:	re (gjb)
2013-11-28 22:06:37 +00:00
brooks
4355776cd8 MFC: r258456
Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is
nmtree.

The mtree output used by mergemaster in this case was clearly not meant for
computer consumption and an approach based on -f <file1> -f <file2> would
probably be a better idea, but this is a minimal change.

Approved by:	re (glebius)
2013-11-26 16:13:48 +00:00
dteske
d0873bf093 MFC Revisions:
256549: man-page updates
256551: .Dd bump in manpage
256553: bootenv -> ROOT fix
257842: monster list of fixes
257843: minor touchup
257844: copy install log
257845: fixup to last
257872: mdoc fixup
257939: debug check
258021: MBR bootcode fixup

Reviewed by:	many
Discussed on:	-current
Approved by:	re (hrs)
2013-11-21 03:40:52 +00:00
dteske
7f36b7bf08 MFC r257755-257756,257780-257785,257787-257793, and
257795,257817,257819,257937-257938,258029,258263-258267:
257755: SRV records
257756: fix spurious error message
257780: Whitespace
257781: Comments and funny syntax
257782: Debug file truncation is optional
257783: f_show_err for debugging
257784: f_eval_catch for debugging
257785: fix size calculations bug
257787: fix broken HTTP "any" media type
257788: more debugging
257789: Comments
257790: fix printf usage bug
257791: f_[v]sprintf added
257792: Comments
257793: fix off-by-one error in size calcs
257795: Replace pkg-tools with pkgng
257817: fix cosmetic typos
257819: Use `pkg -vv' to get ABI
257937: Adjustment to last
257938: Adjustment to last
258029: Comments
258263: Shuffle code around
258264: Remove unused code
258265: Debugging. Use f_eval_catch with pkg
258266: Shutdown media on exit from packages
258267: Fix pkg install from DVD

Reviewed by:	many
Discussed on:	-current
Approved by:	re (hrs)
2013-11-21 03:38:47 +00:00
trasz
77d8ffb510 Fix typo.
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-11-14 12:14:27 +00:00
glebius
0daddca6bd Merge r257945 from head:
Do not use just freed memory.

Approved by:	re (kib)
2013-11-14 09:26:52 +00:00
glebius
bb108535ba Merge r257888, r258049 from head:
- Use system libiconv, instead of trying to dlopen() it.
  - Just disable recoding support in libsmb if built WITHOUT_ICONV.

PR:		183153
Approved by:	re (kib)
2013-11-14 09:25:29 +00:00
gjb
4f116e3822 MFC r257749:
Switch to using pkg(8) for the doc install in bsdinstall(8).
  This also bootstraps the system with pkg(8) for future use.

Approved by:	re (delphij)
PR:		183488
Sponsored by:	The FreeBSD Foundation
2013-11-09 00:59:31 +00:00
bdrewery
c49734a56e MFC r257668:
Use proper capitalization for FreeBSD.org

Approved by:	bapt
Approved by:	re (gjb)
2013-11-07 15:43:41 +00:00
bdrewery
8ca6127d10 MFC r257505:
Add -f support to 'pkg bootstrap' and 'pkg add' to force installation
  of pkg(8) even if already installed.

  This is useful if you somehow messup pkg(8) and need to reinstall from
  remote with it already being registered in the pkg(8) /var/db/pkg database.

  Also add some sanity checks to 'pkg add'.

Approved by:	bapt
Approved by:	re (glebius)
2013-11-04 13:01:29 +00:00
bdrewery
5dcfadbc54 MFC r257378,r257400,r257402,r257440:
Add a pkg(7) manpage for bootstrap

Approved by:	bapt
Approved by:	re (gjb)
2013-11-03 13:06:43 +00:00
bdrewery
eb6fbdd1a6 MFC r257377:
Add a 'pkg bootstrap' command which will bootstrap pkg(8) without
  forwarding any command to it after installation.

Approved by:	bapt
Approved by:	re (gjb)
2013-11-03 12:58:14 +00:00
trasz
baae40831d MFC r257379:
Rename '-h' option to '-p', and use "portal" instead of "host" or "address",
in order to be consistent with iSCSI terminology.  Besides, calling the
option '-h' was just wrong.

This changes usage for newly added iscsictl(8), and two newly added
subcommands to ctladm(8).  This breaks POLA between CURRENT and 10,
but since 10.0 has not been released yet, it's still ok to do.

MFC r257380:

Bump .Dd after r257379.

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
2013-11-02 02:38:32 +00:00
gjb
8141a12b1d MFC r256540, r256544:
r256540 (dteske):
 Add loader.conf(5) entries to import bootpool after boot when
 using full-disk encryption and ZFS.

 r256544 (dteske):
 Fix loader.conf(5) entries from r256540.

Approved by:	re (hrs)
Sponsored by:	The FreeBSD Foundation
2013-11-01 15:54:57 +00:00
brooks
8b58367431 MFC r256865
Remove the isf(4) driver.  It was created by accident and is subset of
the cfi(4) driver.  It remained in the tree longer than would be ideal
due to the time required to bring cfi(4) to feature parity.

Sponsored by:	DARPA/AFRL
Approved by:	re (gjb)
2013-10-31 16:16:52 +00:00
grehan
382c310190 MFC r257092
Fix bug in the ioapic emulation for level-triggered interrupts,
  where a pin assertion while a source was masked would result in
  the interrupt being lost, with the symptom being a console hang.
  The condition is now recorded, and the interrupt generated when
  the source is unmasked.

Approved by:  re (glebius)
2013-10-30 21:12:27 +00:00
neel
249db5aac3 MFC r257293.
Add support for PCI-to-ISA LPC bridge emulation. If the LPC bus is attached
to a virtual machine then we implicitly create COM1 and COM2 ISA devices.

Prior to this change the only way of attaching a COM port to the virtual
machine was by presenting it as a PCI device that is mapped at the legacy
I/O address 0x3F8 or 0x2F8.

There were some issues with the original approach:
- It did not work at all with UEFI because UEFI will reprogram the PCI device
  BARs and remap the COM1/COM2 ports at non-legacy addresses.
- OpenBSD GENERIC kernel does not create a /dev/console because it expects
  the uart device at the legacy 0x3F8/0x2F8 address to be an ISA device.
- It was functional with a FreeBSD guest but caused the console to appear
  on /dev/ttyu2 which was not intuitive.

The uart emulation is now independent of the bus on which it resides. Thus it
is possible to have uart devices on the PCI bus in addition to the legacy
COM1/COM2 devices behind the LPC bus.

The command line option to attach ISA COM1/COM2 ports to a virtual machine is
"-s <bus>,lpc -l com1,stdio".

The command line option to create a PCI-attached uart device is:
"-s <bus>,uart[,stdio]"

The command line option to create PCI-attached COM1/COM2 device is:
"-S <bus>,uart[,stdio]". This style of creating COM ports is deprecated.

Approved by:	re (glebius)
2013-10-30 20:42:09 +00:00
bdrewery
7046958142 MFC: r256770,r257142,r257145,r257146,r257147,r257148,
r257149,r257150,r257158,r257159,r257164,r257168,
     r257193

  - Support checking signature for pkg bootstrap from remote
    and for 'pkg add ./pkg.txz'

  - Be verbose on where pkg is being bootstrapped from.

  - Add support for reading configuration files from /etc/pkg.
    For now only /etc/pkg/FreeBSD.conf is supported.

  - Add test package signing key fingerprint into /etc/keys/pkg/trusted.

  - Disable fingerprint checking by default for now as the official
    packages are not yet signed.

Approved by:	bapt
Approved by:	re (glebius)
2013-10-29 18:36:44 +00:00
bdrewery
b8f1640fa0 MFC r257051:
Add support for using "pkg+http://" for the PACKAGESITE.

  pkg 1.2 is adding this support as well. This should help
  lessen the confusion on why the default SRV PACKAGESITE
  does not load in a browser.

Approved by:	bapt
Approved by:	re (glebius)
2013-10-29 12:25:22 +00:00
bapt
22acce6ad4 MFC: r256968, r256971, r256978
Improve SRV records support for the pkg(8) bootstrap:
- order srv records by priorities
- for all entries of the same priority, order randomly respect the weight
- select the port where to fetch from respect the port provided in the SRV
record

Allow to bootstrap by doing pkg add ./a/path/to/a/pkg_package.txz

Approved by:	re (glebius)
2013-10-29 07:33:53 +00:00
cperciva
cf504dd159 MFC r256646, r256767, r257038:
When installing updates, install new directories first and remove old
  directories last.

  Allow ~ in file names so libtool droppings in contrib don't break updates.
  It has happened twice now, and is likely to happen again.

  Be more selective when filtering for lib*.so.N files.  These are deleted
  at the end of the upgrade process, after warning users to upgrade any
  3rd party software (e.g., from the ports tree) which might link to the
  libraries being removed.

Approved by:	re (gjb)
Errata Notice:	FreeBSD-EN-13:04.freebsd-update
2013-10-26 08:34:35 +00:00
grehan
c26ecf0555 MFC r256926, r257005
r256926
  Fix AHCI ATAPI emulation when backed with /dev/cd0

  - remove assumption that the backing file/device had
    512-byte sectors
  - fix incorrect iovec size variable that would result
    in a buffer overrun when an o/s issued an i/o request
    with more s/g elements than the blockif api

r257005
  Export the block size capability to guests.
  - Use #defines for capability bits
  - Export the VTBLK_F_BLK_SIZE capability
  - Fix bug in calculating capacity: it is in
    512-byte units, not the underlying sector size

  This allows virtio-blk to have backing devices
  with non 512-byte sector sizes e.g. /dev/cd0, and
  4K-block harddrives.

Approved by:  re (glebius)
2013-10-25 18:39:01 +00:00
bdrewery
817f3323c4 MFC r256450:
Rename libbsdyml to libyaml, make private, and bump
  SHLIB_MAJOR to 1.0

Approved by:	bapt
Approved by:	re (glebius)
2013-10-23 18:07:07 +00:00
neel
b31f0060b5 MFC r256645.
Add a new capability, VM_CAP_ENABLE_INVPCID, that can be enabled to expose
'invpcid' instruction to the guest. Currently bhyve will try to enable this
capability unconditionally if it is available.

Consolidate code in bhyve to set the capabilities so it is no longer
duplicated in BSP and AP bringup.

Add a sysctl 'vm.pmap.invpcid_works' to display whether the 'invpcid'
instruction is available.

Approved by:	re (hrs)
2013-10-22 00:58:51 +00:00
grehan
9ad9e387e9 MFC r256709:
Eliminate unconditional debug printfs.

  Linux writes to these nominally read-only registers,
  so avoid having bhyve write warning messages to stdout
  when the reg writes can be safely ignored. Change the
  WPRINTF to DPRINTF which is conditional.

Approved by:	re (delphij)
2013-10-18 22:05:17 +00:00
grehan
4bbe413766 MFC r256709:
Eliminate unconditional debug printfs.

  Linux writes to these nominally read-only registers,
  so avoid having bhyve write warning messages to stdout
  when the reg writes can be safely ignored. Change the
  WPRINTF to DPRINTF which is conditional.

Approved by:	re (gjb)
2013-10-18 21:42:47 +00:00
dteske
9a4ff0a6cf MFC r256489:
Add executable bit to docsinstall [old] and entropy [new] scripts.

MFC r256541:
Document BSDINSTALL_TMPBOOT environment variable introduced by SVN r256343.

Approved by:	re (gjb)
2013-10-18 07:42:50 +00:00
dteske
d58485abbd MFC r256391:
Fix signed integer overflow detection in f_expand_number() of strings.subr.

Approved by:	re (glebius)
2013-10-12 19:54:12 +00:00
grehan
c1abbfde2d MFC r256389
Implement the virtio block 'get-ident' operation. This eliminates the
  annoying verbose boot error of the form

     g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

  The ident returned by bhyve is a text string 'BHYVE-XXXX-XXXX', where
  the X's are the first bytes of the md5 hash of the backing filename.

Approved by:	re (gjb)
2013-10-12 19:41:35 +00:00
hrs
2a63615074 MFC 256385:
- Add mount.fdescfs parameter to jail(8). This is similar to
  mount.devfs but mounts fdescfs.  The mount happens just after
  mount.devfs.

- rc.d/jail now displays whole error message from jail(8) when a jail
  fails to start.

Approved by:	re (gjb)
2013-10-12 17:46:13 +00:00