CVS commit: src/share/man/man4

2024-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 14:54:58 UTC 2024

Modified Files:
src/share/man/man4: thinkpad.4

Log Message:
mention that we handle battery controls too.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/thinkpad.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2024-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 14:54:58 UTC 2024

Modified Files:
src/share/man/man4: thinkpad.4

Log Message:
mention that we handle battery controls too.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/thinkpad.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/thinkpad.4
diff -u src/share/man/man4/thinkpad.4:1.4 src/share/man/man4/thinkpad.4:1.5
--- src/share/man/man4/thinkpad.4:1.4	Tue Mar 18 14:20:39 2014
+++ src/share/man/man4/thinkpad.4	Sat Apr 27 10:54:58 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: thinkpad.4,v 1.4 2014/03/18 18:20:39 riastradh Exp $
+.\"	$NetBSD: thinkpad.4,v 1.5 2024/04/27 14:54:58 christos Exp $
 .\"
 .\" Copyright (c) 2008 Jared D. McNeill 
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 9, 2010
+.Dd April 27, 2024
 .Dt THINKPAD 4
 .Os
 .Sh NAME
@@ -36,8 +36,8 @@
 The
 .Nm
 driver provides support for vendor specific features found in IBM and
-Lenovo brand laptops, such as function key handling, hotkey handling, and
-temperature and fan monitoring.
+Lenovo brand laptops, such as function key handling, hotkey handling,
+battery controls, and temperature and fan monitoring.
 .Sh SEE ALSO
 .Xr acpi 4 ,
 .Xr aps 4 ,



CVS commit: src/sys/dev/acpi

2024-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 14:50:18 UTC 2024

Modified Files:
src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
Expose a sysctl interface hw.acpi.thinkpad.bat[]. to control
some aspects of battery charging behavior on supported systems:

charge_start
threshold below which to start charging (in %, 0-99)

charge_stop
threshold above which to stop charging (in %, 1-100)

force_discharge
discharge while on AC power, e.g., for calibration

charge_inhibit
inhibit charging while on AC power

>From Malte Dehling


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/acpi/thinkpad_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/thinkpad_acpi.c
diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.56 src/sys/dev/acpi/thinkpad_acpi.c:1.57
--- src/sys/dev/acpi/thinkpad_acpi.c:1.56	Sat Apr 27 10:45:11 2024
+++ src/sys/dev/acpi/thinkpad_acpi.c	Sat Apr 27 10:50:18 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: thinkpad_acpi.c,v 1.56 2024/04/27 14:45:11 christos Exp $ */
+/* $NetBSD: thinkpad_acpi.c,v 1.57 2024/04/27 14:50:18 christos Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,13 +27,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.56 2024/04/27 14:45:11 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.57 2024/04/27 14:50:18 christos Exp $");
 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -49,10 +50,27 @@ ACPI_MODULE_NAME		("thinkpad_acpi")
 #define	THINKPAD_NFANSENSORS	1
 #define	THINKPAD_NSENSORS	(THINKPAD_NTEMPSENSORS + THINKPAD_NFANSENSORS)
 
+typedef struct tp_sysctl_param {
+	device_t		sp_dev;
+	int			sp_bat;
+} tp_sysctl_param_t;
+
+typedef union tp_batctl {
+	int			have_any;
+	struct {
+	int			charge_start:1;
+	int			charge_stop:1;
+	int			charge_inhibit:1;
+	int			force_discharge:1;
+	int			individual_control:1;
+	}			have;
+} tp_batctl_t;
+
 typedef struct thinkpad_softc {
 	device_t		sc_dev;
 	device_t		sc_ecdev;
 	struct acpi_devnode	*sc_node;
+	struct sysctllog	*sc_log;
 	ACPI_HANDLE		sc_powhdl;
 	ACPI_HANDLE		sc_cmoshdl;
 	ACPI_INTEGER		sc_ver;
@@ -90,6 +108,14 @@ typedef struct thinkpad_softc {
 	envsys_data_t		sc_sensor[THINKPAD_NSENSORS];
 
 	int			sc_display_state;
+
+#define THINKPAD_BAT_ANY	0
+#define THINKPAD_BAT_PRIMARY	1
+#define THINKPAD_BAT_SECONDARY	2
+#define THINKPAD_BAT_LAST	3
+
+	tp_batctl_t		sc_batctl;
+	tp_sysctl_param_t	sc_scparam[THINKPAD_BAT_LAST];
 } thinkpad_softc_t;
 
 /* Hotkey events */
@@ -130,6 +156,17 @@ typedef struct thinkpad_softc {
 #define	THINKPAD_DISPLAY_ALL \
 	(THINKPAD_DISPLAY_LCD | THINKPAD_DISPLAY_CRT | THINKPAD_DISPLAY_DVI)
 
+#define THINKPAD_GET_CHARGE_START	"BCTG"
+#define THINKPAD_SET_CHARGE_START	"BCCS"
+#define THINKPAD_GET_CHARGE_STOP	"BCSG"
+#define THINKPAD_SET_CHARGE_STOP	"BCSS"
+#define THINKPAD_GET_FORCE_DISCHARGE	"BDSG"
+#define THINKPAD_SET_FORCE_DISCHARGE	"BDSS"
+#define THINKPAD_GET_CHARGE_INHIBIT	"BICG"
+#define THINKPAD_SET_CHARGE_INHIBIT	"BICS"
+
+#define THINKPAD_CALL_ERROR		0x8000
+
 #define THINKPAD_BLUETOOTH_HWPRESENT	0x01
 #define THINKPAD_BLUETOOTH_RADIOSSW	0x02
 #define THINKPAD_BLUETOOTH_RESUMECTRL	0x04
@@ -168,6 +205,9 @@ static void	thinkpad_brightness_down(dev
 static uint8_t	thinkpad_brightness_read(thinkpad_softc_t *);
 static void	thinkpad_cmos(thinkpad_softc_t *, uint8_t);
 
+static void	thinkpad_battery_probe_support(device_t);
+static void	thinkpad_battery_sysctl_setup(device_t);
+
 CFATTACH_DECL3_NEW(thinkpad, sizeof(thinkpad_softc_t),
 thinkpad_match, thinkpad_attach, thinkpad_detach, NULL, NULL, NULL,
 0);
@@ -220,6 +260,7 @@ thinkpad_attach(device_t parent, device_
 	int i;
 
 	sc->sc_dev = self;
+	sc->sc_log = NULL;
 	sc->sc_powhdl = NULL;
 	sc->sc_cmoshdl = NULL;
 	sc->sc_node = aa->aa_node;
@@ -371,6 +412,17 @@ thinkpad_attach(device_t parent, device_
 	/* Register temperature and fan sensors with envsys */
 	thinkpad_sensors_init(sc);
 
+	/* Probe supported battery charge/control operations */
+	thinkpad_battery_probe_support(self);
+
+	if (sc->sc_batctl.have_any) {
+		for (i = 0; i < THINKPAD_BAT_LAST; i++) {
+			sc->sc_scparam[i].sp_dev = self;
+			sc->sc_scparam[i].sp_bat = i;
+		}
+		thinkpad_battery_sysctl_setup(self);
+	}
+
 fail:
 	if (!pmf_device_register(self, NULL, thinkpad_resume))
 		aprint_error_dev(self, "couldn't establish power handler\n");
@@ -396,6 +448,9 @@ thinkpad_detach(device_t self, int flags
 	if (sc->sc_sme != NULL)
 		sysmon_envsys_unregister(sc->sc_sme);
 
+	if (sc->sc_log != NULL)
+		sysctl_teardown(>sc_log);
+
 	pmf_device_deregister(self);
 
 	pmf_event_deregister(self, PMFE_DISPLAY_BRIGHTNESS_UP,
@@ -948,6 +1003,290 @@ thinkpad_cmos(thinkpad_softc_t *sc, uint
 		AcpiFormatException(rv));
 }
 
+static uint32_t
+thinkpad_call_method(device_t 

CVS commit: src/sys/dev/acpi

2024-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 14:50:18 UTC 2024

Modified Files:
src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
Expose a sysctl interface hw.acpi.thinkpad.bat[]. to control
some aspects of battery charging behavior on supported systems:

charge_start
threshold below which to start charging (in %, 0-99)

charge_stop
threshold above which to stop charging (in %, 1-100)

force_discharge
discharge while on AC power, e.g., for calibration

charge_inhibit
inhibit charging while on AC power

>From Malte Dehling


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/acpi/thinkpad_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2024-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 14:45:11 UTC 2024

Modified Files:
src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
thinkpad cosmetic patches (Malte Dehling)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/acpi/thinkpad_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2024-04-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 14:45:11 UTC 2024

Modified Files:
src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
thinkpad cosmetic patches (Malte Dehling)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/acpi/thinkpad_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/thinkpad_acpi.c
diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.55 src/sys/dev/acpi/thinkpad_acpi.c:1.56
--- src/sys/dev/acpi/thinkpad_acpi.c:1.55	Fri Aug 12 12:21:41 2022
+++ src/sys/dev/acpi/thinkpad_acpi.c	Sat Apr 27 10:45:11 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: thinkpad_acpi.c,v 1.55 2022/08/12 16:21:41 riastradh Exp $ */
+/* $NetBSD: thinkpad_acpi.c,v 1.56 2024/04/27 14:45:11 christos Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.55 2022/08/12 16:21:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.56 2024/04/27 14:45:11 christos Exp $");
 
 #include 
 #include 
@@ -138,8 +138,8 @@ typedef struct thinkpad_softc {
 #define THINKPAD_WWAN_RADIOSSW		0x02
 #define THINKPAD_WWAN_RESUMECTRL	0x04
 
-#define THINKPAD_UWB_HWPRESENT	0x01
-#define THINKPAD_UWB_RADIOSSW	0x02
+#define THINKPAD_UWB_HWPRESENT		0x01
+#define THINKPAD_UWB_RADIOSSW		0x02
 
 #define THINKPAD_RFK_BLUETOOTH		0
 #define THINKPAD_RFK_WWAN		1
@@ -165,7 +165,7 @@ static void	thinkpad_bluetooth_toggle(th
 static bool	thinkpad_resume(device_t, const pmf_qual_t *);
 static void	thinkpad_brightness_up(device_t);
 static void	thinkpad_brightness_down(device_t);
-static uint8_t	thinkpad_brightness_read(thinkpad_softc_t *sc);
+static uint8_t	thinkpad_brightness_read(thinkpad_softc_t *);
 static void	thinkpad_cmos(thinkpad_softc_t *, uint8_t);
 
 CFATTACH_DECL3_NEW(thinkpad, sizeof(thinkpad_softc_t),
@@ -230,7 +230,7 @@ thinkpad_attach(device_t parent, device_
 
 	sc->sc_ecdev = NULL;
 	for (curdev = deviter_first(, DEVITER_F_ROOT_FIRST);
-	 curdev != NULL; curdev = deviter_next())
+	curdev != NULL; curdev = deviter_next())
 		if (device_is_a(curdev, "acpiecdt") ||
 		device_is_a(curdev, "acpiec")) {
 			sc->sc_ecdev = curdev;
@@ -330,29 +330,30 @@ thinkpad_attach(device_t parent, device_
 #endif
 	for (i = TP_PSW_DISPLAY_CYCLE; i < TP_PSW_LAST; i++)
 		sc->sc_smpsw[i].smpsw_type = PSWITCH_TYPE_HOTKEY;
-	psw[TP_PSW_DISPLAY_CYCLE].smpsw_name = PSWITCH_HK_DISPLAY_CYCLE;
-	psw[TP_PSW_LOCK_SCREEN].smpsw_name = PSWITCH_HK_LOCK_SCREEN;
-	psw[TP_PSW_BATTERY_INFO].smpsw_name = PSWITCH_HK_BATTERY_INFO;
-	psw[TP_PSW_EJECT_BUTTON].smpsw_name = PSWITCH_HK_EJECT_BUTTON;
-	psw[TP_PSW_ZOOM_BUTTON].smpsw_name = PSWITCH_HK_ZOOM_BUTTON;
-	psw[TP_PSW_VENDOR_BUTTON].smpsw_name = PSWITCH_HK_VENDOR_BUTTON;
+
+	psw[TP_PSW_DISPLAY_CYCLE].smpsw_name	= PSWITCH_HK_DISPLAY_CYCLE;
+	psw[TP_PSW_LOCK_SCREEN].smpsw_name	= PSWITCH_HK_LOCK_SCREEN;
+	psw[TP_PSW_BATTERY_INFO].smpsw_name	= PSWITCH_HK_BATTERY_INFO;
+	psw[TP_PSW_EJECT_BUTTON].smpsw_name	= PSWITCH_HK_EJECT_BUTTON;
+	psw[TP_PSW_ZOOM_BUTTON].smpsw_name	= PSWITCH_HK_ZOOM_BUTTON;
+	psw[TP_PSW_VENDOR_BUTTON].smpsw_name	= PSWITCH_HK_VENDOR_BUTTON;
 #ifndef THINKPAD_NORMAL_HOTKEYS
-	psw[TP_PSW_FNF1_BUTTON].smpsw_name = PSWITCH_HK_FNF1_BUTTON;
-	psw[TP_PSW_WIRELESS_BUTTON].smpsw_name = PSWITCH_HK_WIRELESS_BUTTON;
-	psw[TP_PSW_WWAN_BUTTON].smpsw_name = PSWITCH_HK_WWAN_BUTTON;
-	psw[TP_PSW_POINTER_BUTTON].smpsw_name  = PSWITCH_HK_POINTER_BUTTON;
-	psw[TP_PSW_FNF10_BUTTON].smpsw_name= PSWITCH_HK_FNF10_BUTTON;
-	psw[TP_PSW_FNF11_BUTTON].smpsw_name= PSWITCH_HK_FNF11_BUTTON;
-	psw[TP_PSW_BRIGHTNESS_UP].smpsw_name   = PSWITCH_HK_BRIGHTNESS_UP;
-	psw[TP_PSW_BRIGHTNESS_DOWN].smpsw_name = PSWITCH_HK_BRIGHTNESS_DOWN;
-	psw[TP_PSW_THINKLIGHT].smpsw_name  = PSWITCH_HK_THINKLIGHT;
-	psw[TP_PSW_VOLUME_UP].smpsw_name   = PSWITCH_HK_VOLUME_UP;
-	psw[TP_PSW_VOLUME_DOWN].smpsw_name = PSWITCH_HK_VOLUME_DOWN;
-	psw[TP_PSW_VOLUME_MUTE].smpsw_name = PSWITCH_HK_VOLUME_MUTE;
-	psw[TP_PSW_STAR_BUTTON].smpsw_name = PSWITCH_HK_STAR_BUTTON;
-	psw[TP_PSW_SCISSORS_BUTTON].smpsw_name = PSWITCH_HK_SCISSORS_BUTTON;
-	psw[TP_PSW_BLUETOOTH_BUTTON].smpsw_name = PSWITCH_HK_BLUETOOTH_BUTTON;
-	psw[TP_PSW_KEYBOARD_BUTTON].smpsw_name = PSWITCH_HK_KEYBOARD_BUTTON;
+	psw[TP_PSW_FNF1_BUTTON].smpsw_name	= PSWITCH_HK_FNF1_BUTTON;
+	psw[TP_PSW_WIRELESS_BUTTON].smpsw_name	= PSWITCH_HK_WIRELESS_BUTTON;
+	psw[TP_PSW_WWAN_BUTTON].smpsw_name	= PSWITCH_HK_WWAN_BUTTON;
+	psw[TP_PSW_POINTER_BUTTON].smpsw_name	= PSWITCH_HK_POINTER_BUTTON;
+	psw[TP_PSW_FNF10_BUTTON].smpsw_name	= PSWITCH_HK_FNF10_BUTTON;
+	psw[TP_PSW_FNF11_BUTTON].smpsw_name	= PSWITCH_HK_FNF11_BUTTON;
+	psw[TP_PSW_BRIGHTNESS_UP].smpsw_name	= PSWITCH_HK_BRIGHTNESS_UP;
+	psw[TP_PSW_BRIGHTNESS_DOWN].smpsw_name	= PSWITCH_HK_BRIGHTNESS_DOWN;
+	psw[TP_PSW_THINKLIGHT].smpsw_name	= PSWITCH_HK_THINKLIGHT;
+	

CVS commit: src/sys/dev/acpi

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 00:40:07 UTC 2024

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
Remove 0 initializations (since the softc is zalloc'ed) and the initial
refresh which will have no data.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/acpi/acpi_bat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.122 src/sys/dev/acpi/acpi_bat.c:1.123
--- src/sys/dev/acpi/acpi_bat.c:1.122	Fri Apr 26 14:19:18 2024
+++ src/sys/dev/acpi/acpi_bat.c	Fri Apr 26 20:40:06 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_bat.c,v 1.122 2024/04/26 18:19:18 christos Exp $	*/
+/*	$NetBSD: acpi_bat.c,v 1.123 2024/04/27 00:40:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.122 2024/04/26 18:19:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.123 2024/04/27 00:40:06 christos Exp $");
 
 #include 
 #include 
@@ -229,14 +229,6 @@ acpibat_attach(device_t parent, device_t
 
 	sc->sc_node = aa->aa_node;
 
-	sc->sc_present = 0;
-	sc->sc_dvoltage = 0;
-	sc->sc_dcapacity = 0;
-	sc->sc_lcapacity = 0;
-	sc->sc_wcapacity = 0;
-
-	sc->sc_sme = NULL;
-
 	mutex_init(>sc_mutex, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(>sc_condvar, device_xname(self));
 
@@ -759,7 +751,7 @@ acpibat_init_envsys(device_t dv)
 	sc->sc_sme->sme_cookie = dv;
 	sc->sc_sme->sme_refresh = acpibat_refresh;
 	sc->sc_sme->sme_class = SME_CLASS_BATTERY;
-	sc->sc_sme->sme_flags = SME_POLL_ONLY | SME_INIT_REFRESH;
+	sc->sc_sme->sme_flags = SME_POLL_ONLY;
 	sc->sc_sme->sme_get_limits = acpibat_get_limits;
 
 	if (sysmon_envsys_register(sc->sc_sme))



CVS commit: src/sys/dev/acpi

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 27 00:40:07 UTC 2024

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
Remove 0 initializations (since the softc is zalloc'ed) and the initial
refresh which will have no data.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/acpi/acpi_bat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/crash

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 22:07:32 UTC 2024

Modified Files:
src/usr.sbin/crash: Makefile

Log Message:
Add ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/crash/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/crash/Makefile
diff -u src/usr.sbin/crash/Makefile:1.50 src/usr.sbin/crash/Makefile:1.51
--- src/usr.sbin/crash/Makefile:1.50	Tue Nov 21 21:01:07 2023
+++ src/usr.sbin/crash/Makefile	Fri Apr 26 18:07:32 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.50 2023/11/22 02:01:07 thorpej Exp $
+#	$NetBSD: Makefile,v 1.51 2024/04/26 22:07:32 christos Exp $
 
 PROG=		crash
 MAN=		crash.8
@@ -119,7 +119,7 @@ NVFLAGS+=-R
 # vers.c
 SRCS+=	vers.c
 vers.c:	${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
-	${HOST_SH} ${S}/conf/newvers.sh ${NVFLAGS} -n -m ${MACHINE} -i CRASH
+	TOOL_DATE=${TOOL_DATE} ${HOST_SH} ${S}/conf/newvers.sh ${NVFLAGS} -n -m ${MACHINE} -i CRASH
 CLEANFILES+=	vers.c version
 
 .else# } {



CVS commit: src/usr.sbin/crash

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 22:07:32 UTC 2024

Modified Files:
src/usr.sbin/crash: Makefile

Log Message:
Add ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/crash/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/fstyp

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 18:21:25 UTC 2024

Modified Files:
src/usr.sbin/fstyp: Makefile

Log Message:
PR/58202: Malte Dehling: Don't link libzfs


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/fstyp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/fstyp/Makefile
diff -u src/usr.sbin/fstyp/Makefile:1.14 src/usr.sbin/fstyp/Makefile:1.15
--- src/usr.sbin/fstyp/Makefile:1.14	Sat Jun  3 17:26:29 2023
+++ src/usr.sbin/fstyp/Makefile	Fri Apr 26 14:21:25 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2023/06/03 21:26:29 lukem Exp $
+#	$NetBSD: Makefile,v 1.15 2024/04/26 18:21:25 christos Exp $
 
 .include 
 
@@ -17,7 +17,8 @@ WARNS?=	6
 COPTS.zfs.c+=	-Wno-unknown-pragmas
 COPTS.zfs.c+=	-Wno-sign-conversion
 COPTS.zfs.c+=	-Wno-strict-prototypes
-LDADD+=	-lnvpair -lzfs
+LDADD+=	-lnvpair
+DPADD+= ${LIBNVPAIR}
 
 OSNET=${NETBSDSRCDIR}/external/cddl/osnet
 CPPFLAGS+=	-DHAVE_ZFS



CVS commit: src/usr.sbin/fstyp

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 18:21:25 UTC 2024

Modified Files:
src/usr.sbin/fstyp: Makefile

Log Message:
PR/58202: Malte Dehling: Don't link libzfs


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/fstyp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 18:19:18 UTC 2024

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
PR/58201: Malte Dehling: re-order sysmon initialization before acpi
registration, to avoid needing to call to acpi_deregister_notify on sysmon
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/acpi/acpi_bat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.121 src/sys/dev/acpi/acpi_bat.c:1.122
--- src/sys/dev/acpi/acpi_bat.c:1.121	Thu Jan  6 20:10:57 2022
+++ src/sys/dev/acpi/acpi_bat.c	Fri Apr 26 14:19:18 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_bat.c,v 1.121 2022/01/07 01:10:57 riastradh Exp $	*/
+/*	$NetBSD: acpi_bat.c,v 1.122 2024/04/26 18:19:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.121 2022/01/07 01:10:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.122 2024/04/26 18:19:18 christos Exp $");
 
 #include 
 #include 
@@ -762,17 +762,16 @@ acpibat_init_envsys(device_t dv)
 	sc->sc_sme->sme_flags = SME_POLL_ONLY | SME_INIT_REFRESH;
 	sc->sc_sme->sme_get_limits = acpibat_get_limits;
 
+	if (sysmon_envsys_register(sc->sc_sme))
+		goto fail;
+
 	(void)acpi_register_notify(sc->sc_node, acpibat_notify_handler);
 	acpibat_update_info(dv);
 	acpibat_update_status(dv);
 
-	if (sysmon_envsys_register(sc->sc_sme))
-		goto fail;
-
 	(void)pmf_device_register(dv, NULL, acpibat_resume);
 
 	return;
-
 fail:
 	aprint_error_dev(dv, "failed to initialize sysmon\n");
 



CVS commit: src/sys/dev/acpi

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 18:19:18 UTC 2024

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
PR/58201: Malte Dehling: re-order sysmon initialization before acpi
registration, to avoid needing to call to acpi_deregister_notify on sysmon
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/acpi/acpi_bat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 18:06:02 UTC 2024

Modified Files:
src/etc: Makefile

Log Message:
PR/58200: Kouichi Hashikawa: ./makeobsolete uses platform's sed


To generate a diff of this commit:
cvs rdiff -u -r1.469 -r1.470 src/etc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.469 src/etc/Makefile:1.470
--- src/etc/Makefile:1.469	Fri Nov 10 15:44:58 2023
+++ src/etc/Makefile	Fri Apr 26 14:06:02 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.469 2023/11/10 20:44:58 christos Exp $
+#	$NetBSD: Makefile,v 1.470 2024/04/26 18:06:02 christos Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -393,10 +393,10 @@ install-obsolete-lists: .PHONY .MAKE
 	mkdir -p ${OBSOLETE.dir}
 .if ${MKX11} != "no"
 	(cd ${NETBSDSRCDIR}/distrib/sets && \
-	AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -b -t ${OBSOLETE.dir})
+	AWK=${TOOL_AWK:Q} SED=${TOOL_SED:Q} MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -b -t ${OBSOLETE.dir})
 .else
 	(cd ${NETBSDSRCDIR}/distrib/sets && \
-	AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -t ${OBSOLETE.dir})
+	AWK=${TOOL_AWK:Q} SED=${TOOL_SED:Q} MAKE=${MAKE:Q} ${HOST_SH} ./makeobsolete -t ${OBSOLETE.dir})
 .endif
 .for file in ${OBSOLETE.files}
 	${_MKMSG_INSTALL} ${DESTDIR}/var/db/obsolete/${file}



CVS commit: src/etc

2024-04-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 26 18:06:02 UTC 2024

Modified Files:
src/etc: Makefile

Log Message:
PR/58200: Kouichi Hashikawa: ./makeobsolete uses platform's sed


To generate a diff of this commit:
cvs rdiff -u -r1.469 -r1.470 src/etc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/makefs

2024-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 24 14:23:37 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
use __func__


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/walk.c
diff -u src/usr.sbin/makefs/walk.c:1.37 src/usr.sbin/makefs/walk.c:1.38
--- src/usr.sbin/makefs/walk.c:1.37	Wed Apr 24 10:02:39 2024
+++ src/usr.sbin/makefs/walk.c	Wed Apr 24 10:23:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: walk.c,v 1.37 2024/04/24 14:02:39 christos Exp $	*/
+/*	$NetBSD: walk.c,v 1.38 2024/04/24 14:23:37 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: walk.c,v 1.37 2024/04/24 14:02:39 christos Exp $");
+__RCSID("$NetBSD: walk.c,v 1.38 2024/04/24 14:23:37 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -95,7 +95,8 @@ fsnode_sort(fsnode *first, const char *r
 	for (fsnode *tmp = first; tmp; tmp = tmp->next, num++) {
 		num++;
 		if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
-			printf ("pre sort: %s %s %s\n", root, dir, tmp->name);
+			printf("%s: pre sort: %s %s %s\n",
+			__func__, root, dir, tmp->name);
 	}
 
 	list = listptr = ecalloc(num, sizeof(*list));
@@ -112,7 +113,8 @@ fsnode_sort(fsnode *first, const char *r
 	free(list);
 	if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
 		for (fsnode *tmp = first; tmp; tmp = tmp->next)
-			printf("post sort: %s %s %s\n", root, dir, tmp->name);
+			printf("%s: post sort: %s %s %s\n",
+			__func__, root, dir, tmp->name);
 
 	return first;
 }
@@ -144,7 +146,7 @@ walk_dir(const char *root, const char *d
 	if ((size_t)len >= sizeof(path))
 		errx(EXIT_FAILURE, "Pathname too long.");
 	if (debug & DEBUG_WALK_DIR)
-		printf("walk_dir: %s %p\n", path, parent);
+		printf("%s: %s %p\n", __func__, path, parent);
 	if ((dirp = opendir(path)) == NULL)
 		err(EXIT_FAILURE, "Can't opendir `%s'", path);
 	rp = path + strlen(root) + 1;
@@ -173,7 +175,8 @@ walk_dir(const char *root, const char *d
 dot = 0;
 			}
 		if (debug & DEBUG_WALK_DIR_NODE)
-			printf("scanning %s/%s/%s\n", root, dir, name);
+			printf("%s: scanning %s/%s/%s\n",
+			__func__, root, dir, name);
 		if (snprintf(path + len, sizeof(path) - len, "/%s", name) >=
 		(int)sizeof(path) - len)
 			errx(EXIT_FAILURE, "Pathname too long.");
@@ -198,7 +201,7 @@ walk_dir(const char *root, const char *d
 #ifdef S_ISSOCK
 		if (S_ISSOCK(stbuf.st_mode & S_IFMT)) {
 			if (debug & DEBUG_WALK_DIR_NODE)
-printf("  skipping socket %s\n", path);
+printf("%s: skipping socket %s\n", __func__, path);
 			continue;
 		}
 #endif
@@ -218,8 +221,8 @@ walk_dir(const char *root, const char *d
 if (S_ISDIR(cur->type) &&
 S_ISDIR(stbuf.st_mode)) {
 	if (debug & DEBUG_WALK_DIR_NODE)
-		printf("merging %s with %p\n",
-		path, cur->child);
+		printf("%s: merging %s with %p\n",
+		__func__, path, cur->child);
 	cur->child = walk_dir(root, rp, cur,
 	cur->child, replace, follow);
 	continue;
@@ -232,7 +235,8 @@ walk_dir(const char *root, const char *d
 	inode_type(cur->type));
 else {
 	if (debug & DEBUG_WALK_DIR_NODE)
-		printf("replacing %s %s\n",
+		printf("%s: replacing %s %s\n",
+		__func__,
 		inode_type(stbuf.st_mode),
 		path);
 	if (cur == join->next)
@@ -280,7 +284,8 @@ walk_dir(const char *root, const char *d
 cur->inode = curino;
 cur->inode->nlink++;
 if (debug & DEBUG_WALK_DIR_LINKCHECK)
-	printf("link_check: found [%ju, %ju]\n",
+	printf("%s: link check found [%ju, %ju]\n",
+	__func__,
 	(uintmax_t)curino->st.st_dev,
 	(uintmax_t)curino->st.st_ino);
 			}
@@ -403,7 +408,7 @@ apply_specfile(const char *specfile, con
 	assert(parent != NULL);
 
 	if (debug & DEBUG_APPLY_SPECFILE)
-		printf("apply_specfile: %s, %s %p\n", specfile, dir, parent);
+		printf("%s: %s, %s %p\n", __func__, specfile, dir, parent);
 
 /* read in the specfile */
 	if ((fp = fopen(specfile, "r")) == NULL)
@@ -438,7 +443,7 @@ apply_specdir(const char *dir, NODE *spe
 	assert(dirnode != NULL);
 
 	if (debug & DEBUG_APPLY_SPECFILE)
-		printf("apply_specdir: %s %p %p\n", dir, specnode, dirnode);
+		printf("%s: %s %p %p\n", __func__, dir, specnode, dirnode);
 
 	if (specnode->type != F_DIR)
 		errx(EXIT_FAILURE, "Specfile node `%s/%s' is not a directory",
@@ -466,7 +471,9 @@ apply_specdir(const char *dir, NODE *spe
 			}
 			if (curnode == NULL) {
 if (debug & DEBUG_APPLY_SPECONLY) {
-	printf("apply_specdir: trimming %s/%s %p\n", dir, curfsnode->name, curfsnode);
+	printf("%s: trimming %s/%s %p\n",
+	__func__, dir, curfsnode->name,
+	curfsnode);
 }
 free_fsnodes(curfsnode);
 			}
@@ -477,13 +484,12 @@ 

CVS commit: src/usr.sbin/makefs

2024-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 24 14:23:37 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
use __func__


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/makefs

2024-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 24 14:02:39 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
make a separate sorting function and KNF (thanks rillig)


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/walk.c
diff -u src/usr.sbin/makefs/walk.c:1.36 src/usr.sbin/makefs/walk.c:1.37
--- src/usr.sbin/makefs/walk.c:1.36	Tue Apr 23 18:18:56 2024
+++ src/usr.sbin/makefs/walk.c	Wed Apr 24 10:02:39 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: walk.c,v 1.36 2024/04/23 22:18:56 christos Exp $	*/
+/*	$NetBSD: walk.c,v 1.37 2024/04/24 14:02:39 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: walk.c,v 1.36 2024/04/23 22:18:56 christos Exp $");
+__RCSID("$NetBSD: walk.c,v 1.37 2024/04/24 14:02:39 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -86,6 +86,37 @@ fsnode_cmp(const void *vleft, const void
 	return strcmp(lname, rname);
 }
 
+static fsnode *
+fsnode_sort(fsnode *first, const char *root, const char *dir)
+{
+	fsnode **list, **listptr;
+	size_t num = 0;
+
+	for (fsnode *tmp = first; tmp; tmp = tmp->next, num++) {
+		num++;
+		if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
+			printf ("pre sort: %s %s %s\n", root, dir, tmp->name);
+	}
+
+	list = listptr = ecalloc(num, sizeof(*list));
+	for (fsnode *tmp = first; tmp; tmp = tmp->next)
+		*listptr++ = tmp;
+
+	qsort (list, num, sizeof(*list), fsnode_cmp);
+
+	for (size_t i = 0; i < num - 1; ++i)
+		list[i]->next = list[i + 1];
+	list[num - 1]->next = NULL;
+	first = list[0];
+	assert(strcmp(first->name, ".") == 0);
+	free(list);
+	if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
+		for (fsnode *tmp = first; tmp; tmp = tmp->next)
+			printf("post sort: %s %s %s\n", root, dir, tmp->name);
+
+	return first;
+}
+
 /*
  * walk_dir --
  *	build a tree of fsnodes from `root' and `dir', with a parent
@@ -106,14 +137,11 @@ walk_dir(const char *root, const char *d
 	char		*name, *rp;
 	int		dot, len;
 
-	fsnode **list, **listptr;
-	int num = 0;
-
 	assert(root != NULL);
 	assert(dir != NULL);
 
 	len = snprintf(path, sizeof(path), "%s/%s", root, dir);
-	if (len >= (int)sizeof(path))
+	if ((size_t)len >= sizeof(path))
 		errx(EXIT_FAILURE, "Pathname too long.");
 	if (debug & DEBUG_WALK_DIR)
 		printf("walk_dir: %s %p\n", path, parent);
@@ -155,14 +183,16 @@ walk_dir(const char *root, const char *d
 		} else {
 			if (lstat(path, ) == -1)
 err(EXIT_FAILURE, "Can't lstat `%s'", path);
-			/* As symlink permission bits vary between filesystems
-			   (ie. 0755 on FFS/NetBSD, 0777 for ext[234]/Linux),
-			   force them to 0755.  */
+			/*
+			 * Symlink permission bits vary between filesystems/OSs
+			 * (ie. 0755 on FFS/NetBSD, 0777 for ext[234]/Linux),
+			 * force them to 0755.
+			 */
 			if (S_ISLNK(stbuf.st_mode)) {
 stbuf.st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
 stbuf.st_mode |= S_IRWXU
- | S_IRGRP | S_IXGRP
- | S_IROTH | S_IXOTH;
+| S_IRGRP | S_IXGRP
+| S_IROTH | S_IXOTH;
 			}
 		}
 #ifdef S_ISSOCK
@@ -273,35 +303,7 @@ walk_dir(const char *root, const char *d
 	if (closedir(dirp) == -1)
 		err(EXIT_FAILURE, "Can't closedir `%s/%s'", root, dir);
 
-	/*
-	 * Sort entries.
-	 */
-	/* Create a plain list: Count, alloc, add.  */
-	for (fsnode *tmp = first; tmp; tmp = tmp->next) {
-		num++;
-		if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
-			printf ("pre sort: %s %s %s\n", root, dir, tmp->name);
-	}
-	list = listptr = ecalloc (num, sizeof (*list));
-	for (fsnode *tmp = first; tmp; tmp = tmp->next)
-		*listptr++ = tmp;
-	/* Sort plain list.  */
-	qsort (list, num, sizeof (*list), _cmp);
-	/* Rewire.  */
-	for (int i = 0; i < num - 1; ++i)
-		list[i]->next = list[i+1];
-	list[num - 1]->next = NULL;
-	first = list[0];
-	/* Check `first` to be ".".  */
-	assert (strcmp (first->name, ".") == 0);
-	/* Free.  */
-	free (list);
-	/* Dump sorted state.  */
-	if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
-		for (fsnode *tmp = first; tmp; tmp = tmp->next)
-			printf ("post sort: %s %s %s\n", root, dir, tmp->name);
-
-	return first;
+	return fsnode_sort(first, root, dir);
 }
 
 static fsnode *



CVS commit: src/usr.sbin/makefs

2024-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 24 14:02:39 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
make a separate sorting function and KNF (thanks rillig)


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/mtree

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 24 01:44:51 UTC 2024

Modified Files:
src/usr.sbin/mtree: create.c

Log Message:
For the NetBSD tools build we provide our own fts.h not FreeBSD's so the
comparator should have the NetBSD signature.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/mtree/create.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/mtree/create.c
diff -u src/usr.sbin/mtree/create.c:1.77 src/usr.sbin/mtree/create.c:1.78
--- src/usr.sbin/mtree/create.c:1.77	Sat Dec  2 08:34:48 2023
+++ src/usr.sbin/mtree/create.c	Tue Apr 23 21:44:51 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: create.c,v 1.77 2023/12/02 13:34:48 christos Exp $	*/
+/*	$NetBSD: create.c,v 1.78 2024/04/24 01:44:51 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)create.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: create.c,v 1.77 2023/12/02 13:34:48 christos Exp $");
+__RCSID("$NetBSD: create.c,v 1.78 2024/04/24 01:44:51 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -84,7 +84,7 @@ static uid_t uid;
 static mode_t mode;
 static u_long flags;
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(HAVE_NBTOOL_CONFIG_H)
 #define	FTS_CONST const
 #else
 #define	FTS_CONST



CVS commit: src/usr.sbin/mtree

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 24 01:44:51 UTC 2024

Modified Files:
src/usr.sbin/mtree: create.c

Log Message:
For the NetBSD tools build we provide our own fts.h not FreeBSD's so the
comparator should have the NetBSD signature.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.sbin/mtree/create.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/makefs

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:18:56 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
pass lint, simplify


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/walk.c
diff -u src/usr.sbin/makefs/walk.c:1.35 src/usr.sbin/makefs/walk.c:1.36
--- src/usr.sbin/makefs/walk.c:1.35	Tue Apr 23 18:12:48 2024
+++ src/usr.sbin/makefs/walk.c	Tue Apr 23 18:18:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: walk.c,v 1.35 2024/04/23 22:12:48 christos Exp $	*/
+/*	$NetBSD: walk.c,v 1.36 2024/04/23 22:18:56 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: walk.c,v 1.35 2024/04/23 22:12:48 christos Exp $");
+__RCSID("$NetBSD: walk.c,v 1.36 2024/04/23 22:18:56 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -73,16 +73,17 @@ static	fsinode	*link_check(fsinode *);
  *	as compared by `strcmp()`.
  */
 static int
-fsnode_cmp (const void *_left, const void *_right)
+fsnode_cmp(const void *vleft, const void *vright)
 {
-	const fsnode * const left  = *(const fsnode * const *)_left;
-	const fsnode * const right = *(const fsnode * const *)_right;
+	const fsnode * const *left  = vleft;
+	const fsnode * const *right = vright;
+	const char *lname = (*left)->name, *rname = (*right)->name;
 
-	if (strcmp (left->name, ".") == 0)
+	if (strcmp(lname, ".") == 0)
 		return -1;
-	if (strcmp (right->name, ".") == 0)
+	if (strcmp(rname, ".") == 0)
 		return 1;
-	return strcmp (left->name, right->name);
+	return strcmp(lname, rname);
 }
 
 /*
@@ -249,14 +250,14 @@ walk_dir(const char *root, const char *d
 cur->inode = curino;
 cur->inode->nlink++;
 if (debug & DEBUG_WALK_DIR_LINKCHECK)
-	printf("link_check: found [%llu, %llu]\n",
-	(unsigned long long)curino->st.st_dev,
-	(unsigned long long)curino->st.st_ino);
+	printf("link_check: found [%ju, %ju]\n",
+	(uintmax_t)curino->st.st_dev,
+	(uintmax_t)curino->st.st_ino);
 			}
 		}
 		if (S_ISLNK(cur->type)) {
 			char	slink[PATH_MAX+1];
-			int	llen;
+			ssize_t	llen;
 
 			llen = readlink(path, slink, sizeof(slink) - 1);
 			if (llen == -1)
@@ -594,9 +595,9 @@ apply_specentry(const char *dir, NODE *s
 	}
 		/* XXX: ignoring F_NLINK for now */
 	if (specnode->flags & F_SIZE) {
-		ASEPRINT("size", "%lld",
-		(long long)dirnode->inode->st.st_size,
-		(long long)specnode->st_size);
+		ASEPRINT("size", "%jd",
+		(intmax_t)dirnode->inode->st.st_size,
+		(intmax_t)specnode->st_size);
 		dirnode->inode->st.st_size = specnode->st_size;
 	}
 	if (specnode->flags & F_SLINK) {
@@ -629,13 +630,13 @@ apply_specentry(const char *dir, NODE *s
 		ASEPRINT("flags", "%#lX",
 		(unsigned long)dirnode->inode->st.st_flags,
 		(unsigned long)specnode->st_flags);
-		dirnode->inode->st.st_flags = specnode->st_flags;
+		dirnode->inode->st.st_flags = (unsigned int)specnode->st_flags;
 	}
 #endif
 	if (specnode->flags & F_DEV) {
-		ASEPRINT("rdev", "%#llx",
-		(unsigned long long)dirnode->inode->st.st_rdev,
-		(unsigned long long)specnode->st_rdev);
+		ASEPRINT("rdev", "%#jx",
+		(uintmax_t)dirnode->inode->st.st_rdev,
+		(uintmax_t)specnode->st_rdev);
 		dirnode->inode->st.st_rdev = specnode->st_rdev;
 	}
 #undef ASEPRINT
@@ -712,16 +713,16 @@ link_check(fsinode *entry)
 	static struct entry {
 		fsinode *data;
 	} *htable;
-	static int htshift;  /* log(allocated size) */
-	static int htmask;   /* allocated size - 1 */
-	static int htused;   /* 2*number of insertions */
-	int h, h2;
+	static size_t htshift;  /* log(allocated size) */
+	static size_t htmask;   /* allocated size - 1 */
+	static size_t htused;   /* 2*number of insertions */
+	size_t h, h2;
 	uint64_t tmp;
 	/* this constant is (1<<64)/((1+sqrt(5))/2)
 	 * aka (word size)/(golden ratio)
 	 */
 	const uint64_t HTCONST = 11400714819323198485ULL;
-	const int HTBITS = 64;
+	const size_t HTBITS = 64;
 
 	/* Never store zero in hashtable */
 	assert(entry);
@@ -742,8 +743,7 @@ link_check(fsinode *entry)
 		htable = ecalloc(htmask+1, sizeof(*htable));
 		/* populate newly allocated hashtable */
 		if (ohtable) {
-			int i;
-			for (i = 0; i <= htmask>>1; i++)
+			for (size_t i = 0; i <= htmask>>1; i++)
 if (ohtable[i].data)
 	link_check(ohtable[i].data);
 			free(ohtable);



CVS commit: src/usr.sbin/makefs

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:18:56 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
pass lint, simplify


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/makefs

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:12:48 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
makefs: Fix symlink permission bits

Permission bits for symlinks are taken straight from `lstat()`. However, the
actual bits presented to the user are filesystem/kernel specific. For example,
Linux with ext2/3/4 will use 0777 for symlinks, whereas NetBSD/FFS will
show 0755. As far as `makefs` is in the loop, the target filesystem will likely
be FFS, so use 0755.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/makefs

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:12:48 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
makefs: Fix symlink permission bits

Permission bits for symlinks are taken straight from `lstat()`. However, the
actual bits presented to the user are filesystem/kernel specific. For example,
Linux with ext2/3/4 will use 0777 for symlinks, whereas NetBSD/FFS will
show 0755. As far as `makefs` is in the loop, the target filesystem will likely
be FFS, so use 0755.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/walk.c
diff -u src/usr.sbin/makefs/walk.c:1.34 src/usr.sbin/makefs/walk.c:1.35
--- src/usr.sbin/makefs/walk.c:1.34	Tue Apr 23 18:12:16 2024
+++ src/usr.sbin/makefs/walk.c	Tue Apr 23 18:12:48 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: walk.c,v 1.34 2024/04/23 22:12:16 christos Exp $	*/
+/*	$NetBSD: walk.c,v 1.35 2024/04/23 22:12:48 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: walk.c,v 1.34 2024/04/23 22:12:16 christos Exp $");
+__RCSID("$NetBSD: walk.c,v 1.35 2024/04/23 22:12:48 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -154,6 +154,15 @@ walk_dir(const char *root, const char *d
 		} else {
 			if (lstat(path, ) == -1)
 err(EXIT_FAILURE, "Can't lstat `%s'", path);
+			/* As symlink permission bits vary between filesystems
+			   (ie. 0755 on FFS/NetBSD, 0777 for ext[234]/Linux),
+			   force them to 0755.  */
+			if (S_ISLNK(stbuf.st_mode)) {
+stbuf.st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
+stbuf.st_mode |= S_IRWXU
+ | S_IRGRP | S_IXGRP
+ | S_IROTH | S_IXOTH;
+			}
 		}
 #ifdef S_ISSOCK
 		if (S_ISSOCK(stbuf.st_mode & S_IFMT)) {



CVS commit: src/usr.sbin/makefs

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:12:16 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
makefs: Sort directory contents by name (Jan-Benedict Glaw)

`makefs` inserts nodes into its internal data structures in the order as
returned by `readdir()` calls. As this is unpredictable, sort entries by
name before creating the target filesystem.

  This is done by first converting the (per-directory) linked list into
a plain array, sort it, finally re-link the list. Special case for the
sorting function: The "." directory entry seems to be ment to be always
at the front, so always check that first.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/makefs

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:12:16 UTC 2024

Modified Files:
src/usr.sbin/makefs: walk.c

Log Message:
makefs: Sort directory contents by name (Jan-Benedict Glaw)

`makefs` inserts nodes into its internal data structures in the order as
returned by `readdir()` calls. As this is unpredictable, sort entries by
name before creating the target filesystem.

  This is done by first converting the (per-directory) linked list into
a plain array, sort it, finally re-link the list. Special case for the
sorting function: The "." directory entry seems to be ment to be always
at the front, so always check that first.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/walk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/walk.c
diff -u src/usr.sbin/makefs/walk.c:1.33 src/usr.sbin/makefs/walk.c:1.34
--- src/usr.sbin/makefs/walk.c:1.33	Thu Dec 28 07:13:55 2023
+++ src/usr.sbin/makefs/walk.c	Tue Apr 23 18:12:16 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: walk.c,v 1.33 2023/12/28 12:13:55 tsutsui Exp $	*/
+/*	$NetBSD: walk.c,v 1.34 2024/04/23 22:12:16 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: walk.c,v 1.33 2023/12/28 12:13:55 tsutsui Exp $");
+__RCSID("$NetBSD: walk.c,v 1.34 2024/04/23 22:12:16 christos Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -66,6 +66,24 @@ static	fsnode	*create_fsnode(const char 
 			   struct stat *);
 static	fsinode	*link_check(fsinode *);
 
+/*
+ * fsnode_cmp --
+ *	This function is used by `qsort` so sort one directory's
+ *	entries.  `.` is always first, sollowed by anything else
+ *	as compared by `strcmp()`.
+ */
+static int
+fsnode_cmp (const void *_left, const void *_right)
+{
+	const fsnode * const left  = *(const fsnode * const *)_left;
+	const fsnode * const right = *(const fsnode * const *)_right;
+
+	if (strcmp (left->name, ".") == 0)
+		return -1;
+	if (strcmp (right->name, ".") == 0)
+		return 1;
+	return strcmp (left->name, right->name);
+}
 
 /*
  * walk_dir --
@@ -87,6 +105,9 @@ walk_dir(const char *root, const char *d
 	char		*name, *rp;
 	int		dot, len;
 
+	fsnode **list, **listptr;
+	int num = 0;
+
 	assert(root != NULL);
 	assert(dir != NULL);
 
@@ -241,7 +262,36 @@ walk_dir(const char *root, const char *d
 			cur->first = first;
 	if (closedir(dirp) == -1)
 		err(EXIT_FAILURE, "Can't closedir `%s/%s'", root, dir);
-	return (first);
+
+	/*
+	 * Sort entries.
+	 */
+	/* Create a plain list: Count, alloc, add.  */
+	for (fsnode *tmp = first; tmp; tmp = tmp->next) {
+		num++;
+		if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
+			printf ("pre sort: %s %s %s\n", root, dir, tmp->name);
+	}
+	list = listptr = ecalloc (num, sizeof (*list));
+	for (fsnode *tmp = first; tmp; tmp = tmp->next)
+		*listptr++ = tmp;
+	/* Sort plain list.  */
+	qsort (list, num, sizeof (*list), _cmp);
+	/* Rewire.  */
+	for (int i = 0; i < num - 1; ++i)
+		list[i]->next = list[i+1];
+	list[num - 1]->next = NULL;
+	first = list[0];
+	/* Check `first` to be ".".  */
+	assert (strcmp (first->name, ".") == 0);
+	/* Free.  */
+	free (list);
+	/* Dump sorted state.  */
+	if (debug & DEBUG_DUMP_FSNODES_VERBOSE)
+		for (fsnode *tmp = first; tmp; tmp = tmp->next)
+			printf ("post sort: %s %s %s\n", root, dir, tmp->name);
+
+	return first;
 }
 
 static fsnode *



CVS commit: src/distrib/vax/floppy

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:00:37 UTC 2024

Modified Files:
src/distrib/vax/floppy: Makefile

Log Message:
VAX boot.fs: Fix owner/group/permissions for VAX's boot.fs (Jan-Benedict Glaw)

(Initial patch from Christos Zoulas.)  Don't create an archive based on local
permission bits and owner/group. Instead, feed a small manifest into `pax`
and let it to its work.

  NB: Don't also feed in an entry for the current directory ".", as `pax` will
then archive all files in the current directory, in `readdir()` order.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/vax/floppy/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/vax/floppy/Makefile
diff -u src/distrib/vax/floppy/Makefile:1.14 src/distrib/vax/floppy/Makefile:1.15
--- src/distrib/vax/floppy/Makefile:1.14	Fri Feb 10 22:07:06 2017
+++ src/distrib/vax/floppy/Makefile	Tue Apr 23 18:00:37 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2017/02/11 03:07:06 christos Exp $
+#	$NetBSD: Makefile,v 1.15 2024/04/23 22:00:37 christos Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -29,7 +29,10 @@ boot.vax: ${DESTDIR}/usr/mdec/boot
 
 ${IMAGE}: ${IMAGEDEPENDS}
 	cat ${XXBOOT} > ${IMAGE}.tmp
-	${TOOL_PAX} ${PAX_TIMESTAMP} -O -w -x ustar boot.vax netbsd.gz | dd of=${IMAGE}.tmp seek=16
+	(echo "./boot.vax type=file uname=root gname=wheel mode=0755"; \
+	 echo "./netbsd.gz type=file uname=root gname=wheel mode=0644") | \
+		${TOOL_PAX} ${PAX_TIMESTAMP} -O -w -x ustar -M | \
+		dd of=${IMAGE}.tmp seek=16
 	dd if=${IMAGE}.tmp of=${IMAGE} bs=${IMAGESIZE} conv=sync
 
 release: check_RELEASEDIR .WAIT ${IMAGE}



CVS commit: src/distrib/vax/floppy

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 22:00:37 UTC 2024

Modified Files:
src/distrib/vax/floppy: Makefile

Log Message:
VAX boot.fs: Fix owner/group/permissions for VAX's boot.fs (Jan-Benedict Glaw)

(Initial patch from Christos Zoulas.)  Don't create an archive based on local
permission bits and owner/group. Instead, feed a small manifest into `pax`
and let it to its work.

  NB: Don't also feed in an entry for the current directory ".", as `pax` will
then archive all files in the current directory, in `readdir()` order.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/vax/floppy/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 21:58:57 UTC 2024

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
`nm`: Generate a stable symbol table (Jan-Benedict Glaw)

Release artifacts may contain symbol lists. Binutils's `nm` sorts them by
symbol name, locale based. Inserting a plain `sort` (with `LC_ALL=C`) here
sorts them by address, and (with several symbols pointing to the same address)
sorting by name is also stable (think of embedded '_'.)


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/distrib/common/Makefile.mdset

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/Makefile.mdset
diff -u src/distrib/common/Makefile.mdset:1.46 src/distrib/common/Makefile.mdset:1.47
--- src/distrib/common/Makefile.mdset:1.46	Mon Aug 12 04:04:28 2019
+++ src/distrib/common/Makefile.mdset	Tue Apr 23 17:58:57 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.mdset,v 1.46 2019/08/12 08:04:28 martin Exp $
+#	$NetBSD: Makefile.mdset,v 1.47 2024/04/23 21:58:57 christos Exp $
 #
 # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels
 #
@@ -149,7 +149,7 @@ ${_KERNEL.${_K}.${_F}}: .NOTMAIN ${_KERN
 	${TOOL_MDSETIMAGE} ${MDSETIMAGEFLAGS} ${.TARGET}.tmp ${_I}
 .endif
 .if !defined(MDSET_NOSYMBOLS.${_FILENAME}) && !defined(MDSET_NOSYMBOLS)
-	${NM} ${.TARGET}.tmp | ${TOOL_GZIP_N} -9 > ${.TARGET}.symbols.gz
+	${NM} ${.TARGET}.tmp | LC_ALL=C sort | ${TOOL_GZIP_N} -9 > ${.TARGET}.symbols.gz
 .endif
 .if !defined(MDSET_NOSTRIP.${_FILENAME}) && !defined(MDSET_NOSTRIP)
 	${STRIP} -R .eh_frame -R .eh_frame_hdr -R .comment -R .ident ${MDSET_STRIPSECTIONS} ${.TARGET}.tmp



CVS commit: src/distrib/common

2024-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 23 21:58:57 UTC 2024

Modified Files:
src/distrib/common: Makefile.mdset

Log Message:
`nm`: Generate a stable symbol table (Jan-Benedict Glaw)

Release artifacts may contain symbol lists. Binutils's `nm` sorts them by
symbol name, locale based. Inserting a plain `sort` (with `LC_ALL=C`) here
sorts them by address, and (with several symbols pointing to the same address)
sorting by name is also stable (think of embedded '_'.)


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/distrib/common/Makefile.mdset

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mpl/bind/dist/lib/ns

2024-04-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 19 12:35:28 UTC 2024

Modified Files:
src/external/mpl/bind/dist/lib/ns: query.c

Log Message:
PR/58170: Yoshitaka Tokugawa: Remove blocking statement when the requestor
asks for for an address that is in the cache and that access is prevented
by a cache acl because the querier has no way to know that this access is
denied, so it is not an abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/mpl/bind/dist/lib/ns/query.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mpl/bind/dist/lib/ns

2024-04-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 19 12:35:28 UTC 2024

Modified Files:
src/external/mpl/bind/dist/lib/ns: query.c

Log Message:
PR/58170: Yoshitaka Tokugawa: Remove blocking statement when the requestor
asks for for an address that is in the cache and that access is prevented
by a cache acl because the querier has no way to know that this access is
denied, so it is not an abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/mpl/bind/dist/lib/ns/query.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mpl/bind/dist/lib/ns/query.c
diff -u src/external/mpl/bind/dist/lib/ns/query.c:1.20 src/external/mpl/bind/dist/lib/ns/query.c:1.21
--- src/external/mpl/bind/dist/lib/ns/query.c:1.20	Wed Feb 21 17:52:46 2024
+++ src/external/mpl/bind/dist/lib/ns/query.c	Fri Apr 19 08:35:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.20 2024/02/21 22:52:46 christos Exp $	*/
+/*	$NetBSD: query.c,v 1.21 2024/04/19 12:35:28 christos Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -909,7 +909,6 @@ query_checkcacheaccess(ns_client_t *clie
 	  msg);
 			}
 		} else {
-			pfilter_notify(result, client, "checkcacheaccess");
 			/*
 			 * We were denied by the "allow-query-cache" ACL.
 			 * There is no need to clear NS_QUERYATTR_CACHEACLOK



CVS commit: src/distrib/sets/lists/base32

2024-04-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 17 13:23:33 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.mipsn64eb ad.mipsn64el ad.riscv64

Log Message:
more plugin set fixes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.mipsn64eb \
src/distrib/sets/lists/base32/ad.mipsn64el
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/base32/ad.riscv64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/base32

2024-04-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Apr 17 13:23:33 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.mipsn64eb ad.mipsn64el ad.riscv64

Log Message:
more plugin set fixes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/ad.mipsn64eb \
src/distrib/sets/lists/base32/ad.mipsn64el
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/base32/ad.riscv64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base32/ad.mipsn64eb
diff -u src/distrib/sets/lists/base32/ad.mipsn64eb:1.4 src/distrib/sets/lists/base32/ad.mipsn64eb:1.5
--- src/distrib/sets/lists/base32/ad.mipsn64eb:1.4	Tue Apr 16 10:15:53 2024
+++ src/distrib/sets/lists/base32/ad.mipsn64eb	Wed Apr 17 09:23:32 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mipsn64eb,v 1.4 2024/04/16 14:15:53 martin Exp $
+# $NetBSD: ad.mipsn64eb,v 1.5 2024/04/17 13:23:32 christos Exp $
 ./lib/n32	base-compat-shlib	compat
 ./lib/n32/npf	base-compat-shlib	compat,npf
 ./lib/n32/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -493,6 +493,8 @@
 ./usr/lib/n32/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/n32/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/n32/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/n32/namedbase-compat-shlib	compat
+./usr/lib/n32/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/n32/opensslbase-crypto-usr		compat
 ./usr/lib/n32/openssl/engines			base-crypto-usr		compat
 ./usr/lib/n32/openssl/engines/dasync.so	base-crypto-usr		compat,pic,openssl=30
@@ -996,6 +998,8 @@
 ./usr/lib/o32/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/o32/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/o32/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/o32/namedbase-compat-shlib	compat
+./usr/lib/o32/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/o32/opensslbase-crypto-usr		compat
 ./usr/lib/o32/openssl/engines			base-crypto-usr		compat
 ./usr/lib/o32/openssl/engines/dasync.so	base-crypto-usr		compat,pic,openssl=30
@@ -1035,9 +1039,11 @@
 ./usr/libdata/debug/lib/o32/npf		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/n32		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/n32/i18n		base-compat-shlib	compat
+./usr/libdata/debug/usr/lib/n32/named		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/n32/security		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/o32		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/o32/i18n		base-compat-shlib	compat
+./usr/libdata/debug/usr/lib/o32/named		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/o32/security	base-compat-shlib	compat
 ./usr/libexec/ld.elf_so-n32			base-sys-shlib		compat,pic
 ./usr/libexec/ld.elf_so-o32			base-sys-shlib		compat,pic
Index: src/distrib/sets/lists/base32/ad.mipsn64el
diff -u src/distrib/sets/lists/base32/ad.mipsn64el:1.4 src/distrib/sets/lists/base32/ad.mipsn64el:1.5
--- src/distrib/sets/lists/base32/ad.mipsn64el:1.4	Tue Apr 16 10:15:53 2024
+++ src/distrib/sets/lists/base32/ad.mipsn64el	Wed Apr 17 09:23:32 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mipsn64el,v 1.4 2024/04/16 14:15:53 martin Exp $
+# $NetBSD: ad.mipsn64el,v 1.5 2024/04/17 13:23:32 christos Exp $
 ./lib/n32	base-compat-shlib	compat
 ./lib/n32/npf	base-compat-shlib	compat,npf
 ./lib/n32/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -493,6 +493,8 @@
 ./usr/lib/n32/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/n32/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/n32/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/n32/namedbase-compat-shlib	compat
+./usr/lib/n32/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/n32/opensslbase-crypto-usr		compat
 ./usr/lib/n32/openssl/engines			base-crypto-usr		compat
 ./usr/lib/n32/openssl/engines/dasync.so	base-crypto-usr		compat,pic,openssl=30
@@ -996,6 +998,8 @@
 ./usr/lib/o32/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/o32/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/o32/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/o32/namedbase-compat-shlib	compat
+./usr/lib/o32/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/o32/opensslbase-crypto-usr		compat
 ./usr/lib/o32/openssl/engines			base-crypto-usr		compat
 ./usr/lib/o32/openssl/engines/dasync.so	base-crypto-usr		compat,pic,openssl=30
@@ -1035,9 +1039,11 @@
 ./usr/libdata/debug/lib/o32/npf		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/n32		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/n32/i18n		base-compat-shlib	compat
+./usr/libdata/debug/usr/lib/n32/named		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/n32/security		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/o32		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/o32/i18n		base-compat-shlib	compat
+./usr/libdata/debug/usr/lib/o32/named		base-compat-shlib	compat
 

CVS commit: src/external/gpl2/texinfo/dist/makeinfo

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:43:08 UTC 2024

Modified Files:
src/external/gpl2/texinfo/dist/makeinfo: index.c

Log Message:
Add comparison function so that it can be used to provide a stable sort
(Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/texinfo/dist/makeinfo/index.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl2/texinfo/dist/makeinfo/index.c
diff -u src/external/gpl2/texinfo/dist/makeinfo/index.c:1.1.1.1 src/external/gpl2/texinfo/dist/makeinfo/index.c:1.2
--- src/external/gpl2/texinfo/dist/makeinfo/index.c:1.1.1.1	Wed Jan 13 19:11:29 2016
+++ src/external/gpl2/texinfo/dist/makeinfo/index.c	Tue Apr 16 19:43:08 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: index.c,v 1.1.1.1 2016/01/14 00:11:29 christos Exp $	*/
+/*	$NetBSD: index.c,v 1.2 2024/04/16 23:43:08 christos Exp $	*/
 
 /* index.c -- indexing for Texinfo.
Id: index.c,v 1.17 2004/11/30 02:03:23 karl Exp 
@@ -511,8 +511,30 @@ index_element_compare (const void *eleme
 {
   INDEX_ELT **elt1 = (INDEX_ELT **) element1;
   INDEX_ELT **elt2 = (INDEX_ELT **) element2;
+  int ret = 0;
 
-  return index_compare_fn ((*elt1)->entry, (*elt2)->entry);
+  /* Find a stable sort order.  */
+  if (ret == 0)
+ret = index_compare_fn ((*elt1)->entry, (*elt2)->entry);
+  if (ret == 0)
+ret = strcmp ((*elt1)->defining_file, (*elt2)->defining_file);
+  if (ret == 0)
+ret = strcmp ((*elt1)->node, (*elt2)->node);
+  if (ret == 0)
+if ((*elt1)->defining_line < (*elt2)->defining_line)
+  ret = -1;
+else if ((*elt1)->defining_line > (*elt2)->defining_line)
+  ret = 1;
+  if (ret == 0)
+if ((*elt1)->entry_number < (*elt2)->entry_number)
+  ret = -1;
+else if ((*elt1)->entry_number > (*elt2)->entry_number)
+  ret = 1;
+  if (ret == 0) {
+abort ();
+  }
+
+  return ret;
 }
 
 /* Force all index entries to be unique. */



CVS commit: src/external/gpl2/texinfo/dist/makeinfo

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:43:08 UTC 2024

Modified Files:
src/external/gpl2/texinfo/dist/makeinfo: index.c

Log Message:
Add comparison function so that it can be used to provide a stable sort
(Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/texinfo/dist/makeinfo/index.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:40:36 UTC 2024

Modified Files:
src/distrib/common: parselist.awk

Log Message:
Set LC_ALL=C before calling sort so that it works consistently. Unfortunately
ENVIRON["LC_ALL"] = "C"; does not work like in gawk (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/common/parselist.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/common

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:40:36 UTC 2024

Modified Files:
src/distrib/common: parselist.awk

Log Message:
Set LC_ALL=C before calling sort so that it works consistently. Unfortunately
ENVIRON["LC_ALL"] = "C"; does not work like in gawk (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/common/parselist.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/common/parselist.awk
diff -u src/distrib/common/parselist.awk:1.16 src/distrib/common/parselist.awk:1.17
--- src/distrib/common/parselist.awk:1.16	Fri Apr 10 12:16:12 2009
+++ src/distrib/common/parselist.awk	Tue Apr 16 19:40:36 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: parselist.awk,v 1.16 2009/04/10 16:16:12 apb Exp $
+#	$NetBSD: parselist.awk,v 1.17 2024/04/16 23:40:36 christos Exp $
 #
 # Copyright (c) 2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -177,7 +177,7 @@ $1 == "COPYDIR" \
 	destdir=$3;
 	if (mode == "mtree") {
 		printf("./%s type=dir mode=755\n", destdir);
-		command="cd " srcdir " && find . -type d -print"
+		command="cd " srcdir " && find . -type d -print | LC_ALL=C sort"
 		while (command | getline dir) {
 			gsub(/^\.\//, "", dir);
 			if (dir == ".")
@@ -187,7 +187,7 @@ $1 == "COPYDIR" \
 		close(command);
 	}
 	if (mode == "install" || mode == "mtree" || mode == "populate") {
-		command="cd " srcdir " && find . -type f -print"
+		command="cd " srcdir " && find . -type f -print | LC_ALL=C sort"
 		while (command | getline srcfile) {
 			gsub(/^\.\//, "", srcfile);
 			copy(srcdir "/" srcfile, destdir "/" srcfile, "");



CVS commit: src/bin/sh

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:30:19 UTC 2024

Modified Files:
src/bin/sh: mkoptions.sh

Log Message:
Be more explicit with sort fields to produce consistent results with gnu
sort (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/bin/sh/mkoptions.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/mkoptions.sh
diff -u src/bin/sh/mkoptions.sh:1.7 src/bin/sh/mkoptions.sh:1.8
--- src/bin/sh/mkoptions.sh:1.7	Sat Apr  6 10:20:27 2024
+++ src/bin/sh/mkoptions.sh	Tue Apr 16 19:30:19 2024
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mkoptions.sh,v 1.7 2024/04/06 14:20:27 kre Exp $
+# $NetBSD: mkoptions.sh,v 1.8 2024/04/16 23:30:19 christos Exp $
 
 #
 # It would be more sensible to generate 2 .h files, one which
@@ -52,8 +52,8 @@ ${SED:-sed} <"${IF}"			\
 	-e '/^#/d'			\
 	-e '/^[ 	]*\//d'		\
 	-e '/^[ 	]*\*/d'		\
-	-e '/^[ 	]*;/d'			|
-sort -b -k2,2f -k2,2|
+	-e '/^[ 	]*;/d'		|
+sort -k2b,2f -k2b,2			|
 while read line
 do
 	# Look for comments in various styles, and ignore them



CVS commit: src/bin/sh

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 23:30:19 UTC 2024

Modified Files:
src/bin/sh: mkoptions.sh

Log Message:
Be more explicit with sort fields to produce consistent results with gnu
sort (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/bin/sh/mkoptions.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 19:15:37 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el
ad.powerpc64 ad.riscv64 md.amd64 md.sparc64
src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/etc/mtree: NetBSD.dist.compat.in
src/external/mpl/bind/lib/plugins: Makefile

Log Message:
fix compat build of filter-.so.0


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/base32/ad.aarch64 \
src/distrib/sets/lists/base32/ad.mips64eb \
src/distrib/sets/lists/base32/ad.mips64el \
src/distrib/sets/lists/base32/ad.powerpc64 \
src/distrib/sets/lists/base32/ad.riscv64 \
src/distrib/sets/lists/base32/md.sparc64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/md.amd64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/debug32/ad.aarch64 \
src/distrib/sets/lists/debug32/ad.mips64eb \
src/distrib/sets/lists/debug32/ad.mips64el \
src/distrib/sets/lists/debug32/ad.powerpc64 \
src/distrib/sets/lists/debug32/ad.riscv64 \
src/distrib/sets/lists/debug32/md.sparc64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug32/ad.mipsn64eb \
src/distrib/sets/lists/debug32/ad.mipsn64el
cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/debug32/md.amd64
cvs rdiff -u -r1.7 -r1.8 src/etc/mtree/NetBSD.dist.compat.in
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/lib/plugins/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base32/ad.aarch64
diff -u src/distrib/sets/lists/base32/ad.aarch64:1.2 src/distrib/sets/lists/base32/ad.aarch64:1.3
--- src/distrib/sets/lists/base32/ad.aarch64:1.2	Sat Apr 13 04:50:18 2024
+++ src/distrib/sets/lists/base32/ad.aarch64	Tue Apr 16 15:15:36 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.2 2024/04/13 08:50:18 nakayama Exp $
+# $NetBSD: ad.aarch64,v 1.3 2024/04/16 19:15:36 christos Exp $
 ./lib/eabi	base-compat-shlib	compat
 ./lib/eabi/npf	base-compat-shlib	compat,npf
 ./lib/eabi/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -490,6 +490,8 @@
 ./usr/lib/eabi/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/eabi/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/eabi/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/eabi/namedbase-compat-shlib	compat
+./usr/lib/eabi/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/eabi/opensslbase-crypto-usr		compat
 ./usr/lib/eabi/openssl/engines			base-crypto-usr		compat
 ./usr/lib/eabi/openssl/engines/dasync.so	base-crypto-usr		compat,pic,openssl=30
@@ -990,6 +992,8 @@
 ./usr/lib/eabihf/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/eabihf/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/eabihf/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/eabihf/namedbase-compat-shlib	compat
+./usr/lib/eabihf/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/eabihf/opensslbase-crypto-usr		compat
 ./usr/lib/eabihf/openssl/engines			base-crypto-usr		compat
 ./usr/lib/eabihf/openssl/engines/dasync.so	base-crypto-usr		compat,pic,openssl=30
@@ -1029,9 +1033,11 @@
 ./usr/libdata/debug/lib/eabihf/npf		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/eabi		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/eabi/i18n		base-compat-shlib	compat
+./usr/libdata/debug/usr/lib/eabi/named		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/eabi/security	base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/eabihf		base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/eabihf/i18n		base-compat-shlib	compat
+./usr/libdata/debug/usr/lib/eabihf/named	base-compat-shlib	compat
 ./usr/libdata/debug/usr/lib/eabihf/security	base-compat-shlib	compat
 ./usr/libexec/ld.elf_so-eabi			base-sys-shlib		compat,pic
 ./usr/libexec/ld.elf_so-eabihf			base-sys-shlib		compat,pic
Index: src/distrib/sets/lists/base32/ad.mips64eb
diff -u src/distrib/sets/lists/base32/ad.mips64eb:1.2 src/distrib/sets/lists/base32/ad.mips64eb:1.3
--- src/distrib/sets/lists/base32/ad.mips64eb:1.2	Sat Apr 13 04:50:19 2024
+++ src/distrib/sets/lists/base32/ad.mips64eb	Tue Apr 16 15:15:36 2024
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.2 2024/04/13 08:50:19 nakayama Exp $
+# $NetBSD: ad.mips64eb,v 1.3 2024/04/16 19:15:36 christos Exp $
 ./lib/64	base-compat-shlib	compat
 ./lib/64/npf	base-compat-shlib	compat,npf
 ./lib/64/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -493,6 +493,8 @@
 ./usr/lib/64/lua/5.4/netpgp.so		base-compat-shlib	compat
 ./usr/lib/64/lua/5.4/sqlite.so		base-compat-shlib	compat
 ./usr/lib/64/lua/5.4/syslog.so		base-compat-shlib	compat
+./usr/lib/64/namedbase-compat-shlib	compat
+./usr/lib/64/named/filter-.so.0		base-compat-shlib	compat
 ./usr/lib/64/opensslbase-crypto-usr		compat
 

CVS commit: src

2024-04-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 16 19:15:37 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el
ad.powerpc64 ad.riscv64 md.amd64 md.sparc64
src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el
ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64
md.sparc64
src/etc/mtree: NetBSD.dist.compat.in
src/external/mpl/bind/lib/plugins: Makefile

Log Message:
fix compat build of filter-.so.0


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/base32/ad.aarch64 \
src/distrib/sets/lists/base32/ad.mips64eb \
src/distrib/sets/lists/base32/ad.mips64el \
src/distrib/sets/lists/base32/ad.powerpc64 \
src/distrib/sets/lists/base32/ad.riscv64 \
src/distrib/sets/lists/base32/md.sparc64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/base32/md.amd64
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/debug32/ad.aarch64 \
src/distrib/sets/lists/debug32/ad.mips64eb \
src/distrib/sets/lists/debug32/ad.mips64el \
src/distrib/sets/lists/debug32/ad.powerpc64 \
src/distrib/sets/lists/debug32/ad.riscv64 \
src/distrib/sets/lists/debug32/md.sparc64
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug32/ad.mipsn64eb \
src/distrib/sets/lists/debug32/ad.mipsn64el
cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/debug32/md.amd64
cvs rdiff -u -r1.7 -r1.8 src/etc/mtree/NetBSD.dist.compat.in
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/lib/plugins/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mpl/bind/lib/plugins

2024-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 17:22:33 UTC 2024

Modified Files:
src/external/mpl/bind/lib/plugins: Makefile

Log Message:
Don't build/install the compat plugin.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/lib/plugins/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mpl/bind/lib/plugins/Makefile
diff -u src/external/mpl/bind/lib/plugins/Makefile:1.5 src/external/mpl/bind/lib/plugins/Makefile:1.6
--- src/external/mpl/bind/lib/plugins/Makefile:1.5	Thu Apr  4 21:16:01 2024
+++ src/external/mpl/bind/lib/plugins/Makefile	Sat Apr 13 13:22:33 2024
@@ -1,10 +1,12 @@
-#	$NetBSD: Makefile,v 1.5 2024/04/05 01:16:01 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2024/04/13 17:22:33 christos Exp $
 
 LIBISMODULE=	yes
 MAKELINKLIB=	no
+.include 
+
+.if !defined(MLIBDIR)
 LIB=	filter-
 
-.include 
 
 SHLIB_MAJOR=0
 SRCS=	filter-.c
@@ -13,5 +15,6 @@ LIBDIR=	/usr/lib/named
 DIST=${IDIST}/bin/plugins
 
 .PATH: ${DIST}
+.endif
 
 .include 



CVS commit: src/external/mpl/bind/lib/plugins

2024-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 17:22:33 UTC 2024

Modified Files:
src/external/mpl/bind/lib/plugins: Makefile

Log Message:
Don't build/install the compat plugin.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/lib/plugins/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libintl

2024-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 02:01:38 UTC 2024

Modified Files:
src/lib/libintl: gettext.c

Log Message:
PR/58136: Paul Ripke: Fix use after free.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libintl/gettext.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libintl/gettext.c
diff -u src/lib/libintl/gettext.c:1.31 src/lib/libintl/gettext.c:1.32
--- src/lib/libintl/gettext.c:1.31	Thu Oct  3 12:35:57 2019
+++ src/lib/libintl/gettext.c	Fri Apr 12 22:01:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: gettext.c,v 1.31 2019/10/03 16:35:57 christos Exp $	*/
+/*	$NetBSD: gettext.c,v 1.32 2024/04/13 02:01:38 christos Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 Citrus Project,
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: gettext.c,v 1.31 2019/10/03 16:35:57 christos Exp $");
+__RCSID("$NetBSD: gettext.c,v 1.32 2024/04/13 02:01:38 christos Exp $");
 
 #include 
 #include 
@@ -176,6 +176,9 @@ pgettext_impl(const char *domainname, co
 		msgid2, n, category);
 	free(msgctxt_id);
 
+	if (translation == msgctxt_id)
+		return msgid1;
+
 	p = strchr(translation, '\004');
 	if (p)
 		return p + 1;



CVS commit: src/lib/libintl

2024-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 02:01:38 UTC 2024

Modified Files:
src/lib/libintl: gettext.c

Log Message:
PR/58136: Paul Ripke: Fix use after free.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libintl/gettext.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2024-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 11 19:12:11 UTC 2024

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
fix previous. Doing assignmnents of conditionals does not work for being
used as conditionals (thanks rillig@)


To generate a diff of this commit:
cvs rdiff -u -r1.401 -r1.402 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2024-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 11 19:12:11 UTC 2024

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
fix previous. Doing assignmnents of conditionals does not work for being
used as conditionals (thanks rillig@)


To generate a diff of this commit:
cvs rdiff -u -r1.401 -r1.402 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.401 src/share/mk/bsd.lib.mk:1.402
--- src/share/mk/bsd.lib.mk:1.401	Tue Apr  9 18:37:23 2024
+++ src/share/mk/bsd.lib.mk	Thu Apr 11 15:12:11 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.401 2024/04/09 22:37:23 christos Exp $
+#	$NetBSD: bsd.lib.mk,v 1.402 2024/04/11 19:12:11 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include 
@@ -425,11 +425,15 @@ _DEST.LINT:=${DESTDIR}${LINTLIBDIR}
 _DEST.DEBUG:=${DESTDIR}${DEBUGDIR}${LIBDIR}
 _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR}
 
-_BUILDSTATICLIB= ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
+.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
 || ${MAKELINKLIB} != "no" || ${MAKESTATICLIB} != "no"
+_BUILDSTATICLIB=yes
+.else
+_BUILDSTATICLIB=no
+.endif
 
 .if defined(LIB)			# {
-.if ${_BUILDSTATICLIB}
+.if ${_BUILDSTATICLIB} != "no"
 _LIBS=${_LIB.a}
 .else
 _LIBS=
@@ -484,7 +488,7 @@ _LIBS+=${_LIB.ln}
 .endif
 
 ALLOBJS=
-.if ${_BUILDSTATICLIB}
+.if ${_BUILDSTATICLIB} != "no"
 ALLOBJS+=${STOBJS}
 .endif
 ALLOBJS+=${POBJS} ${SOBJS}



CVS commit: src/lib/libc/rpc

2024-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 11 18:41:03 UTC 2024

Modified Files:
src/lib/libc/rpc: xdr_float.c

Log Message:
avoid lint warning on the vax


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/rpc/xdr_float.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/rpc/xdr_float.c
diff -u src/lib/libc/rpc/xdr_float.c:1.41 src/lib/libc/rpc/xdr_float.c:1.42
--- src/lib/libc/rpc/xdr_float.c:1.41	Mon Feb 15 06:07:48 2016
+++ src/lib/libc/rpc/xdr_float.c	Thu Apr 11 14:41:03 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: xdr_float.c,v 1.41 2016/02/15 11:07:48 martin Exp $	*/
+/*	$NetBSD: xdr_float.c,v 1.42 2024/04/11 18:41:03 christos Exp $	*/
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -37,7 +37,7 @@
 static char *sccsid = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)xdr_float.c	2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: xdr_float.c,v 1.41 2016/02/15 11:07:48 martin Exp $");
+__RCSID("$NetBSD: xdr_float.c,v 1.42 2024/04/11 18:41:03 christos Exp $");
 #endif
 #endif
 
@@ -254,6 +254,7 @@ xdr_double(XDR *xdrs, double *dp)
 goto shipit;
 			}
 		}
+		/*LINTED: possible overflow*/
 		id.exp = vd.exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;
 		id.mantissa1 = (vd.mantissa1 << 13) |
 			((unsigned int)vd.mantissa2 >> 3);
@@ -296,6 +297,7 @@ xdr_double(XDR *xdrs, double *dp)
 goto doneit;
 			}
 		}
+		/*LINTED: can overflow */
 		vd.exp = id.exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;
 		vd.mantissa1 = ((unsigned int)id.mantissa1 >> 13);
 		vd.mantissa2 = ((id.mantissa1 & MASK(13)) << 3) |



CVS commit: src/lib/libc/rpc

2024-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 11 18:41:03 UTC 2024

Modified Files:
src/lib/libc/rpc: xdr_float.c

Log Message:
avoid lint warning on the vax


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/rpc/xdr_float.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mit/libuv/lib

2024-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  9 22:38:17 UTC 2024

Modified Files:
src/external/mit/libuv/lib: Makefile

Log Message:
Now that the bug in bsd.lib.mk, MAKELINKLIB is not needed anymore (as it
should not be). Pointed out by kre@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mit/libuv/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mit/libuv/lib

2024-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  9 22:38:17 UTC 2024

Modified Files:
src/external/mit/libuv/lib: Makefile

Log Message:
Now that the bug in bsd.lib.mk, MAKELINKLIB is not needed anymore (as it
should not be). Pointed out by kre@


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/mit/libuv/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/libuv/lib/Makefile
diff -u src/external/mit/libuv/lib/Makefile:1.9 src/external/mit/libuv/lib/Makefile:1.10
--- src/external/mit/libuv/lib/Makefile:1.9	Fri Apr  5 08:03:24 2024
+++ src/external/mit/libuv/lib/Makefile	Tue Apr  9 18:38:17 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2024/04/05 12:03:24 kre Exp $
+# $NetBSD: Makefile,v 1.10 2024/04/09 22:38:17 christos Exp $
 
 LIBISPRIVATE=pic
 
@@ -8,7 +8,6 @@ MKLINT=	no
 LIB=	uv
 
 MAKESTATICLIB=yes
-MAKELINKLIB=yes
 
 .if ${LIBISPRIVATE:Uno} == "no"
 INCS=	uv.h uv/unix.h uv/bsd.h uv/errno.h uv/version.h uv/threadpool.h



CVS commit: src/share/mk

2024-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  9 22:37:23 UTC 2024

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
Merge two identical if's and fix a logic error in them ( && instead of ||)


To generate a diff of this commit:
cvs rdiff -u -r1.400 -r1.401 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.400 src/share/mk/bsd.lib.mk:1.401
--- src/share/mk/bsd.lib.mk:1.400	Thu Apr  4 21:16:00 2024
+++ src/share/mk/bsd.lib.mk	Tue Apr  9 18:37:23 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.400 2024/04/05 01:16:00 christos Exp $
+#	$NetBSD: bsd.lib.mk,v 1.401 2024/04/09 22:37:23 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include 
@@ -425,9 +425,11 @@ _DEST.LINT:=${DESTDIR}${LINTLIBDIR}
 _DEST.DEBUG:=${DESTDIR}${DEBUGDIR}${LIBDIR}
 _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR}
 
+_BUILDSTATICLIB= ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
+|| ${MAKELINKLIB} != "no" || ${MAKESTATICLIB} != "no"
+
 .if defined(LIB)			# {
-.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
-	|| ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no"
+.if ${_BUILDSTATICLIB}
 _LIBS=${_LIB.a}
 .else
 _LIBS=
@@ -482,8 +484,7 @@ _LIBS+=${_LIB.ln}
 .endif
 
 ALLOBJS=
-.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
-	|| ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no"
+.if ${_BUILDSTATICLIB}
 ALLOBJS+=${STOBJS}
 .endif
 ALLOBJS+=${POBJS} ${SOBJS}



CVS commit: src/share/mk

2024-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr  9 22:37:23 UTC 2024

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
Merge two identical if's and fix a logic error in them ( && instead of ||)


To generate a diff of this commit:
cvs rdiff -u -r1.400 -r1.401 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/mtree

2024-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  8 12:38:59 UTC 2024

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
kre says this should be obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/mtree

2024-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  8 12:38:59 UTC 2024

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
kre says this should be obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.258 src/etc/mtree/NetBSD.dist.base:1.259
--- src/etc/mtree/NetBSD.dist.base:1.258	Mon Apr  8 08:32:15 2024
+++ src/etc/mtree/NetBSD.dist.base	Mon Apr  8 08:38:59 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.258 2024/04/08 12:32:15 christos Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.259 2024/04/08 12:38:59 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1451,7 +1451,6 @@
 ./var/preserve
 ./var/quotas			gname=operator mode=0750
 ./var/run
-./var/run/named			mode=0775 uname=named gname=named
 ./var/rwho			uname=_rwhod gname=_rwhod
 ./var/shm			mode=01777
 ./var/spool



CVS commit: src/etc/mtree

2024-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  8 12:32:16 UTC 2024

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
put back /var/run/named


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.257 src/etc/mtree/NetBSD.dist.base:1.258
--- src/etc/mtree/NetBSD.dist.base:1.257	Thu Apr  4 21:15:59 2024
+++ src/etc/mtree/NetBSD.dist.base	Mon Apr  8 08:32:15 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.257 2024/04/05 01:15:59 christos Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.258 2024/04/08 12:32:15 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -1451,6 +1451,7 @@
 ./var/preserve
 ./var/quotas			gname=operator mode=0750
 ./var/run
+./var/run/named			mode=0775 uname=named gname=named
 ./var/rwho			uname=_rwhod gname=_rwhod
 ./var/shm			mode=01777
 ./var/spool



CVS commit: src/etc/mtree

2024-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  8 12:32:16 UTC 2024

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
put back /var/run/named


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/base

2024-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  7 15:02:08 UTC 2024

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
/var/run/named is not obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.1339 -r1.1340 src/distrib/sets/lists/base/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/base

2024-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  7 15:02:08 UTC 2024

Modified Files:
src/distrib/sets/lists/base: mi

Log Message:
/var/run/named is not obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.1339 -r1.1340 src/distrib/sets/lists/base/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1339 src/distrib/sets/lists/base/mi:1.1340
--- src/distrib/sets/lists/base/mi:1.1339	Thu Apr  4 21:15:59 2024
+++ src/distrib/sets/lists/base/mi	Sun Apr  7 11:02:08 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1339 2024/04/05 01:15:59 christos Exp $
+# $NetBSD: mi,v 1.1340 2024/04/07 15:02:08 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -6377,7 +6377,7 @@
 ./var/quotas	base-util-root
 ./var/run	base-sys-root
 ./var/run/lwresdbase-obsolete		obsolete
-./var/run/named	base-obsolete		obsolete
+./var/run/named	base-bind-root
 ./var/rwho	base-netutil-root
 ./var/shm	base-sys-root
 ./var/spool	base-sys-root



CVS commit: src/external/gpl2/texinfo/dist/util

2024-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  7 12:30:38 UTC 2024

Modified Files:
src/external/gpl2/texinfo/dist/util: texindex.c

Log Message:
make qsort sorting deterministic


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/texinfo/dist/util/texindex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl2/texinfo/dist/util/texindex.c
diff -u src/external/gpl2/texinfo/dist/util/texindex.c:1.2 src/external/gpl2/texinfo/dist/util/texindex.c:1.3
--- src/external/gpl2/texinfo/dist/util/texindex.c:1.2	Wed Jan 13 19:34:53 2016
+++ src/external/gpl2/texinfo/dist/util/texindex.c	Sun Apr  7 08:30:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: texindex.c,v 1.2 2016/01/14 00:34:53 christos Exp $	*/
+/*	$NetBSD: texindex.c,v 1.3 2024/04/07 12:30:38 christos Exp $	*/
 
 /* texindex -- sort TeX index dribble output into an actual index.
Id: texindex.c,v 1.11 2004/04/11 17:56:47 karl Exp 
@@ -55,6 +55,7 @@ struct lineinfo
 long number;/* The numeric value (for numeric comparison). */
   } key;
   long keylen;  /* Length of KEY field. */
+  size_t idx;		/* tie breaker */
 };
 
 /* This structure describes a field to use as a sort key. */
@@ -369,7 +370,9 @@ compare_full (const void *p1, const void
 }
 }
 
-  return 0; /* Lines match exactly. */
+  if (*line1 == *line2)
+abort ();
+  return *line1 < *line2 ? -1 : 1;
 }
 
 /* Compare LINE1 and LINE2, described by structures
@@ -428,7 +431,9 @@ compare_prepared (const void *p1, const 
 }
 }
 
-  return 0; /* Lines match exactly. */
+  if (line1->idx == line2->idx)
+abort ();
+  return line1->idx < line2->idx ? -1 : 1;
 }
 
 /* Like compare_full but more general.
@@ -799,11 +804,13 @@ sort_in_core (char *infile, int total, c
 
   if (lineinfo)
 {
+  size_t idx = 0;
   struct lineinfo *lp;
   char **p;
 
   for (lp = lineinfo, p = linearray; p != nextline; lp++, p++)
 {
+	  lp->idx = idx++;
   lp->text = *p;
   lp->key.text = find_field (keyfields, *p, >keylen);
   if (keyfields->numeric)



CVS commit: src/external/gpl2/texinfo/dist/util

2024-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  7 12:30:38 UTC 2024

Modified Files:
src/external/gpl2/texinfo/dist/util: texindex.c

Log Message:
make qsort sorting deterministic


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/texinfo/dist/util/texindex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libedit

2024-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 13:36:11 UTC 2024

Modified Files:
src/lib/libedit: editline.7

Log Message:
update em-toggle-overwrite binding (Xose Vazquez Perez)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/editline.7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libedit/editline.7
diff -u src/lib/libedit/editline.7:1.5 src/lib/libedit/editline.7:1.6
--- src/lib/libedit/editline.7:1.5	Mon May  9 17:27:55 2016
+++ src/lib/libedit/editline.7	Sat Apr  6 09:36:11 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: editline.7,v 1.5 2016/05/09 21:27:55 christos Exp $
+.\"	$NetBSD: editline.7,v 1.6 2024/04/06 13:36:11 christos Exp $
 .\"	$OpenBSD: editline.7,v 1.1 2016/04/20 01:11:45 schwarze Exp $
 .\"
 .\" Copyright (c) 2016 Ingo Schwarze 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd May 7, 2016
+.Dd April 6, 2024
 .Dt EDITLINE 7
 .Os
 .Sh NAME
@@ -546,7 +546,7 @@ It is an error if the cursor is already 
 buffer.
 .It Ic em-set-mark Pq emacs: Ctrl-Q, NUL
 Set the mark at the current cursor position.
-.It Ic em-toggle-overwrite Pq not bound by default
+.It Ic em-toggle-overwrite Pq insert
 Switch from insert to overwrite mode or vice versa.
 .It Ic em-universal-argument Pq not bound by default
 If in argument input mode, multiply the argument by 4.



CVS commit: src/lib/libedit

2024-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 13:36:11 UTC 2024

Modified Files:
src/lib/libedit: editline.7

Log Message:
update em-toggle-overwrite binding (Xose Vazquez Perez)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/editline.7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/doc/standards/xopen

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 23:06:32 UTC 2024

Modified Files:
src/share/doc/standards/xopen: Makefile

Log Message:
spacify the paper size for PostScript


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/doc/standards/xopen/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/doc/standards/xopen/Makefile
diff -u src/share/doc/standards/xopen/Makefile:1.5 src/share/doc/standards/xopen/Makefile:1.6
--- src/share/doc/standards/xopen/Makefile:1.5	Fri Aug  1 13:04:01 2003
+++ src/share/doc/standards/xopen/Makefile	Fri Apr  5 19:06:32 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2003/08/01 17:04:01 lukem Exp $
+#	$NetBSD: Makefile,v 1.6 2024/04/05 23:06:32 christos Exp $
 
 DOCS=	xcu5
 .for i in ${DOCS}
@@ -7,7 +7,7 @@ TARGS+=	${i}.ps ${i}.txt ${i}.html ${i}.
 
 POST_PLAIN= -P-b -P-u -P-o -Tascii
 
-ARGS_PS=	${GFLAGS} -dformat=PostScript
+ARGS_PS=	${GFLAGS} -dformat=PostScript ${ROFF_PAGESIZE}
 ARGS_TXT=	${GFLAGS} -dformat=ASCII ${POST_PLAIN}
 ARGS_HTML=	${GFLAGS} -dformat=HTML  ${POST_PLAIN} -ww
 ARGS_MORE=	${GFLAGS} -dformat=more -P-h -Tascii



CVS commit: src/share/doc/standards/xopen

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 23:06:32 UTC 2024

Modified Files:
src/share/doc/standards/xopen: Makefile

Log Message:
spacify the paper size for PostScript


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/doc/standards/xopen/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man0

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 23:05:54 UTC 2024

Modified Files:
src/share/man/man0: Makefile

Log Message:
specify the page size for PostScript


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man0/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man0/Makefile
diff -u src/share/man/man0/Makefile:1.18 src/share/man/man0/Makefile:1.19
--- src/share/man/man0/Makefile:1.18	Mon May 22 08:55:44 2023
+++ src/share/man/man0/Makefile	Fri Apr  5 19:05:53 2024
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.9 (Berkeley) 7/1/91
-#	$NetBSD: Makefile,v 1.18 2023/05/22 12:55:44 lukem Exp $
+#	$NetBSD: Makefile,v 1.19 2024/04/05 23:05:53 christos Exp $
 
 #
 # Note: Needs ps2pdf to convert .ps to .pdf
@@ -77,10 +77,10 @@ man${_S}pages.ps: man${_S}pages.files
 		if ${TOOL_GREP} -q ^\\.TS "${.CURDIR}/back" ; \
 		then	\
 			${_MKSHMSG_FORMAT} >&2 $${f} ;	\
-			cat $${f} | ${TOOL_TBL} | ${TOOL_GROFF} -Z -msafer -man -Tps ; \
+			cat $${f} | ${TOOL_TBL} | ${TOOL_GROFF} -Z -msafer -man -Tps ${ROFF_PAGESIZE}; \
 		else	\
 			${_MKSHMSG_FORMAT} >&2 $${f} "(tbl)";	\
-			cat $${f} | ${TOOL_GROFF} -Z -msafer -man -Tps ; \
+			cat $${f} | ${TOOL_GROFF} -Z -msafer -man -Tps ${ROFF_PAGESIZE}; \
 		fi ;	\
 	done > ${.TARGET}.troff.tmp			\
 	&& cat ${.TARGET}.troff.tmp			\



CVS commit: src/share/man/man0

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 23:05:54 UTC 2024

Modified Files:
src/share/man/man0: Makefile

Log Message:
specify the page size for PostScript


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man0/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/notes

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 23:05:04 UTC 2024

Modified Files:
src/distrib/notes: Makefile.inc

Log Message:
specify the paper size for PostScript


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/distrib/notes/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.59 src/distrib/notes/Makefile.inc:1.60
--- src/distrib/notes/Makefile.inc:1.59	Thu Nov 16 13:06:05 2023
+++ src/distrib/notes/Makefile.inc	Fri Apr  5 19:05:04 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.59 2023/11/16 18:06:05 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.60 2024/04/05 23:05:04 christos Exp $
 #
 
 # Ross Harvey 
@@ -71,7 +71,7 @@ PRESET+=	-dcur_date="${curdate}"
 
 POST_PLAIN= -P-b -P-u -P-o
 
-ARGS_PS=	${PRESET} -dformat=PostScript
+ARGS_PS=	${PRESET} -dformat=PostScript ${ROFF_PAGESIZE}
 ARGS_TXT=	${PRESET} -dformat=ASCII ${POST_PLAIN} -Tascii -mtty-char
 ARGS_HTML=	${PRESET} -dformat=HTML ${POST_PLAIN} -Tlatin1 -ww
 ARGS_MORE=	${PRESET} -dformat=more -P-h -Tascii -mtty-char



CVS commit: src/distrib/notes

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 23:05:04 UTC 2024

Modified Files:
src/distrib/notes: Makefile.inc

Log Message:
specify the paper size for PostScript


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/distrib/notes/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libterminfo

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:30:18 UTC 2024

Modified Files:
src/lib/libterminfo: genman

Log Message:
>From Jan-Benedict Glaw:

Use `printf` instead of `echo` for precise output

`man` pages generated under NetBSD and Linux differ as the escape codes
may or may not be interpreted when going through those two chained `echo`es.
Instead just use `printf`, which produces the desired output, always.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/genman

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libterminfo

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:30:18 UTC 2024

Modified Files:
src/lib/libterminfo: genman

Log Message:
>From Jan-Benedict Glaw:

Use `printf` instead of `echo` for precise output

`man` pages generated under NetBSD and Linux differ as the escape codes
may or may not be interpreted when going through those two chained `echo`es.
Instead just use `printf`, which produces the desired output, always.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/genman

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libterminfo/genman
diff -u src/lib/libterminfo/genman:1.5 src/lib/libterminfo/genman:1.6
--- src/lib/libterminfo/genman:1.5	Fri Jan 25 07:52:45 2013
+++ src/lib/libterminfo/genman	Fri Apr  5 18:30:18 2024
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: genman,v 1.5 2013/01/25 12:52:45 roy Exp $
+# $NetBSD: genman,v 1.6 2024/04/05 22:30:18 christos Exp $
 
 # Copyright (c) 2009, 2013 The NetBSD Foundation, Inc.
 #
@@ -44,11 +44,11 @@ gentab()
 	# Generate a list of long names and codes
 	$TOOL_SED -n \
 	-e "s/#define t_\([^(]*\).*>$tab\[TICODE_\([^]]*\).*/\1 \2/p" \
-	$ti | $TOOL_SORT | while read name code foo; do
+	$ti | $TOOL_SORT | while read name code _; do
 		cap=$($TOOL_SED -ne "s/.*{ \"\(..\)\", TICODE_$code }.*/\1/p" \
 		$tc | head -n 1)
 		desc=$($TOOL_SED -ne "s/ \* $name\: \(.*\)/\1/p" $ti)
-		echo ".It \"\\&$name\" Ta Sy \"\\&$code\" Ta Sy \"\\&$cap\" Ta \"\\&$desc\""
+		printf '.It "\\&%s" Ta Sy "\\&%s" Ta Sy "\\&%s" Ta "\\&%s"\n' "${name}" "${code}" "${cap}" "${desc}"
 	done
 }
 
@@ -56,15 +56,15 @@ boolcaps=$(gentab $TERMH $TERMC flags)
 numcaps=$(gentab $TERMH $TERMC nums)
 strcaps=$(gentab $TERMH $TERMC strs)
 
-echo ".\\\"DO NOT EDIT"
-echo ".\\\"Automatically generated from termcap.5.in"
-echo ".\\\""
+printf '.\\"DO NOT EDIT\n'
+printf '.\\"Automatically generated from termcap.5.in\n'
+printf '.\\"\n'
 
 while read -r line; do
 	case "$line" in
-	"@BOOLCAPS@")	echo "$boolcaps";;
-	"@NUMCAPS@")	echo "$numcaps";;
-	"@STRCAPS@")	echo "$strcaps";;
-	*)		echo "$line";;
+	"@BOOLCAPS@")	printf '%s\n' "${boolcaps}";;
+	"@NUMCAPS@")	printf '%s\n' "${numcaps}";;
+	"@STRCAPS@")	printf '%s\n' "${strcaps}";;
+	*)		printf '%s\n' "${line}";;
 	esac
 done <$TERMM



