Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glwbW-0003E6-W9 for pgsql-www@arkaria.postgresql.org; Tue, 22 Jan 2019 14:00:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1glwbV-0007aN-GU for pgsql-www@arkaria.postgresql.org; Tue, 22 Jan 2019 14:00:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glwbV-0007Zw-7m for pgsql-www@lists.postgresql.org; Tue, 22 Jan 2019 14:00:37 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1glwbM-0000iT-3w for pgsql-www@postgresql.org; Tue, 22 Jan 2019 14:00:36 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 43kVRt0QYkz3F1k; Tue, 22 Jan 2019 15:00:26 +0100 (CET) Date: Tue, 22 Jan 2019 15:00:25 +0100 From: Christoph Berg To: PostgreSQL WWW Cc: Adrian Vondendriesch Subject: apt.postgresql.org django app for www.postgresql.org Message-ID: <20190122140025.GA27301@msg.df7cb.de> Mail-Followup-To: Christoph Berg , PostgreSQL WWW , Adrian Vondendriesch MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, We have implemented a repository browser for apt.postgresql.org to be run on www.postgresql.org/repos/apt/. This has been in the works for years, but has somehow never reached this list. It is mostly feature-complete, i.e. browsing the list of supported distributions, source and binary packages works. It supports searching for packages and filenames in packages. Dependencies: python-apt, postgresql-*-debversion, pg_trgm (from postgresql-*-contrib) To test, create a mirror of a (subset of) apt.postgresql.org: * debmirror -v -h apt.postgresql.org -r pub/repos/apt --method=http -d sid-pgdg --omit-suite-symlinks -s main,12 -a source,amd64 --exclude='\.deb$' --getcontents --no-check-gpg /srv/repo * set APT_DIR to that directory in settings_local.py * run import-packagelists.py TODO: * The contained homepage at /repos/apt/ is an outdated mockup, the list of supported dists should be rendered from the database * There are no links to /repos/apt/ from anywhere else in the pg.o page yet * import-packagelists.py uses django to open the PG connection, but this should be rewritten to use plain psycopg2. * The idea is that import-packagelists.py writes directly to the database, so appropriate GRANTs are needed to allow writing to the apt_* tables only * The "qa" part contains queries that have not yet been ported from an older datamodel yet and is hence disabled * There is no documentation yet Still, it already works nicely if you point the browser directly at /repos/apt, so please review :) Christoph --xHFwDpU9dbj6ez1V Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Add-APT-repository-webpages-at-repos-apt.patch"