<div><span style>Hi everyone,</span></div><div><span style><br></span></div><div><span style>Please find my report below.</span></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><span style>First Report </span><br style>
<span style>========<br></span><div><span style>Project - Sys-V init file creator from systemd service files</span><br style><br style><span style>Status of the project so far : </span><br style><br style><span style>The aim of my project is to come up with a Sys-V init file when given systemd service file as input. As mentioned in my project proposal[0], I utilized the period of April end and May to study the administrative and working aspects of Systemd[1].  I also had a look at the documentation for the modern systemd system[2] and the internals of the old SysV init system. I also went through this huge discussion thread {"A few observations about systemd"}[3] on the debian-devel list to better understand systemd's integration efforts in debian. Then I installed systemd on linux and had a look at systemd service files. I had a look at the various configuration parameters in the systemd unit configuration files. Each systemd service file has 3 sections, namely [Unit], [Service] and [Install] section. Each of these sections then has some commonly used options. The aim is to parse these files, get the sections and retrieve all the options. Then, I plan to use these options to get most of the LSB headers to help me generate LSB compliant init script. </span><br style>
<br style><span style>I am doing the initial development of the converter script in python. For the purpose of parsing the systemd service file, I am using configparser class [4] in python.</span><br style><span style>Currently, the code can exactly identify the sections and the underlying options. I've started working on the next step - linking each systemd option to an appropriate bash command. This linking is the main conversion logic. To get it perfectly right, I plan to experiment with various systemd service files. I have created an account akhil-guest on alioth. I plan to upload the first 'dirty' version of the converter on the git repo within the next few days.</span><br style>
<br style><span style>So, summarizing, what I have done : </span><br style><br style><span style>1. Study the various aspects and design of the systemd init system and read its documentation.</span><br style><span style>2. Study the old Sys-V init file format (LSB format) and see how Sys-V works and how systemd betters it.</span><br style>
<span style>3. Study integration efforts of systemd in debian.</span><br style><span style>4. Study the configuration of Systemd service files and the role of each section and each available option under each section.</span><br style>
<span style>5. Build a python script that parses the service file and extracts each section and underlying options.</span><br style><span style>6. Link each option to an appropriate bash command (partially done, will need a lot more experiments to better the linking and hence, the conversion).</span><br style>
<br style><span style>What I plan to do:</span><br style><span style>1. Upload first version of the tool(in python) on a git repo within next few days.</span><br style><span style>2. Play around with various configuration options in the systemd file and improve the main conversion logic. Keep updating the tool till we get reasonably correct</span><br style>
<span style>(aiming for atleast 80-90% correctness) Sys-V init script.</span><br style><span style>3. Rewrite the tool in perl as python is not part of the base system.</span><br style><br style><span style>References:</span><br style>
<span style>[0] : </span><a href="http://wiki.debian.org/SummerOfCode2012/Projects#SysV-init_file_creator_from_systemd_service_files" target="_blank" style>http://wiki.debian.org/SummerOfCode2012/Projects#SysV-init_file_creator_from_systemd_service_files</a><br style>
<span style>[1] : </span><a href="http://0pointer.de/blog/projects/systemd.html" target="_blank" style>http://0pointer.de/blog/projects/systemd.html</a><br style><span style>[2] : </span><a href="http://0pointer.de/blog/projects/systemd-docs.html" target="_blank" style>http://0pointer.de/blog/projects/systemd-docs.html</a><br style>
<span style>[3] : </span><a href="http://lists.debian.org/debian-devel/2011/07/msg00269.html" target="_blank" style>http://lists.debian.org/debian-devel/2011/07/msg00269.html</a><br style><span style>[4] : </span><a href="http://docs.python.org/library/configparser.html" target="_blank" style>http://docs.python.org/library/configparser.html</a>
</div><div><br></div><div>Regards,</div><div>Akhil Vij</div>