CVS commit: src/sys/conf

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:28:20 UTC 2024

Modified Files:
src/sys/conf: newvers_stand.mk

Log Message:
Use ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/conf/newvers_stand.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/newvers_stand.mk
diff -u src/sys/conf/newvers_stand.mk:1.4 src/sys/conf/newvers_stand.mk:1.5
--- src/sys/conf/newvers_stand.mk:1.4	Fri May 21 07:28:11 2021
+++ src/sys/conf/newvers_stand.mk	Fri Apr  5 18:28:20 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: newvers_stand.mk,v 1.4 2021/05/21 11:28:11 nakayama Exp $
+#	$NetBSD: newvers_stand.mk,v 1.5 2024/04/05 22:28:20 christos Exp $
 
 VERSIONFILE?=version
 VERSIONMACHINE?=${MACHINE}
@@ -19,7 +19,7 @@ VERSIONFLAGS+=-d
 
 vers.c:	${VERSIONFILE} ${_NETBSD_VERSION_DEPENDS}
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${S}/conf/newvers_stand.sh \
+	TOOL_DATE=${TOOL_DATE} ${HOST_SH} ${S}/conf/newvers_stand.sh \
 	-m ${VERSIONMACHINE} ${VERSIONFLAGS} ${.ALLSRC:[1]} ${NEWVERSWHAT}
 
 .endif



