PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
22.6k stars 999 forks source link

Ubuntu or Debian package for PostgREST #2273

Open steve-chavez opened 2 years ago

steve-chavez commented 2 years ago

Would help with distribution.


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

hwittenborn commented 2 years ago

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.

mbanck commented 6 months ago

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.

steve-chavez commented 6 months ago

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

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.

mbanck commented 6 months ago

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 commented 5 months ago

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
wolfgangwalther commented 4 months ago

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.