Commit Graph

299178 Commits

Author SHA1 Message Date
christos da8bb7f219 Remove the importdate hack to make things more similar with the upstream
script.
2022-12-13 18:36:41 +00:00
christos 1790571ce3 preserve the original logic if we don't have MKREPRO_TIMESTAMP, use consistent
version string with other builds.
2022-12-13 18:27:45 +00:00
martin 47ace57a28 When doing reproducible builds, don't import a "run" number in the
ntp tools config version files.
2022-12-13 18:15:29 +00:00
kre f2d4de93b1 POSIX is addint this utility in Issue 8 (whenever it appears). However
they do not specify "long" options (ever).  The --preserve and --foreground
options in this utility had no short form, so they "invented" -p and -f
so only standard form one char options needed to be specified.

Change the opt processing here so -p == --preserve and -f == --foreground
so we support the options POSIX will specify.

No other changes here, just adding those alternates for the options.
2022-12-13 13:25:36 +00:00
skrll e311a492a7 Trailing whitespace 2022-12-13 12:43:32 +00:00
blymn 7c304c7fb1 Default the character width to 1 if wcwidth fails. 2022-12-12 21:14:15 +00:00
jakllsch 9f13cfae40 vsbus vax: sprinkle volatile for register accesses 2022-12-12 18:22:32 +00:00
chs b04cd074cb apply this commit from FreeBSD:
commit 9dda00df7e8f9279a43d92758df6a7e10a9aed95
  Author: Chuck Silvers <chs@FreeBSD.org>
  Date:   Mon Dec 12 08:14:17 2022 -0800

      restore: fix restore of NFS4 ACLs

      Changing the mode bits on a file with an NFS4 ACL results in the
      NFS4 ACL being replaced by one matching the new mode bits being set,
      so when restoring a file with an NFS4 ACL, set the owner/group/mode first
      and then set the NFS4 ACL, so that setting the mode does not throw away
      the ACL that we just set.

      Reviewed by:    mckusick
      Differential Revision:  https://reviews.freebsd.org/D37618
2022-12-12 16:53:30 +00:00
martin 1c03490869 Move the last remaining kernel printf to ofprint. 2022-12-12 13:26:46 +00:00
msaitoh f39fc9703b Use warn() instead of warnx() and simplify. 2022-12-12 05:09:33 +00:00
gutteridge 297f2ebee1 madt.c & mainbus.c: fix build with acpica 20221020
AcpiTbChecksum() was renamed AcpiUtChecksum() during code consolidation.
2022-12-12 01:07:52 +00:00
martin 53a2fe55e3 When generating a script for disklabel(8) do not use the "pretty printed"
file system type names, but the raw ones that disklabel(8) actually
knows about.
2022-12-11 19:32:57 +00:00
oster 1dac77d6f0 Support save/restore of AST levels in the PCB for context switching.
Code written by ragge@ , tested by oster@.
2022-12-11 18:02:40 +00:00
christos 0a3ec37ff4 Update tzcode to 2022g 2022-12-11 17:58:42 +00:00
christos fa7b09b795 Merge in 2022g:
Although tzcode still works with C89, bugs found in recent routine
    maintenance indicate that bitrot has set in and that in practice
    C89 is no longer used to build tzcode.  As it is a maintenance
    burden, support for C89 is planned to be removed soon.  Instead,
    please use compilers compatible with C99, C11, C17, or C23.

    timegm, which tzcode implemented in 1989, will finally be
    standardized 34 years later as part of C23, so timegm is now
    supported even if STD_INSPIRED is not defined.

    Fix bug in zdump's tzalloc emulation on hosts that lack tm_zone.
    (Problem reported by Đoàn Trần Công Danh.)

    Fix bug in zic on hosts where malloc(0) yields NULL on success.
    (Problem reported by Tim McBrayer for AIX 6.1.)

    Fix zic configuration to avoid linkage failures on some platforms.
    (Problems reported by Gilmore Davidson and Igor Ivanov.)

    Work around MS-Windows nmake incompatibility with POSIX.
    (Problem reported by Manuela Friedrich.)

    Port mktime and strftime to debugging platforms where accessing
    uninitialized data has undefined behavior (strftime problem
    reported by Robert Elz).

    Check more carefully for unlikely integer overflows, preferring
    C23 <stdckdint.h> to overflow checking by hand, as the latter has
    had obscure bugs.
