Re: dpkg-buildpackage mvn command tries to use /root/.m2/repository
>>>>> Steinar Bang <sb@dod.no>:
> Outline of the plan
> 1. Download the sources and build them with maven (this is where I'm now)
> 2. Create the directories that will receive the built karaf stuff:
> mkdir -p /etc/karaf
> mkdir -p /usr/share/karaf
> mkdir -p /var/lib/karaf
> 3. Move the built stuff in unpacked-src/assemblies/apache-karaf/target/assembly
> to the appropriate places the final structure
> a. mv unpacked-src/assemblies/apache-karaf/target/assembly/bin to /usr/share/karaf
> b. mv unpacked-src/assemblies/apache-karaf/target/assembly/data to /var/lib/karaf
> c. mv unpacked-src/assemblies/apache-karaf/target/assembly/deploy to /var/lib/karaf
> d. mv unpacked-src/assemblies/apache-karaf/target/assembly/etc/* to /etc/karaf
> e. mv unpacked-src/assemblies/apache-karaf/target/assembly/lib to /usr/share/karaf
> f. mv unpacked-src/assemblies/apache-karaf/target/assembly/system to /usr/share/karaf
> 4. Create a systemd config that sets up the appropriate environment variables before
> starting the karaf daemon
> KARAF_BASE=/usr/share/karaf
> KARAF_ETC=/etc/karaf
> KARAF_DATA=/var/lib/karaf/data
> 5. Create postinst and postrm scripts that creates/removes a karaf user
> (and group) and sets up and removes the systemd daemon
> 6. Replace all of the non org.apache.karaf.*.jar needed for boot with
> deb dependencies
> 7. Move the org.apache.karaf.*.jar part of /usr/share/karaf/system to
> /usr/share/maven-repository and use this as the system repo in karaf
> After point 5 in this, there will hopefully be a running
> non-debian-package compliant karaf that's installable by a debian
> package (ie. about the same level of functionality as my current fpm
> based package, but built from sources instead of the binary tar-ball and
> using the debian tools).
I've now have a working package that is at step 5, ie. at the same level
as the fpm package I've been using up until now.
https://github.com/steinarb/karaf-debian
Improvments wrt. the fpm package:
1. Built from the apache karaf src tar-ball instead of the binary
tar-ball
2. Built using the standard debian packaging tools
It's also a bit simpler. I used the systemd template of the karaf
distribution as a basis for the systemd file (so now the KARAF_DATA
directory actually works the way it was supposed to do).
I also wrote the maintscripts from scratch, making them a lot simpler
than the ones in the fpm package.
Reply to: