Thread View: news.software.nntp
15 messages
15 total messages
Started by Michael Grimm
Sun, 01 Feb 2009 16:04
docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Sun, 01 Feb 2009 16:04
Date: Sun, 01 Feb 2009 16:04
38 lines
2041 bytes
2041 bytes
Hi - docheckgroups throws an error if I'm trying to update the newsgroups file (-u): #v+ news> cat testfile local.odd local test group news> cat testfile | docheckgroups -u Usage: egrep [OPTION]... PATTERN [FILE]... Try `egrep --help' for more information. Usage: egrep [OPTION]... PATTERN [FILE]... Try `egrep --help' for more information. Usage: egrep [OPTION]... PATTERN [FILE]... Try `egrep --help' for more information. Usage: egrep [OPTION]... PATTERN [FILE]... Try `egrep --help' for more information. Usage: egrep [OPTION]... PATTERN [FILE]... Try `egrep --help' for more information. Usage: egrep [OPTION]... PATTERN [FILE]... Try `egrep --help' for more information. news> grep local.odd active newsgroups news> egrep -V egrep (GNU grep) 2.5.1-FreeBSD news> uname -r FreeBSD 7.1-RELEASE-p2 #v- Anyone else seeing this error with FBSD or any other OS Regards, Michael -- to let
Re: docheckgroups -u throws error regrding egrep
Author: Julien ÉLIE
Date: Sun, 01 Feb 2009 17:53
Date: Sun, 01 Feb 2009 17:53
49 lines
2540 bytes
2540 bytes
Hi Michael,
> docheckgroups throws an error if I'm trying to update the newsgroups
> file (-u):
No error without the "-u" flag?
> grep local.odd active newsgroups
Note that "docheckgroups -u" will not add local.odd to your active file.
It is "docheckgroups -u | mod-active" or "docheckgroups -u | sh".
> Anyone else seeing this error with FBSD or any other OS
On Debian Etch and BSDI BSD/OS 4.3.1, I have no problem:
% cat testfile | docheckgroups -u
# The following newsgroups are missing and should be added:
#
# local.odd
#
# You can add them by executing the command(s):
/home/news/bin/ctlinnd newgroup local.odd y
# The following newsgroups descriptions are missing and should be added:
#
# local.odd local test group
#
# The file /home/news/db/newsgroups has just been updated accordingly.
exit # so you can feed this message into the shell (as well as mod-active).
% grep ^local /home/news/db/newsgroups
local.odd local test group
What is the result of "egrep --help"?
--
Julien ÉLIE
« -- Nous te torturons depuis des heures et ça ne te fait rien !
-- Si ! Ça me fait passer le temps ! » (Astérix)
Re: docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Sun, 01 Feb 2009 19:46
Date: Sun, 01 Feb 2009 19:46
105 lines
5619 bytes
5619 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote:
>> docheckgroups throws an error if I'm trying to update the newsgroups
>> file (-u):
>
> No error without the "-u" flag?
Yes, no error. I'll get the very same output you get including "-u'.
But, if I understand http://www.eyrie.org/~eagle/software/inn/docs/docheckgroups.html
understand correctly,'-u' shouldn't output what to do, but applies it
instead. Correct or misunderstanding of mine?
>> grep local.odd active newsgroups
>
> Note that "docheckgroups -u" will not add local.odd to your active
> file. It is "docheckgroups -u | mod-active" or "docheckgroups -u |
> sh".
Yes, I know. But 'docheckgroup -u' dies before piping to mod-active.
Therefore I concentrated on that command.
> What is the result of "egrep --help"?
Sorry, it's lengthy:
#v+
news|news> egrep --help
Usage: egrep [OPTION]... PATTERN [FILE] ...
Search for PATTERN in each FILE or standard input.
Example: egrep -i 'hello world' menu.h main.c
Regexp selection and interpretation:
-E, --extended-regexp PATTERN is an extended regular expression
-F, --fixed-strings PATTERN is a set of newline-separated
strings
-G, --basic-regexp PATTERN is a basic regular expression
-P, --perl-regexp PATTERN is a Perl regular expression
-e, --regexp=PATTERN use PATTERN as a regular expression
-z, --null-data a data line ends in 0 byte, not newline
Miscellaneous:
-s, --no-messages suppress error messages
-v, --invert-match select non-matching lines
-V, --version print version information and exit
--help display this help and exit
-J, --bz2decompress decompress bzip2'ed input before searching
-Z, --decompress decompress input before searching
(HAVE_LIBZ=1)
--mmap use memory-mapped input if possible
Output control:
-m, --max-count=NUM stop after NUM matches
-b, --byte-offset print the byte offset with output lines
-n, --line-number print line number with output lines
--line-buffered flush output on every line
-H, --with-filename print the filename for each match
-h, --no-filename suppress the prefixing filename on output
--label=LABEL print LABEL as filename for standard input
-o, --only-matching show only the part of a line matching
PATTERN
-q, --quiet, --silent suppress all normal output
--binary-files=TYPE assume that binary files are TYPE
TYPE is 'binary', 'text', or 'without-match'
-a, --text equivalent to --binary-files=text
-I equivalent to --binary-files=without-match
-d, --directories=ACTION how to handle directories
ACTION is 'read', 'recurse', or 'skip'
-D, --devices=ACTION how to handle devices, FIFOs and sockets
ACTION is 'read' or 'skip'
-R, -r, --recursive equivalent to --directories=recurse
--include=PATTERN files that match PATTERN will be examined
--exclude=PATTERN files that match PATTERN will be skipped.
--exclude-from=FILE files that match PATTERN in FILE will be
skipped.
-L, --files-without-match only print FILE names containing no match
-l, --files-with-matches only print FILE names containing matches
-c, --count only print a count of matching lines per
FILE
--null print 0 byte after FILE name
Context control:
-B, --before-context=NUM print NUM lines of leading context
-A, --after-context=NUM print NUM lines of trailing context
-C, --context=NUM print NUM lines of output context
-NUM same as --context=NUM
--color[=WHEN],
--colour[=WHEN] use markers to distinguish the matching
string
WHEN may be `always', `never' or `auto'.
-U, --binary do not strip CR characters at EOL (MSDOS)
-u, --unix-byte-offsets report offsets as if CRs were not there
(MSDOS)
`egrep' means `grep -E'. `fgrep' means `grep -F'.
With no FILE, or when FILE is -, read standard input. If less than
two FILEs given, assume -h. Exit status is 0 if match, 1 if no match,
and 2 if trouble.
Report bugs to <bug-gnu-utils@gnu.org>.
#v-
Regards,
Michael
--
to let
Re: docheckgroups -u throws error regrding egrep
Author: Julien ÉLIE
Date: Sun, 01 Feb 2009 20:23
Date: Sun, 01 Feb 2009 20:23
94 lines
3672 bytes
3672 bytes
Hi Michael,
>> No error without the "-u" flag?
>
> Yes, no error. I'll get the very same output you get including "-u'.
> But, if I understand http://www.eyrie.org/~eagle/software/inn/docs/docheckgroups.html
> understand correctly,'-u' shouldn't output what to do, but applies it
> instead. Correct or misunderstanding of mine?
What makes you think of that in the man page?
In the examples section:
Now that we have checked the output of docheckgroups and that we agree with
the changes, we run it with the -u flag to update the newsgroups file and we
redirect the standard output to mod-active to update the active file:
cat test | docheckgroups -u | mod-active
docheckgroups -u still outputs the newsgroups to create/remove, obsolete descriptions, etc.
The only thing which changes is that:
# The following newsgroups descriptions are missing and should be added:
#
# [...]
#
# You can remove them by editing /home/news/db/newsgroups
# or by using the -u flag with docheckgroups.
becomes:
# The following newsgroups descriptions are obsolete:
#
# [...]
#
# The file /home/news/db/newsgroups has just been updated accordingly.
and will not be output the next time you run docheckgroups.
> Yes, I know. But 'docheckgroup -u' dies before piping to mod-active.
> Therefore I concentrated on that command.
>
> #v+
> news|news> egrep --help
> Usage: egrep [OPTION]... PATTERN [FILE] ...
Hmm... The problem does not seem to be related with egrep, but with
the way "-u" is parsed. It is not removed by docheckgroups. Then,
we have "egrep -u" which does not exist.
docheckgroups currently does:
## Parse arguments.
if [ $# -gt 0 ]; then
case $1 in
-u) shift;
UPDATEDESC=true;;
esac
fi
Do you know how it should be written for your platform?
## Parse arguments.
if [ $# -gt 0 ]; then
case $1 in
-u)
shift
UPDATEDESC=true
;;
esac
fi
??
[ "$#" -gt "0" ]
??
Could you please make some tests?
It is near the beginning of <pathbin>/docheckgroups.
--
Julien ÉLIE
« Il y a deux sortes de justice : vous avez l'avocat qui connaît bien la loi,
et l'avocat qui connaît bien le juge ! » (Coluche)
Re: docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Sun, 01 Feb 2009 21:03
Date: Sun, 01 Feb 2009 21:03
62 lines
2730 bytes
2730 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: >> But, if I understand http://www.eyrie.org/~eagle/software/inn/docs/docheckgroups.html >> understand correctly,'-u' shouldn't output what to do, but applies it >> instead. Correct or misunderstanding of mine? > > What makes you think of that in the man page? [explanations] Ok, sorry. What I meant is: with '-u' changes are applied to newsgroups, without that flag, changes are advertised, only. Ok or still a blackout of mine? >> news|news> egrep --help >> Usage: egrep [OPTION]... PATTERN [FILE] ... > > Hmm... The problem does not seem to be related with egrep, but with > the way "-u" is parsed. It is not removed by docheckgroups. Then, > we have "egrep -u" which does not exist. > > docheckgroups currently does: > > ## Parse arguments. > if [ $# -gt 0 ]; then > case $1 in > -u) shift; > UPDATEDESC=true;; > esac > fi > > Do you know how it should be written for your platform? > > ## Parse arguments. > if [ $# -gt 0 ]; then > case $1 in > -u) > shift > UPDATEDESC=true > ;; > esac > fi > > > ?? > > > [ "$#" -gt "0" ] > > ?? > > Could you please make some tests? > It is near the beginning of <pathbin>/docheckgroups. I'm awefully sorry, but I do not understand *what* I should test. I cannot find a single 'shift' in my docheckgroups nor an 'UPDATEDESC'? I'm running INN 2.4.5, if that matters ... Regards, Michael -- to let
Re: docheckgroups -u throws error regrding egrep
Author: Julien ÉLIE
Date: Sun, 01 Feb 2009 21:14
Date: Sun, 01 Feb 2009 21:14
35 lines
2506 bytes
2506 bytes
Hi Michael,
> Ok, sorry. What I meant is: with '-u' changes are applied to newsgroups,
> without that flag, changes are advertised, only. Ok or still a blackout
> of mine?
We're OK. That's how it works.
> I'm awefully sorry, but I do not understand *what* I should test. I
> cannot find a single 'shift' in my docheckgroups nor an 'UPDATEDESC'?
> I'm running INN 2.4.5, if that matters ...
Oh :)
The "-u" flag is new with INN 2.5.0!
Be careful:
http://www.eyrie.org/~eagle/software/inn/docs/
is the documentation of INN 2.5.0.
docheckgroups does not have any documentation in INN 2.4.x (I wrote it
for INN 2.5.0 and added "-u" at the same time).
Yet, you can use this docheckgroups as-is with INN 2.4.5. Just download:
http://inn.eyrie.org/trac/export/8317/trunk/control/docheckgroups.in
and put the right second line (like the one in your current docheckgroups).
--
Julien ÉLIE
« Desinit in piscem mulier formosa superne. » (Horace)
Re: docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Sun, 01 Feb 2009 21:39
Date: Sun, 01 Feb 2009 21:39
32 lines
2073 bytes
2073 bytes
Hi Julien - Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: >> I'm running INN 2.4.5, if that matters ... > > Oh :) > > The "-u" flag is new with INN 2.5.0! Holy shit! Merde, merde, merde, or whatever alike buzzwords may apply, sorry, sorry ;-) > Be careful: > http://www.eyrie.org/~eagle/software/inn/docs/ > is the documentation of INN 2.5.0. Sorry, I didn't realize! > Yet, you can use this docheckgroups as-is with INN 2.4.5. Just download: > > http://inn.eyrie.org/trac/export/8317/trunk/control/docheckgroups.in > > and put the right second line (like the one in your current docheckgroups). I will give it a try tomorrow, and, I will let you know if that version is running under FBSD 7.1, promised! Regards, Michael -- to let
Re: docheckgroups -u throws error regrding egrep
Author: Julien ÉLIE
Date: Sun, 01 Feb 2009 21:47
Date: Sun, 01 Feb 2009 21:47
32 lines
2419 bytes
2419 bytes
Hi Michael,
>> The "-u" flag is new with INN 2.5.0!
>
> Holy shit! Merde, merde, merde, or whatever alike buzzwords may apply,
> sorry, sorry ;-)
No problem.
I should have known you were running INN 2.4.5 owing to your having posted
a problem with its core dumping with Perl 5.8.9.
But when you spoke about "-u", I only thought about INN 2.5.0...
>> Be careful:
>> http://www.eyrie.org/~eagle/software/inn/docs/
>> is the documentation of INN 2.5.0.
>
> Sorry, I didn't realize!
Normally, this documentation also applies to INN 2.4.5 and is somehow
more accurate than its own documentation. However, a few parts (like
"docheckgroups -u") do not apply!
For 2.4.5, it is officially here:
http://www.eyrie.org/~eagle/software/inn/docs-2.4/
--
Julien ÉLIE
« La raison du plus fou est toujours la meilleure. » (Raymond Devos)
Re: docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Mon, 02 Feb 2009 18:56
Date: Mon, 02 Feb 2009 18:56
20 lines
2034 bytes
2034 bytes
Michael 'Ingrid' Grimm <trashcan@odo.in-berlin.de> wrote: > Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: >> Yet, you can use this docheckgroups as-is with INN 2.4.5. Just download: >> >> http://inn.eyrie.org/trac/export/8317/trunk/control/docheckgroups.in >> >> and put the right second line (like the one in your current docheckgroups). > > I will give it a try tomorrow, and, I will let you know if that version > is running under FBSD 7.1, promised! JFTR: It's working perfectly well with FBSD 7.1! Will this docheckgroups make it into the soon to be released 2.4.6? Thanks for your help, Michael -- to let
Re: docheckgroups -u throws error regrding egrep
Author: Julien ÉLIE
Date: Mon, 02 Feb 2009 19:42
Date: Mon, 02 Feb 2009 19:42
23 lines
2302 bytes
2302 bytes
Hi Michael, > JFTR: It's working perfectly well with FBSD 7.1! Glad to hear! > Will this docheckgroups make it into the soon to be released 2.4.6? I had not planned to do that but, well, I will add it as you asked for it. The fact is that it is not very useful with INN 2.4.6. I added "-u" in order to automatically add the descriptions with controlchan (which calls docheckgroups for a checkgroups). It is not currently implemented but will soon be, along with encoding conversions of the descriptions. -- Julien ÉLIE « Pour aller plus vite, j'additionne toujours de bas en haut : je fais du même coup l'addition et la preuve. » (Aurélien Scholl)
Re: docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Mon, 02 Feb 2009 20:38
Date: Mon, 02 Feb 2009 20:38
30 lines
2464 bytes
2464 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: >> Will this docheckgroups make it into the soon to be released 2.4.6? > > I had not planned to do that but, well, I will add it as you asked for > it. Merci ;-) > The fact is that it is not very useful with INN 2.4.6. I added "-u" > in order to automatically add the descriptions with controlchan (which > calls docheckgroups for a checkgroups). It is not currently > implemented but will soon be, along with encoding conversions of the > descriptions. Understood. That automatically updating of the newsgroups file will be highly welcome, because it's always been a pain in the ass to keep newsgroups uptodate ;-) With that version at hand, at least everyone interested, may now apply checkgroups through that script plus piping to mod-active to get both active and newsgroups updated. I just updated my newsgroupsfile with all recent checkgroup files (appr. 37000 lines) and ran it through your script. Perfect ;-) Thanks and regards, Michael -- to let
Re: docheckgroups -u throws error regrding egrep
Author: Julien ÉLIE
Date: Mon, 02 Feb 2009 21:26
Date: Mon, 02 Feb 2009 21:26
27 lines
2624 bytes
2624 bytes
Hi Michael,
> Understood. That automatically updating of the newsgroups file will be
> highly welcome, because it's always been a pain in the ass to keep
> newsgroups uptodate ;-)
Yep!
> With that version at hand, at least everyone interested, may now apply
> checkgroups through that script plus piping to mod-active to get both
> active and newsgroups updated.
Please take care of a limitation of mod-active: it cannot change the status
of a group. Suppose you have "news.group y" and it becomes moderated
("ctlinnd newgroup news.group m" or the same with "changegroup"), mod-active
will not be able to do that because of ctlinnd which does not currently
accept such changes when it is paused.
However, it works fine if you pipe the result to sh instead.
I just wanted to let you know that.
--
Julien ÉLIE
« Non licet omnibus adire Corinthum. » (proverbe issu du grec)
Re: docheckgroups -u throws error regrding egrep
Author: Michael Grimm
Date: Mon, 02 Feb 2009 21:57
Date: Mon, 02 Feb 2009 21:57
13 lines
1828 bytes
1828 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: > Please take care of a limitation of mod-active: it cannot change the > status of a group. [...] > I just wanted to let you know that. Thanks, I didn't know that. Regards, Michael -- to let
Re: docheckgroups -u throws error regarding egrep
Author: Julien ÉLIE
Date: Sun, 08 Mar 2009 13:04
Date: Sun, 08 Mar 2009 13:04
29 lines
2867 bytes
2867 bytes
Hi Michael,
>> Please take care of a limitation of mod-active: it cannot change the
>> status of a group. Suppose you have "news.group y" and it becomes moderated
>> ("ctlinnd newgroup news.group m" or the same with "changegroup"), mod-active
>> will not be able to do that because of ctlinnd which does not currently
>> accept such changes when it is paused.
>> However, it works fine if you pipe the result to sh instead.
>
> Thanks, I didn't know that.
Oh, I'm sorry for the wrong information.
*mod-active CAN change the status of a group.*
There is no limitation (mod-active handles newgroup, rmgroup and changegroup).
The limitation is only for *ctlinnd* ("ctlinnd changegroup" does not work when
the server is paused).
It means that you can go on using mod-active the way you did. mod-active
directly modifies the active file -- that's why it works well. Whence changes
are seen after the active file has been reloaded by mod-active.
--
Julien ÉLIE
« Je n'aime pas être chez moi. À tel point que lorsque je vais chez quelqu'un
et qu'il me dit : « Vous êtes ici chez vous », je rentre chez moi ! » (Raymond Devos)
Re: docheckgroups -u throws error regarding egrep
Author: Michael Grimm
Date: Sun, 08 Mar 2009 20:59
Date: Sun, 08 Mar 2009 20:59
25 lines
2415 bytes
2415 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote:
>>> Please take care of a limitation of mod-active: it cannot change
>>> the status of a group. Suppose you have "news.group y" and it
>>> becomes moderated ("ctlinnd newgroup news.group m" or the same with
>>> "changegroup"), mod-active will not be able to do that because of
>>> ctlinnd which does not currently accept such changes when it is
>>> paused.
>>
>> Thanks, I didn't know that.
>
> Oh, I'm sorry for the wrong information.
[...]
> It means that you can go on using mod-active the way you did.
> mod-active directly modifies the active file -- that's why it works
> well. Whence changes are seen after the active file has been reloaded
> by mod-active.
Thanks for that info, and, Julien, I really appreciate your commitment
and efforts regarding INN! Really!
Merci,
Michael
--
to let
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads