Commit graph

1101 commits

Author SHA1 Message Date
Kees Jongenburger 51a9903002 Add support in devmand for using config dirs.
Add support in devmand for using configuration directories to
allow 3rd party packages to add configuration items.
2012-06-18 09:29:53 +02:00
Kees Jongenburger ade7dc8ded Upgrade libddekit and introduce devmand.
Devmand (Device manager daemon) is the daemon that will
dynamically manage services based on events received from
the system.
2012-06-18 09:23:42 +02:00
Ben Gras 85ff5a947e dumpcore: use ptrace function to trigger a coredump
. dumpcore currently relies on minix segments
	. also ptrace dumpcore fix
2012-06-15 12:13:50 +02:00
Ben Gras 769af57274 further libexec generalization
. new mode for sys_memset: include process so memset can be
	  done in physical or virtual address space.
	. add a mode to mmap() that lets a process allocate uninitialized
	  memory.
	. this allows an exec()er (RS, VFS, etc.) to request uninitialized
	  memory from VM and selectively clear the ranges that don't come
	  from a file, leaving no uninitialized memory left for the process
	  to see.
	. use callbacks for clearing the process, clearing memory in the
	  process, and copying into the process; so that the libexec code
	  can be used from rs, vfs, and in the future, kernel (to load vm)
	  and vm (to load boot-time processes)
2012-06-07 15:15:02 +02:00
Ben Gras ee4016155e vm: add third-party mmap() mode and PROCCTL
these two functions will be used to support all exec() functionality
going into a single library shared by RS and VFS and exec() knowledge
leaving VM.

	. third-party mmap: allow certain processes (VFS, RS) to
	  do mmap() on behalf of another process
	. PROCCTL: used to free and clear a process' address space
2012-06-07 12:43:16 +02:00
Ben Gras c2d5e01042 endianness compile fixes 2012-06-06 13:15:18 +02:00
Ben Gras 8c434cf24f synctree compile fix
. rename CANCEL to ORDER_CANCEL so the CANCEL enum name doesn't
	  clash with a minix header file. also endianness test fix.
2012-05-31 22:42:49 +02:00
Antoine Leca c662389d25 Enable LZMA supprt with tar(1) 2012-04-25 17:52:33 +02:00
Ben Gras 861bb4e571 update_bootcfg: fix: generate absolute paths 2012-04-18 16:30:06 +02:00
Ben Gras b332803b6f release fixes
. make ramdisk buildable without ../etc having pwd.db
	. add cat to release bootstrap cmds
	. support running dynamically linked executables for
	  release bootstrap cmds
	. import netbsd chroot to help
2012-04-17 16:58:58 +02:00
Ben Gras 53f94f8ed4 dynamic executables on ramdisk support
See UPDATING about upgrading clang for dynamic linking.

	. allow executables on ramdisk to be dynamically linked; this means
	  putting a few required shared libraries and ld.elf_so on the ramdisk.
	. this makes the ramdisk (usage) smaller when they are dynamic, but
	  bigger when they're not.
	. also we can safely ditch newroot and call mount directly as that is
	  all newroot does.
	. create proto.common to share a bunch of entries between
	  small/nonsmall cases
2012-04-16 14:06:09 +02:00
Thomas Veerman d729ecb11b service: make clear who is printing the error 2012-04-13 13:51:56 +00:00
Thomas Veerman 8dd0880985 Add a simple utility to send control messages
The svrctl utility allows you to send control messages to VFS or PM.
This way you can retrieve runtime information or alter behavior.
2012-04-13 12:58:41 +00:00
Ben Gras 511c977f93 retire bios_wini 2012-04-12 03:02:21 +02:00
Ben Gras a2d1372680 Import NetBSD usr.bin/login 2012-04-11 20:02:15 +02:00
David van Moolenbroek 928d76dbe8 Add VBFS: VirtualBox Shared Folder File System
Refer to "man vbfs" on how to mount it.
2012-04-11 00:27:48 +02:00
Ben Gras ef01931f76 Import NetBSD file(1) 2012-04-03 01:15:36 +02:00
Antoine Leca d0b2856430 Drop obsolete sdump
The code cannot be compiled, and is not included for over a year.
And it creates a corefile which is obsolete.
2012-03-29 14:15:42 +02:00
Ben Gras 36db008cb5 adjust netconf for new su behaviour
reported and debugged by Ryan Lie, tracker item 594.
2012-03-28 17:30:56 +02:00
Ben Gras 4de51eedad import NetBSD su 2012-03-27 02:19:46 +02:00
Ben Gras 204ae72525 retire _ANSI and <minix/ansi.h> 2012-03-25 21:58:27 +02:00
Ben Gras f22864c24e get rid of __LONG_LONG_SUPPORTED
. also drop minix-specific code in libarchive
	  that was needed for not supporting 64 bit ints
