Sascha Wildner [Fri, 20 Jul 2018 11:38:22 +0000 (13:38 +0200)]
kernel/sysctl: Add handling of uint32_t.
Brad Hoffman [Wed, 18 Jul 2018 14:41:03 +0000 (14:41 +0000)]
rc: Bring in a simple mechanism to run rc scripts only once.
The basic mechanism is: If /firstboot exists, rc will also run all
scripts that have the "firstboot" keyword, then delete /firstboot.
This is a simpler version of FreeBSD's work. Specifically, we hardcode
the firstboot sentinel's name to /firstboot and we also remove it a
bit more simply because we assume that at the end of /etc/rc, root is
R/W.
This mechanism is used for example by sysutils/ec2-scripts and is in
preparation for the upcoming ena(4) driver import.
Based-on: FreeBSD
Aaron LI [Tue, 17 Jul 2018 11:57:55 +0000 (19:57 +0800)]
if_tun: Allow IP packets of length TUNMRU with TUNSIFHEAD set
Obtained-from: FreeBSD (revision 300205)
Aaron LI [Thu, 5 Jul 2018 06:08:43 +0000 (14:08 +0800)]
if_tun: Raise maximum MTU to be 65535 bytes
This is used, for example, by packetdrill to test with MTU's up to the
maximum value.
Taken-from: FreeBSD (revision 300603)
Aaron LI [Mon, 9 Jul 2018 04:45:24 +0000 (12:45 +0800)]
if_tun: Disallow change network device type
Disallow ioctl(2) to change the network device type of tun(4).
Otherwise, page faults and panics can happen when access uninitialized
fields in the "struct ifnet" which are specific to the network device
type.
Obtained-from: FreeBSD (revision 326362)
Aaron LI [Sun, 8 Jul 2018 13:07:20 +0000 (21:07 +0800)]
if_tun: Implement interface clone support
Now 'ifconfig tunX create' and 'ifconfig tunX destroy' work.
The tun device will be automatically destroyed when being closed,
except for the manually created tun device/interface by
'ifconfig tunX create', similar to the tap(4) device.
This interface clone support is based on the if_tap device.
Aaron LI [Sun, 8 Jul 2018 11:55:36 +0000 (19:55 +0800)]
if_tun: Better name interface-related functions
Rename interface-related functions to be 'tunifxxx', and reorder a
bit to better group them.
Tweak the styles and improve debug messages a bit.
Aaron LI [Sun, 8 Jul 2018 02:17:20 +0000 (10:17 +0800)]
if_tun: Add sysctl net.link.tun.{refcnt,debug}
Add read-only sysctl net.link.tun.refcnt to show the number of opened
devices.
Add sysctl net.link.tun.debug to be a alias to debug.if_tun_debug.
Aaron LI [Sun, 8 Jul 2018 01:43:12 +0000 (09:43 +0800)]
if_tun: Support module load and unload
Track the created tun devices in a list, and record the number of opened
tun devices. Destroy all tun devices when unloading the module.
Mainly based on if_tap.
Aaron LI [Sat, 7 Jul 2018 15:21:18 +0000 (23:21 +0800)]
if_tun: Add "cdev_t tun_dev" to tun_softc struct
Similar to if_tap, save the tun device in the tun_softc struct.
Aaron LI [Sat, 7 Jul 2018 15:16:19 +0000 (23:16 +0800)]
if_tun: Use pointer to ifnet in tun_softc struct
Use a pointer to the ifnet struct in the tun_softc struct, instead of
embedding a full ifnet struct in it. (similar to FreeBSD's)
Use if_alloc() to allocate the ifnet struct.
Aaron LI [Tue, 17 Jul 2018 11:04:12 +0000 (19:04 +0800)]
if_tun: Update tun.4 man page to match the code
Mainly follow FreeBSD's tun.4, refer to NetBSD's tun.4, and with my own
minor adjustments.
Aaron LI [Sat, 7 Jul 2018 12:49:04 +0000 (20:49 +0800)]
if_tun: Some small tweaks and cleanups
* Consistently use the TUN define instead of "tun".
* Use variable "sc" instead of "tp" to refer to "struct tun_softc".
* Use variable "ifp" (struct ifnet *) to make code more readable.
* Static the bitmap variable.
* Various style tweaks.
Aaron LI [Thu, 19 Jul 2018 07:04:35 +0000 (15:04 +0800)]
if_tap: Restore SIOCGIFFLAGS, SIOC[GS]IFADDR ioctls for tapioctl()
These ioctls allow basic control of the network interface via the device
file (/dev/tapX). For example, our vke(4) device currently uses the
'SIOCGIFADDR' ioctl.
Matthew Dillon [Tue, 17 Jul 2018 18:37:20 +0000 (11:37 -0700)]
libc - MFC resolver fix
* Allows intermediate domain names with an underscore.
* Fixes lookups of 'www.office.com' and 'www.newegg.com', and
probably other domains.
Reported-by: kerma
Diagnosed-by: kerma, tautology
Aaron LI [Tue, 17 Jul 2018 09:58:35 +0000 (17:58 +0800)]
Revert "if_tap: Get rid of arpcom struct from tap_softc struct"
This reverts commit
78e1ab4a8fc0074361116dedb55e6dc02baea351, with
minor adjustments to reduce the diff.
Thank sephe for pointint out the problem with that commit, which
breaks the 'ether_ifattach()' as well as some IPv6 stuffs that
assume the existence of 'arpcom'.
Sascha Wildner [Tue, 17 Jul 2018 09:23:47 +0000 (11:23 +0200)]
ioctl.9: Remove some obsolete commented out info.
Aaron LI [Tue, 17 Jul 2018 06:29:44 +0000 (14:29 +0800)]
if_tap: Disallow change network device type
Disallow ioctl(2) to change the network device type of tap(4).
Otherwise, page faults and panics can happen when access uninitialized
fields in the "struct ifnet" which are specific to the network device
type.
Obtained-from: FreeBSD (revision 326362)
Aaron LI [Fri, 13 Jul 2018 07:43:07 +0000 (15:43 +0800)]
if_tap: Add TAPGIFNAME ioctl to get interface name
This is a convenient shortcut to obtain the network interface name using
file descriptor for character device.
This ioctl is obtained from FreeBSD (revision 182880) which was further
obtained from NetBSD. This ioctl is used by softwares such as QEMU.
Bump __DragonFly_version and update tap.4 man page.
Aaron LI [Fri, 13 Jul 2018 05:04:35 +0000 (13:04 +0800)]
if_tap: Remove the broken vmnet support
The vmnet feature provided by tap(4) was intended to be used by the
VMWare port that runs as the server side to communicate with its clients.
However, our tap(4) was updated a lot in the past but left the vmnet
function broken. In addition, we don't have the VMWare server and thus
the vmnet function isn't needed in the foreseeable future.
So just remove it.
Discussed-with: swildner, sephe
Aaron LI [Mon, 9 Jul 2018 10:53:42 +0000 (18:53 +0800)]
if_tap: Update tap.4 man page to match the code
Remove the description on FIONBIO ioctl since ours doesn't support it.
Mainly taken from FreeBSD, with some improvements.
Aaron LI [Sun, 8 Jul 2018 08:37:24 +0000 (16:37 +0800)]
if_tap: Return error instead of system panic
Return error when failed to create/find the device and to allocate
the interface struct, instead of system panic.
Aaron LI [Sun, 8 Jul 2018 07:16:56 +0000 (15:16 +0800)]
if_tap: Remove redundant unit from tapcreate() and tun_softc
The tap interface unit number is the same as minor number of the
associated tap device, so remove the redundant "unit" argument
from tapcreate() function as well as the "tap_unit" entry from
tun_softc struct.
Meanwhile, improve the debug messages.
Aaron LI [Sun, 8 Jul 2018 06:09:29 +0000 (14:09 +0800)]
if_tap: Get rid of arpcom struct from tap_softc struct
Remove the ancient arpcom struct from the tap_softc struct,
meanwhile introduce the "tap_ifp" member that points to the
interface (ifnet struct) associating with the tap device.
Aaron LI [Sun, 8 Jul 2018 04:30:55 +0000 (12:30 +0800)]
if_tap: Destroy the autoclone device when unload module
Use destroy_autoclone_dev(), which replaces both devfs_clone_handler_del()
and devfs_clone_bitmap_uninit(), to destroy the autoclone device /dev/tap
when unload the module.
Without this fix, the autoclone device /dev/tap is left over when the
module is unloaded.
Aaron LI [Sun, 8 Jul 2018 02:05:31 +0000 (10:05 +0800)]
if_tap: Add read-only sysctl net.link.tap.refcnt
Expose the number of opened devices as a read-only sysctl:
net.link.tap.refcnt.
Improve the debug messages with respect to the refcnt.
Aaron LI [Sat, 7 Jul 2018 12:21:45 +0000 (20:21 +0800)]
if_tap: Remove global variable "taplastunit"
This global variable isn't helpful. In addition, the tap units can be
non-continuous.
Aaron LI [Sat, 7 Jul 2018 10:57:10 +0000 (18:57 +0800)]
if_tap: Some small tweaks and cleanups
* Consistently use the TAP define instead of "tap", also remove the
CDEV_NAME define.
* Consistently use "tap_if" instead of "arpcom.ac_if".
* Better name the kqueue functions, and move the structs to the beginning.
* Reorder to better group related functions.
* Explicitly include the required <sys/queue.h> header.
* Use variable "sc" instead of "tp" to refer to "struct tap_softc".
* Staticize the bitmap variable.
* Use the variable unit = minor(dev) more.
* Improve the debug messages.
* Various minor style tweaks and cleanups.
Matthew Dillon [Fri, 13 Jul 2018 17:31:32 +0000 (10:31 -0700)]
test - Test after repository move to SSD
* Test after repository move to SSD
Aaron LI [Thu, 12 Jul 2018 03:38:48 +0000 (11:38 +0800)]
Disable cert verification for pkg-bootstrap when no cert.pem
Our site uses HTTPs and fetch(1) requires /etc/ssl/cert.pem or
/usr/local/etc/ssl/cert.pem to verify the server's certificate.
However, when one needs to bootstrap the 'pkg', that cert.pem
generally doesn't exist since it is installed by the ca_root_nss
package. So disable certificate verification for fetch(1) in
such a case.
Split out 'pkg-bootstrap-{fetch,install}' targets to get rid of
some duplicate codes.
Matthew Dillon [Wed, 11 Jul 2018 18:45:38 +0000 (11:45 -0700)]
nvme - Do a better job backing out of probe errors
* AWS provides nvme interfaces which might not have attached volumes.
Improve stability on AWS nvme (still needs more work). Play nice
when queue creation fails. Do a better job tracking MSI-X
interrupt installation and removal.
Matthew Dillon [Wed, 11 Jul 2018 18:44:24 +0000 (11:44 -0700)]
misc - Allow /usr/dports to be a null-mount
* Don't punt on rm -rf /usr/dports if /usr/dports cannot be
deleted. It might be a null mount.
Sascha Wildner [Tue, 10 Jul 2018 13:01:15 +0000 (15:01 +0200)]
hostname(1): Add a compat option -f to print the FQDN (our default).
This should fix the build of multimedia/libcec.
Found-in: FreeBSD
Tomohiro Kusumi [Sat, 7 Jul 2018 12:28:56 +0000 (05:28 -0700)]
sbin/hammer2: Explicitly include <sys/stat.h> for stat(2)
Fix compile error on Linux.
Tomohiro Kusumi [Sat, 7 Jul 2018 08:07:21 +0000 (01:07 -0700)]
sbin/hammer2: Drop unused header includes in icrc.c
libdmsg, UUID, and HAMMER2 ondisk definitions are not needed
for CRC calculation.
Sascha Wildner [Sat, 7 Jul 2018 21:04:18 +0000 (23:04 +0200)]
diffutils: Update README.DELETED.
Sascha Wildner [Sat, 7 Jul 2018 21:03:23 +0000 (23:03 +0200)]
Merge branch 'vendor/DIFFUTILS'
Sascha Wildner [Sat, 7 Jul 2018 21:01:37 +0000 (23:01 +0200)]
diffutils: Remove another unneeded file from the vendor branch.
Sascha Wildner [Sat, 7 Jul 2018 20:36:59 +0000 (22:36 +0200)]
hier.7: Mention /rescue.
Sascha Wildner [Sat, 7 Jul 2018 18:27:32 +0000 (20:27 +0200)]
openpam: Local adjustments for the Resedacea upgrade.
Sascha Wildner [Sat, 7 Jul 2018 18:26:09 +0000 (20:26 +0200)]
Merge branch 'vendor/OPENPAM'
Sascha Wildner [Sat, 7 Jul 2018 18:23:48 +0000 (20:23 +0200)]
Import OpenPAM Resedacea.
See HISTORY for the details.
Aaron LI [Fri, 6 Jul 2018 06:39:44 +0000 (14:39 +0800)]
Fix remaining references to mkinitrd.8 to initrd.7
Reported-by: swildner
Tomohiro Kusumi [Thu, 5 Jul 2018 05:44:02 +0000 (22:44 -0700)]
sys/vfs/hammer: Cleanup CRC functions
The inner cmp in nested `vol_version >= HAMMER_VOL_VERSION_SEVEN`
conditional in hammer_crc_test_xxx() mostly get optimized out by gcc,
so not much reason to have __hammer_crc_get_xxx() in case of retry
using old CRC.
Aaron LI [Thu, 5 Jul 2018 11:49:49 +0000 (19:49 +0800)]
libtelnet: Fix styles in sra.c
Fix various small style(9) issues in sra.c, making some of the logic
clearer.
Aaron LI [Thu, 5 Jul 2018 09:04:51 +0000 (17:04 +0800)]
telnet(1): Disable PAM for the rescue version
This avoids several PAM-related libraries when crunching telnet, and
reduces the size by about 200 KB.
Aaron LI [Thu, 5 Jul 2018 08:50:46 +0000 (16:50 +0800)]
libtelnet: Fix build with NOPAM
Also don't perform a check for "secure" tty for root logins when using
PAM; that is what we provide pam_security(8) for.
Taken-from: NetBSD (lib/libtelnet/sra.c, v1.6)
Aaron LI [Thu, 5 Jul 2018 08:47:29 +0000 (16:47 +0800)]
libtelnet: Some small updates to sra.c from NetBSD
* Define 'SMALL_LEN' and 'XSMALL_LEN' to replace the explicit numbers.
(also replaced the original PASS_SIZE)
* Use 'strlcpy()' and 'snprintf()' when appropriate.
* Clean some type casts.
* Some style(9) tweaks.
Sascha Wildner [Thu, 5 Jul 2018 06:16:36 +0000 (08:16 +0200)]
wcscoll.3: Remove leading '+' from copy/paste from a patch.
Sepherosa Ziehau [Wed, 4 Jul 2018 15:10:20 +0000 (23:10 +0800)]
objcache: Add stat counting # of exhaustion.
Use it to supress exhaustion warning; nuke no longer used 'exhausted'
field in objcache struct.
Sepherosa Ziehau [Wed, 4 Jul 2018 14:57:56 +0000 (22:57 +0800)]
objcache: Move rarely used but useful bits into their own structure.
Sepherosa Ziehau [Wed, 4 Jul 2018 14:17:05 +0000 (22:17 +0800)]
objcache: Use u_long for stats.
Add a new stat to count # of allocation.
Aaron LI [Wed, 4 Jul 2018 03:14:27 +0000 (11:14 +0800)]
initrd: Refactor Makefile and introduce quick{rescue,initrd}
Refactor the Makefile by splitting the original targets into smaller
ones.
Introduce targets quick{rescue,initrd} which skip the clean step.
Such similar behavior was achieved by passing '-DNO_CLEAN' to make.
(suggested-by: swildner)
Aaron LI [Sat, 30 Jun 2018 13:49:45 +0000 (21:49 +0800)]
initrd: Crunch grep/diff/telnet to rescue tools
NOTE: These tools depend on their corresponding internal libraries.
This adds about 1MB to the rescue tools.
Aaron LI [Sat, 30 Jun 2018 13:44:30 +0000 (21:44 +0800)]
mk/crunchgen: Support internal libraries
Add "CRUNCH_INTLIBS" and "CRUNCH_INTLIB_${P}" to support the building
and linkage of internal libraries.
Also properly handle the "obj" etc. targets for internal libraries.
Meanwhile, add "CRUNCH_LIB_${P}" and "CRUNCH_KEEP_${P}" to the comments.
Aaron LI [Sat, 30 Jun 2018 13:36:54 +0000 (21:36 +0800)]
crunchgen(1): Support building and linking internal libraries
Some programs (e.g., grep, diff, telnet) use internal libraries. In
order to crunch such programs, the corresponding internal libraries
must be built together with the programs and then are used to create
the <progname>.lo.
Extend the crunchgen(1)'s "special" command by adding the "lib_int"
keyword, which specifies the internal libraries to be used to create
the <progname>.lo.
The "libs_int" command is also implemented to support building the
needed internal libraries which will be statically linked to create
the final crunched executable.
Aaron LI [Sat, 30 Jun 2018 05:51:12 +0000 (13:51 +0800)]
crunchgen(1): Small updates and cleanups
* Use realpath(3) to replace the hack of using popen/pwd.
* Add function iseq() to replace strcmp().
* Use {} for make variables.
* Various style(9) tweaks.
Aaron LI [Wed, 27 Jun 2018 01:36:05 +0000 (09:36 +0800)]
initrd: Handle ${DESTDIR} when building rescue tools
When building rescue tools for a target system (e.g., create release
build), use tools (e.g., crunchide, crunchgen, cc), headers and libraries
from the target root (${DESTDIR}).
NOTE:
GCC is more tolerant (e.g., doesn't warn about unused variables) to
system headers than user headers, so we have to use "-isystem <inc_dir>"
instead of "-I<dir>", but the former (option syntax) causes difficulty
for <bsd.dep.mk> to filter the options to call mkdep(1). Therefore, we
use "--sysroot=${DESTDIR}" and it's simpler than specifying headers paths
with "-I<dir>" and library paths with "-L<dir>".
Meanwhile, improve the commands logic in Makefile, and set LC_ALL=C.
Aaron LI [Wed, 13 Jun 2018 01:42:47 +0000 (09:42 +0800)]
crunchgen(1): Add "linkopts" to specify linker options
Currently, the link options (e.g., library search directories) are
appended to the "libs" directive. Moreover, crunchgen discards
duplicates in such string lists.
For example, "-L /lib -L /usr/lib" becomes "-L /lib /usr/lib".
Add the "linkopts" directive to record the options for linking the
final crunched binary. This makes the "libs" directive cleaner,
and helps crunchgen to detect duplicates between "libs" and "libs_so".
Update the crunchgen.1 man page.
Update mk/bsd.crunchgen.mk against the new "linkopts" directive.
Clean up crunchgen.c a bit.
Aaron LI [Tue, 12 Jun 2018 01:33:17 +0000 (09:33 +0800)]
crunchgen(1): Improve the skeleton program
* Sort the name of crunched tools (for easier finding available tools).
* Do not print the name of itself in usage.
* Remove the unused crunched_here() function.
* Style updates (taken-from: NetBSD)
Aaron LI [Mon, 11 Jun 2018 12:58:36 +0000 (20:58 +0800)]
initrd: Add real scp(1)
scp(1) and ssh(1) are different tools, so the original "scp" alias
doesn't work actually. Add real scp(1) now.
Meanwhile, alias "ssh" to "slogin" as the same as the base system.
Remove the symbol keep statement as it's no longer needed.
Aaron LI [Sun, 10 Jun 2018 06:43:02 +0000 (14:43 +0800)]
initrd: Reorganize and crunch 70 more rescue tools
* Merge "rescue.sbin" into "rescue" to save space (avoid duplicated
libraries to be linked).
* Move "lvm" out of "rescue.libcrypto" since lvm(8) doesn't need libcrypto.
* Crunch 70 more tools (aliases not counted):
awk, basename, bc, bzip2, cap_mkdb, chflags, chown, cmp, cpio, cut,
date, dirname, dmsetup, dump, ed, env, expr, false, find, fstyp, gzip,
head, hexdump, hostname, id, join, kcollect, kdump, kenv, ktrace,
ldconfig, lsvfs, mount_devfs, nc, paste, patch, pax, pkill, printf,
pw, pwd_mkdb, rcorder, realpath, relpath, restore, rtsold, savecore,
sed, sort, stat, stty, tail, tar, tee, touch, tput, tr, traceroute,
traceroute6, true, truss, uname, uniq, varsym, vi, vipw, vnconfig, wc,
xz, yes
Highlights:
awk, bzip2, chown, cpio, find, gzip, nc, pw, sed, tar, vi, xz
Now the total number of crunched rescue tools more than 230 (including
aliases), but the total size remains almost the same :-)
* Improve the makefiles to be much cleaner.
Aaron LI [Mon, 11 Jun 2018 07:59:11 +0000 (15:59 +0800)]
libedit: No need of the bundled fgetln, vis and wcsdup
All these functions are provided in libc, so remove them from libedit
to avoid symbol conflict (e.g., crunching many tools).
Meanwhile, the libedit's config.h already have proper defines for the
above functions.
Sascha Wildner [Wed, 4 Jul 2018 08:21:55 +0000 (10:21 +0200)]
bsd-family-tree: Sync yet again with FreeBSD.
Aaron LI [Mon, 11 Jun 2018 05:29:31 +0000 (13:29 +0800)]
libssh: No need of compat vis.c as we support VIS_ALL
This helps avoid the vis.o symbol conflicts between libc and libssh.
Aaron LI [Mon, 11 Jun 2018 04:47:36 +0000 (12:47 +0800)]
vis(1): Add option -a to use VIS_ALL
Taken-from: OpenBSD
Aaron LI [Mon, 11 Jun 2018 04:44:07 +0000 (12:44 +0800)]
vis(3): Add VIS_ALL support
OpenSSH requires VIS_ALL and therefore uses the version bundled with
itself, but this causes the vis.o symbol conflicts between libc and
libssh when crunching fstyp(8) with ssh(1).
Bump __DragonFly_version.
Based-on: OpenBSD
Tomohiro Kusumi [Wed, 4 Jul 2018 04:39:34 +0000 (21:39 -0700)]
lib/libdmsg: Fix compile-time warning on Linux
warning: pointer targets in passing argument 2 of 'crypto_algos[0].init' differ in signedness
note: expected 'char *' but argument is of type 'uint8_t *'
Aaron LI [Tue, 3 Jul 2018 12:15:17 +0000 (20:15 +0800)]
Do not auto build rescue tools when ${DESTDIR} != "/"
When installworld to an alternative root (i.e., ${DESTDIR} != "/"),
do not automatically build the rescue tools.
This change won't affect the nrelease build, since it will explicitly
do 'make initrd'.
Suggested-by: swildner
Sepherosa Ziehau [Tue, 3 Jul 2018 14:52:30 +0000 (22:52 +0800)]
objcache: Fix comment indentation.
Sepherosa Ziehau [Tue, 3 Jul 2018 14:46:22 +0000 (22:46 +0800)]
objcache: Use __predict for predictable conditions.
Aaron LI [Tue, 3 Jul 2018 11:42:48 +0000 (19:42 +0800)]
<sys/gpt.h>: Fix a minor comment issue
Sepherosa Ziehau [Mon, 2 Jul 2018 15:55:41 +0000 (23:55 +0800)]
objcache: Fix comment style
Sepherosa Ziehau [Mon, 2 Jul 2018 15:05:07 +0000 (23:05 +0800)]
objcache: Constify object cache name.
Aaron LI [Sun, 1 Jul 2018 05:23:59 +0000 (13:23 +0800)]
Add the initrd.7 man page
This man page is partly based on the removed mkinitrd.8 man page
written by Alex Hornung.
Reviewed-by: Sascha Wildner
Sascha Wildner [Mon, 2 Jul 2018 07:35:56 +0000 (09:35 +0200)]
build.7: Fold CAVEATS into EXAMPLES. No need for an extra section.
Aaron LI [Fri, 15 Jun 2018 04:41:43 +0000 (12:41 +0800)]
Makefile.inc1: Remove the obsolete crunch from bootstrap tools
Since rescue build is now detached from buildworld, so crunchgen(1)
and crunchide(1) are no longer needed by the buildworld.
Aaron LI [Mon, 11 Jun 2018 04:35:33 +0000 (12:35 +0800)]
vi(1): Do not build iconv(3) support for the rescue version
The iconv(3) support requires dynamic library access, which is impossible for
the statically liked rescue version, so disable it.
Taken-from: FreeBSD
Aaron LI [Mon, 2 Jul 2018 01:30:20 +0000 (09:30 +0800)]
initrd: Fix parallel build
Add explicit target orders to oinit/Makefile, because such orders are
set in <bsd.subdir.mk> but not in <bsd.prog.mk>.
Since the make targets (e.g., depend, all, install, clean) are now
ordered, so remove 'clean cleandepend' from the same command as
'depend all install'.
Also allow defining the 'NO_CLEAN" variable to not clean previous builds.
Aaron LI [Mon, 2 Jul 2018 01:06:31 +0000 (09:06 +0800)]
mk/crunchgen: Fix parallel builds by ordering targets
Order the build targets (clean, cleandepend, cleandir, obj, objlink,
depend, all, install) to avoid the race in parallel building. This
change is based on <bsd.subdir.mk>. Meanwhile, add minor comments to
make the hierarchy clearer in <bsd.subdir.mk>.
Add the 'depend' target for the crunchdir's.
Aaron LI [Mon, 2 Jul 2018 01:27:29 +0000 (09:27 +0800)]
mk/crunchgen: Remove the unimplemented ${_+_}
The ${_+_} make variable is introduced by FreeBSD in revision 133369,
but we don't implement it, so remove it.
Aaron LI [Mon, 2 Jul 2018 02:01:19 +0000 (10:01 +0800)]
initrd: Add -lpthread for hammer2
The 'pthread' library was lost from commit
8692d13918892c3f474fc05d37f17fe125bb61bd when rebasing.
François Tigeot [Sun, 1 Jul 2018 20:52:31 +0000 (22:52 +0200)]
install(1): Add a -N option, improving NetBSD and FreeBSD compatibility
* -N is the standard NetBSD and FreeBSD install(1) option to use
alternative user and group databases
* DragonFly previously used -L to do the same thing. Keep this option
but warn to use -N instead.
Aaron LI [Sat, 9 Jun 2018 15:47:31 +0000 (23:47 +0800)]
initrd: Better check the created initrd before installing
Improve mkinitrd.sh to check /sbin/oinit, /bin/sh and /etc/rc on the
created initrd image to avoid installing a broken one.
Update to use "install" to install the created initrd image to ensure
user/group of root/wheel and mode of 444.
(The command to remove the temporary initrd image was committed in a
previous patch due to squashing.)
Aaron LI [Sat, 9 Jun 2018 15:39:49 +0000 (23:39 +0800)]
initrd: Crunch lvm(8) with sbin.libcrypto
Do not build lvm(8) alone since it can be crunched together with
sbin.libcrypto which contains cryptsetup(8). This also saves about
400KB space.
Tidy up the sbin.libcrypto Makefile in the meantime.
Aaron LI [Sat, 9 Jun 2018 15:36:43 +0000 (23:36 +0800)]
lvm(8): Do not build readline support for the rescue version
Make use of the RESCUE make variable to not build the readline support
for its rescue version (to be installed at /rescue).
Clean up the Makefile.
Aaron LI [Sat, 9 Jun 2018 15:35:32 +0000 (23:35 +0800)]
cryptsetup(8): Tidy up Makefile
Aaron LI [Sat, 9 Jun 2018 05:31:22 +0000 (13:31 +0800)]
mk/crunchgen: Remove the unused CRUNCH_BUILDTOOLS support/hack
The CRUNCH_BUILDTOOLS is commented out in initrd/bin/Makefile.
And we already use pregenerated headers for bin/sh in commit
cbb07feb2f78629297b21609f526fcec6e4ad8ee .
Aaron LI [Sat, 9 Jun 2018 12:06:05 +0000 (20:06 +0800)]
initrd: Tell make to use makefiles from the source tree
Otherwise, make uses makefiles from the system installed ones at
/usr/share/mk, therefore, the updated bsd.prog.mk has no effect until
being installed to the system.
Note that the variables assigned by make (i.e., make ... var=value)
will override the shell enviroment variables (e.g., var=value shell
command). So make sure the make variable assignments (e.g., DESTDIR)
are put after the make.
Also fix mkinitrd.sh to remove the used temporary initrd image file.
Aaron LI [Sat, 9 Jun 2018 11:22:14 +0000 (19:22 +0800)]
mk/prog: Support CRUNCH_CFLAGS for crunchgen's buildopts
Taken-from: FreeBSD
Aaron LI [Sat, 9 Jun 2018 05:42:51 +0000 (13:42 +0800)]
mk/crunchgen: Allow to use symlinks for crunched programs
Add support to create symlinks (i.e., soft links) instead of hard links
for the crunched programs.
If the variable CRUNCH_USE_SYMLINKS is set (default: not set), then use
symlinks instead of hard links.
Aaron LI [Sat, 9 Jun 2018 05:39:18 +0000 (13:39 +0800)]
mk/crunchgen: Do not hard code the path to the source directories
Introduce the variable CRUNCH_PATH_${D} to specify the path to the
base source directory ${D}.
Update the description and initrd makefiles accordingly.
Sascha Wildner [Sat, 30 Jun 2018 18:15:41 +0000 (20:15 +0200)]
openpam: Since there is no pam(8) manual page, refer to pam(3).
Sascha Wildner [Sat, 30 Jun 2018 17:54:49 +0000 (19:54 +0200)]
openpam: Revert a useless local comment change for better merging.
Antonio Huete Jimenez [Sat, 30 Jun 2018 19:36:53 +0000 (19:36 +0000)]
vkernel - Do not re-initialize vcons
- Commit
fb3cf125d1 introduced a cninit() call in configure_final()
and vcons should properly handle multiple initialization.
- This fixes the vkernel boot problem in current master.
Sascha Wildner [Sat, 30 Jun 2018 06:43:53 +0000 (08:43 +0200)]
condvar.9: Add MLINKS for recently added functions.
Eitan Adler [Fri, 29 Jun 2018 23:53:21 +0000 (23:53 +0000)]
bsd-family-tree: Add dfly 5.2.2; fbsd 11.2
Tomohiro Kusumi [Sat, 30 Jun 2018 00:19:39 +0000 (17:19 -0700)]
sys/kern: Make condvar(9) support mutex(9)
Sascha Wildner [Fri, 29 Jun 2018 21:23:50 +0000 (23:23 +0200)]
Sync ACPICA with Intel's version
20180629.
* Fix regressions in acpiexec(8) and iasl(8).
* Add a warning to iasl(8) on attempted use of Unload().
* Add some ASL extensions that make various arguments optional.
For detailed list, please see sys/contrib/dev/acpica/changes.txt.
Sascha Wildner [Wed, 27 Jun 2018 12:19:28 +0000 (14:19 +0200)]
Remove old mkinitrd config.