Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Paul Herman

On Sun, 19 May 2002, Dima Dorfman wrote:

 How about fixing ls(1) to output the numeric mode if asked to?

That's good, but while you're at it you'd probably want to get
*everything* out of (struct stat) and print it numerically (device,
flags, atime since epoch, etc.)  You could do this in ls(1), but
I'll have a patch for fstat(1) soon (working on it) that gives you:

bash$ /usr/obj/usr/src/usr.bin/fstat/fstat -s /tmp /kernel
INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID GID ATIME  MTIME  CTIME
  NAME
235226304 4114305  8096   100555 40 1   0   0   1021779222 1021740354 
1021740354 /kernel
56651  226304 512  4  041777 00 6   0   0   1021787523 1021787657 
1021787657 /tmp

so you can parse it however you like.  Either way, ls(1) or
fstat(1), as long as you can get the info you need.  :-)

-Paul.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Dima Dorfman

Paul Herman [EMAIL PROTECTED] wrote:
 On Sun, 19 May 2002, Dima Dorfman wrote:
 
  How about fixing ls(1) to output the numeric mode if asked to?
 
 That's good, but while you're at it you'd probably want to get
 *everything* out of (struct stat) and print it numerically (device,
 flags, atime since epoch, etc.)  You could do this in ls(1), but
 I'll have a patch for fstat(1) soon (working on it) that gives you:
 
 bash$ /usr/obj/usr/src/usr.bin/fstat/fstat -s /tmp /kernel
 INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID GID ATIME  MTIME CTIME   
   NAME
 235226304 4114305  8096   100555 40 1   0   0   1021779222 
10217403541021740354 /kernel
 56651  226304 512  4  041777 00 6   0   0   1021787523 
10217876571021787657 /tmp
 
 so you can parse it however you like.  Either way, ls(1) or
 fstat(1), as long as you can get the info you need.  :-)

This looks much better than my extention.  I look forward to seeing
this get into the tree.

Thanks.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



[PATCH] fixed buildworld in absences of src/games

2002-05-19 Thread Steve Kargl

If you don't have src/games, the make buildworld dies 
without the following patch.

-- 
Steve

--- share/doc/usd/30.rogue/Makefile.origSat May 18 21:29:07 2002
+++ share/doc/usd/30.rogue/Makefile Sat May 18 22:50:21 2002
@@ -10,5 +10,5 @@
 
 .include bsd.doc.mk
 .else
-all clean cleandepend cleandir depend distribute install obj:
+all clean cleandepend cleandir depend includes buildincludes installincludes 
+distribute install obj:
 .endif
--- share/doc/usd/31.trek/Makefile.orig Sat May 18 21:30:12 2002
+++ share/doc/usd/31.trek/Makefile  Sat May 18 22:50:46 2002
@@ -10,5 +10,5 @@
 
 .include bsd.doc.mk
 .else
-all clean cleandepend cleandir depend distribute install obj:
+all clean cleandepend cleandir depend includes buildincludes installincludes 
+distribute install obj:
 .endif

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



new fstat(1) feature (was Re: mergemaster(8) broken -- uses Perl)

2002-05-19 Thread Paul Herman


OK, here's a patch to fstat(1) which adds an -s option to stat(2)
a list of files on the command line.  It's against -STABLE but
should still apply to -CURRENT.  Comments are appreciated.

The only other addition I would like to have is have -n option
display everything numericaly as it does now, whereas no -n
would display everything in human readable format (users, groups,
modes, dates, etc.)

If someone else would like to do that, please patch away! :-)
Otherwise, I'll see if I can't get around to it some other time.

-Paul.

Index: fstat.1
===
RCS file: /u02/ncvs/src/usr.bin/fstat/fstat.1,v
retrieving revision 1.9.2.6
diff -u -r1.9.2.6 fstat.1
--- fstat.1 16 Apr 2002 19:53:35 -  1.9.2.6
+++ fstat.1 19 May 2002 06:35:41 -
@@ -87,6 +87,10 @@
 and print the mode of the file in octal instead of symbolic form.
 .It Fl p
 Report all files open by the specified process.
+.It Fl s
+Print
+.Xr stat 2
+contents of files given on the command line.
 .It Fl u
 Report all files open by the specified user.
 .It Fl v
@@ -181,6 +185,40 @@
 .Xr ln 1 ) ,
 the name printed may not be the actual
 name that the process originally used to open that file.
+.El
+.Pp
+unless the
+.Fl s
+option is given in which case the following is printed:
+.Bl -tag -width BLOCKS
+.It Li INODE
+The inode number of the file.
+.It Li DEV
+The device number the file resides on.
+.It Li SIZE
+The size in bytes of the file.
+.It Li BLOCKS
+The number of blocks used by the file.
+.It Li MODE
+The file's protection mode.
+.It Li FLAGS
+The file's
+.Xr chflags 2
+flags.
+.It Li LNK
+The number of hard links.
+.It Li UID
+The user ID of the file's owner.
+.It Li GID
+The group ID of the file's group.
+.It Li ATIME
+The time of last access.
+.It Li MTIME
+The time of last data modification.
+.It Li CTIME
+The time of last file status change.
+.It Li NAME
+The file name.
 .El
 .Sh SOCKETS
 The formating of open sockets depends on the protocol domain.
Index: fstat.c
===
RCS file: /u02/ncvs/src/usr.bin/fstat/fstat.c,v
retrieving revision 1.21.2.7
diff -u -r1.21.2.7 fstat.c
--- fstat.c 21 Nov 2001 10:49:37 -  1.21.2.7
+++ fstat.c 19 May 2002 06:10:58 -
@@ -121,6 +121,7 @@
 intnflg;   /* (numerical) display f.s. and rdev as dev_t */
 intvflg;   /* display errors in locating kernel data objects etc... */
 intmflg;   /* include memory-mapped files */
+intsflg;   /* display inode information */


 struct file **ofiles;  /* buffer of pointers to file structures */
@@ -137,6 +138,7 @@

 kvm_t *kd;

+void dostats __P((void));
 void dofiles __P((struct kinfo_proc *kp));
 void dommap __P((struct kinfo_proc *kp));
 void vtrans __P((struct vnode *vp, int i, int flag));
