Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian package and submit it to Debian #81

Closed
dzc34 opened this issue Jul 22, 2017 · 2 comments
Closed

Debian package and submit it to Debian #81

dzc34 opened this issue Jul 22, 2017 · 2 comments

Comments

@dzc34
Copy link
Member

dzc34 commented Jul 22, 2017

Previous discussion with @rydroid:
https://github.com/Asqatasun/Asqatasun/issues/158

It is a "feature" proposition. There is no Debian package and even no way to build one. It would be great to have a way to build one and submit it to Debian to install this program more easily.

similar issue but less complete
#82 Automatically create a debian package at the maven build

documentation

package Java apps on Ubuntu / Debian

https://trac.osgeo.org/ubuntugis/wiki/java-packaging
There a multiples way to package Java apps on Ubuntu.

  1. Fastest way is to get the jar/war file and make a package containing them. Your debian/rules will simply extract it at the right place.
  2. It ends up making a package similar to the first way, but using tools like jdeb to make it automatically for you. jdeb(​https://github.com/tcurdt/jdeb) is a plugin for maven/ant that automatically creates a package from your Java app if it's using Maven or Ant to build.
  3. There are also tools to help creating a package built from source ​https://wiki.debian.org/Java/Packaging. It works out of the box for ants and manually building the app
  4. For maven projects, Maven-Debian-Helper(​https://wiki.debian.org/Java/MavenDebianHelper) makes it really easy to package an app if all the depencies are available.

1. get the jar/war file and make a package containing them

# Prerequisites
apt-get install       debhelper       \
                        cdbs            \
                        lintian         \
                        build-essential \
                        fakeroot        \
                        devscripts      \
                        pbuilder        \
                        dh-make         \
                        debootstrap

# First test
mkdir test_package_debian
cd test_package_debian
wget https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.6.0/contrast-finder_0.6.0.i386.tar.gz
mv -v contrast-finder_0.6.0.i386.tar.gz contrast-finder_0.6.0.orig.tar.xz
tar zxvf contrast-finder_0.6.0.orig.tar.xz
mv contrast-finder_0.6.0.i386 contrast-finder_0.6.0
cd contrast-finder_0.6.0
dh_make -y -s -e [email protected] -p contrast-finder_0.6.0 
rm -rf *ex *EX README* && ls -l

# What's next?
...
...

# check package
dpkg --contents *.deb 
lintian -Iv *.deb 

# install package
dpkg -i *.deb
apt-get -f install

# See package information
dpkg -l tomcat7 libspring-instrument-java contrast-finder   

# Check directories
ls -l /etc/contrast-finder
ls -l /var/log/contrast-finder/
ls -l /var/lib/tomcat7/webapps
ls -l /usr/share/tomcat7/lib/spring3-instrument-tomcat* 

2. maven plugin jdeb

another way: maven plugin to create Debian packages from Java builds

it's works, but not ready for submit it to Debian repository (and not easy way)
see #82 Automatically create a debian package at the maven build

@dzc34 dzc34 changed the title Debian package Debian package and submit it to Debian Jul 23, 2017
@dzc34
Copy link
Member Author

dzc34 commented Jun 14, 2018

added to #161 and closed

@dzc34 dzc34 closed this as completed Jun 14, 2018
@dzc34
Copy link
Member Author

dzc34 commented Aug 26, 2018

remove the dedicated branch (unused):

  • debian/changelog
  • debian/compat
  • debian/control
  • debian/docs

debian/compat file

9

debian/control file

Package: contrast-finder
Architecture: all
Depends: tomcat7
Section: java
Priority: extra
Description: ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant