Opened 15 years ago

Closed 13 years ago

#17711 closed defect (fixed)

leafnode build fails to create user news

Reported by: martinsm@… Owned by: krischik@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc:
Port: leafnode

Description

I have built leafnode from trunk on 10.5.6, but it has not created user and group news and therefore is unable to run. I can run fetchnews manually with sudo. I have exported NNTPSERVER="localhost" so it should work as it does in bsd land. telnet localhost 119 just gives connection refused. Any suggestions most welcome

Change History (9)

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to krischik@…

comment:2 Changed 15 years ago by martin.osx@…

It does need the user - tricky to test for me as I already got them. Give me a few days.

Apart from that the port creates some *.command files in "/Applications/MacPorts/Utilities" to start the leafnode using launchd. You don't start it manually!

Martin

comment:3 in reply to:  1 Changed 15 years ago by martinsm@…

Replying to jmr@…: Well, some more info, first a bit of background, I am not long in from freebsd land, just finding my way about making ports on osx... Anyway I have now verified that user _news exists, but netstat shows that nntp is not running, so presumably the service is not being started, in fact after a lengthy perusal of the messages, there is no mention of either leafnode or nntp. Where should I start looking for clues? I am learning as fast as I can, need to be pushed along a bit, cheers

comment:4 Changed 15 years ago by martin.osx@…

Of course leafnode won't show with netstat. On MacOS we use launchd which replaces init, cron and inetd. I take it you know how inetd or xinetd work. As said launchd works the same way - only it is configured with hip and modern xml files.

The needed xml files are part of the port. As well as .command files to load them - Ahh, you might not know either: .command is the extension for shell scripts used by Mac OS. That is: if you use .command finder will start the script on double click. I use Z-Shell - so you should have install the Z-Shell port.

comment:5 in reply to:  4 Changed 15 years ago by martinsm@…

Replying to martin.osx@…:

Of course leafnode won't show with netstat. On MacOS we use launchd which replaces init, cron and inetd. I take it you know how inetd or xinetd work. As said launchd works the same way - only it is configured with hip and modern xml files.

The needed xml files are part of the port. As well as .command files to load them - Ahh, you might not know either: .command is the extension for shell scripts used by Mac OS. That is: if you use .command finder will start the script on double click. I use Z-Shell - so you should have install the Z-Shell port.

OK, some progress, I found the directory in applications, double clicked the restart leafnode command file, enter password and leafnode starts.... nntp now visible in netstat -a | grep LISTEN Now thunderbird can access leafnode, fine but trying to set up slrn to access it is another problem: rakuba:~ martinsmith$ slrn -f /Users/martinsmith/.jnewsrc --create slrn 0.9.8.1 [2004-10-07]

Using newsrc file /Users/martinsmith/.jnewsrc for server localhost. Connecting to host localhost ... Failed to initialize server Reason: 502 Remote access denied. slrn fatal error: Failed to initialize server. and on the console: 21/12/2008 18:56:21 leafnode[384] Denying access from address outside the local networks. (Check config.example.) but slrn is on the localhost ???

Anyway leafnode is not started at startup, where should I look for the command file that starts leafnode, or where should it be? That is the next important thing to sort out, slrn can follow later Any clues, many thanks

comment:6 Changed 15 years ago by martin.osx@…

Sorry for the delay.

Well, we now come to the point where the ticket changes into a Mac OS X crash course ;-) :

In order for a launchd to automaticly start a service the plist file must reside in /Library/LaunchAgents/ or /Library/LaunchDaemons. Symbolic link will do. There is also a ~/Library/LaunchAgents and ~/Library/LaunchDaemons for services started at login and /System/Library/LaunchAgents/ and /System/Library/LaunchDaemons for services provided by Apple. Never change the System one!

Martin

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:8 Changed 13 years ago by jmroot (Joshua Root)

Keywords: failure to create user news removed
Owner: changed from krischik@… to krischik@…

comment:9 Changed 13 years ago by krischik@…

Resolution: fixed
Status: newclosed

Why is this bug back online? The needed create statements are in place:

pre-destroot {
	addgroup	_news			realname="NEWS Server group"
	adduser		_news gid=_news realname="NEWS Server user"
}

and apart from that it's user _news - with an underscore.

Note: See TracTickets for help on using tickets.