CVS commit: src/sys/conf

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:28:20 UTC 2024

Modified Files:
src/sys/conf: newvers_stand.mk

Log Message:
Use ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/conf/newvers_stand.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/conf

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:27:25 UTC 2024

Modified Files:
src/sys/conf: newvers.mk newvers.sh

Log Message:
Use ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/conf/newvers.mk
cvs rdiff -u -r1.62 -r1.63 src/sys/conf/newvers.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/conf

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:27:25 UTC 2024

Modified Files:
src/sys/conf: newvers.mk newvers.sh

Log Message:
Use ${TOOL_DATE} (Jan-Benedict Glaw)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/conf/newvers.mk
cvs rdiff -u -r1.62 -r1.63 src/sys/conf/newvers.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/newvers.mk
diff -u src/sys/conf/newvers.mk:1.2 src/sys/conf/newvers.mk:1.3
--- src/sys/conf/newvers.mk:1.2	Sat Apr  8 14:24:09 2017
+++ src/sys/conf/newvers.mk	Fri Apr  5 18:27:25 2024
@@ -1,4 +1,4 @@
-# $NetBSD: newvers.mk,v 1.2 2017/04/08 18:24:09 christos Exp $
+# $NetBSD: newvers.mk,v 1.3 2024/04/05 22:27:25 christos Exp $
 
 MKREPRO?=no
 
