Bug 246383 - [new port] www/hs-postgrest: PostgREST create a REST API to an existing Postgres database
Summary: [new port] www/hs-postgrest: PostgREST create a REST API to an existing Postg...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Palle Girgensohn
URL: http://postgrest.org
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-05-11 19:36 UTC by Dmitry Wagin
Modified: 2020-05-26 16:56 UTC (History)
2 users (show)

See Also:


Attachments
hs-postgrest.diff (59.14 KB, patch)
2020-05-11 19:36 UTC, Dmitry Wagin
no flags Details | Diff
hs-postgrest.diff (58.50 KB, patch)
2020-05-24 17:17 UTC, Dmitry Wagin
no flags Details | Diff
without-custom-install.diff (2.21 KB, patch)
2020-05-26 16:56 UTC, Dmitry Wagin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Wagin 2020-05-11 19:36:02 UTC
Created attachment 214387 [details]
hs-postgrest.diff

PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API. The structural constraints and permissions in the database determine the API endpoints and operations.
Comment 1 Dmitry Wagin 2020-05-24 17:17:08 UTC
Created attachment 214816 [details]
hs-postgrest.diff

update to 7.0.1
Comment 2 Palle Girgensohn freebsd_committer 2020-05-26 06:55:57 UTC
Committed. Thanks!
Comment 3 commit-hook freebsd_committer 2020-05-26 06:56:14 UTC
A commit references this bug:

Author: girgen
Date: Tue May 26 06:55:38 UTC 2020
New revision: 536575
URL: https://svnweb.freebsd.org/changeset/ports/536575

Log:
  Introducing PostgREST

  Using PostgREST is an alternative to manual CRUD programming. Custom API
  servers suffer problems. Writing business logic often duplicates, ignores or
  hobbles database structure. Object-relational mapping is a leaky abstraction
  leading to slow imperative code. The PostgREST philosophy establishes a single
  declarative source of truth: the data itself.

  WWW:		http://postgrest.org/en/v7.0.0/
  PR:		246383
  Submitted by:	Dmitry Wagin

Changes:
  head/GIDs
  head/UIDs
  head/www/Makefile
  head/www/hs-postgrest/
  head/www/hs-postgrest/Makefile
  head/www/hs-postgrest/distinfo
  head/www/hs-postgrest/files/
  head/www/hs-postgrest/files/default.conf.in
  head/www/hs-postgrest/files/postgrest.in
  head/www/hs-postgrest/pkg-descr
  head/www/hs-postgrest/pkg-plist
Comment 4 Gleb Popov freebsd_committer 2020-05-26 09:18:52 UTC
I'd appreciate getting haskell@ on hook when adding new Haskell ports.

In the Makefile

- "SKIP_CABAL_PLIST=       yes" should be removed, along with "sbin/postgrest" from pkg-plist.
- do-install target shouldn't contain INSTALL_PROGRAM part. Doesn't USES=cabal install this executable automatically?
Comment 5 Dmitry Wagin 2020-05-26 10:11:10 UTC
(In reply to Gleb Popov from comment #4)

postgrest is a web server, custom installation is made for remove unnecessary shell wrapper.
Comment 6 Gleb Popov freebsd_committer 2020-05-26 13:19:30 UTC
(In reply to Dmitry Wagin from comment #5)
You mean wrapper generated by USES=cabal? What's wrong with it?
Comment 7 Dmitry Wagin 2020-05-26 13:52:05 UTC
(In reply to Gleb Popov from comment #6)

wrapper is not needed.
Comment 8 Gleb Popov freebsd_committer 2020-05-26 13:59:08 UTC
(In reply to Dmitry Wagin from comment #7)

Most of Haskell ports don't need them, but that's not a reason to introduce additional complexity to ports. Please, provide a patch with changes I requested.
Comment 9 Dmitry Wagin 2020-05-26 14:11:28 UTC
(In reply to Gleb Popov from comment #8)

Generating files that will not be used is wrong.
Comment 10 Gleb Popov freebsd_committer 2020-05-26 14:44:51 UTC
Okay, since you're the maintainer I'll leave that to you.
Comment 11 Dmitry Wagin 2020-05-26 16:56:41 UTC
Created attachment 214883 [details]
without-custom-install.diff

IMHO complexity same + generated file