7018 Commits

Author SHA1 Message Date
David van Moolenbroek
e4449940d2 No longer auto-start pkgsrc packages
In order to comply with the pkgsrc standards, pkgsrc packages are no
longer auto-started.  Instead, we require that users follow the common
pkgsrc procedure: to start a pkgsrc package as part of system startup,
copy its startup script from /usr/pkg/etc/rc.d to /etc/rc.d, and make
the appropriate changes to /etc/rc.conf.

This change affects in particular the openssh package, of which its
ssh daemon is no longer auto-started.  However, installing this
package also no longer causes all kinds of Kerberos-related warnings
to be reported at boot time now.

Also remove a leftover reference to the defunct ddekit usb package.

Change-Id: I4d42f6ca1ab5e3bc2ec296bc7c0e3056964ae451
2017-02-23 14:08:50 +00:00
David van Moolenbroek
325ce30bcc Initial import of NetBSD rc system
IMPORTANT: this change has a docs/UPDATING entry!

This patch performs an initial import of the infrastructure and a
subset of the NetBSD set of rc startup and shutdown scripts.  The
"initial" refers to the fact that this is not yet a full switch to the
NetBSD rc system: the MINIX ramdisk rc script, which (typically) runs
as the first thing, is kept as is.  After mounting the root file
system, the ramdisk rc script will start the NetBSD rc infrastructure
by invoking /etc/rc, however.  The regular MINIX startup-and-shutdown
script has been moved from /etc/rc to /etc/rc.minix, and is now
invoked as part of the NetBSD rc infrastructure through a bridge rc
script /etc/rc.d/minixrc.  /etc/rc.minix invokes /usr/etc/rc as before.

Switching over the ramdisk to the NetBSD system and decomposing the
MINIX rc.minix script into smaller components are left to future work.
Also, the current pkgsrc etc/rc.d auto-start functionality is left as
is, even though it should be removed (see the etc/usr/rc comment).

Change-Id: Ia96cae7c426e94b85c67978dc1307dacc4b09fc5
2017-02-23 14:08:39 +00:00
David van Moolenbroek
2109df2759 VM: fix race condition communicating with VM
After processing certain asynchronous requests from VFS, VM would send
an asynchronous reply without supplying the AMF_NOREPLY flag.  As a
result, this asynchronous reply could be taken as the result of an
ipc_sendrec() call, causing the entire VM/VFS communication to become
desynchronized.  The end result was a deadlock-induced panic during a
later request.

This bug was exposed because of the higher-than-usual concurrency
level in the NetBSD rc scripts.  The fix consists of properly setting
the AMF_NOREPLY flag for asynchronous replies.

Change-Id: Iafafe2fdd67f212ecbf27a53862cefba2e4cf7e8
2017-02-23 11:27:42 +00:00
David van Moolenbroek
3e1f70db42 VBOX: update current time immediately at startup
Performing the update at any later time may cause rc scripts to work
with a wrong date, which may have side effects, such as databse files
getting regenerated on every boot.

Change-Id: Idfdbf67ad285300c982d95769007dc88c522b908
2017-02-22 17:18:12 +00:00
David van Moolenbroek
81fc6023c2 Import NetBSD services_mkdb(8)
Change-Id: Ia3fc2479d2abb2dbe9afd1b60e0ffbaf377bcf5a
2017-02-22 17:18:06 +00:00
David van Moolenbroek
5ae330e220 Import NetBSD fmt(1)
This requires importing a few files from mail(1) already.  Importing
the rest of mail(1) is left to future work.

Change-Id: If96513a306245cd7fb64660758d0dbd29a36e87c
2017-02-22 17:18:00 +00:00
David van Moolenbroek
045e0ed35c Import NetBSD rcorder(8)
Change-Id: Id2ed4959f8089189929fc56401d1c70add5ad323
2017-02-22 17:17:28 +00:00
David van Moolenbroek
c58da9fbc3 Rename MINIX service(8) to minix-service(8)
IMPORTANT: this change has a docs/UPDATING entry!

