Subject: toolchain/20051: pax (as host tool) uses wrong macros for major/minor
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/24/2003 17:51:19
>Number:         20051
>Category:       toolchain
>Synopsis:       pax (as host tool) uses wrong macros for major/minor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 24 17:52:00 PST 2003
>Originator:     Valeriy E. Ushakov
>Release:        1.6M
FreeBSD 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Jun 27 04:33:50 MSD 2002  i386

When doing an unprived build on a non-netbsd host pax will use netbsd
macros to construct netbsd dev_t when it reads the mtree spec file:


However when an archive is written, pax will use host's native
major/minor macros to decompose that dev_t - which results in bogus

In my case (cross building for NetBSD/sparc on a FreeBSD/i386 host),
it chokes on the minor number for:

./dev/dtya type=char device=netbsd,12,524288 mode=0600 uname=uucp gname=wheel


pax: Ustar header field is too small for ./dev/dtya

because ustar_wr decomposes netbsd's dev_t value with native macros
and gets minor 2147483648 (2^31) instead of 524288 (2^19)

try building an unprived release on a host with a dev_t internal structure that is different from the netbsd dev_t.