2022-12-11 17:57:23 +00:00
kre 82842e14f0 Don't forget pci17 2022-12-11 17:35:56 +00:00
mlelstv c9f523c85d Use genfs_pathconf for VOP_PATHCONF.
Fixes bin/57103.
2022-12-11 11:31:55 +00:00
kre 1cba94e3a4 This test makes (made) a false assumption about the way that
process scheduling works.   That a process (or in this case,
a thread) is no longer blocked at time T does not mean that it
will resume execution at time T.   The OS is free to devote
resources to other processes/threads instead - all we should
normally be able to expect is that if it is not unblocked before
time T, that it will not start running before then.

In general though, the pthread_cond_*wait() functions don't guarantee
even that - but for this test, the possibility of something else
randomly signalling the condvar isn't believable, so don't worry about
that possibility (but do fail without calling strerror(0) on the off
chance it does happen).

Once we cease testing that the process resumed running before some
particular time, we can stop dealing with qemu timekeeping issues,
it might (seem to) take qemu twice as long as was requested before
the thread resumes, but that's OK - the same thing could happen on
a loaded system for other reasons.

Beyond that, the test also has (had) a race condition.   When using
CLOCK_REALTIME though that clock needed to have advanced to T before
the ETIMEDOUT should happen, there is no guarantee that it will stay >T
(CLOCK_REALTIME is allowed to be reset backwards).   So, only test
that the current time (after ETIMEDOUT) >= T when we're using
CLOCK_MONOTONIC - for CLOCK_REALTIME the time might have stepped
back between when the ETIMEDOUT happened and when the thread
obtains the current clock reading.  For that case, all we can test
is that the ETIMEDOUT actually happens.

With much of what was there now gone, the code can be simplified,
we no longer need to do timespec arithmetic, just one comparison
(simpler to test that Tend >= Tstart+period than Tend-Tstart > period
as we need Tstart+period for the abstime value for the timeout anyway).

Note that this still tests for the issue reported in PR lib/47703
which is where the test came from in the first place.

ps: we seem to be missing pthread_cond_clockwait() which is the same
as pthread_cond_timedwait() except that the clock to use is passed
as a parameter, rather than as an attribute of the condition variable.
2022-12-11 10:02:53 +00:00
kre b79485bc28 Undo the previous revert - turns out that vers 1.7 was correct after
all, and I am simply unable to read or comprehend (properly).
2022-12-11 08:32:02 +00:00
kre e2731928b1 It appears that POSIX intends to add a -d X option to the read command
in its next version, so it can be used as -d '' (to specify a \0 end
character for the record read, rather than the default \n) to accompany
find -print0 and xargs -0 options (also likely to be added).

Add support for -d now.   While here fix a bug where escaped nul
chars (\ \0) in non-raw mode were not being dropped, as they are
when not escaped (if not dropped, they're still not used in any
useful way, they just ended the value at that point).
2022-12-11 08:23:10 +00:00
mlelstv eec672a55c Need larger fat pointers for 128bit cache lines. 2022-12-11 08:09:20 +00:00
tsutsui df71525370 Enable UFS2 support.
Tested on 425t with HPDisk emulating 7958B using NetBSD 9.3 UFS2 image.
2022-12-11 07:41:37 +00:00
tsutsui 06f7440e2e Make hp300 bootloaders UFS2 ready. 2022-12-11 07:39:30 +00:00
kre 84d302cd6a Revert last. remains in northamerica as a zone, does not need a link here
(this one came from the gtz fork, rather than some local botch...)
2022-12-11 07:14:05 +00:00
kre fc2e760cbf Merge more changes that should have been made, but weren't. One day
I will work out why this doesn't happen automatically.    Ugh.
2022-12-11 07:08:36 +00:00
kre fb4bac3cba Note tzdata2022g 2022-12-11 07:01:55 +00:00
kre d942351a30 tzdata update to 2022g
Added zoneinfo files:
	America/Ciudad_Juarez
