PDA

View Full Version : [SOLVED] rpm creation and systemd problem


TheBigRed
17th June 2012, 02:29 PM
hi,

i am trying to build a new rpm package for fedora 17, i have already created a package review (https://bugzilla.redhat.com/show_bug.cgi?id=821224)

However, I cant interpret the systemd error messages.

[root@fc17-64 tmp]# systemctl enable tntnet.service
ln -s '/usr/lib/systemd/system/tntnet.service' '/etc/systemd/system/multi-user.target.wants/tntnet.service'


[root@fc17-64 tmp]# systemctl start tntnet.service
Job failed. See system journal and 'systemctl status' for details.


[root@fc17-64 tmp]# systemctl status tntnet.service
tntnet.service - tntnet web application server
Loaded: loaded (/usr/lib/systemd/system/tntnet.service; enabled)
Active: failed (Result: timeout) since Sun, 17 Jun 2012 14:07:14 +0200; 2min 12s ago
Process: 2475 ExecStart=/usr/bin/tntnet (code=killed, signal=TERM)
CGroup: name=systemd:/system/tntnet.service

Jun 17 14:05:44 fc17-64 tntnet[2475]: tntnet 2.1
Jun 17 14:05:44 fc17-64 tntnet[2475]: unknown group www-data

any hint ?

pete_1967
17th June 2012, 02:34 PM
Jun 17 14:05:44 fc17-64 tntnet[2475]: unknown group www-data

There's your hint right there.

TheBigRed
19th June 2012, 08:05 PM
There's your hint right there.

ok,
after adding a new group www-data an adding my user name to the group, service starts and a status is displayed.
groupadd www-data
usermod -a -G www-data martin

martin@fc17 tmp$ systemctl start tntnet.service
martin@fc17 tmp$ systemctl status tntnet.service
tntnet.service - tntnet web application server
Loaded: loaded (/usr/lib/systemd/system/tntnet.service; enabled)
Active: active (running) since Tue, 19 Jun 2012 20:15:49 +0200
Process: 580 ExecStart=/usr/bin/tntnet (code=exited, status=0/SUCCESS)
Main PID: 587 (tntnet)
CGroup: name=systemd:/system/tntnet.service
├ 586 /usr/bin/tntnet
└ 587 /usr/bin/tntnet

I only need a reviewer for the bug review.

pete_1967
20th June 2012, 01:11 AM
Who are you building this package? If it's for Red Hat/ Fedora, there is never a group called www-data, Apache runs as apache:apache. www-data is used in Debian (and derivatives) for Apache.

TheBigRed
20th June 2012, 10:11 AM
Who are you building this package? If it's for Red Hat/ Fedora, there is never a group called www-data, Apache runs as apache:apache. www-data is used in Debian (and derivatives) for Apache.

i am tried to build a new rpm package for fedora 17, i have already created a package review (https://bugzilla.redhat.com/show_bug.cgi?id=821224)

the contens of the orignial tntnet.conf.in looks like this:

Daemon 1
User www-data
Group www-data
CompPath @libdir@/tntnet

this means, i must change the User and Group in tntnet.conf.in ?

pete_1967
20th June 2012, 10:51 AM
this means, i must change the User and Group in tntnet.conf.in ?
If you want it to work on Red Hat/ Fedora, yes you do.

TheBigRed
20th June 2012, 06:47 PM
thanks for reply :)

TheBigRed
24th June 2012, 04:43 PM
In Fedora Apache uses httpd UID/GID 48 (fixed!) for user/group "Apache". This means, among other things, that files from the httpd package have set appropriate access rights can and are intended only for httpd.

%changelog
* Sun Jun 24 2012 Martin Gansser <linux4martin@gmx.de> - 2.1-8
- removed group and user apache from tntnet.conf
- added own group tntnet to tntnet.conf
- added creation of users and groups in pre section

tntnet.src.rpm (https://www.disk.dsl.o2online.de/FclyPlh/RPMS/VDR/tntnet/tntnet-2.1-8.fc17/tntnet-2.1-8.fc17.src.rpm?a=mrLedpPhCkY)
tntnet.spec (https://www.disk.dsl.o2online.de/FclyPlh/RPMS/VDR/tntnet/tntnet-2.1-8.fc17/tntnet.spec?a=l2tVN0d4nz0)


review closed package review (https://bugzilla.redhat.com/show_bug.cgi?id=821224)

Redondo Beach Travel Photos on Instagram - Leesburg - Polyarnyy Instagram Photos