From owner-svn-ports-head@freebsd.org Sun Mar 18 12:31:14 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B11FF4FD2B; Sun, 18 Mar 2018 12:31:14 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39D636EEBA; Sun, 18 Mar 2018 12:31:14 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34D2B208CB; Sun, 18 Mar 2018 12:31:14 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2ICVEOQ040310; Sun, 18 Mar 2018 12:31:14 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2ICVD4m040306; Sun, 18 Mar 2018 12:31:13 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201803181231.w2ICVD4m040306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Sun, 18 Mar 2018 12:31:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r464904 - in head/databases: . pgsanity X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/databases: . pgsanity X-SVN-Commit-Revision: 464904 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 12:31:14 -0000 Author: tobik Date: Sun Mar 18 12:31:13 2018 New Revision: 464904 URL: https://svnweb.freebsd.org/changeset/ports/464904 Log: New port: databases/pgsanity PgSanity checks the syntax of PostgreSQL SQL files. It does this by leveraging the ecpg command which is traditionally used for preparing C files with embedded SQL for compilation. However, as part of that preparation, ecpg checks the embedded SQL statements for syntax errors using the exact same parser that is in PostgreSQL. So the approach that PgSanity takes is to take a file that has a list of bare SQL in it, make that file look like a C file with embedded SQL, run it through ecpg and let ecpg report on the syntax errors of the SQL. WWW: https://github.com/markdrago/pgsanity PR: 226689 Submitted by: 0mp Added: head/databases/pgsanity/ head/databases/pgsanity/Makefile (contents, props changed) head/databases/pgsanity/distinfo (contents, props changed) head/databases/pgsanity/pkg-descr (contents, props changed) Modified: head/databases/Makefile Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Sun Mar 18 12:20:10 2018 (r464903) +++ head/databases/Makefile Sun Mar 18 12:31:13 2018 (r464904) @@ -601,6 +601,7 @@ SUBDIR += pgreplay SUBDIR += pgroonga SUBDIR += pgrouting + SUBDIR += pgsanity SUBDIR += pgsphere SUBDIR += pgtcl SUBDIR += pgtop Added: head/databases/pgsanity/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pgsanity/Makefile Sun Mar 18 12:31:13 2018 (r464904) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +PORTNAME= pgsanity +DISTVERSIONPREFIX= v +DISTVERSION= 0.2.8-16 +DISTVERSIONSUFFIX= -gd82a5be +CATEGORIES= databases python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Check syntax of PostgreSQL SQL files + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= pgsql python +USE_PYTHON= autoplist concurrent distutils + +USE_GITHUB= yes +GH_ACCOUNT= markdrago + +NO_ARCH= yes + +OPTIONS_DEFINE= DOCS + +PORTDOCS= README.md + +do-test: + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test) + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include Added: head/databases/pgsanity/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pgsanity/distinfo Sun Mar 18 12:31:13 2018 (r464904) @@ -0,0 +1,3 @@ +TIMESTAMP = 1521374534 +SHA256 (markdrago-pgsanity-v0.2.8-16-gd82a5be_GH0.tar.gz) = 6f08f723f08d2eee201fff8f0fdb855d7c7bb0b7e9063cff428c03b4b37f7eee +SIZE (markdrago-pgsanity-v0.2.8-16-gd82a5be_GH0.tar.gz) = 7673 Added: head/databases/pgsanity/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/pgsanity/pkg-descr Sun Mar 18 12:31:13 2018 (r464904) @@ -0,0 +1,14 @@ +PgSanity checks the syntax of PostgreSQL SQL files. + +It does this by leveraging the ecpg command which is traditionally +used for preparing C files with embedded SQL for compilation. +However, as part of that preparation, ecpg checks the embedded SQL +statements for syntax errors using the exact same parser that is in +PostgreSQL. + +So the approach that PgSanity takes is to take a file that has a list +of bare SQL in it, make that file look like a C file with embedded +SQL, run it through ecpg and let ecpg report on the syntax errors of +the SQL. + +WWW: https://github.com/markdrago/pgsanity