2022-12-11 06:59:36 +00:00
kre f03d0da556 Sort (NFCI) 2022-12-11 06:50:31 +00:00
kre 900b47c8be Merge tzdata2022g 2022-12-11 06:47:36 +00:00
kre 78e7dd8137 Import tzdata2022g from https://github.com/JodaOrg/global-tz/releases/download/2022ggtz/tzdata2022ggtz.tar.gz
Summary of changes in tzdata2022g (2022-11-29 08:58:31 -0800):
  * In the Mexican state of Chihuahua, the border strip near the US
    will change to agree with nearby US locations on 2022-11-30.
  * Much of Greenland, represented by America/Nuuk, stops observing
    winter time after March 2023, so its daylight saving time becomes
    standard time.
  * Changes for pre-1996 northern Canada (thanks to Chris Walton):
  * Merge America/Iqaluit and America/Pangnirtung into the former,
    with a backward compatibility link for the latter name.
  * Cambridge Bay, Inuvik, Iqaluit, Rankin Inlet, Resolute and
    Yellowknife did not observe DST in 1965, and did observe DST
    from 1972 through 1979.
  * Whitehorse moved from -09 to -08 on 1966-02-27, not 1967-05-28.
  * Colombia's 1993 fallback was 02-06 24:00, not 04-04 00:00.
  * Singapore's 1981-12-31 change was at 16:00 UTC (23:30 local time),
    not 24:00 local time.

Zones added by this update:
	America/Ciudad_Juarez
2022-12-11 06:46:49 +00:00
tsutsui c67d58d80c Remove a #if 0'ed out unused function. 2022-12-11 06:27:35 +00:00
tsutsui ea7df4c52d Cleanup extern declarations. 2022-12-11 06:20:07 +00:00
kre 22e113f0c4 Merge changes that should have been merged in earlier updates, but
got missed.   This is in preparation for an updata to tzdata2022g
which is coming soon (still from the gtz fork).

There is a (small) chance this update might break the build, that will
be fixed (if it happens) when 2022g is merged (which should not be
very far into the future).
2022-12-11 06:18:00 +00:00
tsutsui 0d3df02a8c Enable options DISKLABEL_EI by default as amd64.
No particular comment no port-i386@:
 https://mail-index.netbsd.org/port-i386/2022/12/02/msg004063.html
2022-12-11 04:20:52 +00:00
chs 366581c70c make sure error is initialized before we return it. 2022-12-11 01:36:49 +00:00
reinoud bbe55e4f80 Update list with file systems who do have fsck adding udf since there is now a
fsck_udf.
2022-12-10 20:58:37 +00:00
christos 9f9a2935e6 dedup 2022-12-10 20:57:10 +00:00
jakllsch 2b6fd3cd15 Don't let compiler optimize out the framebuffer probe in lcg_match() by
using keyword volatile.
2022-12-10 19:50:43 +00:00
chs a932562d1e apply this change from FreeBSD:
commit c028393d7072f1f88efd8d6e6c77bb9b15b3f3b6
  Author: Kirk McKusick <mckusick@FreeBSD.org>
  Date:   Fri Apr 11 21:48:14 2008 +0000

      Correctly set file group when restore is run by a user other than root.
