daily CVS update output

2014-09-29 Thread NetBSD source update

Updating src tree:
P src/distrib/cobalt/ramdisk/Makefile
P src/distrib/utils/embedded/conf/beagleboard.conf
P src/doc/CHANGES
P src/lib/libc/stdio/printf.3
P src/lib/libc/stdio/vsnprintf.c
P src/lib/libc/stdio/vsnprintf_ss.c
P src/lib/libperfuse/ops.c
P src/lib/librumpuser/rumpuser_port.h
P src/lib/libutil/opendisk.c
P src/sbin/gpt/Makefile
P src/sbin/gpt/add.c
P src/sbin/gpt/backup.c
P src/sbin/gpt/biosboot.c
P src/sbin/gpt/create.c
P src/sbin/gpt/destroy.c
P src/sbin/gpt/gpt.8
P src/sbin/gpt/gpt.c
P src/sbin/gpt/gpt.h
P src/sbin/gpt/label.c
P src/sbin/gpt/map.c
P src/sbin/gpt/migrate.c
P src/sbin/gpt/recover.c
P src/sbin/gpt/remove.c
P src/sbin/gpt/resize.c
P src/sbin/gpt/resizedisk.c
P src/sbin/gpt/restore.c
P src/sbin/gpt/set.c
P src/sbin/gpt/show.c
P src/sbin/gpt/type.c
P src/sbin/gpt/unset.c
P src/sys/arch/arm/samsung/exynos_reg.h
P src/sys/arch/arm/samsung/exynos_soc.c
P src/sys/arch/arm/samsung/exynos_var.h
P src/sys/arch/arm/samsung/exynos_wdt.c
P src/sys/arch/cobalt/conf/RAMDISK
P src/sys/arch/evbarm/rpi/rpi_machdep.c
U src/tools/gpt/Makefile
U src/tools/gpt/opendisk.h

Updating xsrc tree:


Killing core files:

Running the SUP scanner:
SUP Scan for current starting at Tue Sep 30 03:04:44 2014
SUP Scan for current completed at Tue Sep 30 03:05:20 2014
SUP Scan for mirror starting at Tue Sep 30 03:05:20 2014
SUP Scan for mirror completed at Tue Sep 30 03:07:24 2014




Updating file list:
-rw-rw-r--  1 srcmastr  netbsd  43040762 Sep 30 03:16 ls-lRA.gz


Automated report: NetBSD-current/i386 build failure

2014-09-29 Thread NetBSD Test Fixture
This is an automatically generated notice of a NetBSD-current/i386
build failure.

The failure occurred on babylon5.NetBSD.org, a NetBSD/amd64 host,
using sources from CVS date 2014.09.29.21.05.11.

An extract from the build.sh output follows:


CC=/tmp/bracket/build/2014.09.29.21.05.11-i386/tools/bin/i486--netbsdelf-gcc 
/tmp/bracket/build/2014.09.29.21.05.11-i386/tools/bin/nbmkdep -f backup.d.tmp  
--   -std=gnu99
--sysroot=/tmp/bracket/build/2014.09.29.21.05.11-i386/destdir  
/tmp/bracket/build/2014.09.29.21.05.11-i386/src/sbin/gpt/backup.c &&  mv 
backup.d.tmp backup.d
--- dependall-bin ---
--- echo ---
#  link  echo/echo
--- dependall-sbin ---
/tmp/bracket/build/2014.09.29.21.05.11-i386/src/sbin/gpt/backup.c:49:2: 
error: #endif without #if
 #endif
  ^
nbmkdep: compile failed.
*** [backup.d] Error code 1
nbmake[6]: stopped in 
/tmp/bracket/build/2014.09.29.21.05.11-i386/src/sbin/gpt
1 error

The following commits were made between the last successful build and the 
failed build:

2014.09.29.18.44.42 snj src/doc/Attic/CHANGES-6.1.6,v 1.1
2014.09.29.18.48.10 snj src/doc/Attic/CHANGES-6.0.7,v 1.1
2014.09.29.20.28.57 christos src/sbin/gpt/add.c,v 1.25
2014.09.29.20.28.57 christos src/sbin/gpt/backup.c,v 1.4
2014.09.29.20.28.57 christos src/sbin/gpt/biosboot.c,v 1.10
2014.09.29.20.28.57 christos src/sbin/gpt/create.c,v 1.8
2014.09.29.20.28.57 christos src/sbin/gpt/destroy.c,v 1.5
2014.09.29.20.28.57 christos src/sbin/gpt/gpt.c,v 1.31
2014.09.29.20.28.57 christos src/sbin/gpt/label.c,v 1.16
2014.09.29.20.28.57 christos src/sbin/gpt/map.c,v 1.7
2014.09.29.20.28.57 christos src/sbin/gpt/migrate.c,v 1.15
2014.09.29.20.28.57 christos src/sbin/gpt/recover.c,v 1.5
2014.09.29.20.28.57 christos src/sbin/gpt/remove.c,v 1.14
2014.09.29.20.28.57 christos src/sbin/gpt/resize.c,v 1.9
2014.09.29.20.28.57 christos src/sbin/gpt/resizedisk.c,v 1.3
2014.09.29.20.28.57 christos src/sbin/gpt/restore.c,v 1.4
2014.09.29.20.28.57 christos src/sbin/gpt/set.c,v 1.3
2014.09.29.20.28.57 christos src/sbin/gpt/show.c,v 1.16
2014.09.29.20.28.57 christos src/sbin/gpt/type.c,v 1.3
2014.09.29.20.28.57 christos src/sbin/gpt/unset.c,v 1.3
2014.09.29.20.29.44 christos src/tools/gpt/Makefile,v 1.1
2014.09.29.21.04.34 christos src/sbin/gpt/Makefile,v 1.11
2014.09.29.21.04.34 christos src/sbin/gpt/backup.c,v 1.5
2014.09.29.21.04.34 christos src/sbin/gpt/biosboot.c,v 1.11
2014.09.29.21.04.34 christos src/sbin/gpt/destroy.c,v 1.6
2014.09.29.21.04.34 christos src/sbin/gpt/gpt.c,v 1.32
2014.09.29.21.04.34 christos src/sbin/gpt/migrate.c,v 1.16
2014.09.29.21.04.52 christos src/lib/libutil/opendisk.c,v 1.13
2014.09.29.21.05.11 christos src/tools/gpt/Makefile,v 1.2
2014.09.29.21.05.11 christos src/tools/gpt/opendisk.h,v 1.1

Log files can be found at:


http://releng.NetBSD.org/b5reports/i386/commits-2014.09.html#2014.09.29.21.05.11


Re: recent dhcpcd looping on ppp0

2014-09-29 Thread Frank Kardel

Much better now.

The busy wait loop is now gone.

Thanks !

Frank

On 09/29/14 14:03, Roy Marples wrote:

On 2014-09-29 11:33, Roy Marples wrote:
Going to guess that ppp0 doesn't have a carrier status OR 
IFF_RUNNING set?
The attached patch should reduce the log spam, let me know how it 
works out.

Errm, this patch should do better!


Well, less spam, but still
- busy wait (repeated count goes up to ~300k)
Sep 28 23:50:05 Andromeda dhcpcd[1101]: ppp0: unknown carrier
Sep 28 23:50:05 Andromeda dhcpcd[1101]: ppp0: carrier_status:
Inappropriate ioctl for device
Sep 28 23:50:14 Andromeda syslogd[1251]: last message repeated 12776 
times


- a flurry of routing messages (probably same number of as 
syslog entries)

got message of size 152 on Sun Sep 28 23:50:10 2014
RTM_IFINFO: iface status change: len 152, if# 6, carrier: unknown,
flags: 
got message of size 152 on Sun Sep 28 23:50:10 2014


Yes, these messages are being triggerd by a flurry of routing messages.
This is probably a bug in NetBSD somewhere and the attached patch
should pretty much silence the warnings down to one n dhcpcd until the
link actually comes up.


So the flurry of messages is triggered by dhcpcd still (thanks 
jmcneill!).

This patch should fix it and all should now be well.

Roy




Re: a separate build of libc

2014-09-29 Thread u-6hol
On Mon, Sep 29, 2014 at 02:34:46PM +0200, Pierre Pronchery wrote:
> I'm considering re-licensing the whole DeforaOS project under BSD.
> You're not the first person to mention this to me, so I guess I'll just
> stop wasting time and do it.

That would be definitely a nice move and make the library and the
whole project attractive for many more users.