2012-03-25 21:58:26 +02:00
Ben Gras db242ed39d retire _CONST, _VOLATILE, _SIZET, _ARGS, _VOID 2012-03-25 21:58:20 +02:00
Ben Gras 7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
Ben Gras 6a73e85ad1 retire _PROTOTYPE
. only good for obsolete K&R support
	. also remove a stray ansi.h and the proto cmd
2012-03-25 16:17:10 +02:00
David van Moolenbroek 70abb127cc Add sys_vumap() kernel call
This new call is a vectored version of sys_umap(). It supports batch
lookups, non-contiguous memory, faulting in memory, and basic access
checks.
2012-03-24 19:51:13 +01:00
David van Moolenbroek 91a1d11c11 Remove unsupported legacy TIOC[GS]ET[PC] ioctls 2012-03-19 00:09:29 +01:00
Ben Gras 6af9856d4a libcompat_minix-centric cleanup
remove some old minix-userland-specific stuff

	. /etc/ttytab as a file, and minix-compat function (fftyslot()),
	  replaced by /etc/ttys and new libc functions
	. also remove minix-specific nlist(), cuserid(), fttyslot(), v8 regex
	  functions and <compat/regex.h>
	. and remaining minix-only utilities that use them
	. also unused <compat/pwd.h> and <compat/syslog.h> and
	  redundant <sys/sigcontext.h>
