From nobody Wed Jan 04 22:30:59 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NnPT90CwTz2pJxL for ; Wed, 4 Jan 2023 22:31:09 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4NnPT80Rz7z3P4g for ; Wed, 4 Jan 2023 22:31:07 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 198.144.192.42 is neither permitted nor denied by domain of yuri@FreeBSD.org) smtp.mailfrom=yuri@FreeBSD.org; dmarc=none Received: from [192.168.5.3] (c-73-162-96-20.hsd1.ca.comcast.net [73.162.96.20]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 304MV0he016381 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 4 Jan 2023 14:31:00 -0800 (PST) (envelope-from yuri@FreeBSD.org) X-Authentication-Warning: shell1.rawbw.com: Host c-73-162-96-20.hsd1.ca.comcast.net [73.162.96.20] claimed to be [192.168.5.3] Message-ID: Date: Wed, 4 Jan 2023 14:30:59 -0800 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US To: ports From: Yuri Subject: PortsDB: a program that imports the ports tree into an SQLite database Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [0.50 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-ports@FreeBSD.org]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:7961, ipnet:198.144.192.0/19, country:US]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[yuri]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all:c]; TO_DOM_EQ_FROM_DOM(0.00)[] X-Rspamd-Queue-Id: 4NnPT80Rz7z3P4g X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N Hi, I developed the PortsDB project that imports FreeBSD ports into an SQLite database: https://github.com/yurivict/freebsd-portsdb The port is ports-mgmt/portsdb. The database can be fully rebuilt in ~20 minutes, after which in can be quickly (in seconds) updated with new commits. The database is currently updated hourly: https://people.freebsd.org/~yuri/ports.sqlite PortsDB can be used to query ports using SQL, as a relational database. External services like Repology, FreshPorts, Portscout and similar can use PortsDB to access information in the ports tree. Users can, for example, easily find their broken ports, or port duplicates, or all ports that they maintain that use gmake, among many other possible queries. Such queries aren't easy to perform grepping the ports tree. Cross-DB queries are also easy to do, combining PortsDB and /var/db/pkg/repo-FreeBSD.sqlite and /var/db/pkg/local.sqlite. All that needs to be done to run PortsDB is ./import.sh and then ./update.sh Regards, Yuri