From patchwork Wed May 1 06:27:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 1093604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44v7kL3k4zz9s9N for ; Wed, 1 May 2019 16:28:10 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=russell.cc Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.b="HJ9+IbO9"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="5yhRDJf/"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44v7kL1SllzDqT4 for ; Wed, 1 May 2019 16:28:10 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=russell.cc (client-ip=64.147.123.24; helo=wout1-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=russell.cc Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.b="HJ9+IbO9"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="5yhRDJf/"; dkim-atps=neutral Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44v7jx1808zDq9Z for ; Wed, 1 May 2019 16:27:48 +1000 (AEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 411F04AA; Wed, 1 May 2019 02:27:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 01 May 2019 02:27:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=russell.cc; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=/PGxcY8u8n9bHOZIdEXTFpp7C7 ueZsyEoKI7Nfv22tA=; b=HJ9+IbO9FJzMRjY9G7qTJce6Otlv7QCH5ch2FNh2v/ Y9BwmA6I4nHUAjUlZmhoEsYFL8bwJx6LGhzCGdINHdWtuU612Shl9k3dZ7924oWw MUgWo8sxzKAtCCijBEa0FkkwqXtq7nOXdxfKCLVy8gWgyajVbTLWzqlKr1A0HucB S2s34jYdnBRe5aq4xM+su/QxW/HxvekRvXYXa4jbF5f65dS2ZvbtWCj0jrE090XU VBWqDWDdHPznbZR2hJI/p44VbwJpAkEo7qboqKcW5xU1OQVYlynqlglVWyo7VRHl WR1xQv/RwSmyYTtSLGcFp5tFTRP8/jfS7AsILClhDXLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/PGxcY8u8n9bHOZId EXTFpp7C7ueZsyEoKI7Nfv22tA=; b=5yhRDJf//Mo1JW1BvX2CPggq3O7POURD0 okUXO14ev30Cv3TEr1a64n9gxWvRpZgl5qvOOuuN8v9ypJ811EEte4HeDmRaZRab 28vmlmN6OkLJnW5B+154BypqaaMH9NkrlzsQ5+Yo19+VNiDxXaHoYZXJCy86VUBW r2OjDIYKC21/TXKQ8g1JTONNI5Qna6AjE/V/gLVIRgtUjyUovDyprq3w+KjhQpl5 3A7U9VXpRyWw1DJhaP+Du/cJimYKhUhBTjfjIePKcBo1+leuBasYWCmgd5cLaFHC nx28GMa9AXDt+TTn8zsbZ9l01ZA4OpU4SjfITjOWiLv6J50tv3hXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrieeigdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdludehmdenucfjughrpefhvf fufffkofgggfestdekredtredttdenucfhrhhomheptfhushhsvghllhcuvehurhhrvgih uceorhhushgtuhhrsehruhhsshgvlhhlrdgttgeqnecuffhomhgrihhnpehusghunhhtuh drtghomhdpshgvthhtihhnghhsrdguvghvnecukfhppeduvddvrdelledrkedvrddutden ucfrrghrrghmpehmrghilhhfrhhomheprhhushgtuhhrsehruhhsshgvlhhlrdgttgenuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from crackle.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 37971E407B; Wed, 1 May 2019 02:27:42 -0400 (EDT) From: Russell Currey To: patchwork@lists.ozlabs.org Subject: [PATCH 1/2] docker: Use Ubuntu ports repositories on non-x86 architectures Date: Wed, 1 May 2019 16:27:17 +1000 Message-Id: <20190501062718.17548-1-ruscur@russell.cc> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" This should allow Patchwork to run "out of the box" in Docker on any architecture with a) an Ubuntu port and b) support in the Postgres multiarch Docker image, which includes at least arm64 and ppc64le. It's a little gross hacking the Dockerfile like this, but I'm not sure there's a more elegant way to do it. Unfortunately it doesn't seem like there's any way to do conditional COPY, and anything in RUN is plain /bin/sh, so that's why it looks like it does. Tested on ppc64le and on x86_64. Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan --- tools/docker/Dockerfile | 14 ++++++++++++-- tools/docker/trusty-ports.list | 3 +++ tools/docker/xenial-ports.list | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tools/docker/trusty-ports.list create mode 100644 tools/docker/xenial-ports.list diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index eef40e4..76bb6b2 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -15,11 +15,21 @@ ENV DJANGO_SETTINGS_MODULE patchwork.settings.dev ENV DEBIAN_FRONTEND noninteractive ENV PYTHONUNBUFFERED 1 + # System # trusty and findutils is for python3.4; xenial is for python3.5 # TODO(stephenfin): Are curl, unzip required? -COPY tools/docker/trusty.list /etc/apt/sources.list.d/trusty.list -COPY tools/docker/xenial.list /etc/apt/sources.list.d/xenial.list +COPY tools/docker/*.list /etc/apt/sources.list.d/ + +RUN cd /etc/apt/sources.list.d; \ + echo $(uname -m) > /tmp/arch; \ + if [ $(cat /tmp/arch) != 'x86_64' ] && grep -q -v "i.86" /tmp/arch; then \ + mv trusty-ports.list trusty.list; \ + mv xenial-ports.list xenial.list; \ + else \ + rm *-ports.list; \ + fi + RUN apt-get update -qq && \ apt-get install -y --no-install-recommends --allow-downgrades \ python-dev python-pip python-setuptools python-wheel \ diff --git a/tools/docker/trusty-ports.list b/tools/docker/trusty-ports.list new file mode 100644 index 0000000..ebcf4fa --- /dev/null +++ b/tools/docker/trusty-ports.list @@ -0,0 +1,3 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ trusty main +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main diff --git a/tools/docker/xenial-ports.list b/tools/docker/xenial-ports.list new file mode 100644 index 0000000..d84641f --- /dev/null +++ b/tools/docker/xenial-ports.list @@ -0,0 +1,3 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ xenial main +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main From patchwork Wed May 1 06:27:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 1093603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44v7k40B6Lz9s9N for ; Wed, 1 May 2019 16:27:56 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=russell.cc Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.b="XPQohhTE"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="oB99VRKw"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44v7k34LR4zDqLb for ; Wed, 1 May 2019 16:27:55 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=russell.cc (client-ip=64.147.123.24; helo=wout1-smtp.messagingengine.com; envelope-from=ruscur@russell.cc; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=russell.cc Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=russell.cc header.i=@russell.cc header.b="XPQohhTE"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="oB99VRKw"; dkim-atps=neutral Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44v7jx0Xn3zDq9D for ; Wed, 1 May 2019 16:27:48 +1000 (AEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8AA5854E; Wed, 1 May 2019 02:27:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 01 May 2019 02:27:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=russell.cc; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=istFH0pS5SJfp kIqbd4mlZnSds0RMJsBEvZDf4aOKQs=; b=XPQohhTE3jp9NK7J4IDJimR/YZgeg VDEtOIvoR83/krM5FucUZ2O6ylzKDwesUD5prF7G6iKcOwef188i0XtMdWVjJjFn 0RBF9e7Ao7em/56hWdTxWUM45OApFPl1AXti6hlAVXZ1gACVFvWCFx28BoPEaYQx TZN3EYCxj2RjqtPXKdlkQhx5KKzOQuzk67DkPRkJx5KZo2EjIXUpLwrrfC8tdfEP qbE9yXIaVa0lZeP08bJMCIbZYFGcdwzxuWHyB9CvQkei51ZBGCsieF6VCDiOUtqj QZK3nED4tGGMmjFqUoJ57hMO1YXNDnyxEHpHUR+/yQHr8Hlex4U3qAjTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=istFH0pS5SJfpkIqbd4mlZnSds0RMJsBEvZDf4aOKQs=; b=oB99VRKw Zz2jMbKGpr8PJaFoNLu1zfLANTy/e0k9GRGUjeoIFYE/aO2LHWEkGtlwiUBX7fhA 664nWjoVybHWD9al2u65335nvXMgHLYqdLERbSFHgcmZ4roB8wEOag8zr3LIZkBG 4o3YHvVkEaRENxTM4+R3aO1hs5eYA0eK0LhfN+7wEQ0crK0aqjO6nPjENuZ1RH5o xh/c4xtLG+XjEYGdcPyVrvImGjHI4tIfE5RLc2dbgC0AtHK6rUsoyV9GWZAS2hH5 lJ6n2ZbntpxDO9AlLuVqdhaCnGkHz0uBTvSkpbJ36DdsY5PQhymT7P2SsN3megms yJm/7dNeNnQXBg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrieeigdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfedtmdenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfhushhsvghllhcuvehurhhr vgihuceorhhushgtuhhrsehruhhsshgvlhhlrdgttgeqnecukfhppeduvddvrdelledrke dvrddutdenucfrrghrrghmpehmrghilhhfrhhomheprhhushgtuhhrsehruhhsshgvlhhl rdgttgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from crackle.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id C2E01E4067; Wed, 1 May 2019 02:27:44 -0400 (EDT) From: Russell Currey To: patchwork@lists.ozlabs.org Subject: [PATCH 2/2] docs: Mention Postgres for Docker development install Date: Wed, 1 May 2019 16:27:18 +1000 Message-Id: <20190501062718.17548-2-ruscur@russell.cc> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501062718.17548-1-ruscur@russell.cc> References: <20190501062718.17548-1-ruscur@russell.cc> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Might as well since it's there, and it gives some clue to anyone trying to use Docker on non-x86. I figured it was best to leave this out of the README since it's incredibly niche. Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan --- docs/development/installation.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/development/installation.rst b/docs/development/installation.rst index 52dc2c3..0ab755f 100644 --- a/docs/development/installation.rst +++ b/docs/development/installation.rst @@ -37,6 +37,10 @@ configure Patchwork using Docker: $ docker-compose build + To use Postgres instead of MySQL, give the ``-f docker-compose-pg.yml`` + argument to ``docker-compose``. This is required on non-x86 architectures + as the MySQL Docker images do not have multiarch support. + #. Run ``docker-compose up``: .. code-block:: shell