I would say go ahead Pierre.

Best regards,
Rune



Re: a separate build of libc

2014-09-29 Thread Joerg Sonnenberger
On Mon, Sep 29, 2014 at 01:05:57PM +0200, u-6...@aetey.se wrote:
> Unfortunately one thing which makes me less entusiastic is the non-BSD
> license, GPL for a libc is pretty intrusive, not even the GNU libc
> uses it.

*cough* Cygwin *cough*

Joerg


Re: a separate build of libc

2014-09-29 Thread Pierre Pronchery
On 29/09/2014 13:05, u-6...@aetey.se wrote:
> On Mon, Sep 29, 2014 at 12:14:42PM +0200, Pierre Pronchery wrote:
>> I do not have the time to read the entire thread now, but you may want
>> to check the DeforaOS libc, which supports NetBSD (and Linux (and
>> more)). You can find it there:
>>
>> http://www.defora.org/os/project/14/libc
>> http://git.defora.org/gitweb/?p=libc.git;a=summary
>> (or git clone http://git.defora.org/DeforaOS/libc.git)
> 
> Oh nice.
> 
> Unfortunately one thing which makes me less entusiastic is the non-BSD
> license, GPL for a libc is pretty intrusive, not even the GNU libc
> uses it.

I'm considering re-licensing the whole DeforaOS project under BSD.
You're not the first person to mention this to me, so I guess I'll just
stop wasting time and do it.

Cheers,
-- 
khorben



Re: recent dhcpcd looping on ppp0

2014-09-29 Thread Roy Marples

On 2014-09-29 11:33, Roy Marples wrote:
Going to guess that ppp0 doesn't have a carrier status OR 
IFF_RUNNING set?
The attached patch should reduce the log spam, let me know how it 
works out.

Errm, this patch should do better!


Well, less spam, but still
- busy wait (repeated count goes up to ~300k)
Sep 28 23:50:05 Andromeda dhcpcd[1101]: ppp0: unknown carrier
Sep 28 23:50:05 Andromeda dhcpcd[1101]: ppp0: carrier_status:
Inappropriate ioctl for device
Sep 28 23:50:14 Andromeda syslogd[1251]: last message repeated 12776 
times


- a flurry of routing messages (probably same number of as syslog 
entries)

got message of size 152 on Sun Sep 28 23:50:10 2014
RTM_IFINFO: iface status change: len 152, if# 6, carrier: unknown,
flags: 
got message of size 152 on Sun Sep 28 23:50:10 2014


Yes, these messages are being triggerd by a flurry of routing messages.
This is probably a bug in NetBSD somewhere and the attached patch
should pretty much silence the warnings down to one n dhcpcd until the
link actually comes up.


So the flurry of messages is triggered by dhcpcd still (thanks 
jmcneill!).

This patch should fix it and all should now be well.

RoyIndex: dhcpcd.c
==
--- dhcpcd.c
+++ dhcpcd.c
@@ -552,14 +552,14 @@
 		break;
 	default:
 		ifp->flags = flags;
 	}
 