This rename is unfortunately necessary because NetBSD has decided to
create its own service(8) utility, and we will want to import theirs
as well.  The two can obviously not coexist.

Also move ours from /bin to /sbin, as it is a superuser-only utility.

Change-Id: Ic6e46ffb3a84b4747d2fdcb0d74e62dbea065039
2017-02-22 17:16:21 +00:00
David van Moolenbroek
bf5536d653 distrib: more minor fixes
- unbreak MKDEBUGLIB=yes builds
- please do not delete my .exrc file :(

Change-Id: Ib1d40e6894062bd881e50c712da88e7a604f2ad7
2017-02-22 13:57:54 +00:00
David van Moolenbroek
77e79d3374 etc: synchronize master.password, group to NetBSD
IMPORTANT: this change has a docs/UPDATING entry!

This change is a long overdue switch-over from the old MINIX set of
user and group accounts to the NetBSD set.  This switch-over is
increasingly important now that we are importing more and more
utilities from NetBSD, several of which expect various user accounts
to exist.  By switching over in one go, we save ourselves various
headaches in the long run, even if the switch-over itself is a bit
painful for existing MINIX users.

The newly imported master.passwd and group files have three exceptions
compared to their NetBSD originals:

1. There is a custom "service" account for MINIX 3 services.  This
   account is used to limit run-time privileges of various system
   services, and is not used for any files on disk.  Its user ID may
   be changed later, but should always correspond to whatever the
   SERVICE_UID definition is set to.
2. The user "bin" has its shell set to /bin/sh, instead of NetBSD's
   /sbin/nologin.  The reason for this is that the test set in
   /usr/tests/minix-posix will not be able to run otherwise.
3. The group "operator" has been set to group ID 0, to match its old
   value.  This tweak is purely for transitioning purposes: as of
   writing, pkgsrc packages are still using root:operator as owner and
   group for most installed files.  Sometime later, we can change back
   "operator" to group ID 5 without breaking anything, because it does
   not appear that this group name is used for anything important.

Change-Id: I689bcfff4cf7ba85c27d1ae579057fa3f8019c68
2017-02-18 21:37:24 +00:00
David van Moolenbroek
e436e99481 distrib: fix entries that are off
This small change makes it easier to do sorts without having to deal
with these entries over and over again.

Change-Id: Id5077a17733fa4b535cdc9881109286335d3cb17
2017-02-18 12:37:22 +00:00
David van Moolenbroek
0c6b4c6127 printconfig(8): print PCI sub-VID/DID when set
In order to allow for proper matching of available drivers to system
hardware, the output of this utility should reflect the full details
of the input from configuration files.  In particular, that includes
sub-IDs of PCI devices when those have been specified.

Change-Id: Iea24d72795cd714268dbdb95df998eb74de8f2bd
2017-02-16 10:22:28 +00:00
David van Moolenbroek
5f6c420586 Retire env.h
This was a MINIX3-specific header file placed outside of the minix/
header subdirectory, with its definitions duplicated in the more
standard minix/sysutil.h header.

Also make env_prefix(3) take constant pointers.

Change-Id: I243c38eb38e24eb98f0c0dddf7f340e7fec255f4
2017-02-16 10:22:27 +00:00
David van Moolenbroek
40dec70c39 trace(1): print sin6_scope_id when relevant
Site-local addresses are out, as they are RFC-deprecated and not
supported on MINIX 3 at all.  Interface-local and link-local multicast
addresses are in, because they are relevant in the context of a
particular zone ID only.

Change-Id: I64a9ecb472946f717f27a72c4073d78aa1120508
2017-02-16 10:21:56 +00:00
David van Moolenbroek
44fdeb7a62 libc: more poll(3) wrapper fixes
- POLLRDBAND is reported by select(2) as errorfd, not readfd;
- POLLERR is not the same as errorfd of select(2);
- flags that are not requested should not be returned.

Change-Id: I9cb3c2c260ead5a2852a2fbbc10280c2b5b0dff9
2017-02-16 10:18:26 +00:00
FeZoli
68804c208e Added Hungarian keyboard layout
Change-Id: Ib52ad3723ba6679506128813be962fd68f8998c5
2017-02-08 22:51:26 +01:00
Jia-Ju Bai
c28d8fefcf VT6105: Restructure the code and correct function order in initialization
Change-Id: Ibbc8f835174349501e74dde7163c234effb34bc8
2017-01-26 12:50:48 +01:00
Jia-Ju Bai
3afdc1200b IP1000: Restructure the code and correct function order in initialization
Change-Id: I7c887a777205ea0ae38b4ef1830535d035c5a976
2017-01-26 12:47:45 +01:00
Jean-Baptiste Boric
72e11e2789 Import NetBSD's passwd.conf
Without this file, the NetBSD userland will fall back by default to the
old, insecure classic UNIX password hashing algorithm.

This is a big security issue. Please check docs/UPDATING for details.

Change-Id: Ib85646ee4678f91384bab238426ee55ff26da011
2017-01-22 20:43:54 +01:00
Jia-Ju Bai
eecf6d233d Add the driver for Trident 4DWAVE-DX sound card
Change-Id: I6a4f5427915032a6a4c0246fed35c10397df3e07
2017-01-08 19:01:58 +01:00
Jia-Ju Bai
8acfcfc39e Add the driver for CS4281 sound card
Change-Id: Ifc1b7c129578c5efa5e328664d10d07ee5df786b
2017-01-08 19:01:20 +01:00
Jia-Ju Bai
86fd71a2c9 Add the driver for ALS4000 sound card
Change-Id: I2ad08e8479b743ec235d1c9e541faa2fa6a29fcc
2017-01-08 19:00:40 +01:00
Jia-Ju Bai
37e23b1cc7 Add the driver for CMI8738 sound card
Change-Id: I5a53e3b8652a014e105ca7c77c42a730f6824307
2017-01-08 18:59:39 +01:00
David van Moolenbroek
6dd801ffb8 libaudiodriver: buffer accounting bugfix
This fixes #191.

Change-Id: I93752161e466b2d03bbcb0838705aab9619c05c8
2016-12-28 13:12:58 +00:00
David van Moolenbroek
192c3a97f6 libaudiodriver: readd callback to drv_int_sum()
The callback, which was dropped in commit git-842c4ed, allows drivers
to fetch the interrupt status once and save it locally for subsequent
calls to drv_int().

This fixes #190 .

Change-Id: I83918656f637e716f60e9f4c19f1498f761d3b52
2016-12-28 13:08:23 +00:00
David van Moolenbroek
10a44c0ee2 trace(1): add basic support for timestamps
This patch adds strace-like support for a -t command line option,
which causes a timestamp to be printed at the beginning of each line.
If the option is given more than once, the output will also include
microseconds.

Change-Id: I8cda581651859448c154b01815cc49d915b7b354
2016-12-28 13:06:04 +00:00
David van Moolenbroek
1bb466dd36 libc: make posix_spawn(3) clean up child on failure
Change-Id: I39a321f23326485fca789e5792a57532d1036716
2016-12-28 13:05:55 +00:00
David van Moolenbroek
b52b83f927 test74: allow to be run from source directory
A small fix to allow this test to be run from its original source
directory location, in addition to its installed location.

Change-Id: I4b7afed14ba02b1bea8d9c5f65bc96698a279188
2016-12-28 13:05:44 +00:00
Antoine Leca
3f862305f8 Fix the process for GNU tools on MINIX
This is a fix over commit a150b26ee803b20080
On a MINIX station, the tools are not usually built and
on a first-time building of the tree, the fetching script
of texinfo was not triggered in some cases. Let force it.
Reported on minix3 googlegroup by Chris Card.

Change-Id: I8beafdeaec66bb1f1f3250bd64c1e14c0023e9d0
2016-11-30 08:42:36 +01:00
Lionel Sambuc
117b6ea003 Fix OPSYS constant in pkg_install tools
Change-Id: I84c1596e4ca9b5a016b628deb75c8133d51a6a75
2016-11-30 08:35:38 +01:00
Jia-Ju Bai
8d98f2e579 Add the driver for IC Plus 1000A Ethernet card
Change-Id: I9ac119c6285bc63a8b795b44d9ab7d245d9a8832
2016-11-24 17:22:28 +01:00
Jia-Ju Bai
8dc24c0650 Update vt6105
Change-Id: I8136a17eb47f626141bb20b9d6a30f82117425b7
2016-11-24 17:22:15 +01:00
rlfnb
fee60e45e6 introducing libacpi
Change-Id: I0808545fefaefc9a8fc8d1101bd85b676467fea0
2016-10-29 17:08:10 +02:00
rlfnb
e154914956 Added vendor- and device id for Via Rhine III
The device id added is used by ALIX boards.

Change-Id: I78d1ce9f2fa0ee121e68d2c84818f669eeab3092
2016-10-24 14:20:37 +02:00
Jia-Ju Bai
9784113fda vt6105: add a README file
Change-Id: I8dbb122afc130f2f2504743fa4fcbada5c97dff5
2016-10-24 14:18:54 +02:00
David van Moolenbroek
286d266fd0 PM: fix alarm signal delivery
As of change git-87c599d, when processing CLOCK notifications, PM no
longer set the current process pointer 'mp'.  That pointer is however
used when delivering signals through check_sig(), to see whether the
current process may deliver a signal to the target process.  As a
result, delivering SIGALARM signals used a previous pointer in these
checks, causing alarm signals not to be delivered in some cases.
This patch ensures that alarm signals are again delivered with PM as
current process.

Change-Id: I94ccbe8b71289df0e1d6d67928e55297bbc28360
2016-10-24 12:11:52 +00:00
David van Moolenbroek
dd41186aac libc: remove MINIX3 restrictions from getnameinfo(3)
Change-Id: I4679f6804f229520d6399a06a5da0655f2bfd899
2016-10-24 12:11:07 +00:00
David van Moolenbroek
f221d2ce48 RMIB: add support for vector copy-out
Change-Id: I9e9b4b8d6eed39fdb511c6bd2a375ddf898064a5
2016-10-24 12:10:34 +00:00
io12
9f11521a37 Fix grammar errors in a comment
Change-Id: I0ad2b6a28afb44e42d1830f1b0944579dc032261
2016-10-19 23:51:07 +02:00
Jia-Ju Bai
022136b354 Add the driver for VIA Technology 6105/6106S Ethernet card
Change-Id: I690c34f0a37bcbb20a5b7748e3dd315707460caf
2016-10-19 21:54:58 +02:00
rlfnb
702ec7400f fixed git checkout and updated latest known changeset working for grub
Change-Id: If4a1e8bfb42a20cf50d847105cc8f96c3cf1cd00
2016-10-18 14:22:28 +02:00
Richard Sailer
a0814afb2e VFS: Convert K&R C -> ANSI C
Aditionally this removes all trailing whitespaces
using: sed -i 's/[[:space:]]*$//' *.c

Change-Id: I88451fdb6f6e79e61f8aae5bd5a7f2e3538f9944
2016-10-18 14:20:21 +02:00
Richard Sailer
4aa48abab9 is: Convert K&R C -> ANSI C
Aditionally this removes all trailing whitespaces
using: sed -i 's/[[:space:]]*$//' *.c

Change-Id: I274fccee9ec320e474ac26fbe19f3bd50bec271a
2016-10-18 14:19:48 +02:00
David van Moolenbroek
6956dd2b51 libc: bugfixes for minix's poll(3) wrapper
- clear "revents" fields even when the call times out;
- do not call FD_ISSET with a negative file descriptor number.

Change-Id: I7aeaae79e73e39aed127a75495ea08256b18c182
2016-10-18 14:18:41 +02:00
David van Moolenbroek
3ac58492b3 Add LLVM GCOV coverage support
With this patch, it is now possible to generate coverage information
for MINIX3 system services with LLVM.  In particular, the system can
be built with MKCOVERAGE=yes, either with a native "make build" or
with crosscompilation.  Either way, MKCOVERAGE=yes will build the
MINIX3 system services with coverage profiling support, generating a
.gcno file for each source module.  After a reboot it is possible to
obtain runtime coverage data (.gcda files) for individual system
services using gcov-pull(8).  The combination of the .gcno and .gcda
files can then be inspected with llvm-cov(1).

For reasons documented in minix.gcov.mk, only system service program
modules are supported for now; system service libraries (libsys etc.)
are not included.  Userland programs are not affected by MKCOVERAGE.

The heart of this patch is the libsys code that writes data generated
by the LLVM coverage hooks into a serialized format using the routines
we already had for GCC GCOV.  Unfortunately, the new llvm_gcov.c code
is LLVM ABI dependent, and may therefore have to be updated later when
we upgrade LLVM.  The current implementation should support all LLVM
versions 3.x with x >= 4.

The rest of this patch is mostly a light cleanup of our existing GCOV
infrastructure, with as most visible change that gcov-pull(8) now
takes a service label string rather than a PID number.

Change-Id: I6de055359d3d2b3f53e426f3fffb17af7877261f
2016-09-24 22:18:31 +00:00
rlfnb
92dfb2dc8e Removed redundant ifdef
Change-Id: Ifb7df30591d658700d6293632f5f944c32376fdf
2016-09-10 13:44:04 +02:00
Antoine Leca
2aa07764b8 [boot-i386] Reduce differences with NetBSD
Change-Id: I50c183d283858a098f0766cf3053fa6e78ce06ad
2016-09-10 12:47:42 +02:00
Antoine Leca
7a3aae8b5b Adjust .gitignore for MINIX file system
Some files in LLVM have more than Minix-maximum of 60 characters.
Also drop some obsolete stuff, and add obj which are symlinks added
to every directory when using /usr/obj as OBJDIR (hinted in wiki.)

Change-Id: Iac82bb064f68689f247a2ee1b1d2f365344ab793
2016-09-10 12:47:03 +02:00
Jean-Baptiste Boric
6afe26749a Enable building with MKDEBUG and MKDEBUGLIB
The way these options work is by creating files that contain debugging
symbols and stashing them in a dedicated set. The minix-debug set has
been created for this purpose, but it will probably have to be refined
since it has been tested only with the default options with an i386
cross-build.

LSC: Amended to support many combination of MKDEBUG, MKDEBUGLIB, with
     and without X11, for both intel and arm.

Change-Id: I2901952e8229938f9ac79c8656484acf704ccd9b
2016-09-10 12:42:45 +02:00
Antoine Leca
a150b26ee8 Improve the process for GNU tools
Split the process to fetch GNU tools (until now embedded
within tools/Makefile.gnuhost) into a new Makefile.fetchgnu,
MINIX-specific hence relocated, which is to be also used
to fetch sources even when not building the tools.
Use it for binutils too.
Improve documentation.

Also do not run configure on each run when MKUPDATE=yes
The .WAIT serialization instruction between fetching and other
configure sources was raising a new run of configure at each
compilation. Avoid it by using two rules.

Change-Id: Ie24950ccbb5c5067f3c1ea57b7bd8294e4c9445e
2016-09-01 21:16:13 +02:00