2022-12-10 18:49:44 +00:00
christos def88d0cda new acpica 2022-12-10 17:42:36 +00:00
christos 0fb72f70ae new file 2022-12-10 17:41:05 +00:00
christos 121a054849 merge acpica 20220331 to 20221020 2022-12-10 17:40:49 +00:00
martin dacc867e53 Always map FS_BSDFFS to one of "FFS", "FFSv2" or "FFSv2ea" - previously
the disklabel name "4.2BSD" could show up initially but we could never
go back to it via the menu used to change the file system type.
This was confusing.
2022-12-10 16:52:02 +00:00
christos 82065f3b3e Import acpica 2022-10-20
20 October 2022. Summary of changes for version 20221020:

This release is available at https://acpica.org/downloads

0) Global changes:

Allow disabling of -Werror. For distro maintainers having `-Werror`
can delay update of GCC. Since every GCC release might add new
warnings that were not yet captured, it might break the build of
packages. With this change, distros can now build with `NOWERROR=TRUE`
instead of patching either the errors or the makefiles. The default
behavior keeps on using `-Werror`.

1) ACPICA kernel-resident subsystem:

Added support for FFH Operation Region special context data.
FFH(Fixed Function Hardware) Opregion is approved to be added in
ACPI 6.5 via code first approach[1]. It requires special context
data similar to GPIO and Generic Serial Bus as it needs to know
platform specific offset and length.

Reverted this commit "executer/exsystem: Warn about sleeps greater
than 10 ms." Due to user complaints about valid sleeps greater than
10ms seen in some existing machines -- generating lots of warnings.

Do not touch VGA memory when EBDA < 1KiB. The ACPICA code assumes
that EBDA region must be at least 1KiB in size. Because this is
not guaranteed, it might happen that while scanning the memory for
RSDP pointer, the kernel touches memory above 640KiB. This is
unwanted as the VGA memory range may not be decoded or even present
when running under virtualization.

Check that EBDA pointer is in valid memory. If the memory at 0x40e
is uninitialized, the retrieved physical memory address of EBDA
may be beyond the low memory (i.e. above 640K). If so, the kernel
may unintentionally access the VGA memory, that might not be decoded
or even present in case of virtualization.

2) iASL Compiler/Disassembler and ACPICA tools:

Completed the existing partial support for the CDAT "table". Although
this isn't technically an ACPI table (It doesn't go into the XSDT),
it is possible to support this table in the Data Table compiler.
Created one new file, "utilities/utcksum.c", used to centralize
checksum generation/validation into one location. Includes changes
to makefiles and MSVC project files.

Updated support for the IORT table - update to version E.e

Added CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table

iASL: Added CCEL table to both compiler/disassembler.

iASL: NHLT table: Fixed compilation of optional undocumented fields

iASL: Fix iASL compile error due to ACPI_TDEL_OFFSET. Commit #
10e4763 ("iASL: Add CCEL table to both compiler/disassembler")
introduced the iASL build issue. The issue is due to using
ACPI_TDEL_OFFSET for CCEL table member reference. To fix it, change
ACPI_TDEL_OFFSET with ACPI_CCEL_OFFSET.
2022-12-10 16:34:37 +00:00
jakllsch 6471fd16f0 Add magic to recognize FFSv2ea 2022-12-10 16:22:21 +00:00
martin da75446885 Comment and code style (cosmetic) changes, no functional change 2022-12-10 16:13:19 +00:00
jakllsch 4bcdac4c45 VAX bootxx has had ffsv2 support since May 2018, allow its use as boot
filesystem in sysinst.

Sucessfully tested in simh-microvax3900 booting from FFSv2ea.
2022-12-10 16:03:15 +00:00
martin 1051e1b2b5 Move some output to DEBUG-only state 2022-12-10 13:15:00 +00:00
martin eb158e844f Convert more kernel printfs that might happen very early (before kernel
console is usable) to ofprint.
2022-12-10 13:06:41 +00:00
martin 99162e5773 Add set_default_sizemult() calls to some architectures obviously
lacking it.
2022-12-09 17:02:13 +00:00