@@ -165,7 +167,7 @@
arg = 0;
what = KERN_PROC_ALL;
nlistf = memf = NULL;
-   while ((ch = getopt(argc, argv, fmnp:u:vN:M:)) != -1)
+   while ((ch = getopt(argc, argv, fmnp:su:vN:M:)) != -1)
switch((char)ch) {
case 'f':
fsflg = 1;
@@ -192,6 +194,9 @@
what = KERN_PROC_PID;
arg = atoi(optarg);
break;
+   case 's':
+   sflg = 1;
+   break;
case 'u':
if (uflg++)
usage();
@@ -241,12 +246,24 @@
 #endif
if ((p = kvm_getprocs(kd, what, arg, cnt)) == NULL)
errx(1, %s, kvm_geterr(kd));
-   if (nflg)
+   if (sflg) {
+   if (!checkfile) {
+   warnx(must provide a filename);
+   usage();
+   }
printf(%s,
+INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID GID ATIME  MTIME  CTIME  
+NAME\n);
+   dostats();
+   exit(0);
+   }
+   else {
+   if (nflg)
+   printf(%s,
 USER CMD  PID   FD  DEVINUM   MODE SZ|DV R/W);
-   else
-   printf(%s,
+   else
+   printf(%s,
 USER CMD  PID   FD MOUNT  INUM MODE SZ|DV R/W);
+   }
if (checkfile  fsflg == 0)
printf( NAME\n);
else
@@ -288,6 +305,31 @@
}

 /*
+ * print inode information for all files in devs
+ */
+void
+dostats() {
+   struct stat s;
+   register DEVS *d;
+   for (d = devs; d != NULL; d = d-next) {
+   if (d-name == NULL)/* does this ever happen? */
+   errx(1, invalid filename);
+   if (stat(d-name, s) == -1) {
+   warnx(couldn't stat file %s, d-name);
+   continue;
+   }
+   (void)printf(%-6u %-6d %-8qd %-6qd %-6.6o %-6.6o %-3d %-3d %-3d ,
+   

Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Bakul Shah

 Paul Herman [EMAIL PROTECTED] wrote:
  On Sun, 19 May 2002, Dima Dorfman wrote:
  
   How about fixing ls(1) to output the numeric mode if asked to?
  
  That's good, but while you're at it you'd probably want to get
  *everything* out of (struct stat) and print it numerically (device,
  flags, atime since epoch, etc.)  You could do this in ls(1), but
  I'll have a patch for fstat(1) soon (working on it) that gives you:
  
  bash$ /usr/obj/usr/src/usr.bin/fstat/fstat -s /tmp /kernel
  INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID GID ATIME  MTIME CTIME 
 NAME
  235226304 4114305  8096   100555 40 1   0   0   1021779222 
10217403541021740354 /kernel
  56651  226304 512  4  041777 00 6   0   0   1021787523 
10217876571021787657 /tmp
  
  so you can parse it however you like.  Either way, ls(1) or
  fstat(1), as long as you can get the info you need.  :-)
 
 This looks much better than my extention.  I look forward to seeing
 this get into the tree.

I have a yet another variation, called `stat'.  It is like
ls(1) except you specify what stat fields you want using a
printf style format string.  I added -n flag to print out
numeric values instead of symbolic ones where it makes sense.
I originally wrote it many years ago because access to stat
fields from shell scripts is such a pain.  Yours for asking.

$ stat -h
Usage: stat [-a | -f format] [-h] [-n] [-L] files...
  where options are:
-a  print all attributes
-f format   print using a printf like format
-h  this help message
-L  follow symbolic links
-n  prints numeric values not symbolic values
The -f format is as follows:
  \ escapes are as in printf
  any other non % char is printed as is, %% prints a single %
  a stat field is printed using %[-][width][.width]letter format.
  - for left justification, width[.width] is as for %s format of printf
 letter can be one of:
   a  file access time
   b  allocated blocks
   c  inode change time
   d  dev
   f  flags
   g  group
   G  generation
   l  links
   m  file modify time
   n  file name
   p  permissions: r=read w=write x=exec S=suid/sgid s=suid/sgid+x
   T=sticky t=sticky+x
   r  raw dev
   s  size
   t  type: b=block c=char d=dir -=file p=fifo s=socket l=symlink w=whiteout
   u  user
 The default format is %t%p %2l %-6u %-6g %9s %m %n\n
 Format for the -a option is %a|%b|%c|%d|%f|%g|%G|%i|%l|%m|%p|%r|%s|%t|%u|%n\n

$ stat stat
-rwxr-xr-x  1 bakul  bakul  22523 May 18 23:46:16 2002 stat
$ stat -a stat

-- bakul

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Bakul Shah

 $ stat -a stat

Oops!  A few lines got eaten!

$ stat -a stat
May 19 00:24:42 2002|48|May 19 00:24:42 2002|291846|-|bakul|0|262301|1|May 19 00:24:42 
2002|rwxr-xr-x|1095744|23996|-|bakul|stat
$ stat -a -n stat
1021793082|48|1021793082|291846|0|1001|0|262301|1|1021793082|755|1095744|23996|10|1001|stat

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Alfred Perlstein

* Bakul Shah [EMAIL PROTECTED] [020519 00:30] wrote:
  $ stat -a stat
 
 Oops!  A few lines got eaten!
 
 $ stat -a stat
 May 19 00:24:42 2002|48|May 19 00:24:42 2002|291846|-|bakul|0|262301|1|May 19 
00:24:42 2002|rwxr-xr-x|1095744|23996|-|bakul|stat
 $ stat -a -n stat
 
1021793082|48|1021793082|291846|0|1001|0|262301|1|1021793082|755|1095744|23996|10|1001|stat

Bow to me.

echo 'ibase=2\nobase=8\n' \
`ls -ld ${FILE} | cut -f 1 -d   | \
 sed -e 's/[rwx]/1/g' -e 's/[^rwx1]/0/g'` | \
 bc

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Perl script rewrites - progress (2)

2002-05-19 Thread John Hay

 I just upgraded my machine, removed perl as far as I could find it, and
 tried to rebuild perl from the ports tree.
 
 So far, I had to change the Makefile first, since it used perl for the
 post-patch target. That was easy:
 
 change the CP and the PERL -pi to a:
 
 ${SED} ${FILES}/use.perl $WRKDIR/use.perl
 
 But so far it doesn't compile :-(
 Anyone else seeing this?

Me too. :-( The error I see is:

###
Extracting splain (with variable substitutions)
../miniperl -I../lib perlcc.PL
Extracting perlcc (with variable substitutions)
../miniperl -I../lib dprofpp.PL
Extracting dprofpp (with variable substitutions)
 
Making x2p stuff
make: don't know how to make built-in. Stop
*** Error code 2

Stop in /usr/ports/lang/perl5/work/perl-5.6.1.
*** Error code 1

Stop in /usr/ports/lang/perl5.
###

###
  grep built-in work/perl-5.6.1/x2p/makefile
hash$(OBJ_EXT): built-in
str$(OBJ_EXT): built-in
util$(OBJ_EXT): built-in
walk$(OBJ_EXT): built-in
###

No more perl in the base, perl in ports don't build. Hmmm Who said
there wasn't a conspiracy against perl? :-)

John
-- 
John Hay -- [EMAIL PROTECTED] / [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett

Often I hear people complain about one lacking in FreeBSD's make(1), if an
error is encountered in a Makefile, we only get the base of its name: what
is passed to ReadMakefile().  This is confusing for people trying to debug
Makefiles, I am told, and really, there's no reason not to always give the
real path to what is passed to ReadMakefile().

Therefore, I would like to ask for review of the following patch to main.c
http://people.freebsd.org/~jmallett/make.main.c.realpath.diff

There is of course the edge case that Dir_FindFile will be used, and it
will somehow give us something that is not a meaningful path.  This is
not all that likely, but if it is, I have a patch I use locally which
tells Dir_FindFile to *always* use real paths.  This bloats a buildworld
log a tad, oh well, you might find it useful.  I'm mostly concerned about
getting the main.c patch reviewed and committed, but here is a patch for
dir.c as well as main.c
http://people.freebsd.org/~jmallett/make.realpath.diff

One could easily argue though that the dir.c patch will represent an
overhead increase withotu a real gain.

Because I'm not sure of that, and because what sparked me digging out
these patches from my local make(1) is the FreeBSD user community, I'm
asking for thoughts, opinions, review, and flames from you guys, the
FreeBSD -CURRENT users.  If there's anyone who can blow a whole through
this idea, or endorse it enough to make me commit it, it's you guys.

Here's a small example of what this results in, with foo/Makefile being
broken:

Without these patches:
ref5% make
=== foo
Makefile, line 1: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /d/home/jmallett.
ref5% 


You can see how one might be confused as to which Makefile that refers.

With these patches:
ref5% ~/jmake
=== foo
/d/home/jmallett/foo/Makefile, line 1: Need an operator
jmake: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /d/home/jmallett.
ref5% 

Much clearer.

Thanks in advance.
-- 
[EMAIL PROTECTED]   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Giorgos Keramidas

On 2002-05-19 06:26, Dima Dorfman wrote:
 Paul Herman [EMAIL PROTECTED] wrote:
 
  bash$ /usr/obj/usr/src/usr.bin/fstat/fstat -s /tmp /kernel
  INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID GID ATIME  MTIME CTIME 
 NAME
  235226304 4114305  8096   100555 40 1   0   0   1021779222 
10217403541021740354 /kernel
  56651  226304 512  4  041777 00 6   0   0   1021787523 
10217876571021787657 /tmp
 
  so you can parse it however you like.  Either way, ls(1) or
  fstat(1), as long as you can get the info you need.  :-)

 This looks much better than my extention.  I look forward to seeing
 this get into the tree.

True.  And it's only logical to have fstat print the `struct stat'
fields.  That would make things a *lot* easier, when trying to make
mergemaster.sh avoid all kinds of perl ;-)

-- 
Giorgos Keramidas- http://www.FreeBSD.org
[EMAIL PROTECTED] - The Power to Serve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Perl script rewrites - progress (2)

2002-05-19 Thread Mark Murray

 Hello Mark and all,
 
 I've started digging around /etc/periodic, and have already done part
 of the work.  You might as well, have this assigned to me, unless
 someone proves faster than me and gets it done in less than a day or
 two.
 
 What I've done so far (and only slightly tested) is available at
 http://www.FreeBSD.org/~keramida/diff/periodic.diff

You have it!

Don't wait for me. :-)

M
-- 
o   Mark Murray
\_
O.\_Warning: this .sig is umop ap!sdn
#text/plain; name=cv.doc [Mark Murray CV Plain Text] cv.doc
#application/octet-stream; name=cv.pdf [Mark Murray CV PDF] cv.pdf

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Giorgos Keramidas

On 2002-05-19 02:13, Alfred Perlstein wrote:
 * Bakul Shah [EMAIL PROTECTED] [020519 00:30] wrote:
   $ stat -a stat
 
  Oops!  A few lines got eaten!
 
  $ stat -a stat
  May 19 00:24:42 2002|48|May 19 00:24:42 2002|291846|-|bakul|0|262301|1|May 19 
00:24:42 2002|rwxr-xr-x|1095744|23996|-|bakul|stat
  $ stat -a -n stat
  
1021793082|48|1021793082|291846|0|1001|0|262301|1|1021793082|755|1095744|23996|10|1001|stat

 Bow to me.

 echo 'ibase=2\nobase=8\n' \
 `ls -ld ${FILE} | cut -f 1 -d   | \
  sed -e 's/[rwx]/1/g' -e 's/[^rwx1]/0/g'` | \
  bc

Great idea to use bc(1) ;-) It doesn't really parse sticky, suid or
sgid bits, but it's smaller than the awk version.  The following did
the trick nicely (but is too ``complicated'', and I'd still like
having a tool that allows userland to call stat/fstat(2):

hades+charon:/tmp$ cat foo.sh
#!/bin/sh

echo 'ibase=2;obase=8;' \
` ls -ld $1 | \
cut -c2-10 | \
sed -e '/^..[sS]/ s/^.*$/+1000/' \
-e '/^.[sS]/ s/^.*$/+100/' \
-e '/^[tT]/ s/^.*$/+10/' | \
sed -e 's/[st]/x/g' -e 's/ST/-/g' | \
sed -e 's/[rwx]/1/g' | \
sed -e 's/[^1+]/0/g' ` | bc

% sh foo.sh /tmp
hades+charon:/tmp$ sh foo.sh /tmp
1777

-- 
Giorgos Keramidas- http://www.FreeBSD.org
[EMAIL PROTECTED] - The Power to Serve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: new fstat(1) feature (was Re: mergemaster(8) broken -- uses Perl)

2002-05-19 Thread Giorgos Keramidas

On 2002-05-19 00:01, Paul Herman wrote:
 
 OK, here's a patch to fstat(1) which adds an -s option to stat(2)
 a list of files on the command line.  It's against -STABLE but
 should still apply to -CURRENT.  Comments are appreciated.

When building with WARNS=2 I also saw a few 'long int format, int
argument' warnings, which can be fixed by using %u instead of %lu in
printf's for st.a_time and friends.  Style(9) put aside, this seems to
work for me in CURRENT (but prints a few of the columns unaligned, see ATIME
below):

hades+root:/tmp/fstat# ./fstat -s fstat
INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID GID ATIME  MTIME  CTIME
  NAME
14134  160768 1771436 100755 00 1   1001 0   1021809739 1021809739 
1021809739 fstat

-- 
Giorgos Keramidas- http://www.FreeBSD.org
[EMAIL PROTECTED] - The Power to Serve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter

Why do people think that a realpath is always available?
What is wrong with just extending using pwd?
And maybe optionally stripping .. and . elements if wanted.
At least pwd doesn't break amd(8) pathnames.
It became nearly impossible to use amd(8) today just because of all that
realpath introduced breakage.

On Sun, May 19, 2002 at 10:04:21AM +, J. Mallett wrote:
 Often I hear people complain about one lacking in FreeBSD's make(1), if an
 error is encountered in a Makefile, we only get the base of its name: what
 is passed to ReadMakefile().  This is confusing for people trying to debug
 Makefiles, I am told, and really, there's no reason not to always give the
 real path to what is passed to ReadMakefile().
 
 Therefore, I would like to ask for review of the following patch to main.c
   http://people.freebsd.org/~jmallett/make.main.c.realpath.diff
 
 There is of course the edge case that Dir_FindFile will be used, and it
 will somehow give us something that is not a meaningful path.  This is
 not all that likely, but if it is, I have a patch I use locally which
 tells Dir_FindFile to *always* use real paths.  This bloats a buildworld
 log a tad, oh well, you might find it useful.  I'm mostly concerned about
 getting the main.c patch reviewed and committed, but here is a patch for
 dir.c as well as main.c
   http://people.freebsd.org/~jmallett/make.realpath.diff
 
 One could easily argue though that the dir.c patch will represent an
 overhead increase withotu a real gain.
 
 Because I'm not sure of that, and because what sparked me digging out
 these patches from my local make(1) is the FreeBSD user community, I'm
 asking for thoughts, opinions, review, and flames from you guys, the
 FreeBSD -CURRENT users.  If there's anyone who can blow a whole through
 this idea, or endorse it enough to make me commit it, it's you guys.
 
 Here's a small example of what this results in, with foo/Makefile being
 broken:
 
 Without these patches:
 ref5% make
 === foo
 Makefile, line 1: Need an operator
 make: fatal errors encountered -- cannot continue
 *** Error code 1
 
 Stop in /d/home/jmallett.
 ref5% 
 
 
 You can see how one might be confused as to which Makefile that refers.
 
 With these patches:
 ref5% ~/jmake
 === foo
 /d/home/jmallett/foo/Makefile, line 1: Need an operator
 jmake: fatal errors encountered -- cannot continue
 *** Error code 1
 
 Stop in /d/home/jmallett.
 ref5% 
 
 Much clearer.

-- 
B.Walter  COSMO-Project http://www.cosmo-project.de
[EMAIL PROTECTED] Usergroup   [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett

On Sun, May 19, 2002 at 03:21:59PM +0200, Bernd Walter wrote:
 Why do people think that a realpath is always available?

Because the manual page doesn't say it isn't.

 What is wrong with just extending using pwd?

That won't handle . and .. and relative paths spanning symbolic links, which
you may or may not want to see in the output, etc.

 And maybe optionally stripping .. and . elements if wanted.

The ODE make(1) as seen in CMU buildtools4 did this by hand, there's no reason
we couldn't either, except someone would likely come along and use realpath(3)
in place of it at a later date.  That's what I did to ODE.

 At least pwd doesn't break amd(8) pathnames.

How does realpath _break_ amd(8) pathnames?  I'm not very familiar with any
functionality that would cause this.  If realpath(3) gets broken, that sounds
like we either need some new conditions in realpath(3), or we need to fix
amd(8) paths.

 It became nearly impossible to use amd(8) today just because of all that
 realpath introduced breakage.

To what end?  More information is helpful.

Thanks.
-- 
[EMAIL PROTECTED]   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



new doc under src/share/doc break world

2002-05-19 Thread Szilveszter Adam

Hello everybody,

The newly integrated documents under src/share/doc/psd and usd break the
world because they are not really incorporated into the build system.
The Makefiles define their own targets, but this way the source files
are not found during make world because the build does not cd into the
appropriate src directory. As it seems, the docs build just fine if the
existing infrastructure in bsd.doc.mk is used.

At present, this means in the psd:

01.cacm, 02.implement, 03.iosys, 04.uprog, 06.Clang, 15.yacc, 16.lex,
17.m4 

in the usd:

21.troff

What needs to be done is really just that the existing infrastructure of
bsd.doc.mk should be used and the custom targets be deleted. For 17.m4, the
problem is more serious, the sU macro does not seem to exist in the
FreeBSD base system just for now, so should be imported first.

Just an FYI.

-- 
Regards:

Szilveszter ADAM
Szombathely Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Bug in -current flock()?

2002-05-19 Thread Robert Watson


I don't know much (anything) about the advisory locking code, but was
puzzled to see the following at the bottom of the flock() system call code
in kern_descrip.c:

if (uap-how  LOCK_EX)
lf.l_type = F_WRLCK;
else if (uap-how  LOCK_SH)
lf.l_type = F_RDLCK;
else {
error = EBADF;
goto done2;
}
FILE_LOCK(fp);
fp-f_flag |= FHASLOCK;
FILE_UNLOCK(fp);
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, lf,
(uap-how  LOCK_NB) ? F_FLOCK : F_FLOCK | F_WAIT);
done2:
fdrop(fp, td);
mtx_unlock(Giant);
return (error);
}

My reading of that is that the fp-f_flag field will be unconditionally
updated to include FHASLOCK, even if VOP_ADVLOCK() returns an error.  Is
this correct?

Robert N M Watson FreeBSD Core Team, TrustedBSD Project
[EMAIL PROTECTED]  NAI Labs, Safeport Network Services


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: [PATCH] fixed buildworld in absences of src/games

2002-05-19 Thread Steve Kargl

I have filed PR misc/38292 to document this problem.

steve


On Sat, May 18, 2002 at 11:42:37PM -0700, Steve Kargl wrote:
 If you don't have src/games, the make buildworld dies 
 without the following patch.
 
 -- 
 Steve
 
 --- share/doc/usd/30.rogue/Makefile.orig  Sat May 18 21:29:07 2002
 +++ share/doc/usd/30.rogue/Makefile   Sat May 18 22:50:21 2002
 @@ -10,5 +10,5 @@
  
  .include bsd.doc.mk
  .else
 -all clean cleandepend cleandir depend distribute install obj:
 +all clean cleandepend cleandir depend includes buildincludes installincludes 
distribute install obj:
  .endif
 --- share/doc/usd/31.trek/Makefile.orig   Sat May 18 21:30:12 2002
 +++ share/doc/usd/31.trek/MakefileSat May 18 22:50:46 2002
 @@ -10,5 +10,5 @@
  
  .include bsd.doc.mk
  .else
 -all clean cleandepend cleandir depend distribute install obj:
 +all clean cleandepend cleandir depend includes buildincludes installincludes 
distribute install obj:
  .endif
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-current in the body of the message

-- 
Steve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter

On Sun, May 19, 2002 at 02:00:04PM +, J. Mallett wrote:
 On Sun, May 19, 2002 at 03:21:59PM +0200, Bernd Walter wrote:
  Why do people think that a realpath is always available?
 
 Because the manual page doesn't say it isn't.
 
  What is wrong with just extending using pwd?
 
 That won't handle . and .. and relative paths spanning symbolic links, which
 you may or may not want to see in the output, etc.
 
  And maybe optionally stripping .. and . elements if wanted.
 
 The ODE make(1) as seen in CMU buildtools4 did this by hand, there's no reason
 we couldn't either, except someone would likely come along and use realpath(3)
 in place of it at a later date.  That's what I did to ODE.
 
  At least pwd doesn't break amd(8) pathnames.
 
 How does realpath _break_ amd(8) pathnames?  I'm not very familiar with any
 functionality that would cause this.  If realpath(3) gets broken, that sounds
 like we either need some new conditions in realpath(3), or we need to fix
 amd(8) paths.
 
  It became nearly impossible to use amd(8) today just because of all that
  realpath introduced breakage.
 
 To what end?  More information is helpful.

amd works as a userland nfs server which builds softlinks to the
path it mounts the volume.
An example:
[52]cicely30 cd /net
[53]cicely30 ls -al
total 3
dr-xr-xr-x   2 root  wheel  512 May 18 14:08 .
drwxr-xr-x  19 root  wheel  512 May 18 14:08 ..
[54]cicely30 ls -ald cicely5.cicely.de/var/d9
drwxr-xr-x  4 root  wheel  512 May 19 01:03 cicely5.cicely.de/var/d9
[55]cicely30 ls -al 
total 4
dr-xr-xr-x   2 root  wheel  512 May 19 17:10 .
drwxr-xr-x  19 root  wheel  512 May 18 14:08 ..
lrwxrwxrwx   1 root  wheel   22 May 19 17:10 cicely5.cicely.de - 
/.amd_mnt/cicely5/host
[56]cicely30 mount | grep d9
cicely5:/var/d9 on /.amd_mnt/cicely5/host/var/d9 (nfs, nodev, nosuid)
[57]cicely30 mount | grep net
pid192@cicely30:/net on /net (nfs)

amd has mounted cicely5:/var/d9 on /.amd_mnt/cicely5/host/var/d9
because /net/cicely5.cicely.de/var/d9 was accessed.
But /net/cicely5.cicely.de/var/d9 is visible as a softlink.
After a while /.amd_mnt/cicely5/host/var/d9 gets unmounted.
Now we can't access the realpath anymore!
But the path we originally used (/net/cicely5.cicely.de/var/d9) is
still fully functional.
My canonical path is /net/cicely5.cicely.de/var/d9 - even it contains
a softlink.
It's worse if I want to relocate the data to another server.
amd mounts the path under a different name, but the intended access
path is still valid.
If I can't mount on fly or relocate directories it would obsolete any
possible benefit from amd.

Even without amd realpath(3) sucks.
Say I have a fat volume mounted under /var/d1.
I softlink /usr/local to /var/d1/local and /home to /var/d1/home.
Now that fat volume gets filled and I add a second volume under
/var/d2.
To have an effect I relocate /var/d1/home to /var/d2/home and update
the link.
Thanks to all that realpath(3) crap /var/d1/home got spread into
thousands places and I have to softlink /var/d1/home to /var/d2/home...

I even can't buildworld on another machine without taking care of
realpath.
If I don't enshure that the source has the same realpath on the
machine to run installworld as it had on the machine where I did
the buildworld it break.

And all that without a real benefit from blindly using realpath(3).

-- 
B.Walter  COSMO-Project http://www.cosmo-project.de
[EMAIL PROTECTED] Usergroup   [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Bug in -current flock()?

2002-05-19 Thread Alfred Perlstein

* Robert Watson [EMAIL PROTECTED] [020519 07:30] wrote:
 
 I don't know much (anything) about the advisory locking code, but was
 puzzled to see the following at the bottom of the flock() system call code
 in kern_descrip.c:
 
 if (uap-how  LOCK_EX)
 lf.l_type = F_WRLCK;
 else if (uap-how  LOCK_SH)
 lf.l_type = F_RDLCK;
 else {
 error = EBADF;
 goto done2;
 }
 FILE_LOCK(fp);
 fp-f_flag |= FHASLOCK;
 FILE_UNLOCK(fp);
 error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, lf,
 (uap-how  LOCK_NB) ? F_FLOCK : F_FLOCK | F_WAIT);
 done2:
 fdrop(fp, td);
 mtx_unlock(Giant);
 return (error);
 }
 
 My reading of that is that the fp-f_flag field will be unconditionally
 updated to include FHASLOCK, even if VOP_ADVLOCK() returns an error.  Is
 this correct?

Yes, but it's harmless.  All that may happen is that at exit/close
time possibly calling VOP_ADVLOCK to unlock the file when it doesn't
need to.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using 1970s technology,
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



tcsh

2002-05-19 Thread Riccardo Torrini

If exists a directory named sort tcsh chdir to that dir instead of
executing sort present in path (and no, I have no . anywere in path)

# pwd
/usr/src/contrib
# find . -name Makefile | sort
# pwd
/usr/src/contrib/sort
# cd ..
# find . -name Makefile | /usr/bin/sort
./bind/Makefile
./bind/bin/Makefile
[...]


And it also happen with non existent commands:

# pwd
/usr/src/contrib
# find . -name Makefile | libreadline
# pwd
/usr/src/contrib/libreadline


Riccardo.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett

On Sun, May 19, 2002 at 05:34:28PM +0200, Bernd Walter wrote:
 
 I even can't buildworld on another machine without taking care of
 realpath.
 If I don't enshure that the source has the same realpath on the
 machine to run installworld as it had on the machine where I did
 the buildworld it break.

installworld does?  How?  The only possibility I can see here is that
dependency rules might be bad because the full paths may differ, but
that wouldn't affect installworld.

 And all that without a real benefit from blindly using realpath(3).

Show me a canonpath(3) or something which will give the simplest symbolic
i.e. a simplified full path given a relative or absolute path with all
redundancies resolved, without resolving away any symbolic paths.

I'm ``blindly'' using the only answer we have to a question: how can I get
an absolute (thus unique) path to an object in the filesystem.

I'm open to alternative ways of doing that, especially as I described
canonpath(3) above.

Thanks.
-- 
[EMAIL PROTECTED]   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter

On Sun, May 19, 2002 at 04:27:10PM +, J. Mallett wrote:
 On Sun, May 19, 2002 at 05:34:28PM +0200, Bernd Walter wrote:
  
  I even can't buildworld on another machine without taking care of
  realpath.
  If I don't enshure that the source has the same realpath on the
  machine to run installworld as it had on the machine where I did
  the buildworld it break.
 
 installworld does?  How?  The only possibility I can see here is that
 dependency rules might be bad because the full paths may differ, but
 that wouldn't affect installworld.

The filenames in /usr/obj are canonicalized.

  And all that without a real benefit from blindly using realpath(3).
 
 Show me a canonpath(3) or something which will give the simplest symbolic
 i.e. a simplified full path given a relative or absolute path with all
 redundancies resolved, without resolving away any symbolic paths.

It would be possible to use the realpath code without the softlink
handling.
Not too difficult if we only had a non-canocalized basedir.

 I'm ``blindly'' using the only answer we have to a question: how can I get
 an absolute (thus unique) path to an object in the filesystem.

Forget it - it's not possible with FreeBSD (see below).
I'm just a bit frustrated about all the brokenness with softlink
handling I saw,  without noticing that FreeBSD doesn't give you a
chance to do it right.

 I'm open to alternative ways of doing that, especially as I described
 canonpath(3) above.

After some digging it seems like it's worse.
getcwd already returns a canonical path on FreeBSD, NetBSD and Solaris.
Only HP-UX returns the accumulated chdir path.
Very dissapointing.

-- 
B.Walter  COSMO-Project http://www.cosmo-project.de
[EMAIL PROTECTED] Usergroup   [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: df

2002-05-19 Thread Ian

On 05/18/02 17:41, Ian Dowse wrote:

 In message [EMAIL PROTECTED], Terry Lambert writes:
 I think the reason for the if is to keep the df from hanging
 indefinitely, particularly when you give it an explicit list.
 
 No, I believe the if (vfslist != NULL) code was there to reduce
 the maximum column widths to those necessary for an explicit list
 of filesystems rather than using the maximum widths for all
 filesystems. The regetmntinfo() call before the if has already
 performed any operations that could hang indefinitely, so it makes
 sense to unconditionally use these up-to-date results instead of
 the potentially stale list from getmntinfo(..., MNT_NOWAIT).
 
 Ian
 

That exactly matches my understanding of the code, the test for vfslist !=
NULL was there only to prevent recalculating the field widths when they
couldn't have changed.  Except it turns out they could have changed for
other reasons than a non-null vfslist.

Terry, the issue of hanging (WAIT versus NOWAIT) is controlled by the -n
(nflag) option, and by whether you've specifically named filesystems on the
command line (indicating you're willing to wait for those filesystems).  The
vfslist stuff is related to the -t option (filter the list down to
filesystems of a given type).  There's no relationship between the vfslist
and waiting or not.

-- Ian (the other one)



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



alpha tinderbox failure

2002-05-19 Thread Dag-Erling Smorgrav

--
 Rebuilding the temporary build tree
--
 stage 1: bootstrap tools
--
 stage 2: cleaning up the object tree
--
 stage 2: rebuilding the object tree
--
 stage 2: build tools
--
 stage 3: cross tools
--
 stage 4: populating /tmp/des/obj/alpha/d/home/des/tinderbox/src/alpha/usr/include
--
 stage 4: building libraries
--
 stage 4: make dependencies
--
 stage 4: building everything..
--
=== usr.bin/unexpand
...
Patching file inc-hist.texi using Plan A...
Hunk #1 succeeded at 26.
Hunk #2 succeeded at 39.
done
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/gdb.texinfo:4647:
 warning: unlikely character , in @var.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/gdb.texinfo:5284:
 warning: @sc argument all uppercase, thus no effect.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/gdb.texinfo:6531:
 warning: @sc argument all uppercase, thus no effect.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/gdbint.texinfo:1026:
 warning: @sc argument all uppercase, thus no effect.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/stabs.texinfo:875:
 warning: `.' or `,' must follow cross reference, not f.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/stabs.texinfo:2040:
 warning: unlikely character , in @var.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/stabs.texinfo:2040:
 warning: unlikely character , in @var.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/stabs.texinfo:2139:
 warning: unlikely character , in @var.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/stabs.texinfo:2139:
 warning: unlikely character , in @var.
/d/home/des/tinderbox/src/gnu/usr.bin/binutils/doc/../../../../contrib/gdb.291/gdb/doc/stabs.texinfo:3373:
 warning: `.' or `,' must follow cross reference, not @.
=== gnu/usr.bin/binutils/gdb
cc1: warnings being treated as errors
/d/home/des/tinderbox/src/contrib/gdb.291/gdb/ax-general.c: In function `ax_print':
/d/home/des/tinderbox/src/contrib/gdb.291/gdb/ax-general.c:376: warning: implicit 
declaration of function `print_longest'
*** Error code 1

Stop in /d/home/des/tinderbox/src/gnu/usr.bin/binutils/gdb.
*** Error code 1

Stop in /d/home/des/tinderbox/src/gnu/usr.bin/binutils.
*** Error code 1

Stop in /d/home/des/tinderbox/src/gnu/usr.bin.
*** Error code 1

Stop in /d/home/des/tinderbox/src/gnu.
*** Error code 1

Stop in /d/home/des/tinderbox/src.
*** Error code 1

Stop in /d/home/des/tinderbox/src.
*** Error code 1

Stop in /d/home/des/tinderbox/src.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett

On Sun, May 19, 2002 at 06:56:40PM +0200, Bernd Walter wrote:
  I'm ``blindly'' using the only answer we have to a question: how can I get
  an absolute (thus unique) path to an object in the filesystem.
 
 Forget it - it's not possible with FreeBSD (see below).
 I'm just a bit frustrated about all the brokenness with softlink
 handling I saw,  without noticing that FreeBSD doesn't give you a
 chance to do it right.

I really doubt there isn't a way to do it right somehow, stuff like this
has been around forever.  Consider how extensively @sys expansion was relied
on by AFS, and so on.  You just have to hide the physical path somehow.

  I'm open to alternative ways of doing that, especially as I described
  canonpath(3) above.
 
 After some digging it seems like it's worse.
 getcwd already returns a canonical path on FreeBSD, NetBSD and Solaris.
 Only HP-UX returns the accumulated chdir path.
 Very dissapointing.

Look at getcwd_logical() in pwd.c
-- 
[EMAIL PROTECTED]   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread David O'Brien

On Sat, May 18, 2002 at 08:12:15PM -0700, Steve Kargl wrote:
  Warnings are treated as errors.  Since GCC 3.1 has brought a hell of a
  lot more warnings with us, you should use -DNO_WERROR until the dust
  of the GCC 3.1 import settles down.
 
 If everyone is using  -DNO_WERROR, then who would report build
 problems :-).

Because we are wanting for people to let the dust settle on the switch to
GCC 3.1.  It is best for people to juse use -DNO_WERROR for now.
Patience.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread David O'Brien

On Sun, May 19, 2002 at 05:29:22AM +0300, Giorgos Keramidas wrote:
 Part of the problems I had when I tried to replace perl in
 mergemaster.sh with something `native' was that the perl code uses
 stat(2) to obtain the permission bits of a directory/file and I can't
 think of a way to do this with tools in the base system without
 resorting to ugly awk scripts that parse and translate ls(1) output.

What is so ugly about it?  It is not that many lines, and it is very easy
to read and understand what you are doing.  Make it an sh function.
There is most likely code like this in the Perl binary.  If this is so
ugly lets gut it out of perl also.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: tcsh

2002-05-19 Thread Jordan DeLong

On Sun, May 19, 2002 at 06:14:09PM +0200, Riccardo Torrini wrote:
 If exists a directory named sort tcsh chdir to that dir instead of
 executing sort present in path (and no, I have no . anywere in path)
 

You probably have the 'implicitcd' option on.

-- 
Jordan DeLong
[EMAIL PROTECTED]




msg38548/pgp0.pgp
Description: PGP signature


Re: tcsh

2002-05-19 Thread Mark Peek

At 6:14 PM +0200 5/19/02, Riccardo Torrini wrote:
If exists a directory named sort tcsh chdir to that dir instead of
executing sort present in path (and no, I have no . anywere in path)

# pwd
/usr/src/contrib
# find . -name Makefile | sort
# pwd
/usr/src/contrib/sort
# cd ..
# find . -name Makefile | /usr/bin/sort
./bind/Makefile
./bind/bin/Makefile
[...]


And it also happen with non existent commands:

# pwd
/usr/src/contrib
# find . -name Makefile | libreadline
# pwd
/usr/src/contrib/libreadline


I tried to reproduce this problem but it worked fine for me.

# pwd
/usr/src/contrib
# find . -name Makefile | sort
./bind/Makefile
./bind/bin/Makefile
[...]

This could be due to something in your .cshrc file. Try this:

# tcsh -f -c find . -name Makefile | sort

the -f flag will prevent sourcing the .cshrc file.

Mark

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: new fstat(1) feature (was Re: mergemaster(8) broken -- usesPerl)

2002-05-19 Thread Paul Herman

Hi,

Here's the final fstat(1) patch which obeys the '-n' switch.
Inodes have a lot on info, so the output is very long.  Please nit
pick on the code, including any style(9) violations you see.

Bakul, I really like your stat -a because the output is compact,
but it's not as readable.  /me wonders if there's a happy medium...

-Paul.

Index: fstat.1
===
RCS file: /u02/ncvs/src/usr.bin/fstat/fstat.1,v
retrieving revision 1.9.2.6
diff -u -r1.9.2.6 fstat.1
--- fstat.1 16 Apr 2002 19:53:35 -  1.9.2.6
+++ fstat.1 19 May 2002 17:48:19 -
@@ -87,6 +87,10 @@
 and print the mode of the file in octal instead of symbolic form.
 .It Fl p
 Report all files open by the specified process.
+.It Fl s
+Print
+.Xr stat 2
+contents of files given on the command line.
 .It Fl u
 Report all files open by the specified user.
 .It Fl v
@@ -181,6 +185,42 @@
 .Xr ln 1 ) ,
 the name printed may not be the actual
 name that the process originally used to open that file.
+.El
+.Pp
+unless the
+.Fl s
+option is given in which case the following is printed:
+.Bl -tag -width DEV\|MOUNT
+.It Li INODE
+The inode number of the file.
+.It Li DEV\|MOUNT
+The device number the file resides on.
+.It Li SIZE
+The size in bytes of the file.
+.It Li BLOCKS
+The number of blocks used by the file.
+.It Li MODE
+The file's protection mode.
+.It Li FLAGS
+The file's
+.Xr chflags 2
+flags.
+.It Li LNK
+The number of hard links.
+.It Li UID\|USER
+The user (ID) of the file's owner.
+.It Li GID\|GROUP
+The group (ID) of the file's group.
+.It Li ATIME
+The time of last access.
+.It Li MTIME
+The time of last data modification.
+.It Li CTIME
+The time of last file status change.
+.It Li GEN
+The file generation number.
+.It Li NAME
+The file name.
 .El
 .Sh SOCKETS
 The formating of open sockets depends on the protocol domain.
Index: fstat.c
===
RCS file: /u02/ncvs/src/usr.bin/fstat/fstat.c,v
retrieving revision 1.21.2.7
diff -u -r1.21.2.7 fstat.c
--- fstat.c 21 Nov 2001 10:49:37 -  1.21.2.7
+++ fstat.c 19 May 2002 17:37:08 -
@@ -97,6 +97,7 @@
 #include string.h
 #include unistd.h
 #include netdb.h
+#include grp.h

 #include fstat.h

@@ -121,6 +122,7 @@
 intnflg;   /* (numerical) display f.s. and rdev as dev_t */
 intvflg;   /* display errors in locating kernel data objects etc... */
 intmflg;   /* include memory-mapped files */
+intsflg;   /* display inode information */


 struct file **ofiles;  /* buffer of pointers to file structures */
@@ -137,6 +139,7 @@

 kvm_t *kd;

+void dostats __P((void));
 void dofiles __P((struct kinfo_proc *kp));
 void dommap __P((struct kinfo_proc *kp));
 void vtrans __P((struct vnode *vp, int i, int flag));
@@ -165,7 +168,7 @@
arg = 0;
what = KERN_PROC_ALL;
nlistf = memf = NULL;
-   while ((ch = getopt(argc, argv, fmnp:u:vN:M:)) != -1)
+   while ((ch = getopt(argc, argv, fmnp:su:vN:M:)) != -1)
switch((char)ch) {
case 'f':
fsflg = 1;
@@ -192,6 +195,9 @@
what = KERN_PROC_PID;
arg = atoi(optarg);
break;
+   case 's':
+   sflg = 1;
+   break;
case 'u':
if (uflg++)
usage();
@@ -217,6 +223,11 @@
exit(1);
}

+   if (sflg  !checkfile) {
+   warnx(must provide a filename);
+   usage();
+   }
+
ALLOC_OFILES(256);  /* reserve space for file pointers */

if (fsflg  !checkfile) {
@@ -242,11 +253,19 @@
if ((p = kvm_getprocs(kd, what, arg, cnt)) == NULL)
errx(1, %s, kvm_geterr(kd));
if (nflg)
-   printf(%s,
+   printf(%s, (sflg)?
+INODE  DEVSIZE BLOCKS MODE   FLAGS  LNK UID  GID  ATIME  MTIME  
+CTIME  GENNAME\n :
 USER CMD  PID   FD  DEVINUM   MODE SZ|DV R/W);
else
-   printf(%s,
+   printf(%s, (sflg)?
+INODE  MOUNT  SIZE BLOCKS MODEFLAGS  LNK USER GROUPATIME 
+   MTIMECTIME
+GENNAME\n :
 USER CMD  PID   FD MOUNT  INUM MODE SZ|DV R/W);
+
+   if (sflg) {
+   dostats();
+   exit(0);
+   }
+
if (checkfile  fsflg == 0)
printf( NAME\n);
else
@@ -288,6 +307,71 @@
}

 /*
+ * print inode information for all files in devs
+ */
+void
+dostats() {
+   struct stat s;
+   struct statfs sf;
+   struct passwd *pw;
+   struct group *gr;
+   char mode[15], tstr[128];
+   register DEVS *d;
+
+   for (d = devs; d != NULL; d = d-next) {
+   

Re: tcsh

2002-05-19 Thread Riccardo Torrini

On 19-May-2002 (18:12:00/GMT) Mark Peek wrote:

If exists a directory named sort tcsh chdir to that dir instead of
executing sort present in path (and no, I have no . anywere in path)
And it also happen with non existent commands:

# pwd
/usr/src/contrib
# find . -name Makefile | libreadline
# pwd
/usr/src/contrib/libreadline

 I tried to reproduce this problem but it worked fine for me.
 This could be due to something in your .cshrc file.

I have set implicitcd.  But it would be honoured only when a
directory is specified on a line itself, not after a pipe (IMHO).



Riccardo.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: tcsh

2002-05-19 Thread Riccardo Torrini

On 19-May-2002 (18:27:40/GMT) Riccardo Torrini wrote:

 I have set implicitcd.  But it would be honoured only when a
 directory is specified on a line itself, not after a pipe (IMHO).

Or (even better), when a directory is followed by a / ?


Riccardo.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Buglet in src/usr.bin/uuencode/Makefile

2002-05-19 Thread Szilveszter Adam

Hi everybody,

Due to a commit from today, there is a small buglet in
src/usr.bin/uuencode/Makefile, a wrong MLINK. This breaks installworld.
(Which doesn't seem to be tested a helluvalot these days)

Apply this patch:

Index: Makefile
===
RCS file: /usr/home/cc/ncvs/freebsd/src/usr.bin/uuencode/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile19 May 2002 11:17:17 -  1.7
+++ Makefile19 May 2002 15:28:18 -
@@ -8,6 +8,6 @@
 MLINKS=uuencode.1 uudecode.1 \
uuencode.format.5 uuencode.5 \
uuencode.1 b64encode.1 \
-   b64decode.1 b64encode.1
+   b64encode.1 b64decode.1
 
 .include bsd.prog.mk

Also, while I have the mike, I think makewhatis can already be turned
back on for the installworld phase, it seemed to work ok when I tested
it (the C version).

-- 
Regards:

Szilveszter ADAM
Szombathely Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter

On Sun, May 19, 2002 at 05:27:47PM +, J. Mallett wrote:
 On Sun, May 19, 2002 at 06:56:40PM +0200, Bernd Walter wrote:
   I'm ``blindly'' using the only answer we have to a question: how can I get
   an absolute (thus unique) path to an object in the filesystem.
  
  Forget it - it's not possible with FreeBSD (see below).
  I'm just a bit frustrated about all the brokenness with softlink
  handling I saw,  without noticing that FreeBSD doesn't give you a
  chance to do it right.
 
 I really doubt there isn't a way to do it right somehow, stuff like this
 has been around forever.  Consider how extensively @sys expansion was relied
 on by AFS, and so on.  You just have to hide the physical path somehow.

Hidding the physical Path is difficult to be done right.
If getcwd would return the logical path things would be much easier.

   I'm open to alternative ways of doing that, especially as I described
   canonpath(3) above.
  
  After some digging it seems like it's worse.
  getcwd already returns a canonical path on FreeBSD, NetBSD and Solaris.
  Only HP-UX returns the accumulated chdir path.
  Very dissapointing.

After rechecking getcwd on HP-UX also returns the physical path.
I tested on that machine only with pwd...
Which is aliased to echo $cwd - damn uni acounts...
Maybe I have just a wrong view on that issue and softlinks have never
been worked that way.

 Look at getcwd_logical() in pwd.c

Aha - but that does mean trusting $PWD.

-- 
B.Walter  COSMO-Project http://www.cosmo-project.de
[EMAIL PROTECTED] Usergroup   [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



perl build broken on current. Was: Re: Perl script rewrites - progress (2)

2002-05-19 Thread John Hay

 I just upgraded my machine, removed perl as far as I could find it, and
 tried to rebuild perl from the ports tree.
 
 So far, I had to change the Makefile first, since it used perl for the
 post-patch target. That was easy:
 
 change the CP and the PERL -pi to a:
 
 ${SED} ${FILES}/use.perl $WRKDIR/use.perl
 
 But so far it doesn't compile :-(
 Anyone else seeing this?

This fix the perl build for me on current. The last part of the patch
is a litlle brute force. For some reason the temporary dependancy file
end up with lines built-in and command line in them, so I just
removed them in one of the sed invocations. I wasn't really interested
in where they come from. I wanted a working perl, and didn't care much
about a nice port. :-)

John
-- 
John Hay -- [EMAIL PROTECTED] / [EMAIL PROTECTED]


Index: Makefile
===
RCS file: /home/ncvs/ports/lang/perl5/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- Makefile19 Dec 2001 17:05:04 -  1.40
+++ Makefile19 May 2002 18:53:53 -
@@ -119,12 +119,11 @@
 BSDPAN_WRKSRC= ${WRKDIR}/BSDPAN-${PORTVERSION}
 
 post-patch:
-   ${CP} ${FILESDIR}/use.perl ${WRKDIR}
-   ${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g;' \
-   -e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-   -e 's|%%PERL_VERSION%%|${PERL_VERSION}|g;' \
-   -e 's|%%PERL_ARCH%%|${PERL_ARCH}|g;' \
-   ${WRKDIR}/use.perl
+   ${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+   -e 's|%%PERL_VER%%|${PERL_VER}|g' \
+   -e 's|%%PERL_VERSION%%|${PERL_VERSION}|g' \
+   -e 's|%%PERL_ARCH%%|${PERL_ARCH}|g' \
+   ${FILESDIR}/use.perl ${WRKDIR}/use.perl
 
 post-install:
@strip ${PREFIX}/bin/perl ${PREFIX}/bin/suidperl
Index: files/patch-ae
===
RCS file: /home/ncvs/ports/lang/perl5/files/patch-ae,v
retrieving revision 1.5
diff -u -r1.5 patch-ae
--- files/patch-ae  22 Mar 2001 15:17:46 -  1.5
+++ files/patch-ae  19 May 2002 18:19:11 -
@@ -1,5 +1,5 @@
 makedepend.SH.ORIG Fri Jul 24 06:00:58 1998
-+++ makedepend.SH  Thu Jul 30 17:08:37 1998
+--- makedepend.SH.orig Mon Mar 19 09:33:17 2001
 makedepend.SH  Sun May 19 20:19:01 2002
 @@ -68,6 +68,7 @@
  case $osname in
  os2) ;;
@@ -8,3 +8,15 @@
  *) $touch $firstmakefile ;;
  esac
  fi
+@@ -196,8 +197,9 @@
+ $echo Updating $mf...
+ $echo # If this runs make out of memory, delete /usr/include lines. \
+$mf.new
+-$sed 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '$defrule \2| .deptmp \
+-   $mf.new
++$sed -e '/built-in/d' -e '/command line/d' \
++  -e 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '$defrule \2| \
++  .deptmp $mf.new
+ else
+ $MAKE hlist || ($echo Searching for .h files...; \
+   $echo *.h | $tr ' ' $trnl | $egrep -v '\*' .hlist)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



stat(1) (was Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Bakul Shah

 the trick nicely (but is too ``complicated'', and I'd still like
 having a tool that allows userland to call stat/fstat(2):

You are not alone; a number of stat(1) commands seemed to
have popped up over the years.  My friend @ SGI told me IRIX
also has such a command.  I liked its options so I modified
mine to match its options as well as kept the option to
specify output format.

New options:

-a atime
-c ctime
-d dev
-g group
-i inode
-k kind (dir/file/fifo/symlnk/char/block/socket/whiteout)
-l links
-m mtime
-p permissions
-r rdev
-s size
-t all three times
-u user

-q quite (print numeric values, no syntactic sugar)
-f fd fstat on file descr. fd

For BSD stuff I added

-F flags
-G generation
-b blocks
-B blocksize

Also,
-L use lstat instead of stat
-n print name
-% fmt user specified format

fmt specification as shown in my previous email, except use
%k for kind and %t for printing all three times.

By default it prints all the stat fields instead of mimicing
ls -lTd as before.  You can specify STATFMT env. var for
a default format.

Example:

$ stat -p stat
rwxr-xr-x
$ stat -p -q stat
755

Not having used SGI's stat command I don't know what output
format it uses.

Paul Herman asks in a separate email if there is a happy
medium.  I don't think so.  One can use ls(1) for a more
human readable format.  stat(1) is really for script use.
Even the -% format is for that (to avoid having to pull out
the ginsu knife of awk/sed/perl for common uses).  About the
best I can do in 300 or so lines of code and that is already
a lot of lines for something like this.

-- bakul

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett

On Sun, May 19, 2002 at 08:47:29PM +0200, Bernd Walter wrote:
 
  Look at getcwd_logical() in pwd.c
 
 Aha - but that does mean trusting $PWD.
 

The only thing that can keep track of where we started vs. where we cd to
is the shell, and so we'd have to trust what it says PWD is.

A possible pseudo-solution would be to give our *build system* (note:
NOT the make program) a .TOPDIR variable which would be intiailised to
something sane to begin with, and build relative/logical paths on top
of it, i.e.
.TOPDIR + realpath(.) - (realpath(.TOPDIR) - .TOPDIR)

To get the current directory.

But damn that's messy, damn that's a lot of overhead, and I think at that
point we're really stretching how much can be gained from such things.
-- 
[EMAIL PROTECTED]   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Bernd Walter

On Sun, May 19, 2002 at 07:17:39PM +, J. Mallett wrote:
 On Sun, May 19, 2002 at 08:47:29PM +0200, Bernd Walter wrote:
  
   Look at getcwd_logical() in pwd.c
  
  Aha - but that does mean trusting $PWD.
  
 
 The only thing that can keep track of where we started vs. where we cd to
 is the shell, and so we'd have to trust what it says PWD is.
 
 A possible pseudo-solution would be to give our *build system* (note:
 NOT the make program) a .TOPDIR variable which would be intiailised to
 something sane to begin with, and build relative/logical paths on top
 of it, i.e.
   .TOPDIR + realpath(.) - (realpath(.TOPDIR) - .TOPDIR)
 
 To get the current directory.
 
 But damn that's messy, damn that's a lot of overhead, and I think at that
 point we're really stretching how much can be gained from such things.

We should simply forget my whole point.
I recognised that softlinks doesn't work that way I (and amd) hoped.

-- 
B.Walter  COSMO-Project http://www.cosmo-project.de
[EMAIL PROTECTED] Usergroup   [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Inetd configuration message logging (or lack thereof)

2002-05-19 Thread David Malone

On Sat, May 18, 2002 at 06:51:31PM -0700, John De Boskey wrote:
 Comments on the following patch. The messages
 are invisible with a default install. This patch
 gets them into /var/log/messages where they can be
 seen.

I have a different fix for this at home, included below. It uses
syslog's LOG_PERROR flag when initially calling openlog. It then
reopens the log without the LOG_PERROR when/if it becomes a daemon.

David.

diff -u -r1.96 inetd.c
--- inetd.c 8 May 2002 17:20:08 -   1.96
+++ inetd.c 13 May 2002 23:02:35 -
@@ -317,7 +317,7 @@
const char *servname;
int error;
 
-   openlog(inetd, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
+   openlog(inetd, LOG_PID | LOG_NOWAIT | LOG_PERROR, LOG_DAEMON);
 
while ((ch = getopt(argc, argv, dlwWR:a:c:C:p:)) != -1)
switch(ch) {
@@ -434,6 +434,9 @@
if (daemon(0, 0)  0) {
syslog(LOG_WARNING, daemon(0,0) failed: %m);
}
+   /* From now on we don't want syslog messages going to stderr. */
+   closelog();
+   openlog(inetd, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
/*
 * In case somebody has started inetd manually, we need to
 * clear the logname, so that old servers run as root do not


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread Terry Lambert

Bernd Walter wrote:
 Why do people think that a realpath is always available?

Because it would be really convenient if we could program without
having to remember on line 17 what we did on line 3, because we
have really, really short attention spans.

While we are at it, wouldn't it be nice if all locks just
disappeared when we closed files, and all open files and
memory allocations went away when our programs exitted?

8-).


 What is wrong with just extending using pwd?
 And maybe optionally stripping .. and . elements if wanted.
 At least pwd doesn't break amd(8) pathnames.
 It became nearly impossible to use amd(8) today just because of all that
 realpath introduced breakage.

That's annoying.

I guess it's because people would really like it to work, even though
hard links make it completely impossible, unless you change a number
of things in the kernel in some pretty serious ways.  8-(.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Matthew Dillon

:  lot more warnings with us, you should use -DNO_WERROR until the dust
:  of the GCC 3.1 import settles down.
: 
: If everyone is using  -DNO_WERROR, then who would report build
: problems :-).
:
:Because we are wanting for people to let the dust settle on the switch to
:GCC 3.1.  It is best for people to juse use -DNO_WERROR for now.
:Patience.
:

Ahhh.. so *that's* why everything broke when I did a full update.

You know, every time I update my -current sources it's winding up
taking me an entire day to get things to build again.  This is the third
time that's happened.  I have spent at least 5 hours building the world
and the kernel over and over again to try to produce a bootable system.
The annoyance factor is quite high.

It would be more considerate of comitters if they would adjust the
defaults for these things so at the very least one can buildworld or
buildkernel without having to do something special.  It may be best
for *you* not to spend the time, but look at the huge amount of other
people's time that is being wasted by these little snafus!  I do 
appreciate all the compiler tools work, I know it isn't easy.  I'm just
asking that a little more care be taken in regards to the other
developers trying to work with -current (which is more and more these
days).  Don't expose breakage to the whole development community on
purpose!

-Matt
Matthew Dillon 
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: make(1) patch to ReadMakefile() to use realpath(3)

2002-05-19 Thread J. Mallett

On Sun, May 19, 2002 at 01:21:49PM -0700, Terry Lambert wrote:
 Bernd Walter wrote:
  Why do people think that a realpath is always available?
 
 Because it would be really convenient if we could program without
 having to remember on line 17 what we did on line 3, because we
 have really, really short attention spans.

No Terry, not quite the same thing.

 While we are at it, wouldn't it be nice if all locks just
 disappeared when we closed files, and all open files and
 memory allocations went away when our programs exitted?

No, because then we'd get lazy programming style overall and expect const
qualifiers to implicitly cast away in function arguments, etc.

In fact, neither of those are particularly interesting or useful.

Now, wouldn't it be nice if we had zero-copy one-to-many pipe file descriptor
loaning.

 8-).
 
 
  What is wrong with just extending using pwd?
  And maybe optionally stripping .. and . elements if wanted.
  At least pwd doesn't break amd(8) pathnames.
  It became nearly impossible to use amd(8) today just because of all that
  realpath introduced breakage.
 
 That's annoying.
 
 I guess it's because people would really like it to work, even though
 hard links make it completely impossible, unless you change a number
 of things in the kernel in some pretty serious ways.  8-(.

That's right.  Long story short there's no libc or kernel facility to do
it, and there's no way to pull a canonical path out of a hat given . or
getcwd(), unless any canonical path will do.
-- 
[EMAIL PROTECTED]   | C, MIPS, POSIX, UNIX, BSD, IRC Geek.
http://www.FreeBSD.org | The Power to Serve
Vote for me for FreeBSD core or the cute little bunny gets it.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Bug in -current flock()?

2002-05-19 Thread Terry Lambert

Robert Watson wrote:
 I don't know much (anything) about the advisory locking code, but was
 puzzled to see the following at the bottom of the flock() system call code
 in kern_descrip.c:

[ ... ]

 My reading of that is that the fp-f_flag field will be unconditionally
 updated to include FHASLOCK, even if VOP_ADVLOCK() returns an error.  Is
 this correct?

Yes.

The FS on which the VOP_ADVLOCK is being called may be a union of two
underlying FS's.

If the lock succeeds on one and fails on the other, you are screwed,
unless you change how the VOP_ADVLOCK semantics are handled.

Backing out the lock on the FS that succeeds doesn't work because of
lock coelescing, and the fact that it is not delayed until both have
succeeded or failed.  It means that if your attempted lock intersects
any preexiting lock, you will have an irreversible promotion or
demotion of the lock, and that simply removing the lock could remove
locking that should remain asserted (after all, the call is reporting
that the state has not changed).

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



SRA login failed -- bug?

2002-05-19 Thread Marcel Moolenaar

Gang,

I sometimes cannot get passed SRA secure login, even though credentials
are given correctly:

Connected to athlon.pn.xcllnt.net.
Escape character is '^]'.
Trying SRA secure login:
User (marcel): 
Password: 
[ SRA login failed ]
:
(repeat last 3 lines -- Ad nauseam)

The problem is not a faulty password or username, but appears to be
something that behaves much the same as uninitialized variables.
Most of the time SRA secure login works ok, but it does occasionally
reject the login. It is not possible to login at all when SRA rejects
a login. It's a permanent state and the only way around it is to
^C and re-telnet, which BTW occasionally fails as well...

I haven't seen anything on this topic, so I'd like to hear if
others are experiencing this as well and if this is a security
feature, a bug or misconfiguration.

Thanks,

-- 
 Marcel Moolenaar USPA: A-39004  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: df

2002-05-19 Thread Terry Lambert

Ian wrote:
 Terry, the issue of hanging (WAIT versus NOWAIT) is controlled by the -n
 (nflag) option, and by whether you've specifically named filesystems on the
 command line (indicating you're willing to wait for those filesystems).  The
 vfslist stuff is related to the -t option (filter the list down to
 filesystems of a given type).  There's no relationship between the vfslist
 and waiting or not.

My if include !nflag , if you will remember.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Terry Lambert

David O'Brien wrote:
   Warnings are treated as errors.  Since GCC 3.1 has brought a hell of a
   lot more warnings with us, you should use -DNO_WERROR until the dust
   of the GCC 3.1 import settles down.
 
  If everyone is using  -DNO_WERROR, then who would report build
  problems :-).
 
 Because we are wanting for people to let the dust settle on the switch to
 GCC 3.1.  It is best for people to juse use -DNO_WERROR for now.
 Patience.


Both Twins: Wonder Twin powers, Activate!
Jayna:  Take the form of ... patches!
Zan:Take the form of ... a complaining email!
Gleek the code monkey:  Gleek!  Gleek!  Gleek!

[ ... meanwhile, in the cartoon viewers' cave ... ]

Bob:That second Wonder Twin really has an incredibly
 lame power!
Tom:Pass the potato chips!

[ ... http://www.seanbaby.com/superfriends/wondertwins.htm ; hit the
  back circle for the rest of the Super Friends.  8-) ... ]


-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Steve Kargl

On Sun, May 19, 2002 at 02:19:27PM -0700, Terry Lambert wrote:
 Both Twins:   Wonder Twin powers, Activate!

 Jayna:Take the form of ... patches!
 Zan:  Take the form of ... a complaining email!
 Gleek the code monkey:Gleek!  Gleek!  Gleek!
 

Terry, you are an idiot.  I wasn't complaining!  I hadn't
seen this particular failure mentioned on the list.  David
was probably aware of the problem, but in case he (and others)
hadn't seen the problem, I reported it in a short email with
the details.

If I were to complain, I'd choose the lack of functional
C++ libraries after the gcc 3.1 upgrade.  I, however,
recognize the difficult and thankless job that David has
with maintaining the compiler infrastructure.

Finally, since you're quick with the wit, can you tell me
how to debug the following problem when I can't compile
the debugger. 

kargl[223] cat a.c
#include stdlib.h
int main(void) {
   /* This isn't the problem.  The problem is with gdb. */
   abort();
}
kargl[224] !gcc
gcc -g a.c
kargl[225] gdb a.out
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-unknown-freebsd...

Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Stuff to prune - ptx ?

2002-05-19 Thread Mark Murray

Hi all

In src/gnu/usr.bin/ptx is a very old (v0.3) version of GNU ptx
(a permuted index generator). This is not used in a make world,
and I believe that we should ditch it.

Anybody have any problems witgh me doing this?

M

-- 
o   Mark Murray
\_
O.\_Warning: this .sig is umop ap!sdn

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Mark Peek

At 2:58 PM -0700 5/19/02, Steve Kargl wrote:
Finally, since you're quick with the wit, can you tell me
how to debug the following problem when I can't compile
the debugger.

kargl[223] cat a.c
#include stdlib.h
int main(void) {
/* This isn't the problem.  The problem is with gdb. */
abort();
}
kargl[224] !gcc
gcc -g a.c
kargl[225] gdb a.out
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-unknown-freebsd...

Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.


This appears to be due to the switch to gcc-3.1. A bug has been filed 
in gnats on this problem (bin/38236: gdb do not work with gcc-3.1).

For now, the workaround is to use the devel/gdb52 port.

Mark

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Giorgos Keramidas

On 2002-05-19 13:31, Matthew Dillon wrote:
 David O'Brien wrote:
:
:Because we are wanting for people to let the dust settle on the switch to
:GCC 3.1.  It is best for people to juse use -DNO_WERROR for now.
:Patience.

 Ahhh.. so *that's* why everything broke when I did a full update.

 You know, every time I update my -current sources it's winding up
 taking me an entire day to get things to build again.

There are cases where updating with the `new files' requires that you
have updated to the `new files', aka chicken and egg problems.  This
is true with the -DNO_WERROR thing, in my opinion.  Let's not blame
David O'Brien for anything, since he's doing such a huge amount of
work already :/

After all, this is -CURRENT.
It's not even guaranteed to work at all times ;-)

- Giorgos


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: mergemaster(8) broken -- uses Perl

2002-05-19 Thread Giorgos Keramidas

On 2002-05-19 11:05, David O'Brien wrote:
 On Sun, May 19, 2002 at 05:29:22AM +0300, Giorgos Keramidas wrote:
  Part of the problems I had when I tried to replace perl in
  mergemaster.sh with something `native' was that the perl code uses
  stat(2) to obtain the permission bits of a directory/file and I can't
  think of a way to do this with tools in the base system without
  resorting to ugly awk scripts that parse and translate ls(1) output.

 What is so ugly about it?  It is not that many lines, and it is very easy
 to read and understand what you are doing.  Make it an sh function.
 There is most likely code like this in the Perl binary.  If this is so
 ugly lets gut it out of perl also.

Alright.  I'll probably use this or the sed stuff I posted as a
followup to Alfred's mail.  I haven't had much time to spend on
FreeBSD today since I was trying to install NetBSD on a spare disk and
start getting acquainted, but thanks for the positive feedback ;)

-- 
Giorgos Keramidas- http://www.FreeBSD.org
[EMAIL PROTECTED] - The Power to Serve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Matthew Dillon


: You know, every time I update my -current sources it's winding up
: taking me an entire day to get things to build again.
:
:There are cases where updating with the `new files' requires that you
:have updated to the `new files', aka chicken and egg problems.  This
:is true with the -DNO_WERROR thing, in my opinion.  Let's not blame
:David O'Brien for anything, since he's doing such a huge amount of
:work already :/
:
:After all, this is -CURRENT.
:It's not even guaranteed to work at all times ;-)
:
:- Giorgos

It's just that it gets frustrating.  If there were only one problem
with the build then, sure, no big deal.  But between the filesystem
import, compiler upgrade, and the warnings failures it has taken all
day for me just to get to the point where it is now dying on Greg's
doc commit.  And when we get past that problem will another hit us? 
I'll probably wind up having to build the world a dozen times before I
get something I can install.  Throw in ipfw changes and the fact that
procfs does not work with the old mount binary and it's taken
quite a bit of munging to just be able to build, install, and run a new
kernel, let alone the world.

I'm going to try make -k next but I don't have high hopes.

-Matt
Matthew Dillon 
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Giorgos Keramidas

On 2002-05-19 17:00, Matthew Dillon wrote:
 
 : You know, every time I update my -current sources it's winding up
 : taking me an entire day to get things to build again.
 :
 :There are cases where updating with the `new files' requires that you
 :have updated to the `new files', aka chicken and egg problems.  This
 :is true with the -DNO_WERROR thing, in my opinion.  Let's not blame
 :David O'Brien for anything, since he's doing such a huge amount of
 :work already :/
 :
 :After all, this is -CURRENT.
 :It's not even guaranteed to work at all times ;-)
 :
 :- Giorgos
 
 It's just that it gets frustrating.  If there were only one problem
 with the build then, sure, no big deal.  But between the filesystem
 import, compiler upgrade, and the warnings failures it has taken all
 day for me just to get to the point where it is now dying on Greg's
 doc commit.  And when we get past that problem will another hit us? 
 I'll probably wind up having to build the world a dozen times before I
 get something I can install.

I know the feeling, I haven't been ablt to build world on this slow
machine of mine for ages.  This is why I'm still running on a 5.x
build of late April :-/

% uname -v
FreeBSD 5.0-CURRENT #1: Thu Apr 25 01:11:09 EEST 2002 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GALADRIEL

But whatever.  I can still test most of the work I'm doing, being
mostly interested in manpages and SGML docs.  You have a point though,
no objections from here.  CURRENT is approaching the -RELEASE of
November every day, and is still somewhat fragile for me ;)

