You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rohit Yadav <ro...@citrix.com> on 2012/09/20 16:33:24 UTC
[Maven] Progress on deb packaging
WIth the aim to slowly replace all ant/waf uses with Maven/plugins, I've some progress on deb packaging to share and questions to ask:
The WIP patch:
http://bhaisaab.org/patches/cloudstack/0001-Maven-jdeb-plugin-for-deb-packaging-WIP.patch (86KB)
I'm facing issue on how and which scripts to configure. All the .in, .conf, .properties files are processed by waf and the @variables@ are replaced during that process. These are mostly sysconfig paths and distro dependant env variables, which are actually fixed and standard for debs (Ubuntu/Debian) and rpms (Fedora).
All the control files are preprocessed and the artifact Ids and versions are not hard coded in the control files anymore. I need help to verify the control rules, dependencies and to test which file goes where.
Every submodule (and every plugin) gets own deb package, same goes for rpm (future). The patch/plugin is inside a profile and can be merge right now, won't break anything. Packaging is very fast compared to waf and does not require any external tool (like dpkg/debuild). For every module or overall project, just cd to the project and do:
mvn package -P deb
WIP modules: plugins, console-proxy, test, patches/iso, deps/XenServer, awsapi. (they all are somewhat tricky)
Right now I've merged all the agent-libs/scripts/deps into one agent-deb.
Suggestions and comments?
Regards,
Rohit
Re: [Maven] Progress on deb packaging
Posted by Rohit Yadav <ro...@citrix.com>.
Updates:
Diff view against master:
https://github.com/bhaisaab/incubator-cloudstack/compare/debs-maven
Patch:
http://bhaisaab.org/patches/cloudstack/0001-Maven-jdeb-plugin.patch (205KB)
Major changes:
- All plugins are created and bundled in separate debs
- agent depends on kvm-plugin
- server depends on whole lot of plugins which were previous bundled monolithically
- Use of exec plugin in cloud-cli
Issues:
- agent's pkg/control/postinst(all) script has some extra stuff I don't understand, pl. check
- CLASSPATH issues, and how to configure this in post install scripts
- With waf/debuild/dpkg-buildpackage no longer, I don't know how to proceed with certain scripts (.in, .properties.in etc.).
Proposal: to maintain two hardcoded versions, one for rpm/rhel/centos, one for deb/ubuntu/debian; or use some kind of preprocessor and use exec plugin to deploy while packaging
- cloud-cli assumes jars in target/jar (used by apidoc.sh to generate commands.xml)
- Packaging issues: systemvm-iso (will probably have to reuse a maven assembly), awsapi (packaging is not clear), client (lots of scripts that require preprocessing of @@ variables), console-proxy (packaging is not clear).
For now, all submodules (except, cloud-client, cloud-awsapi and cloud-systemvmiso/console-proxy) can be packaged using:
mvn package -P deb
Maven TODOs:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven#BuildingwithMaven-TODOs
Regards.
On 20-Sep-2012, at 8:03 PM, Rohit Yadav <ro...@citrix.com> wrote:
> WIth the aim to slowly replace all ant/waf uses with Maven/plugins, I've some progress on deb packaging to share and questions to ask:
>
> The WIP patch:
> http://bhaisaab.org/patches/cloudstack/0001-Maven-jdeb-plugin-for-deb-packaging-WIP.patch (86KB)
>
> I'm facing issue on how and which scripts to configure. All the .in, .conf, .properties files are processed by waf and the @variables@ are replaced during that process. These are mostly sysconfig paths and distro dependant env variables, which are actually fixed and standard for debs (Ubuntu/Debian) and rpms (Fedora).
>
> All the control files are preprocessed and the artifact Ids and versions are not hard coded in the control files anymore. I need help to verify the control rules, dependencies and to test which file goes where.
>
> Every submodule (and every plugin) gets own deb package, same goes for rpm (future). The patch/plugin is inside a profile and can be merge right now, won't break anything. Packaging is very fast compared to waf and does not require any external tool (like dpkg/debuild). For every module or overall project, just cd to the project and do:
>
> mvn package -P deb
>
> WIP modules: plugins, console-proxy, test, patches/iso, deps/XenServer, awsapi. (they all are somewhat tricky)
>
> Right now I've merged all the agent-libs/scripts/deps into one agent-deb.
>
> Suggestions and comments?
>
> Regards,
> Rohit