From patchwork Mon Mar 12 10:12:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 884401 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QFzYZIAw"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400DMK6XtJz9sRN for ; Mon, 12 Mar 2018 21:13:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AE465836B2; Mon, 12 Mar 2018 10:12:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WqYTy0791vh6; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7359B836B3; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 60A151C2BAA for ; Mon, 12 Mar 2018 10:12:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5DDCF87E71 for ; Mon, 12 Mar 2018 10:12:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yXjTm+aTVkaU for ; Mon, 12 Mar 2018 10:12:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id C806F87499 for ; Mon, 12 Mar 2018 10:12:55 +0000 (UTC) Received: by mail-io0-f195.google.com with SMTP id v6so10753533iog.7 for ; Mon, 12 Mar 2018 03:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=h949x9HQiBPv5XwCaEKe9Mwa3nHkfMEZa64CCHTD4f4=; b=QFzYZIAwdK9alZy9yOa/DiB0Vb01h0HdtljKXdwcXo3zX7ciLoEjdyaTvmzScm4TdI chFFaXZVpLugBdJS7m5D5v9m1JaLTq5jH0CLwqV3vAb9ELVw0NluBnL5CxD2rgbUNHjM owjq5d2su44V8TnmvbPzNO05m5J2WqzhNEMzCOMsKmBueVETqMhHhOSCTaLdGaBJNQOn 9IyJjGaduqVADJIKUwre6zecE7/Wa49FQH8HDZt6c9p0ARljrumIqmjstH1RWaaXirZC Qh08uGkjFujHXmCoT487wmfAz/9z5F+Qu4n8j/UrDrYWUjxk5egS5msi3MN9/55/fSU0 7dbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=h949x9HQiBPv5XwCaEKe9Mwa3nHkfMEZa64CCHTD4f4=; b=q26oV0P/3tmryGbw24VCvUPNBm42aNNmVzIzbN4NKH0k4S8w6ZMTr26n/pBxBlRe04 zAPH9rTb7/zFei/LH0DGxkvdXjIjFxXogeYqtJudJQ9KD1+vqL7kO3Jk1q0rmHf2zxLU k6nU3sCMzKKDbUWZreui8XLfoDOcqhJy9i+7SG9wI6rwPdkFlKUOa/TBcFyzkkupAGkk aidN8RvIr5/6HXB4LHvnod4HtDNuU2BGkCLBWuQ6TYW6NJmgU1Bwrminj2DU48k4vsDZ DOv43NnWp1GKAl9ox8Uk8mbDMHHGfPKx6O4nZb4deCZ+Agzl1szK7LLnQ1xDyIJyUv2U tqqA== X-Gm-Message-State: AElRT7Gfcy3GTb7ZRYihiK+Bg0hXC+FqY56buTPwQYrmhhF8vnjKyAbl bA2lv1NYE87OManJLIwjJtR+LeGN X-Google-Smtp-Source: AG47ELuBxs9p1KrbM3O1FdYtz8ji0nBeAvGMGrcctHghl7kT+kTf2K4DH2GiwFArb040FhqDRcrHEg== X-Received: by 10.107.200.151 with SMTP id y145mr7782111iof.182.1520849574743; Mon, 12 Mar 2018 03:12:54 -0700 (PDT) Received: from localhost.localdomain (mail.codeblue.com. [65.183.183.198]) by smtp.gmail.com with ESMTPSA id 202sm3278389itu.23.2018.03.12.03.12.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Mar 2018 03:12:54 -0700 (PDT) From: Adam Duskett To: buildroot@buildroot.org Date: Mon, 12 Mar 2018 06:12:30 -0400 Message-Id: <20180312101231.2280-1-aduskett@gmail.com> X-Mailer: git-send-email 2.14.3 Subject: [Buildroot] [PATCH v3 1/2] postgresql: add version output to pg_config X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some external packages call pg_config to determine the installed PostgreSQL version. Add this output to Buildroots own pg_config, so these packages correctly compile. Signed-off-by: Adam Duskett --- Changes v1 -> v3: - Added this patch to the series. package/postgresql/pg_config | 5 ++++- package/postgresql/postgresql.mk | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config index 85c0e63ddb..642252f27f 100644 --- a/package/postgresql/pg_config +++ b/package/postgresql/pg_config @@ -14,6 +14,9 @@ case "$1" in --libdir) echo "$prefix/lib" ;; + --version) + echo "PostgreSQL @POSTGRESQL_VERSION@" + ;; *) - echo "Usage: $0 {--includedir|--libdir}" + echo "Usage: $0 {--includedir|--libdir|--version}" esac diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk index c6b689a146..94b3e60e59 100644 --- a/package/postgresql/postgresql.mk +++ b/package/postgresql/postgresql.mk @@ -84,6 +84,7 @@ POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG $(INSTALL) -m 0755 -D package/postgresql/pg_config \ $(STAGING_DIR)/usr/bin/pg_config + $(SED) "s|@POSTGRESQL_VERSION@|$(POSTGRESQL_VERSION)|g" $(STAGING_DIR)/usr/bin/pg_config endef POSTGRESQL_POST_INSTALL_STAGING_HOOKS += POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG From patchwork Mon Mar 12 10:12:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 884402 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Pm/lZz0E"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400DMX4fZfz9sRN for ; Mon, 12 Mar 2018 21:13:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 27F92852F8; Mon, 12 Mar 2018 10:13:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nr4imxGQMDjb; Mon, 12 Mar 2018 10:13:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A8A3C855E3; Mon, 12 Mar 2018 10:13:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C2D4B1C2BAA for ; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BF93387E71 for ; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XQZse5O7FjJc for ; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id E878E87499 for ; Mon, 12 Mar 2018 10:12:56 +0000 (UTC) Received: by mail-it0-f68.google.com with SMTP id e64-v6so10669003ita.5 for ; Mon, 12 Mar 2018 03:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bCyZ1Wrvfsh9Yp1EP6mfZCypl1/pzODtnINMSYeaGWY=; b=Pm/lZz0ECyAQam7h6tVfyb8C0W8/kkW2deW4OVmHAAtnfnFfjYpdvrrYIIE397pOzt Rp0KazSCrr7D/XmnlfrTOzHi1voMLf24oaD2ZFravNrIHAeQeqGmNJAXxKWt38La2GLp UuygAZUUTICyNLIOWBv7mb9vHkhOy5K0uqkvz3BzUTiNRGTaBrGbof+CKM1ym/cJddWh TICkChEj4wTv/wD4lkhra2+L6c+o2X9NRyFTiVabK0QBh6WQxBs0bGMZBpvh2SrIDduY KAPjSogILyp9Yna71/lXmpXu3b3T6HzQgce65MloRL2YXCSncM6fwrr68fXaNtgkyXp1 RBMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bCyZ1Wrvfsh9Yp1EP6mfZCypl1/pzODtnINMSYeaGWY=; b=i1QtbmtmzlgxBkVsvWR5lulHFVbnSAhBM/JbDwB3ktFCM+n406ktB1XeStVRFIHkJw KDvalPgVy8kQw7uUI72gNN9OwUsozLF95dj4LYtArsMR1TZaw+t2xbdBlSXrj58j93xW RYqeGadikoKtmUQd33tcMg4oCaA0C6OZi/m6HgEZ6dKIghyJYN0GRjfaOigCXT6zwC46 p9v2vDz1hXzipRTYSnafwcPu9op9qstEfcEYoS8+lw3u9kDnqfeQxKNOv/3TXEJngtAc nd5T+m/pRAaKHxEHBXtYpqNaOB8/W8qK8Y7bVoJcHmEj+WmuX90qf66Q4GBZCNaSWAeq cNrw== X-Gm-Message-State: AElRT7EODxVo7SbfTaqf6lwKYWHOnQ3UHE75USA5kXgKXbr4aPHvDl3J QSdt5CF2H7PTrRol83eVBivUoMG2 X-Google-Smtp-Source: AG47ELtRsM7a3Klzbs+qnm6AfAN4dEj4LjIe0UJZvwvigkjrV4x73F7Lpu6VHhFuNAhS6mf1Wv+nFQ== X-Received: by 10.36.47.147 with SMTP id j141mr7898844itj.140.1520849575892; Mon, 12 Mar 2018 03:12:55 -0700 (PDT) Received: from localhost.localdomain (mail.codeblue.com. [65.183.183.198]) by smtp.gmail.com with ESMTPSA id 202sm3278389itu.23.2018.03.12.03.12.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Mar 2018 03:12:54 -0700 (PDT) From: Adam Duskett To: buildroot@buildroot.org Date: Mon, 12 Mar 2018 06:12:31 -0400 Message-Id: <20180312101231.2280-2-aduskett@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180312101231.2280-1-aduskett@gmail.com> References: <20180312101231.2280-1-aduskett@gmail.com> Subject: [Buildroot] [PATCH v3 2/2] python-psycopg2: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). It was designed for heavily multi-threaded applications that create and destroy lots of cursors and make a large number of concurrent INSERTs or UPDATEs. Signed-off-by: Adam Duskett Reviewed-by: Yegor Yefremov Signed-off-by: Adam Duskett < --- Changes v1 -> v2: - None Changes v2 -> v3: - Removed python-psycopg2/0001-don-t-use-pg_config.patch - Added PYTHON_PSYCOPG2_BUILD_OPTS and PYTHON_PSYCOPG2_INSTALL_TARGET_OPTS to point towards Buildroots own pg_config file. (Thomas) - Updated to 2.7.4 DEVELOPERS | 1 + package/Config.in | 1 + package/python-psycopg2/Config.in | 22 ++++++++++++++++++++++ package/python-psycopg2/python-psycopg2.hash | 4 ++++ package/python-psycopg2/python-psycopg2.mk | 21 +++++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 package/python-psycopg2/Config.in create mode 100644 package/python-psycopg2/python-psycopg2.hash create mode 100644 package/python-psycopg2/python-psycopg2.mk diff --git a/DEVELOPERS b/DEVELOPERS index 3df820e712..6329bcde2d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -53,6 +53,7 @@ F: package/nginx-naxsi/ F: package/policycoreutils/ F: package/python-flask-sqlalchemy/ F: package/python-mutagen/ +F: package/python-psycopg2/ F: package/python-sqlalchemy/ F: package/restorecond/ F: package/refpolicy/ diff --git a/package/Config.in b/package/Config.in index 449ffcc47b..d40170ccf9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -856,6 +856,7 @@ menu "External python modules" source "package/python-prompt-toolkit/Config.in" source "package/python-protobuf/Config.in" source "package/python-psutil/Config.in" + source "package/python-psycopg2/Config.in" source "package/python-ptyprocess/Config.in" source "package/python-pudb/Config.in" source "package/python-pyasn/Config.in" diff --git a/package/python-psycopg2/Config.in b/package/python-psycopg2/Config.in new file mode 100644 index 0000000000..ec852bb49e --- /dev/null +++ b/package/python-psycopg2/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_PYTHON_PSYCOPG2 + bool "python-psycopg2" + select BR2_PACKAGE_POSTGRESQL + help + Psycopg is the most popular PostgreSQL database adapter for + the Python programming language. Its main features are the + complete implementation of the Python DB API 2.0 specification + and the thread safety (several threads can share the same + connection). It was designed for heavily multi-threaded + applications that create and destroy lots of cursors and make + a large number of concurrent INSERTs or UPDATEs. + + Psycopg 2 is mostly implemented in C as a libpq wrapper, + resulting in being both efficient and secure. It features + client-side and server-side cursors, asynchronous + communication and notifications, COPY support. Many Python + types are supported out-of-the-box and adapted to matching + PostgreSQL data types; adaptation can be extended and + customized thanks to a flexible objects adaptation system. + Psycopg 2 is both Unicode and Python 3 friendly. + + http://initd.org/psycopg/ diff --git a/package/python-psycopg2/python-psycopg2.hash b/package/python-psycopg2/python-psycopg2.hash new file mode 100644 index 0000000000..ea4a07697b --- /dev/null +++ b/package/python-psycopg2/python-psycopg2.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/psycopg2/json, sha256 locally computed +md5 70fc57072e084565a42689d416cf2c5c psycopg2-2.7.4.tar.gz +sha256 8bf51191d60f6987482ef0cfe8511bbf4877a5aa7f313d7b488b53189cf26209 psycopg2-2.7.4.tar.gz +sha256 1752db3c786e12b62ca804178dca033adce8bff4c4b3d98d3449d407fe45210d LICENSE diff --git a/package/python-psycopg2/python-psycopg2.mk b/package/python-psycopg2/python-psycopg2.mk new file mode 100644 index 0000000000..3cb8c85778 --- /dev/null +++ b/package/python-psycopg2/python-psycopg2.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-psycopg2 +# +################################################################################ + +PYTHON_PSYCOPG2_VERSION = 2.7.4 +PYTHON_PSYCOPG2_SOURCE = psycopg2-$(PYTHON_PSYCOPG2_VERSION).tar.gz +PYTHON_PSYCOPG2_SITE = https://pypi.python.org/packages/74/83/51580322ed0e82cba7ad8e0af590b8fb2cf11bd5aaa1ed872661bd36f462 +PYTHON_PSYCOPG2_SETUP_TYPE = setuptools +PYTHON_PSYCOPG2_LICENSE = LGPL-3.0+ +PYTHON_PSYCOPG2_LICENSE_FILES = LICENSE +PYTHON_PSYCOPG2_DEPENDENCIES = postgresql + +# Force psycopg2 to use the BuildRoot provided postgresql version instead of +# The host machines +PYTHON_PSYCOPG2_BUILD_OPTS += build_ext --pg-config=$(STAGING_DIR)/usr/bin/pg_config + +PYTHON_PSYCOPG2_INSTALL_TARGET_OPTS += build_ext --pg-config=$(STAGING_DIR)/usr/bin/pg_config + +$(eval $(python-package))