@@ -17,7 +17,7 @@ newvers: vers.o
 vers.o: ${SYSTEM_OBJ:O} Makefile $S/conf/newvers.sh \
 		$S/conf/osrelease.sh ${_NETBSD_VERSION_DEPENDS}
 	${_MKMSG_CREATE} vers.c
-	${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS}
+	TOOL_DATE=${TOOL_DATE} ${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS}
 	${_MKTARGET_COMPILE}
 	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
 	${COMPILE_CTFCONVERT}

Index: src/sys/conf/newvers.sh
diff -u src/sys/conf/newvers.sh:1.62 src/sys/conf/newvers.sh:1.63
--- src/sys/conf/newvers.sh:1.62	Sat Apr  8 14:24:09 2017
+++ src/sys/conf/newvers.sh	Fri Apr  5 18:27:25 2024
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: newvers.sh,v 1.62 2017/04/08 18:24:09 christos Exp $
+#	$NetBSD: newvers.sh,v 1.63 2024/04/05 22:27:25 christos Exp $
 #
 # Copyright (c) 1984, 1986, 1990, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -153,6 +153,7 @@ if [ ! -e version ]; then
 	echo 0 > version
 fi
 
+DATE=${TOOL_DATE:-date}
 Rflag=false
 nflag=false
 timestamp=
@@ -206,7 +207,7 @@ if ${Rflag}; then
 else
 	if [ -z "${timestamp}" ]; then
 		v=$(cat version)
-		t=$(LC_ALL=C date)
+		t=$(LC_ALL=C ${DATE})
 		u=${USER-root}
 		h=$(hostname)
 		d=$(pwd)
@@ -214,7 +215,7 @@ else
 		echo $(expr ${v} + 1) > version
 	else
 		v=0
-		t=$(LC_ALL=C TZ=UTC date -r "${timestamp}")
+		t=$(LC_ALL=C TZ=UTC ${DATE} -r "${timestamp}")
 		u=mkrepro
 		h=mkrepro.NetBSD.org
 		d="/usr/src/sys/arch/${machine}/compile/${id}"



CVS commit: src/bin/sh

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:22:17 UTC 2024

Modified Files:
src/bin/sh: mkoptions.sh

Log Message:
>From Jan-Benedict Glaw:

Fix a redirection and prepare a stable sort for upper-/lowercase
option letters

This script is a mess, I strongly believe that it should be rewritten.
However, I'm not 100% sure why it was invented in the first place
(come on, the generated header file isn't _that_ complicated that
it couldn't be sanely managed by hand!), but let's fix the sorting
order by using LC_ALL=C.

Also add a few 'X' to the `mktemp` template to make non-BSD
implementations happy. As a bonus, actually *use* the initial `sed`
output instead of throwing it away by piping it into `sort` with
also connecting `sort`'s stdin with the original input file...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/bin/sh/mkoptions.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/mkoptions.sh
diff -u src/bin/sh/mkoptions.sh:1.5 src/bin/sh/mkoptions.sh:1.6
--- src/bin/sh/mkoptions.sh:1.5	Wed Nov 15 04:21:19 2017
+++ src/bin/sh/mkoptions.sh	Fri Apr  5 18:22:17 2024
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mkoptions.sh,v 1.5 2017/11/15 09:21:19 kre Exp $
+# $NetBSD: mkoptions.sh,v 1.6 2024/04/05 22:22:17 christos Exp $
 
 #
 # It would be more sensible to generate 2 .h files, one which
@@ -13,12 +13,13 @@
 
 set -f
 IFS=' 	'	# blank, tab (no newline)
+export LC_ALL=C	# for sort consistency
 
 IF="$1"
 OF="${3+$3/}$2"
 
-E_FILE=$(${MKTEMP:-mktemp} -t MKO.E.$$)
-O_FILE=$(${MKTEMP:-mktemp} -t MKO.O.$$)
+E_FILE=$(${MKTEMP:-mktemp} -t MKO.E.$$)
+O_FILE=$(${MKTEMP:-mktemp} -t MKO.O.$$)
 trap 'rm -f "${E_FILE}" "${O_FILE}"' EXIT
 
 exec 5> "${E_FILE}"
@@ -40,8 +41,8 @@ ${SED:-sed} <"${IF}"			\
 	-e '/^#/d'			\
 	-e '/^[ 	]*\//d'		\
 	-e '/^[ 	]*\*/d'		\
-	-e '/^[ 	]*;/d'			|
-sort -b -k2,2f -k2,2 < "${IF}"			|
+	-e '/^[ 	]*;/d'		|
+sort -b -k2,2f -k2,2			|
 while read line
 do
 	# Look for comments in various styles, and ignore them



CVS commit: src/bin/sh

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 22:22:17 UTC 2024

Modified Files:
src/bin/sh: mkoptions.sh

Log Message:
>From Jan-Benedict Glaw:

Fix a redirection and prepare a stable sort for upper-/lowercase
option letters

This script is a mess, I strongly believe that it should be rewritten.
However, I'm not 100% sure why it was invented in the first place
(come on, the generated header file isn't _that_ complicated that
it couldn't be sanely managed by hand!), but let's fix the sorting
order by using LC_ALL=C.

Also add a few 'X' to the `mktemp` template to make non-BSD
implementations happy. As a bonus, actually *use* the initial `sed`
output instead of throwing it away by piping it into `sort` with
also connecting `sort`'s stdin with the original input file...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/bin/sh/mkoptions.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/file/dist/src

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 16:56:58 UTC 2024

Modified Files:
src/external/bsd/file/dist/src: apprentice.c

Log Message:
break strength ties so that qsort is deterministic


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/file/dist/src/apprentice.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/file/dist/src/apprentice.c
diff -u src/external/bsd/file/dist/src/apprentice.c:1.28 src/external/bsd/file/dist/src/apprentice.c:1.29
--- src/external/bsd/file/dist/src/apprentice.c:1.28	Fri Aug 18 15:00:11 2023
+++ src/external/bsd/file/dist/src/apprentice.c	Fri Apr  5 12:56:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: apprentice.c,v 1.28 2023/08/18 19:00:11 christos Exp $	*/
+/*	$NetBSD: apprentice.c,v 1.29 2024/04/05 16:56:58 christos Exp $	*/
 
 /*
  * Copyright (c) Ian F. Darwin 1986-1995.
@@ -37,7 +37,7 @@
 #if 0
 FILE_RCSID("@(#)$File: apprentice.c,v 1.342 2023/07/17 14:38:35 christos Exp $")
 #else
-__RCSID("$NetBSD: apprentice.c,v 1.28 2023/08/18 19:00:11 christos Exp $");
+__RCSID("$NetBSD: apprentice.c,v 1.29 2024/04/05 16:56:58 christos Exp $");
 #endif
 #endif	/* lint */
 
@@ -1141,8 +1141,12 @@ apprentice_sort(const void *a, const voi
 	const struct magic_entry *mb = CAST(const struct magic_entry *, b);
 	size_t sa = file_magic_strength(ma->mp, ma->cont_count);
 	size_t sb = file_magic_strength(mb->mp, mb->cont_count);
-	if (sa == sb)
-		return 0;
+	if (sa == sb) {
+		int x = memcmp(ma->mp, mb->mp, sizeof(*ma->mp));
+		if (x == 0)
+			abort();
+		return x > 0 ? -1 : 1;
+	}
 	else if (sa > sb)
 		return -1;
 	else



CVS commit: src/external/bsd/file/dist/src

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 16:56:58 UTC 2024

Modified Files:
src/external/bsd/file/dist/src: apprentice.c

Log Message:
break strength ties so that qsort is deterministic


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/file/dist/src/apprentice.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/postinstall

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 16:44:54 UTC 2024

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
remove dup named dir


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/postinstall/postinstall.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/postinstall/postinstall.in
diff -u src/usr.sbin/postinstall/postinstall.in:1.62 src/usr.sbin/postinstall/postinstall.in:1.63
--- src/usr.sbin/postinstall/postinstall.in:1.62	Sun Mar 10 14:23:18 2024
+++ src/usr.sbin/postinstall/postinstall.in	Fri Apr  5 12:44:54 2024
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.62 2024/03/10 18:23:18 rillig Exp $
+# $NetBSD: postinstall.in,v 1.63 2024/04/05 16:44:54 christos Exp $
 #
 # Copyright (c) 2002-2022 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1706,6 +1706,12 @@ do_named()
 	compare_dir "${op}" "${SRC_DIR}/etc/namedb" "${DEST_DIR}/etc/namedb" \
 		644 \
 		root.cache
+
+	local od="${DEST_DIR}/usr/libexec/named"
+	if [ -d "$od" ]; then
+		rm -fr "$od"
+		msg "Removed obsolete '${od}'"
+	fi
 }
 
 



CVS commit: src/usr.sbin/postinstall

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 16:44:54 UTC 2024

Modified Files:
src/usr.sbin/postinstall: postinstall.in

Log Message:
remove dup named dir


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/postinstall/postinstall.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mit/libuv/lib

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 11:04:37 UTC 2024

Modified Files:
src/external/mit/libuv/lib: Makefile

Log Message:
Just build the staticlib.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mit/libuv/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/libuv/lib/Makefile
diff -u src/external/mit/libuv/lib/Makefile:1.7 src/external/mit/libuv/lib/Makefile:1.8
--- src/external/mit/libuv/lib/Makefile:1.7	Fri Apr  5 04:51:27 2024
+++ src/external/mit/libuv/lib/Makefile	Fri Apr  5 07:04:37 2024
@@ -1,15 +1,12 @@
-# $NetBSD: Makefile,v 1.7 2024/04/05 08:51:27 kre Exp $
+# $NetBSD: Makefile,v 1.8 2024/04/05 11:04:37 christos Exp $
 
-LIBISPRIVATE=pic
+LIBISPRIVATE=yes
 
 .include 
 
 MKLINT=	no
 LIB=	uv
 
-MAKESTATICLIB=yes
-MAKELINKLIB=yes
-
 .if ${LIBISPRIVATE:Uno} == "no"
 INCS=	uv.h uv/unix.h uv/bsd.h uv/errno.h uv/version.h uv/threadpool.h
 INCSDIR=/usr/include



CVS commit: src/external/mit/libuv/lib

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 11:04:37 UTC 2024

Modified Files:
src/external/mit/libuv/lib: Makefile

Log Message:
Just build the staticlib.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mit/libuv/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 11:04:19 UTC 2024

Modified Files:
src/external: Makefile

Log Message:
Fold long line


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/Makefile
diff -u src/external/Makefile:1.24 src/external/Makefile:1.25
--- src/external/Makefile:1.24	Fri Apr  5 04:51:27 2024
+++ src/external/Makefile	Fri Apr  5 07:04:19 2024
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile,v 1.24 2024/04/05 08:51:27 kre Exp $
+#	$NetBSD: Makefile,v 1.25 2024/04/05 11:04:19 christos Exp $
 
 SUBDIR+= amdgpu-firmware apache2 atheros broadcom bsd cddl gpl2 gpl3 historical
-SUBDIR+= intel-fw-eula intel-fw-public ibm-public mit .WAIT mpl nvidia-firmware ofl
+SUBDIR+= intel-fw-eula intel-fw-public ibm-public
+SUBDIR+= mit .WAIT mpl nvidia-firmware ofl
 SUBDIR+= public-domain realtek
 
 .include 



CVS commit: src/external

2024-04-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 11:04:19 UTC 2024

Modified Files:
src/external: Makefile

Log Message:
Fold long line


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/external

2024-04-05 Thread Christos Zoulas
In article <20240405085127.b998ef...@cvs.netbsd.org>,
Robert Elz  wrote:
>Module Name:   src
>Committed By:  kre
>Date:  Fri Apr  5 08:51:27 UTC 2024
>
>Modified Files:
>   src/external: Makefile
>   src/external/mit/libuv/lib: Makefile
>
>Log Message:
>Probable hack fix for current build breakage.
>
>Make sure to build external/mit before external/mpl (as bind in mpl
>needs libuv from mit) and in mit/libuv make sure to build the
>static library with the new MAKESTATICLIB mechanism, as that is
>what bind needs.

Thanks for fixing. The Makefile in external does not handle dependencies
and I don't think it gets invoked until libraries have been built, which
in src/lib/Makefile handles the mit/uv mpl/bind order. The change you
made is fine, I will make the line shorter. The libuv Makefile change is
ok too, but it is simplere to just not build the pic library in the first
place, which is what I have done.

christos



CVS commit: src

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 01:16:01 UTC 2024

Modified Files:
src/distrib/sets/lists/base: mi shl.mi
src/distrib/sets/lists/debug: shl.mi
src/etc/mtree: NetBSD.dist.base NetBSD.dist.compat.in
src/external/mpl/bind: Makefile
src/external/mpl/bind/lib/libns: Makefile
src/external/mpl/bind/lib/plugins: Makefile
src/lib/libpam: Makefile.inc
src/lib/libpam/libpam: Makefile
src/lib/libpam/modules: mod.mk
src/lib/npf: mod.mk
src/share/mk: bsd.README bsd.lib.mk
Removed Files:
src/external/mpl/bind/libexec: Makefile plugin.mk
src/external/mpl/bind/libexec/filter-: Makefile

Log Message:
- Create 3 new variables:
  MAKELINKLIB that follows MKLINKLIB but can be overwritten by Makefiles
  MAKESTATICLIB that follows MKSTATICLIB but can be overwritten by Makefiles
  LINKINSTALL that follows MAKELINKLIB but can be overwritten by Makefiles
  These give enough control to the module Makefiles so that they don't need
  to override the default library install rules which break the debug sets.
- Remove /usr/libexec/named which duplicated /usr/lib/named


To generate a diff of this commit:
cvs rdiff -u -r1.1338 -r1.1339 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.976 -r1.977 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.338 -r1.339 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.256 -r1.257 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.6 -r1.7 src/etc/mtree/NetBSD.dist.compat.in
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/bind/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/lib/libns/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/lib/plugins/Makefile
cvs rdiff -u -r1.1 -r0 src/external/mpl/bind/libexec/Makefile \
src/external/mpl/bind/libexec/plugin.mk
cvs rdiff -u -r1.1 -r0 src/external/mpl/bind/libexec/filter-/Makefile
cvs rdiff -u -r1.20 -r1.21 src/lib/libpam/Makefile.inc
cvs rdiff -u -r1.31 -r1.32 src/lib/libpam/libpam/Makefile
cvs rdiff -u -r1.17 -r1.18 src/lib/libpam/modules/mod.mk
cvs rdiff -u -r1.8 -r1.9 src/lib/npf/mod.mk
cvs rdiff -u -r1.446 -r1.447 src/share/mk/bsd.README
cvs rdiff -u -r1.399 -r1.400 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1338 src/distrib/sets/lists/base/mi:1.1339
--- src/distrib/sets/lists/base/mi:1.1338	Sat Mar 30 12:47:55 2024
+++ src/distrib/sets/lists/base/mi	Thu Apr  4 21:15:59 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1338 2024/03/30 16:47:55 thorpej Exp $
+# $NetBSD: mi,v 1.1339 2024/04/05 01:15:59 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1267,6 +1267,7 @@
 ./usr/libdata/debug/usr/lib/i18n		base-i18n-root		compatfile
 ./usr/libdata/debug/usr/lib/named		base-sys-usr
 ./usr/libdata/debug/usr/lib/npf			base-obsolete		obsolete
+./usr/libdata/debug/usr/lib/security		base-sys-usr		compatfile
 ./usr/libdata/debug/usr/libexec			base-sys-usr
 ./usr/libdata/debug/usr/libexec/ching		base-sys-usr
 ./usr/libdata/debug/usr/libexec/lpr		base-sys-usr
@@ -1321,7 +1322,7 @@
 ./usr/libexec/mail.local			base-mail-bin
 ./usr/libexec/makekeybase-crypto-bin
 ./usr/libexec/makewhatis			base-man-bin		!makemandb
-./usr/libexec/namedbase-bind-bin
+./usr/libexec/namedbase-obsolete		obsolete
 ./usr/libexec/named-xfer			base-obsolete		obsolete
 ./usr/libexec/ntalkdbase-netutil-bin
 ./usr/libexec/pfspamdbase-obsolete		obsolete

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.976 src/distrib/sets/lists/base/shl.mi:1.977
--- src/distrib/sets/lists/base/shl.mi:1.976	Wed Feb 21 17:53:47 2024
+++ src/distrib/sets/lists/base/shl.mi	Thu Apr  4 21:15:59 2024
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.976 2024/02/21 22:53:47 christos Exp $
+# $NetBSD: shl.mi,v 1.977 2024/04/05 01:15:59 christos Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1002,4 +1002,4 @@
 ./usr/lib/security/pam_u2f.so.4			base-sys-shlib		compatfile,pam
 ./usr/lib/security/pam_unix.so.4		base-sys-shlib		compatfile,pam
 ./usr/libexec/ld.elf_sobase-sys-shlib		dynamicroot
-./usr/libexec/named/filter-.so		base-bind-bin
+./usr/libexec/named/filter-.so		base-obsolete		obsoleteind-bin

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.338 src/distrib/sets/lists/debug/shl.mi:1.339
--- src/distrib/sets/lists/debug/shl.mi:1.338	Wed Feb 21 17:53:47 2024
+++ src/distrib/sets/lists/debug/shl.mi	Thu Apr  4 21:15:59 2024
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.338 2024/02/21 22:53:47 christos Exp $
+# $NetBSD: shl.mi,v 1.339 2024/04/05 01:15:59 christos Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 

CVS commit: src

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  5 01:16:01 UTC 2024

Modified Files:
src/distrib/sets/lists/base: mi shl.mi
src/distrib/sets/lists/debug: shl.mi
src/etc/mtree: NetBSD.dist.base NetBSD.dist.compat.in
src/external/mpl/bind: Makefile
src/external/mpl/bind/lib/libns: Makefile
src/external/mpl/bind/lib/plugins: Makefile
src/lib/libpam: Makefile.inc
src/lib/libpam/libpam: Makefile
src/lib/libpam/modules: mod.mk
src/lib/npf: mod.mk
src/share/mk: bsd.README bsd.lib.mk
Removed Files:
src/external/mpl/bind/libexec: Makefile plugin.mk
src/external/mpl/bind/libexec/filter-: Makefile

Log Message:
- Create 3 new variables:
  MAKELINKLIB that follows MKLINKLIB but can be overwritten by Makefiles
  MAKESTATICLIB that follows MKSTATICLIB but can be overwritten by Makefiles
  LINKINSTALL that follows MAKELINKLIB but can be overwritten by Makefiles
  These give enough control to the module Makefiles so that they don't need
  to override the default library install rules which break the debug sets.
- Remove /usr/libexec/named which duplicated /usr/lib/named


To generate a diff of this commit:
cvs rdiff -u -r1.1338 -r1.1339 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.976 -r1.977 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.338 -r1.339 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.256 -r1.257 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.6 -r1.7 src/etc/mtree/NetBSD.dist.compat.in
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/bind/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/lib/libns/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/lib/plugins/Makefile
cvs rdiff -u -r1.1 -r0 src/external/mpl/bind/libexec/Makefile \
src/external/mpl/bind/libexec/plugin.mk
cvs rdiff -u -r1.1 -r0 src/external/mpl/bind/libexec/filter-/Makefile
cvs rdiff -u -r1.20 -r1.21 src/lib/libpam/Makefile.inc
cvs rdiff -u -r1.31 -r1.32 src/lib/libpam/libpam/Makefile
cvs rdiff -u -r1.17 -r1.18 src/lib/libpam/modules/mod.mk
cvs rdiff -u -r1.8 -r1.9 src/lib/npf/mod.mk
cvs rdiff -u -r1.446 -r1.447 src/share/mk/bsd.README
cvs rdiff -u -r1.399 -r1.400 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:54:18 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib/liblto_plugin: Makefile
src/external/gpl3/gcc/lib/liblto_plugin: Makefile

Log Message:
LIBISMODULE should be yes or no...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/liblto_plugin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
diff -u src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.15 src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.16
--- src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.15	Sun Dec 31 17:52:49 2023
+++ src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile	Thu Apr  4 19:54:17 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2023/12/31 22:52:49 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2024/04/04 23:54:17 christos Exp $
 
 .include 
 .include 
@@ -22,7 +22,7 @@ CPPFLAGS+=	-DHAVE_CONFIG_H
 CPPFLAGS+=	-Dxstrdup=strdup -Dxexit=exit
 CPPFLAGS+=	-Dxcalloc=calloc -Dxmalloc=malloc -Dxrealloc=realloc
 
-LIBISMODULE=	1
+LIBISMODULE=	yes
 USE_SHLIBDIR=	yes
 REQUIRETOOLS=	yes
 NOLINT=		# defined

Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile
diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.11 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.12
--- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.11	Sun Dec 31 17:52:49 2023
+++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile	Thu Apr  4 19:54:17 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2023/12/31 22:52:49 mrg Exp $
+#	$NetBSD: Makefile,v 1.12 2024/04/04 23:54:17 christos Exp $
 
 .include 
 .include 
@@ -22,7 +22,7 @@ CPPFLAGS+=	-DHAVE_CONFIG_H
 CPPFLAGS+=	-Dxstrdup=strdup -Dxexit=exit
 CPPFLAGS+=	-Dxcalloc=calloc -Dxmalloc=malloc -Dxrealloc=realloc
 
-LIBISMODULE=	1
+LIBISMODULE=	yes
 USE_SHLIBDIR=	yes
 REQUIRETOOLS=	yes
 NOLINT=		# defined



CVS commit: src/external/gpl3

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:54:18 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib/liblto_plugin: Makefile
src/external/gpl3/gcc/lib/liblto_plugin: Makefile

Log Message:
LIBISMODULE should be yes or no...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/liblto_plugin/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:53:05 UTC 2024

Modified Files:
src/doc: HACKS

Log Message:
mention gallium.old hack


To generate a diff of this commit:
cvs rdiff -u -r1.241 -r1.242 src/doc/HACKS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:53:05 UTC 2024

Modified Files:
src/doc: HACKS

Log Message:
mention gallium.old hack


To generate a diff of this commit:
cvs rdiff -u -r1.241 -r1.242 src/doc/HACKS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.241 src/doc/HACKS:1.242
--- src/doc/HACKS:1.241	Fri Jan 12 03:44:42 2024
+++ src/doc/HACKS	Thu Apr  4 19:53:05 2024
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.241 2024/01/12 08:44:42 martin Exp $
+# $NetBSD: HACKS,v 1.242 2024/04/04 23:53:05 christos Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -1115,3 +1115,12 @@ descr
 	   56 | __asm("movq %%gs:%1, %0" :
 	and can't easily be worked around.
 kcah
+
+hack	ctfconvert/gcc: disable gcc dwarf-4 generation
+cdate	Thu Apr  4 19:51:05 EDT 2024
+who	christos
+file	src/external/mit/xorg/lib/gallium.old/Makefile : 1.9
+descr
+	Some files create dwarf info that our ctfmerge can't handle.
+	We downgrade dwarf generation to version 3 which works.
+kcah



CVS commit: src/external/mit/xorg/lib/gallium.old

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:50:13 UTC 2024

Modified Files:
src/external/mit/xorg/lib/gallium.old: Makefile

Log Message:
Don't ccreate dwarf-4 on these files because it breaks ctfconvert.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/mit/xorg/lib/gallium.old/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/lib/gallium.old/Makefile
diff -u src/external/mit/xorg/lib/gallium.old/Makefile:1.8 src/external/mit/xorg/lib/gallium.old/Makefile:1.9
--- src/external/mit/xorg/lib/gallium.old/Makefile:1.8	Sat Oct  7 08:15:52 2023
+++ src/external/mit/xorg/lib/gallium.old/Makefile	Thu Apr  4 19:50:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2023/10/07 12:15:52 rin Exp $
+# $NetBSD: Makefile,v 1.9 2024/04/04 23:50:13 christos Exp $
 
 # Transparent struct/union broken
 NOLINT=yes
@@ -33,8 +33,8 @@ LDFLAGS+=	-pthread
 
 # Reduce debugging for these extremely large objects.
 .if ${MKDEBUG:Uno} != "no"
-CXXFLAGS+=	-g1
-CFLAGS+=	-g1
+CXXFLAGS+=	-g1 -gdwarf-3
+CFLAGS+=	-g1 -gdwarf-3
 .endif
 
 GALLIUM_SUBDIRS= \



CVS commit: src/external/mit/xorg/lib/gallium.old

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:50:13 UTC 2024

Modified Files:
src/external/mit/xorg/lib/gallium.old: Makefile

Log Message:
Don't ccreate dwarf-4 on these files because it breaks ctfconvert.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/mit/xorg/lib/gallium.old/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/fs/tmpfs

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 16:58:35 UTC 2024

Modified Files:
src/tests/fs/tmpfs: t_times.sh

Log Message:
Better output handling (des at FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/tmpfs/t_times.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/tmpfs/t_times.sh
diff -u src/tests/fs/tmpfs/t_times.sh:1.6 src/tests/fs/tmpfs/t_times.sh:1.7
--- src/tests/fs/tmpfs/t_times.sh:1.6	Wed Jun 16 20:03:05 2021
+++ src/tests/fs/tmpfs/t_times.sh	Thu Apr  4 12:58:35 2024
@@ -1,4 +1,4 @@
-# $NetBSD: t_times.sh,v 1.6 2021/06/17 00:03:05 riastradh Exp $
+# $NetBSD: t_times.sh,v 1.7 2024/04/04 16:58:35 christos Exp $
 #
 # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -48,7 +48,7 @@ empty_body() {
 	atf_fail "Incorrect mtime: ${ost_birthtime} != ${ost_mtime}"
 
 	sleep 1
-	atf_check -s eq:0 -o ignore -e empty cat a
+	atf_check -s eq:0 -o empty -e empty cat a
 	eval $(stat -s a) || atf_fail "stat failed"
 	[ ${st_atime} -gt ${ost_atime} ] || \
 	atf_fail "Incorrect atime: ${st_atime} <= ${ost_atime}"
@@ -83,7 +83,7 @@ non_empty_body() {
 	eval $(stat -s b | sed -e 's|st_|ost_|g') || atf_fail "stat failed"
 
 	sleep 1
-	atf_check -s eq:0 -o ignore -e empty cat b
+	atf_check -s eq:0 -o inline:"foo\n" -e empty cat b
 	eval $(stat -s b) || atf_fail "stat failed"
 	[ ${st_atime} -gt ${ost_atime} ] || \
 	atf_fail "Incorrect atime: ${st_atime} <= ${ost_atime}"



CVS commit: src/tests/fs/tmpfs

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 16:58:35 UTC 2024

Modified Files:
src/tests/fs/tmpfs: t_times.sh

Log Message:
Better output handling (des at FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/tmpfs/t_times.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/fs/tmpfs

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 16:57:45 UTC 2024

Modified Files:
src/tests/fs/tmpfs: t_vnd.sh

Log Message:
make this work again


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/fs/tmpfs/t_vnd.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/tmpfs/t_vnd.sh
diff -u src/tests/fs/tmpfs/t_vnd.sh:1.12 src/tests/fs/tmpfs/t_vnd.sh:1.13
--- src/tests/fs/tmpfs/t_vnd.sh:1.12	Wed Nov 30 12:50:00 2022
+++ src/tests/fs/tmpfs/t_vnd.sh	Thu Apr  4 12:57:45 2024
@@ -1,4 +1,4 @@
-# $NetBSD: t_vnd.sh,v 1.12 2022/11/30 17:50:00 martin Exp $
+# $NetBSD: t_vnd.sh,v 1.13 2024/04/04 16:57:45 christos Exp $
 #
 # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -29,7 +29,8 @@
 #
 
 vnddev=vnd3
-vnd=/dev/${vnddev}
+rvnd=/dev/r${vnddev}a
+vnd=/dev/${vnddev}a
 
 atf_test_case basic cleanup
 basic_head() {
@@ -43,7 +44,7 @@ basic_body() {
 	dd if=/dev/zero of=disk.img bs=1m count=10
 	atf_check -s eq:0 -o empty -e empty vndconfig -c ${vnddev} disk.img
 
-	atf_check -s eq:0 -o ignore -e ignore newfs -I ${vnd}
+	atf_check -s eq:0 -o ignore -e ignore newfs -I ${rvnd}
 
 	atf_check -s eq:0 -o empty -e empty mkdir mnt
 	atf_check -s eq:0 -o empty -e empty mount ${vnd} mnt



  1   2   3   4   5   6   7   8   9   10   >