-- 
Giorgos Keramidas- http://www.FreeBSD.org
[EMAIL PROTECTED] - The Power to Serve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Terry Lambert

Steve Kargl wrote:
 Finally, since you're quick with the wit, can you tell me
 how to debug the following problem when I can't compile
 the debugger.

[ ... ]

 gcc -g a.c

[ ... ]

 Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.

Use -ggdb instead, thus avoiding DWARF.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Steve Kargl

On Sun, May 19, 2002 at 05:50:32PM -0700, Terry Lambert wrote:
 
  Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.
 
 Use -ggdb instead, thus avoiding DWARF.
 

BZZZT...  Thanks for play!

kargl[204] gcc -ggdb a.c
kargl[205] gdb a.out
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-unknown-freebsd...

Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.

-- 
Steve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



i386 tinderbox failure

2002-05-19 Thread Dag-Erling Smorgrav

--
 Rebuilding the temporary build tree
--
 stage 1: bootstrap tools
--
 stage 2: cleaning up the object tree
--
 stage 2: rebuilding the object tree
--
=== usr.bin/chpass
=== usr.bin/cksum
=== usr.bin/cmp
=== usr.bin/col
=== usr.bin/colcrt
=== usr.bin/colldef
=== usr.bin/colrm
=== usr.bin/column
=== usr.bin/comm
/bin/sh:Permission denied
*** Error code 1

