Student Application Template
Leiningen & Clojure packaging
- Eugenio Cano-Manuel Mendoza
I am a 23-year-old Computer Science undergrad at the University of Malaga. Whilst I am approaching the final year of my degree, I am endeavouring to make a significant addition to open source software before the completion of my studies.6 years of using GNU/Linux (and happy). I am a big advocate of the concept of ‘free software is a matter of liberty, not price’. I'm a fan of Vim and One True Brace Style. I am positively certain that scripting makes everything, including my life, a whole lot easier. Having said that, I am most comfortable with C/C++, Java, Python, PHP and Bash. I like Lisp and for the past 2 months, I have been playing around with Clojure and from my point of view is a very practical Lisp dialect. It is because of this that I have taken on this project. I see great potential for it and am excited to start hacking.
About the project
Leiningen & Clojure packaging.
The problem is that maintainers don't have tools to automate the packaging of software made with Leiningen and Clojure. This project has 2 main goals: The first goal will be pack the dependencies for Leiningen 2 (wheezy currently has 1.7.1 which is outdated). This will allow Debian to incorporate more programs and libraries written in Clojure into its package system. The second task is to write the tools to ease the packaging of software made with Leiningen 2 and Clojure.
The new helper should ease the packaging of old Leiningen libraries but the reason why Leiningen 2 has to be packaged before the tool is made is because this new helper would hopefully rely on Leiningen 2 (and not current version). The order of the tasks could change if it is required for clojurehelper to support old leiningen packages.
As of now, the following libraries and programs have to be packaged because they are dependencies of Leiningen 2 and they don't exist in Debian:
leiningen-core clj-http classlojure cheshire com.hypirion.io useful pomegranate reply clj-stacktrace clojure-complete drawbridge jline2 sjacket parsley regex clojure.tools.cli clojure.tools.nrepl cd-client clj-http-lite versioneer clojure.core.cache stencil quoin scout clojure.tools.macro clojure.data.xml.
jackson-core jackson-dataformat-smile indexer-core indexer-artifact.
Because of the JVM nature of Clojure, some of the libraries that will be packaged can be used within Java programs enriching not only the Clojure ecosystem but the Java ecosystem as well.
As for the second part of the project an initial attempt would be not to fork javahelper but to reuse most of the tools that javatools provide. Clojure programs rely on Java to be compiled, up to now Clojure programs are being packed with javahelper+ a fair amount of overrides, my idea is to make a helper that can automatically take care of all the fuzz, for example set a CLASSPATH where all the dependencies from project.clj are met, take care of specific Clojure build settings etc. Packaging the dependencies for Leiningen 2 will give me a better understanding of the patterns that are repeated.
I plan to write a blog and document everything I do related to this project in order to help other people that want to start making packages for Clojure libraries as well.
I have written a simple dh_lein2 helper that prints '(println "Somebody set us up the Leiningen")'. I have sent the source code to the debian clojure packaging team mailing list.
- I have also packaged two simple dependencies (packages scout and quoin mentioned earlier).
- Create a Clojure-Leiningen ecosystem in Debian.
Benefits to Debian:
Broaden the number of packages that Debian provides (making packaging easier and updating Leiningen) and make Debian ready for future Clojure software. I will also try to see if there's room for improvement with javahelper and the maven builder since I'll be using those tools heavily.
- Leiningen2 and dependencies packaged for Debian.
- A tool that helps packaging Clojure projects that depend on Leiningen easier (along the lines of dh-make).
- A tool that helps building and assembling the debianised package (dh_lein2).
- Documentation about the tricky bits of Clojure packaging, common pitfalls, and things to pay extra attention to.
- I can commence work from the beginning of the GSoC coding period. Packaging the dependencies of Leiningen 2 will be done before the GSoC mid-term evaluation, the second part will be done until the end of the GSoC (and improved afterwards). I am most comfortable working in the afternoons.
May 28 - June 16, Students get to know mentors, read documentation, get up to speed to begin working on their projects:
In order to meet the pre-application requirement I had to read some documentation and I had the chance to meet some of the mentors. I will use this first period to read more about specific parts of Debian packaging that I skipped, for example advanced debhelper tools, specific debian/ files, files that are used by the javahelper tool, learn more about the packaging process itself (the maintainers, uploads, keying...), git-buildpackage and so on. I will also get to know all the mentors, I think these first 20 days will be appropriate to discuss our ideas regarding the new tool dh_lein2 or clojurehelper. The pre-application requirement along with a few more packages will give me the perspective needed to suggest a new way of packaging clojure programs. It would be interesting to plan the packaging of the dependencies during this period. Analize the dependencies of each other and the difficulty of each package so I can start working on them with them fluidly.
June 17 - July 29, Mentors give students a helping hand and guidance on their projects:
June 17 - July 1:
- Packaging will start, I will make small tools to help me with the task and possibly serve as base for the new clojurehelper. I will be taking notes on how these packages are being built using the old tools. This will serve as a starting point for the design of clojurehelper. I will be following the plan from the first period, starting to package easy libraries with almost no dependencies.
July 2 - July 16:
- Most of the basic indirect dependencies for Leiningen 2 should be packed by now. It is during this period when I will start packaging more complex libraries and programs that rely on the more basic packages.
July 17 - July 29:
- End of the first term. Leiningen 2 should be packed by then.
Aug 2 - Sept 16, Second Term:
Aug 2 - Aug 16:
- The knowledge acquired from the packaging of the dependencies for Leiningen 2 should help me decide the best way to implement clojurehelper. I will most likely reuse the tools I made during the beginning of the first term and use them as a base for clojurehelper. During this period we will be analyzing what components are required (for example a clone of jh_linkjars, a clone of jh_makepkg...)
Aug 17 - Aug 31:
- Some components should already be done. For example cj_makepkg should correctly build a debian/ folder with a proper structure. clojurehelper should hook properly into the dh targets.
Sept 1 - Sept 16:
- The rest of components should be done as well. For example cj_linkjars should properly link the /usr/share/java libraries to the maven repository used by Leiningen.
Sept 16 - Sept 23, Pencils down:
- During this week I will write the rest of the documentation needed to use the new-developed tools, build a few libraries with it to test it and polish some code.
Exams and other commitments:
- My exams are scheduled for the 14/6, 25/06 26/6 and 28/06. I'll probably just need a couple of days before each exam to study. Barring that, I have no other commitments that would hinder my work.
Other summer plans:
- I will be going abroad in August but I don’t foresee any issues with me having to code full time.
I have been a Debian user for most of my Linux life. I have always liked the incredible community behind it. I feel that this project is a great opportunity to becoming a part of that community and representing what they support. I believe that this project is a stepping-stone to my aspiration of becoming a valuable DM.
Are you applying for other projects in SoC?