Bug 617330 - Providing native systemd file for upcoming F14 Feature Systemd
Summary: Providing native systemd file for upcoming F14 Feature Systemd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pcsc-lite
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: SysVtoSystemd
TreeView+ depends on / blocked
 
Reported: 2010-07-22 19:13 UTC by Jóhann B. Guðmundsson
Modified: 2011-07-15 08:37 UTC (History)
3 users (show)

Fixed In Version: pcsc-lite-1.7.4-2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-15 08:37:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Native systemd file for pcscd (364 bytes, text/plain)
2010-07-22 19:13 UTC, Jóhann B. Guðmundsson
no flags Details
Spec file which introduce systemd unit file and drop SysV support for pcscd.service (12.14 KB, text/x-rpm-spec)
2011-06-24 08:02 UTC, Jóhann B. Guðmundsson
no flags Details

Description Jóhann B. Guðmundsson 2010-07-22 19:13:29 UTC
Created attachment 433786 [details]
Native systemd file for pcscd

Description of problem:

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

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

1.http://fedoraproject.org/wiki/Features/systemd
2.https://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/Daemon#Installing_Systemd_Service_Files

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

Thank you. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bug Zapper 2010-07-30 12:45:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Lennart Poettering 2010-08-10 14:02:06 UTC
ping

Comment 3 Kalev Lember 2010-08-10 14:49:07 UTC
I'd like to see the Packaging Committee discuss systemd unit file packaging before we start including them in packages.

The link [2] in comment #1 is probably a good starting point for official guidelines. However, as far as I can tell nobody has proposed any new systemd-related guidelines to the Packaging Committee so far.

Comment 4 Lennart Poettering 2010-08-11 13:52:39 UTC
Well, so far this is all optional. You are free to skip this for now, and I won't even be grumpy. ;-) Would be cool though if you could ship this.

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

Comment 5 Bill Nottingham 2011-04-26 17:35:21 UTC
Moving systemd service RFEs to rawhide.

At this point, it is not appropriate in the Fedora 15 cycle to add these. Furthermore, at this point, we are still finalizing the packaging guidelines to handle SysV -> systemd upgrades.

We therefore request:
- wait until there are packaging guidelines (this will be announced on the devel list). This ensures that upgrades will work smoothly and we/you won't have to do multiple sets of changes.
- work on these sorts of changes for Fedora 16 where necessary, not Fedora 15, as we're trying to fix things for release.
- do *not* change a service from SysV to systemd in an existing release (such as Fedora 15), as this is the sort of behavior change that goes against our update policy, documented as https://fedoraproject.org/wiki/Updates_Policy

Comment 6 Jóhann B. Guðmundsson 2011-06-23 15:28:29 UTC
What's the current status on this and note as per packaging guidelines the old
sysv init script would be packed in a separate subpackage if the intention is
to continue to maintain and support.

1.https://fedoraproject.org/wiki/Packaging:Guidelines:Systemd

Comment 7 Kalev Lember 2011-06-23 22:08:49 UTC
I have local modifications to pcscd for systemd socket activation, but I haven't submitted these upstream yet.

And no, I don't think there is any point in shipping the sysv init script in a separate subpackage.

Comment 8 Jóhann B. Guðmundsson 2011-06-24 08:02:49 UTC
Created attachment 509688 [details]
Spec file which introduce systemd unit file and drop SysV support for pcscd.service

I threw in here a spec file which introduce systemd unit file and drop SysV support for the submitted pcscd.service encase your changes dont make it in, in time for alpha so we dont end up blocking the alpha release you can then update the service file with the socket one and introduce a smartcard.target if you went into that direction.

Comment 9 Kalev Lember 2011-06-24 09:06:17 UTC
Thanks Jóhann.

I took a quick look at your changes and it would appear that they are missing the %triggerun part for cleaning up after sysv init script removal (systemd-sysv-convert and chkconfig --del): http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript

Also note that pcscd is NOT on the Live CD, so it would not be a blocker for the Alpha release.

Comment 10 Jóhann B. Guðmundsson 2011-06-24 09:27:57 UTC
Ah you are correct I missed the upgrade path although it's debatable how useful that is since the end user still needs to enable the service after upgrade "When updating from a package containing a SysV initscript to a package containing a systemd unit file, we "start-over fresh" with default start and stop policy from the new package, and do not migrate what the user had previously configured."
so whether the user runs  systemd-sysv-convert --apply foo or systemctl enable foo.service makes no difference I would think. 

Ah somehow I took it for granted that pcsc-lite was installed by default on the Live cd regardless of that the sooner we get a native service file in rawhide the better. ;)

Comment 11 Kalev Lember 2011-06-25 13:00:12 UTC
I just submitted the patches and unit files upstream:
http://archives.neohapsis.com/archives/dev/muscle/2011-q2/0138.html

Comment 12 Jóhann B. Guðmundsson 2011-06-28 19:23:03 UTC
Just out of curiosity is this service
applicant for hardware activation unfortunately our guidelines are a bit short
on how to do that 

"Hardware activation

Hardware activation occurs when a service is installed but only turns on if a
certain type of hardware is installed. Enabling of the service is normally done
with a udev rule. At this time we do not have further guidance on how to write
those udev rules. The service itself installs its .service files in the normal
places and are installed by the normal systemd scriptlets. These services
should never be enabled by the package as they will be enabled by udev. "

But you can read man systemd.device and look at the bluetooth service which is
doing that I believe if it's relevant..

Comment 13 Kalev Lember 2011-06-29 22:17:57 UTC
Yes, hardware activation would be nice to have.

Comment 14 Kalev Lember 2011-07-15 08:37:57 UTC
I just built pcsc-lite-1.7.4-2.fc16 for rawhide with the systemd patches applied and dropped the sysv init script. Thanks for all your help, Jóhann!


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