Stop in /d/home/des/tinderbox/src/usr.bin/comm.
*** Error code 1

Stop in /d/home/des/tinderbox/src/usr.bin.
*** Error code 1

Stop in /d/home/des/tinderbox/src.
*** Error code 1

Stop in /d/home/des/tinderbox/src.
*** Error code 1

Stop in /d/home/des/tinderbox/src.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: gdb breaks world

2002-05-19 Thread Terry Lambert

Steve Kargl wrote:
  Use -ggdb instead, thus avoiding DWARF.
 
 BZZZT...  Thanks for play!

Did Mark Peek's suggestion of using the gdb that matched
the compiler (gdb 5.2 from ports) work instead?

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



perl5 port won't build

2002-05-19 Thread Beech Rintoul

I grabbed the latest ports and attempted to build p5, it errors with the 
following:

Making x2p stuff
make: don't know how to make built-in. Stop
*** Error code 2

Stop in /usr/ports/lang/perl5/work/perl-5.6.1.
*** Error code 1

Stop in /usr/ports/lang/perl5.

Any suggestions?

Beech
-- 
---
  Beech Rintoul - SysAdmin - [EMAIL PROTECTED]
/\   ASCII Ribbon Campaign  | Sinbad Network Communications
\ / - NO HTML/RTF in e-mail  | 3101 Penland Parkway #K-38
 X  - NO Word docs in e-mail | Anchorage, AK 99508-1957
/ \ -












To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message