mappyfile icon indicating copy to clipboard operation
mappyfile copied to clipboard

add debian packaging

Open tomkralidis opened this issue 7 years ago • 24 comments

As a devops person, I would like to install mappyfile via apt-get so that installations can be reproducible.

Many projects require Debian packaging setup for Ubuntu/Debian environments.

tomkralidis avatar Jun 17 '18 00:06 tomkralidis

What are the steps involved to do this? I briefly looked at https://askubuntu.com/questions/16446/how-to-get-my-software-into-ubuntu Has OWSLib gone through a similar process? Did it require a mentor etc.

I think @tigerfoot kindly added mappyfile to the OpenSUSE project - see https://github.com/geographika/mappyfile/issues/13 and https://software.opensuse.org/search?utf8=%E2%9C%93&q=mappyfile

geographika avatar Jun 17 '18 14:06 geographika

@geographika: cc'ing @kalxas here for advice on getting mappyfile onto UbuntuGIS. I think the initial key steps are figuring out mappyfile's dependency tree and covering for upstream packages.

tomkralidis avatar Jun 17 '18 16:06 tomkralidis

Hi, thanks for the notification. I will add this on my packaging todo list. Thanks @tigerfoot for taking care of the openSUSE part.

kalxas avatar Jun 19 '18 08:06 kalxas

@kalxas - thanks for looking into this - let me know if I need to make any modifications to support this. Out of interest, what is the advantage of adding Python packages to Ubuntu repositories rather than using PyPI?

geographika avatar Jun 19 '18 11:06 geographika

@geographika: AFAIK some IT environments do not accept pip as a deployment approach.

tomkralidis avatar Jun 19 '18 12:06 tomkralidis

Both RPM and Debian packaging is more strict and provide a better integration with the OS, thus more stable than pip.

kalxas avatar Jun 19 '18 12:06 kalxas

I see in setup.py that installing the package requires 3 other packages https://github.com/geographika/mappyfile/blob/master/setup.py#L40 but requirements.txt has more than 3. I guess setup.py includes the absolute minimal?

kalxas avatar Jun 21 '18 14:06 kalxas

Yes the libraries in setup.py are the only ones required to use mappyfile. I'll add some comments to the requirements.txt to make this clearer (or clean it up). I presume all dependencies also have to already be packaged for Debian?

geographika avatar Jun 22 '18 12:06 geographika

Yes, all the dependencies have to be packaged too.

kalxas avatar Jun 26 '18 21:06 kalxas

Hi all, Initial packages for mappyfile are now available on: https://launchpad.net/~gcpp-kalxas/+archive/ubuntu/ubuntugis/+packages

Testing on Ubuntu Bionic: screenshot_20180818_003709

Here is the error I get: screenshot_20180818_003817

kalxas avatar Aug 17 '18 21:08 kalxas

I realized that I had a previous version of lark-parser, I will update.

kalxas avatar Aug 17 '18 21:08 kalxas

@kalxas - thanks for this! What is the process for when I update mappyfile to a new version? Do you have to do something manually to create a new package? Is there anything I can do from my side to make this easier (I have a new release planned in the next few weeks with a command line interface).

geographika avatar Aug 18 '18 08:08 geographika

Packages are created and uploaded manually on distributions like openSUSE, Debian and Ubuntu. On every new release, packagers need to handle this process.

kalxas avatar Aug 18 '18 10:08 kalxas

@tigerfoot do you have a working spec file for Mappyfile? I cannot see the project in https://build.opensuse.org/project/show/Application:Geo or the staging area.

kalxas avatar Aug 18 '18 10:08 kalxas

@geographika @tomkralidis packages now available in UbuntuGIS experimental ppa: https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental/+packages Please test.

kalxas avatar Aug 18 '18 11:08 kalxas

@kalxas I've one in python, actually it's a refugee in my home https://build.opensuse.org/package/show/home:bruno_friedmann:branches:devel:languages:python/python-mappyfile that should be refreshed in time (next release) and thus be forwarded to d:l:p and then to factory and afterward directly in Leap. Maybe instead of d:l:p project I can use Application:Geo I've to think about it.

tigerfoot avatar Aug 18 '18 12:08 tigerfoot

both options look fine to me :)

kalxas avatar Aug 18 '18 14:08 kalxas

@kalxas - the following commands work for me (on Lubuntu xenial - an OSGeoLive 11 VM):

sudo add-apt-repository ppa:ubuntugis/ubuntugis-experimental
sudo apt-get update
sudo apt-get install python-mappyfile
sudo apt-get install python3-mappyfile

python -c "import mappyfile;print(mappyfile.__version__)"
python3 -c "import mappyfile;print(mappyfile.__version__)"

I noticed the Python2 version adds an additional dependency - python-functools32 not in setup.py - I resume this is fine?

A couple of questions for you if you have time:

  • what (if anything) should be done if a new version of mappyfile is released? Should I ping you, or simply wait until you or another maintainer wants to make a new packages?
  • what steps could be taken to get this onto an OSGeoLive release in the future? I know full projects need a Quick Start etc. - is this the same for Python libraries? I can ask this question on the OSGeo mailing list if more appropriate.

geographika avatar Aug 19 '18 21:08 geographika

Hi, This is the dependency chain in debian control file:

Depends: ${misc:Depends},
         ${python:Depends},
         python (>=2.7),
         python-jsonschema,
         python-jsonref,
         python-lark-parser,
         debconf

so this dependency comes from another package.

Regarding your questions:

  • ping ubuntugis mailing list for an updated package
  • I will add mappyfile to OSGeoLive as a python library (many libraries are included without quickstart/overview) but the best way to promote your project is to provide docs and go through the complete process :)

kalxas avatar Aug 19 '18 21:08 kalxas

https://github.com/OSGeo/OSGeoLive/commit/2df427d7744fc2adc0e9889af7a8f6c80dd9c11b

kalxas avatar Aug 20 '18 19:08 kalxas

@kalxas not sure if this comment is relevant to debian packaging:

Installing on Ubuntu 18.04 required python-setuptools (sudo apt-get install python-setuptools)

tomkralidis avatar Aug 23 '18 13:08 tomkralidis

Mappyfiles on pypi is 0.7.6 and only 0.7.5 version is published here issue reported Booth side of the project should be kept in sync, it's a nightmare otherwise :-)

Also click is now an additionnal requires

tigerfoot avatar Feb 05 '19 14:02 tigerfoot

Hi all, New Mappyfile deb package just landed in OSGeoLive ppa: https://launchpad.net/~osgeolive/+archive/ubuntu/nightly/+packages

kalxas avatar May 07 '19 15:05 kalxas

Packages now in UbuntuGIS experimental. Please test. https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental/+packages?field.name_filter=&field.status_filter=published&field.series_filter=bionic

kalxas avatar May 14 '19 11:05 kalxas