-	if (carrier == LINK_UNKNOWN)
-		syslog(LOG_ERR, "%s: carrier_status: %m", ifname);
-	/* IFF_RUNNING is checked, if needed, earlier and is OS dependant */
-	else if (carrier == LINK_DOWN || (ifp->flags & IFF_UP) == 0) {
+	if (carrier == LINK_UNKNOWN) {
+		if (errno != ENOTTY) /* For example a PPP link on BSD */
+			syslog(LOG_ERR, "%s: carrier_status: %m", ifname);
+	} else if (carrier == LINK_DOWN || (ifp->flags & IFF_UP) == 0) {
 		if (ifp->carrier != LINK_DOWN) {
 			if (ifp->carrier == LINK_UP)
 syslog(LOG_INFO, "%s: carrier lost", ifp->name);
 			ifp->carrier = LINK_DOWN;
 			script_runreason(ifp, "NOCARRIER");
@@ -638,11 +638,10 @@
 {
 	struct interface *ifp = arg;
 	struct if_options *ifo = ifp->options;
 	size_t i;
 	char buf[DUID_LEN * 3];
-	struct timeval tv;
 
 	pre_start(ifp);
 	if (if_up(ifp) == -1)
 		syslog(LOG_ERR, "%s: if_up: %m", ifp->name);
 
@@ -653,20 +652,19 @@
 			break;
 		case LINK_DOWN:
 			syslog(LOG_INFO, "%s: waiting for carrier", ifp->name);
 			return;
 		case LINK_UNKNOWN:
-			/* No media state available, so we loop until
-			 * IFF_UP and IFF_RUNNING are set. */
+			/* No media state available.
+			 * Any change on state such as IFF_UP and IFF_RUNNING
+			 * should be reported to us via the route socket
+			 * as we've done the best we can to bring the interface
+			 * up at this point. */
 			ifp->carrier = if_carrier(ifp);
 			if (ifp->carrier != LINK_UNKNOWN)
 goto link_retry;
 			syslog(LOG_INFO, "%s: unknown carrier", ifp->name);
-			tv.tv_sec = 0;
-			tv.tv_usec = 100;
-			eloop_timeout_add_tv(ifp->ctx->eloop, &tv,
-			dhcpcd_startinterface, ifp);
 			return;
 		}
 	}
 
 	if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6)) {



Re: a separate build of libc

2014-09-29 Thread u-6hol
On Mon, Sep 29, 2014 at 12:14:42PM +0200, Pierre Pronchery wrote:
> I do not have the time to read the entire thread now, but you may want
> to check the DeforaOS libc, which supports NetBSD (and Linux (and
> more)). You can find it there:
> 
> http://www.defora.org/os/project/14/libc
> http://git.defora.org/gitweb/?p=libc.git;a=summary
> (or git clone http://git.defora.org/DeforaOS/libc.git)

Oh nice.

Unfortunately one thing which makes me less entusiastic is the non-BSD
license, GPL for a libc is pretty intrusive, not even the GNU libc
uses it.

Thanks anyway,
Rune



Re: recent dhcpcd looping on ppp0

2014-09-29 Thread Roy Marples

Hi Frank

On 2014-09-28 22:58, Frank Kardel wrote:

On 09/28/14 23:17, Roy Marples wrote:

On Sunday 28 Sep 2014 22:06:47 Roy Marples wrote:
Going to guess that ppp0 doesn't have a carrier status OR IFF_RUNNING 
set?
The attached patch should reduce the log spam, let me know how it 
works out.

Errm, this patch should do better!


Roy

Well, less spam, but still
- busy wait (repeated count goes up to ~300k)
Sep 28 23:50:05 Andromeda dhcpcd[1101]: ppp0: unknown carrier
Sep 28 23:50:05 Andromeda dhcpcd[1101]: ppp0: carrier_status:
Inappropriate ioctl for device
Sep 28 23:50:14 Andromeda syslogd[1251]: last message repeated 12776 
times


- a flurry of routing messages (probably same number of as syslog 
entries)

got message of size 152 on Sun Sep 28 23:50:10 2014
RTM_IFINFO: iface status change: len 152, if# 6, carrier: unknown,
flags: 
got message of size 152 on Sun Sep 28 23:50:10 2014


Yes, these messages are being triggerd by a flurry of routing messages.
This is probably a bug in NetBSD somewhere and the attached patch should 
pretty much silence the warnings down to one n dhcpcd until the link 
actually comes up.


Let me know how this one works!

Thanks

RoyIndex: dhcpcd.c
==
--- dhcpcd.c
+++ dhcpcd.c
@@ -547,19 +547,23 @@
 		 * dhcpcd has already set it.
 		 *
 		 * So we check the flags now. If IFF_UP is still not set
 		 * then we should expect an accompanying link_down message */
 		if_setflag(ifp, 0); /* will set ifp->flags */
+		ifp->options->options &= ~DHCPCD_LINK_WARNED;
 		break;
 	default:
 		ifp->flags = flags;
+		ifp->options->options &= ~DHCPCD_LINK_WARNED;
 	}
 
-	if (carrier == LINK_UNKNOWN)
-		syslog(LOG_ERR, "%s: carrier_status: %m", ifname);
-	/* IFF_RUNNING is checked, if needed, earlier and is OS dependant */
-	else if (carrier == LINK_DOWN || (ifp->flags & IFF_UP) == 0) {
+	if (carrier == LINK_UNKNOWN) {
+		if (!ifp->options->options & DHCPCD_LINK_WARNED) {
+			syslog(LOG_ERR, "%s: carrier_status: %m", ifname);
+			ifp->options->options |= DHCPCD_LINK_WARNED;
+		}
+	} else if (carrier == LINK_DOWN || (ifp->flags & IFF_UP) == 0) {
 		if (ifp->carrier != LINK_DOWN) {
 			if (ifp->carrier == LINK_UP)
 syslog(LOG_INFO, "%s: carrier lost", ifp->name);
 			ifp->carrier = LINK_DOWN;
 			script_runreason(ifp, "NOCARRIER");
@@ -648,21 +652,26 @@
 
 	if (ifo->options & DHCPCD_LINK) {
 link_retry:
 		switch (ifp->carrier) {
 		case LINK_UP:
+			ifo->options &= ~DHCPCD_LINK_WARNED;
 			break;
 		case LINK_DOWN:
+			ifo->options &= ~DHCPCD_LINK_WARNED;
 			syslog(LOG_INFO, "%s: waiting for carrier", ifp->name);
 			return;
 		case LINK_UNKNOWN:
 			/* No media state available, so we loop until
 			 * IFF_UP and IFF_RUNNING are set. */
 			ifp->carrier = if_carrier(ifp);
 			if (ifp->carrier != LINK_UNKNOWN)
 goto link_retry;
-			syslog(LOG_INFO, "%s: unknown carrier", ifp->name);
+			if (!(ifo->options & DHCPCD_LINK_WARNED)) {
+syslog(LOG_INFO, "%s: unknown carrier", ifp->name);
+ifo->options |= DHCPCD_LINK_WARNED;
+			}
 			tv.tv_sec = 0;
 			tv.tv_usec = 100;
 			eloop_timeout_add_tv(ifp->ctx->eloop, &tv,
 			dhcpcd_startinterface, ifp);
 			return;

Index: if-options.h
==
--- if-options.h
+++ if-options.h
@@ -104,10 +104,11 @@
 #define DHCPCD_DHCP			(1ULL << 49)
 #define DHCPCD_DHCP6			(1ULL << 50)
 #define DHCPCD_NOPFXDLG			(1ULL << 51)
 #define DHCPCD_PFXDLGONLY		(1ULL << 52)
 #define DHCPCD_PFXDLGMIX		(1ULL << 53)
+#define DHCPCD_LINK_WARNED		(1ULL << 54)
 
 extern const struct option cf_options[];
 
 struct if_sla {
 	char ifname[IF_NAMESIZE];



Re: a separate build of libc

2014-09-29 Thread Pierre Pronchery
Hi Rune,

I do not have the time to read the entire thread now, but you may want
to check the DeforaOS libc, which supports NetBSD (and Linux (and
more)). You can find it there:

http://www.defora.org/os/project/14/libc
http://git.defora.org/gitweb/?p=libc.git;a=summary
(or git clone http://git.defora.org/DeforaOS/libc.git)

Let me know if you need any help with it.

HTH,
-- khorben

On 19/09/2014 16:04, u-6...@aetey.se wrote:
> Background:
> 
>   building an independent/standalone toolchain able to produce binaries
>   runnable on NetBSD
>   (note, this is not the same as compiling or cross-compiling "NetBSD")
> 
> The component:
> 
>   libc
> 
> A small practical question:
> 
>   Where does machine/asm.h come from, given the NetBSD source sets as
>   the starting point?
> 
> Presumably it is possible to find out the answer by analysing the
> "build.sh" tool but the named tool is possibly not the (only) definition
> of the structure/interrelations of the concerned data?
> 
> A deeper question:
> 
>   What would be the minimal initial data (source) to be able to recreate
>   a working NetBSD libc? I get the impression that the data is widely
>   scattered across different file trees and source sets, my goal
>   is now to identify the relevant subset of "the whole".
> 
> To better describe what I have in mind, I might refer to the source archive
> of musl Linux libc, which includes everything (including all includes :)
> that is needed for the build, as a single archive of less than 1MB.
> The compiler and linker to be used do not have to be platform-specific
> beyond the capability to build executables in a format understandable
> by the target kernel.
> 
> I don't see that there is any similar abstraction for NetBSD libc yet (?).
> It would be pretty useful.
> 
> Anybody who can/would answer the questions above?
> 
> Regards,
> Rune

-- 
khorben