2012-03-16 17:06:24 +01:00
Evgeniy Ivanov 9290237811 Bootloader reinstall mode for setup. 2012-03-15 19:06:23 +01:00
Evgeniy Ivanov 72eca0eb1e update_bootcfg improvements.
- Fix a glitch (don't glob '*' in for).
- update_bootcfg should be a /bin command.
- update_bootcfg should not add menu entries for missing kernels.
2012-03-14 18:19:28 +01:00
Andy Kosela 24f1e18846 Import NetBSD cat(1) 2012-03-14 16:54:30 +01:00
Andy Kosela 7e81b07cc5 Import NetBSD ed(1) 2012-03-14 16:52:31 +01:00
Erik van der Kouwe 9e56468d6c sprofalyze forgets a.out and learns that ELF binaries have larger addresses 2012-03-13 11:23:35 +01:00
David van Moolenbroek c8b892d835 swifi: modernize a bit
- ELF support
- update of one example script
- warning fixes
2012-03-05 22:41:49 +01:00
David van Moolenbroek 4aaa5377b3 Import NetBSD du(1) 2012-03-05 22:32:33 +01:00
Ben Gras 04eb5d326a allow elvis to be invoked as ex 2012-02-22 01:51:19 +01:00
Ben Gras 8ef86ffe84 better cpp 2012-02-17 23:53:44 +01:00
Ben Gras 957f4181c0 /usr/lib/cpp script to invoke clang -E
. mainly to keep X working
2012-02-17 15:15:31 +00:00
Antoine Leca 3fb8cb760c More cleaning up 2012-02-15 19:04:58 +00:00
Evgeniy Ivanov 9ab3cf37ce updateboot script for netbsd bootloader 2012-02-15 03:51:27 +01:00
David van Moolenbroek 342171fa9e Remove elle(1) editor, due to an incompatible license 2012-02-14 19:13:17 +01:00
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00
Ben Gras a73c217bf6 clang compile fixes 2012-02-14 14:05:52 +01:00
Evgeniy Ivanov 3ab668c366 Fix shutdown message in setup.sh 2012-02-09 18:54:54 +01:00
Evgeniy Ivanov 61a29c4291 Warn users about non NetBSD mbr.
New boot doesn't work with old mbr, when there are multiple MINIX
partitions. Warn user about it and suggest to install new mbr.
2012-02-09 18:54:53 +01:00
Evgeniy Ivanov 6f88dc8713 Support reinstall and new boot. 2012-02-09 18:54:52 +01:00
Antoine Leca 3f2ab5b34b writeisofs: also boots plain binaries with -B
With -n -b file, a.out boot images can be used for CD booting;
with the new -n -B file option, plain binary (like bootxx_cd9660)
can be used instead.
Restore working the -h and -f options while there.
And add a new -F option for 2.8MB floppy image.
2012-02-09 18:54:49 +01:00
Antoine Leca 2ae897db7b writeisofs: improve compatibility
Register file timestamps
Remember the path tables in the primary descriptor
Put the size of the parent directory in the \1 entry, not own size
Allow the use of -b option without -a

Notes:
* Still missing the man page
* Filenames are still trimmed to 12 characters, because of
  8.3 MS-DOS inherited compatibility (ISO9660 level 1);
  also note that 7.4 or 9.2 filenames are accepted though
* Final . at end of filenames without extension is still missing
* VMS-compatible ;1 version suffix is still omitted
* Limit of 65,535 directories in path tables is not checked
2012-02-09 18:54:49 +01:00
Evgeniy Ivanov 13d8a6969a Add new boot to the setup. 2012-02-09 18:54:48 +01:00
Antoine Leca 7a60d6d33f Switch part/autopart to new mbr bootblock 2012-02-09 18:54:46 +01:00
Thomas Veerman d4cdd59eaa service: allow starting service with user's realuid 2012-02-01 13:21:56 +00:00
Thomas Veerman becf700bc2 APFS: drop privileges upon startup
Move SERVICE_LOGIN to rs.h global header so it's accessible for all.
2012-01-30 15:16:20 +00:00
Thomas Veerman e35528ae79 New zoneinfo port from NetBSD 2012-01-16 11:03:25 +00:00
Thomas Veerman e257c999b8 Replace rm and rmdir with NetBSD version 2012-01-16 10:46:14 +00:00
Ben Gras 4668b84158 vm_remap_ro
- allows shared memory to be mapped in readonly

- ben@minix3.org & tom@minix3.org
2012-01-13 11:30:01 +00:00
Ben Gras 0bb4bb9d51 move pax and chmod for useradd 2012-01-11 00:26:09 +01:00
Ben Gras 94715d8e54 import netbsd ext2fs fsck and newfs 2011-12-22 23:07:23 +01:00
Ben Gras 4d4057d8a2 netbsd fsck driver import
. fsck driver parses /etc/fstab and invokes sub-fscks
	. further simplifies fs handling in rc
2011-12-22 23:07:15 +01:00
Ben Gras 59ff5cbd87 mfs: clean flag
. also implement now-possible fsck -p option
    	. allows unconditional fsck -p invocation at startup,
    	  only checking each filesystem if not marked clean
    	. mounting unclean is allowed but is forced readonly
    	. updating the superblock while mounted is now not
    	  allowed by mfs - must be done (e.g. by fsck.mfs)
    	  on an unmounted fs
	. clean flag is unset by mfs on mounting, and set by
	  mfs on clean unmounting (if clean flag was set at
	  mount time)

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 16:53:32 +01:00
David van Moolenbroek e7db2d3588 Add fbd -- Faulty Block Device driver
This driver can be loaded as an overlay on top of a real block
device, and can then be used to generate block-level failures for
certain transfer requests. Specifically, a rule-based system allows
the user to introduce (overt and silent) data corruption and errors.

It exposes itself through /dev/fbd, and a file system can be mounted
on top of it. The new fbdctl(8) tool can be used to control the
driver; see ``man fbdctl'' for details. It also comes with a test
set, located in test/fbdtest.
2011-12-11 22:45:46 +01:00
Thomas Veerman 5acd97c7e0 Enable GCOV always 2011-12-07 15:20:26 +00:00
David van Moolenbroek cb98b586fd btrace: gcc fix 2011-12-07 11:52:40 +01:00
Joseph Koshy 39b1aee2e1 fix rm -f
"/bin/rm" should not issue a usage message if the "-f" option was
    specified.
2011-11-25 17:49:09 +01:00
David van Moolenbroek fd4c2b74f3 Add block device tracing facility
The implementation is in libblockdriver, and works transparently for
all block drivers. The new btrace(8) tool can be used to control block
tracing; see ``man btrace'' for details.
2011-11-25 13:47:21 +01:00
David van Moolenbroek 0aa01a2dce Add vbox -- VirtualBox time sync driver
Sets time forward to match the host time.

Started automatically if the corresponding device is present.
2011-11-23 18:15:43 +01:00
Ben Gras 79853dc9bc netconf: run lspci earlier for netconf -c
. Reported by Tenkawa
2011-11-23 15:24:42 +00:00
David van Moolenbroek 5a70f42ab6 gcore: uninitialized variable fix and cleanup 2011-11-23 15:56:13 +01:00
Adriana Szekeres c30f014a89 gcore command to coredump a process 2011-11-22 22:07:41 +01:00
Arun Thomas 3f9ef4ac46 make: set MACHINE_ARCH variable
Also, modify sys.mk so we continue to build with -O
2011-11-18 16:22:25 +01:00
Ben Gras f379b3eecb remove ftpd200 2011-11-18 12:19:50 +01:00
Vivek Prakash 79bfef9aab import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
Ben Gras 349a158056 base system hooks for pkgsrc drivers
. rc script and service know to look in /usr/pkg/.. for
	  extra binaries and conf files
	. service split into parsing config and doing RS request
	  so that a new utility (printconfig) can just print the
	  config in machine-parseable format for netconf integration
	. converted all base system eth drivers/netconf
2011-11-16 16:18:21 +01:00
Ben Gras 0811b47a71 df: add case for MFSv3
. fix for FSes mounted with '-t mfs' syntax
2011-11-14 22:18:31 +00:00
Ben Gras 5c00743626 Switch to NetBSD passwd format
Based on work by Vivek Prakash and Gianluca Guida.

See UPDATING about caveats on currently existing accounts.

	. restores netbsd libc pwcache functions
2011-11-14 14:47:42 +00:00
Ben Gras cedeabb357 mainstream-format fstab format
. detect both formats in /etc/rc
	. generate new format in setup
	. obsoletes /etc/fstab.local: everything can go in /etc/fstab
	. put shutdown/reboot/halt and a copy of /usr/adm/wtmp
	  (/etc/wtmp) on root FS so that we can do shutdown checks before
	  mounting /usr
	. new fstab format makes getfsent() and friends work
2011-11-14 14:47:28 +00:00
Thomas Veerman 490e0de548 Import librefuse and libpuffs
Import libpuffs and our port of libpuffs. The port was done as part of
GSoC 2011 FUSE project, done by Evgeniy Ivanov. The librefuse import
did not require any porting efforts. Libpuffs has been modified to
understand our VFS-FS protocol and translate between that and PUFFS. As
an example that it works, fuse-ntfs-3g from pkgsrc can be compiled and
used to mount ntfs partitions:
mount -t ntfs-3g <device> <mountpoint>

FUSE only works with the asynchronous version of VFS. See <docs/UPDATING> on
how to run AVFS.

This patch further includes some changes to mount(1) and mount(2) so it's
possible to use file systems provided by pkgsrc (note: manual modifications
to /etc/system.conf are still needed. There has been made an exception for
fuse-ntfs-3g, so it already as an entry).
2011-11-14 11:53:05 +00:00
David van Moolenbroek b477504754 ps(1): remove outdated comment 2011-11-11 11:37:44 +01:00
Ben Gras 3fbb50397c stopgap local fstab
. /etc/fstab.local to list user-defined filesystems
	. /usr/etc/rc reads it and runs type-specific fsck if necessary
	. also type-specific mount
2011-11-07 20:37:12 +01:00
Ben Gras 0c3983b25a update/fix manpage support
. add bsd-style MLINKS to minix man set, restoring aliases
	  (e.g. man add64 -> int64)
	. update daily cron script to run makewhatis and restore makewhatis
	  in man Makefile (makedb), restores functionality of man -k
	. netbsd imports of man, mdocml, makewhatis, libutil, apropos
	. update man.conf with manpage locations, restoring man [-s] <section>
	. throws out some obsolete manpages
2011-09-28 15:24:15 +00:00
Ben Gras bc0a39238e worldstone benchmark script
. also imports seq(1) to help it
	. add -C option to time(1) to print tsc difference
	. increase col width for ministat for tsc numbers
2011-09-24 14:49:55 +00:00
Ben Gras 86b5fa5102 get rid of leftover _DIRENT_NAME_LEN=61 2011-09-01 16:27:28 +00:00
Vivek Prakash 12d9a08f0d import NetBSD mkdir
. add symlink from old location /usr/bin/mkdir for
	  for compatability
2011-08-25 14:35:12 +00:00
Ben Gras f984dbba70 increase system-wide filename limit to 255
. move mfs-specific struct, constants to mfs/, so
	  mfs-specific, on-disk format structs and consts are
	  fully isolated from generic structs and functions
	. removes de and readfs utils
2011-08-17 16:00:01 +00:00
Ben Gras 164789226c install: correct error message 2011-08-16 20:40:52 +00:00
Thomas Cort 940bbe18b6 mkdir: allow 'mkdir -p' with trailing '/'
Let's suppose that /usr/tmp exists and one wants /usr/tmp/a/b
If one runs "mkdir -p /usr/tmp/a/b/" (the '/' at the end is
important), then a "File exists" error comes up. Example:

$ rm -rf /usr/tmp/a
$ mkdir -p /usr/tmp/a/b/
/usr/tmp/a/b/: File exists

This breaks gcc47 installation when C++ is enabled, and this
isn't the behaviour of mkdir on NetBSD nor Linix.

This patch fixes the above issue by dropping the trailing '/'.
2011-08-15 09:14:36 +00:00
Ben Gras d477a9ed82 vm/ipc: only report signals when it matters to ipc
. ipc wants to know about processes that get
	  signals, so that it can break blocking ipc operations
	. doing it for every single signal is wasteful
	  and causes the annoying 'no slot for signals' message
	. this fix tells vm on a per-process basis it (ipc)
	  wants to be notified, i.e. only when it does any ipc calls
	. move ipc config to separate config file while we're at it
2011-08-05 20:52:32 +00:00
Ben Gras 3977443581 terminfo fixes
. add TERM=minix to builtin terms
	. regenerate compiled-in compile_terms.c
	. fix terminfo db path
	. update termcap command
	. By Antoine Leca
2011-08-04 16:50:57 +00:00
Ben Gras 989934b37c rename -lutil to -lminixutil
. in preparation for netbsd -lutil
2011-08-01 14:32:14 +02:00
Ben Gras f614d0015a mk: single mk fragment for new libc
. allow commands to use it by setting NEED_NBSDLIBC
	. also add mkfiles to clean and cleandepend so they
	  don't break on missing new mkfiles
2011-07-27 18:23:36 +02:00
Arun Thomas 3ca141ab81 Remove legacy swapfs utility 2011-07-27 17:16:17 +02:00
Thomas Veerman ece4c9d565 Add DEV_CLONE_A dev type 2011-07-27 12:23:03 +00:00
Antoine Leca b67a7fca8c ash: don't rely on libc signal names
The bsd signal names are out-of-order compared to the minix ones.

I found out (the hard way) that the (MINIX-descending) ordered list of
signals in <sys/signal.h> does not match the (BSD-descending) ordered
list of signals in usr/src/lib/libc/nbsd_libc/gen/sig{name,list}.c

Beyond being unfortunate, it prevents the trap command of ash to handle
correctly a named signal; a funny test case is
        #!/bin/sh
        trap 'echo trapping signal BUS' BUS
        trap 'echo trapping signal 10 (USR1)' 10
        trap # show me what is currently trapped

As a quick workaround, I disabled the use of the libc-provided
sys_sig{name,list} arrays for ash, and reverted to the hand-made array
which is used by the less capable MINIX libc. It allowed me to use
pkgsrc.
2011-07-26 18:59:52 +02:00
Arun Thomas 93bb4036ce Remove bigmake, binsizes, packman 2011-07-26 13:38:27 +02:00
Arun Thomas 2a9322a117 Remove advent and ttt 2011-07-26 11:37:18 +02:00
Ben Gras 51ffecc181 import elf-only -lcurses
. abandons mixer, gomoku, talk, talkd, top from base system
	. compile top with clang so no ack-compiled program
	  needs -lcurses any more
2011-07-25 11:08:17 +02:00
Vivek Prakash 1ea07af9da Replace uniq with NetBSD version 2011-07-24 21:40:02 +02:00
Arun Thomas 06617e7fdf Import NetBSD mkdep 2011-07-22 17:28:27 +02:00
Arun Thomas db5c83c918 Remove strings(1) 2011-07-21 19:06:06 +02:00
Ben Gras 1341e4aa02 rename size to acksize
.  in keeping with the pattern: elf/binutils tools have
	   regular names, ack tools have 'exceptional' names
2011-07-21 14:31:17 +02:00
Ben Gras 000a9d36be cleanup of libterminfo introduction
. don't install minix <termcap.h> as libterminfo
	  has its own (but still install it in /usr/include.ack)
	. forget minix termcap functions in -lcompat_minix
	. make commands use -lterminfo in netbsd libc compile mode
2011-07-20 18:39:02 +02:00