Bug 657412 - Providing native systemd file for upcoming F15 Feature Systemd
Summary: Providing native systemd file for upcoming F15 Feature Systemd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: 3proxy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Pavel Alexeev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: SysVtoSystemd
TreeView+ depends on / blocked
 
Reported: 2010-11-25 20:47 UTC by Michał Piotrowski
Modified: 2011-07-13 15:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-23 13:14:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
3proxy.service (163 bytes, text/plain)
2010-11-25 20:47 UTC, Michał Piotrowski
no flags Details

Description Michał Piotrowski 2010-11-25 20:47:13 UTC
Created attachment 462961 [details]
3proxy.service

The attached file is a native systemd file for upcoming F15 Feature [1]

Please read [2] on how to packaging and installing systemd Service files.

To learn more about Systemd daemon see [3].

To view old SysV with the new Systemd site by site see for your component see [4]

If you have any question dont hesitate to ask them on this bug report.

1.http://fedoraproject.org/wiki/Features/systemd

2.https://fedoraproject.org/wiki/Systemd_Packaging_Draft

3.http://0pointer.de/public/systemd-man/daemon.html

4.https://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/compatability

Comment 1 Pavel Alexeev 2010-11-30 13:01:39 UTC
I have read linked links and do not understand many things.
Draft guidelines have more questions then answers...

What particularly I should do with it file after place it in /lib/systemd/system/?

Should it be done only in rawhide?

Comment 2 Michał Piotrowski 2010-11-30 13:16:21 UTC
"Should it be done only in rawhide?"

Yes, it's F15 feature.

"What particularly I should do with it file after place it in
/lib/systemd/system/?"


"Lennart Poettering 2010-08-11 09:50:56 EDT 

BTW, it is not sufficient to just drop the .service files into
/lib/systemd/system. It is also necessary to enable it when upgrading from an
old sysv-only rpm. How to implement that in the spec file with minimal work is
documented in daemon(7):

http://0pointer.de/public/systemd-man/daemon.html#id2562029"

https://bugzilla.redhat.com/show_bug.cgi?id=617324#c4

For upgrade you need to enable it, but I'm not sure what you need to do for install. AFAIR Lennart wrote something about not anabling services by default after installation.

Lennart, any comments?

Comment 3 Jóhann B. Guðmundsson 2010-11-30 13:54:22 UTC
See...

https://fedoraproject.org/wiki/Systemd_Packaging_Draft

Comment 4 Pavel Alexeev 2010-11-30 14:23:58 UTC
As stated before I have read this document. Main question was - at least when planing finish it? Is there approximately date of meeting by it?

Comment 5 Michał Piotrowski 2010-12-09 08:51:14 UTC
This service should start after network.target
After=syslog.target network.target

Comment 6 Michał Piotrowski 2010-12-09 08:56:19 UTC
"Main question was - at least when
planing finish it? Is there approximately date of meeting by it?"

There is no any Fedora 15 feature for this (there is only https://fedoraproject.org/wiki/Features/systemd - but that does not include script conversion), but it would be nice provide this systemd service for F15.

Comment 7 Pavel Alexeev 2010-12-16 18:59:27 UTC
I'm make such changes, please revisit scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=2670327

But I still have some questions:
1) Is there new macros for path %{_libdir}/systemd/system/ ?
2) What I should do with old systemV service instructions like:
%preun                                                                                                                                                                  
# traditional SystemV service                                                                                                                                           
if [ $1 = 0 ]; then                                                                                                                                                     
   /sbin/service %{name} stop > /dev/null 2>&1                                                                                                                        
   /sbin/chkconfig --del %{name}                                                                                                                                      
fi
Now I leave it as is and only add systemd installation (and migration). Should it be deleted?

Comment 8 Michał Piotrowski 2010-12-21 20:19:02 UTC
I installed this packege, and everything is running fine... but - it's my old version AFAICS.

[michal@dio ~]$ sudo systemctl status 3proxy.service
3proxy.service - 3proxy Proxy Server
	  Loaded: loaded (/lib/systemd/system/3proxy.service)
	  Active: active (running) since Tue, 21 Dec 2010 21:13:51 +0100; 4min 13s ago
	 Process: 8355 (/usr/bin/3proxy /etc/3proxy.cfg, code=exited, status=0/SUCCESS)
	Main PID: 8356 (3proxy)
	  CGroup: name=systemd:/system/3proxy.service
		  └ 8356 /usr/bin/3proxy /etc/3proxy.cfg

New version is installed to
/usr/lib64/systemd/system

Comment 9 Pavel Alexeev 2010-12-22 11:40:26 UTC
You do not answer what do with legacy statements.

Comment 10 Michał Piotrowski 2010-12-22 15:38:02 UTC
I did not answer because I do not know :)

I'm not a Fedora packager and frankly I know little about RPM's

Comment 11 Lennart Poettering 2011-02-18 20:56:28 UTC
(In reply to comment #7)
> I'm make such changes, please revisit scratch build:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=2670327
> 
> But I still have some questions:
> 1) Is there new macros for path %{_libdir}/systemd/system/ ?
> 2) What I should do with old systemV service instructions like:
> %preun                                                                          
> # traditional SystemV service                                                   
> if [ $1 = 0 ]; then                                                             
>    /sbin/service %{name} stop > /dev/null 2>&1                                  
>    /sbin/chkconfig --del %{name}                                                
> fi
> Now I leave it as is and only add systemd installation (and migration). Should
> it be deleted?

I think those answers are given in the current policy draft:

https://fedoraproject.org/wiki/TomCallaway/Systemd_Revised_Draft

Comment 12 Pavel Alexeev 2011-02-23 16:24:36 UTC
I think we should wait until it was accepted as guidelines, not draft only.

Comment 13 Pavel Alexeev 2011-06-23 13:14:04 UTC
I think I now resolve it. Feedback welcome.


Note You need to log in before you can comment on or make changes to this bug.