postgrest icon indicating copy to clipboard operation
postgrest copied to clipboard

Ubuntu or Debian package for PostgREST

Open steve-chavez opened this issue 3 years ago • 6 comments

Would help with distribution.

  • https://packaging.ubuntu.com/html/packaging-new-software.html
  • https://wiki.debian.org/HowToPackageForDebian

Might help https://github.com/ed-o-saurus/PLHaskell#ubuntu

steve-chavez avatar May 04 '22 01:05 steve-chavez

If you just want a simple way to create a Debian package, I think makedeb could help a lot. It uses a file format that's quite a bit simpler than that used in standard Debian packaging.

You could also upload the package to the MPR afterwards for more easy distribution, but you could also just publish the built deb under the releases or your own APT repository afterwards.


P.s. makedeb and the MPR are personal projects of mine.

hwittenborn avatar May 08 '22 21:05 hwittenborn

One problem with packaging PostgREST on Debian/Ubuntu is that the usual packagers (I am one) do not have a lot of experience with Haskell and also that it is not immediately obvious how many Haskell dependency packages need to be packaged first before we get to PostgREST.

mbanck avatar Dec 14 '23 13:12 mbanck

@mbanck Thanks for the feedback. I see pandoc (Haskell project too) packaged:

  • https://packages.ubuntu.com/search?keywords=pandoc
  • https://packages.debian.org/search?keywords=pandoc

how many Haskell dependency packages need to be packaged first before we get to PostgREST.

Is it necessary to package every Haskell dependency? Not sure if pandoc is doing that.

steve-chavez avatar Dec 14 '23 14:12 steve-chavez

Is it necessary to package every Haskell dependency? Not sure if pandoc is doing that.

Yes, unfortunately, Linux distributions are not in general vendorizing dependencies, see the list for pandoc here ("Other Packages Related to pandoc"):

https://packages.debian.org/source/bookworm/pandoc

mbanck avatar Dec 16 '23 08:12 mbanck

I had a look at the Build-Depends from postgrest.cabal, and the following have Debian packages already:

Package: libghc-aeson-dev
Package: libghc-auto-update-dev
Package: libghc-base-dev
Package: libghc-base64-bytestring-dev
Package: libghc-bytestring-dev
Package: libghc-case-insensitive-dev
Package: libghc-cassava-dev
Package: libghc-clock-dev
Package: libghc-containers-dev
Package: libghc-contravariant-extras-dev
Package: libghc-cookie-dev
Package: libghc-directory-dev
Package: libghc-either-dev
Package: libghc-extra-dev
Package: libghc-gitrev-dev
Package: libghc-heredoc-dev
Package: libghc-http-dev
Package: libghc-http-types-dev
Package: libghc-lens-dev
Package: libghc-lens-aeson-dev
Package: libghc-mtl-dev
Package: libghc-network-dev
Package: libghc-network-uri-dev
Package: libghc-optparse-applicative-dev
Package: libghc-regex-tdfa-dev
Package: libghc-retry-dev
Package: libghc-scientific-dev
Package: libghc-streaming-commons-dev
Package: libghc-text-dev
Package: libghc-time-dev
Package: libghc-timeit-dev
Package: libghc-unix-compat-dev
Package: libghc-unordered-containers-dev
Package: libghc-vault-dev
Package: libghc-vector-dev
Package: libghc-wai-dev
Package: libghc-wai-cors-dev
Package: libghc-wai-extra-dev
Package: libghc-wai-logger-dev
Package: libghc-warp-dev

The following apparently do not:

cache
configurator-pg
fuzzyset
hasql
hasql-dynamic-statements
hasql-notifications
hasql-pool
hasql-transaction
insert-ordered-containers
interpolatedstring-perl6
jose
parsec
protolude
ranged-sets
swagger2

mbanck avatar Jan 04 '24 11:01 mbanck

The following apparently do not:

In case anyone wants to work on packaging the above mentioned dependencies, please don't worry about those two:

interpolatedstring-perl6

This can be replaced with neat-interpolation, which is already packaged as libghc-neat-interpolation-dev. I already have a commit locally to do that, for different reasons (reducing usages of template haskell in our deps).

swagger2

This is going away anyway, once we get around to finish #1698 eventually.

wolfgangwalther avatar Jan 21 '24 15:01 wolfgangwalther