From nobody Thu Jan 5 09:50:05 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 4NnhXn3yF0z2p1yJ for ; Thu, 5 Jan 2023 09:50:17 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NnhXn3VRBz3FCk; Thu, 5 Jan 2023 09:50:17 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672912217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4kSX/L+C2pdg9fj4kAgg5jLWPrZ58D4yMzVxPIbRqrg=; b=uqClWsNYLWoSwvjIxe80j9OHLklClXRwXt0MkCQnkHjAaAsc/lFxcRaf8zYxV3DBnCzkP4 Btf9e6ooFqM4tYxQDaQ3Wty2Z3vjriJujSEUz6K+3HqkqfpxyuI5s6oXtiFbe6dyle2nIc hOcOuSAPHNJ80fai2aBD7kYF4lw6HZRxK6+f75468UmtkvSqqrICqCCxbW/WGB0wQh3Qlj WHuf7qm9jU9v+cvxHv1uBjQffiRLPDm41cIlNbQnHDyBUEmGEYMhfXeLjGybn+sZ5jMM2R vh8Oc7Sq9ISr8gQO1Nf78ewzzlY6xyMTO7qQDsksINIfNACjEEDVKcfIGFfvFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672912217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4kSX/L+C2pdg9fj4kAgg5jLWPrZ58D4yMzVxPIbRqrg=; b=WTrcC4N0zKYBPSCW/BsqzO7WI0/z86OwJvitrPiXpWzh/kT8+NRnDQj9aniyPKxO1P5K1s XakWFRHOpGkol91jN0OUMphohnk1arypvCfCIoWj4mpvCuA/BwnNuKhgu5ZuagzxW4Og/0 R14YPn5KX+lqzPALoqP3gMj0KGEYa8iB0+VTN5ohrl8M1yX+duFP8xkKaouM2oqZmO2YEn pN0VVdZdb4+7xJEI2tjpPGnjh5vD4SOKvKqEMdR3omToeVtT0DbYLdlPCm4zqFVBLDdIsb /NiFZYkExq4Hq2G4//3vBwNDbQvOCf4auQev27ZLO7BAMk7BSalG9WSdD0q1vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672912217; a=rsa-sha256; cv=none; b=pzj/4zjfpswK1X/5Q+Hn2ca1b4vUt2ntqZHTCe2kt2aKtV7L5SpCmv0ISem02m09OhILua hYH19ZSq+yD/te13e+ZtTlSI5JGMSrXO4D5bhN7mqlg6kQSxjqy/TJ9XOyDvCisgSn9u5t zMjUAodks+lXzgcib/KpOkzvzPwW2XwQct2zk5CAeFpDbe7hqgXCsPfk5DllYePDZWnq9x I/awkJ0nuyGhyluwkRwRRcLG4uzgCkLB+waymMnlLywfewiNlDcBvfwBXBNWPCrOvXc6nD LNmsakr5uT9FACQEgX93/norQfJfpx6UovqZiYJGCRZDSqPcbnv8bkDzvTzwDQ== Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NnhXn2GM2zfkC; Thu, 5 Jan 2023 09:50:17 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f45.google.com with SMTP id l184so8903445vsc.0; Thu, 05 Jan 2023 01:50:17 -0800 (PST) X-Gm-Message-State: AFqh2kqRjd+6GD4H1AWr0MKXreLYa9EALqrRvfq3bTp8uMd5uL6Hs3s8 UBqPJFyvGv/qr434XrhMFrvQuLtieAO1qayTym8= X-Google-Smtp-Source: AMrXdXsGXEPHgY2GE5SgMCri1qF57IdiP7oOJCDv3/JKEC3VOucmswBZDzYRrA9yWuqXhU5k5bNmTclrhxk74S0u0nw= X-Received: by 2002:a05:6102:a83:b0:3cd:35ac:e005 with SMTP id n3-20020a0561020a8300b003cd35ace005mr2350012vsg.11.1672912216758; Thu, 05 Jan 2023 01:50:16 -0800 (PST) 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 References: In-Reply-To: From: Nuno Teixeira Date: Thu, 5 Jan 2023 09:50:05 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: PortsDB: a program that imports the ports tree into an SQLite database To: Yuri Cc: ports Content-Type: multipart/alternative; boundary="0000000000006ba17d05f1813a90" X-ThisMailContainsUnwantedMimeParts: N --0000000000006ba17d05f1813a90 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Yuri! /etc/make.conf: PORTSDIR=3D/work/freebsd/ports/main `portsdb-import`: error: the PORTSDIR environment variable should point to a valid ports tree Usage: /usr/local/bin/portsdb-import [{sync|async}] Any clues? I don't work with SQL for about 20 years, any simple commands to start with as an example? I usaually use grep and portgrep but this tools promises that we can do deep search within ports. Thats what I looking for! Cheers! Yuri escreveu no dia quarta, 4/01/2023 =C3=A0(s) 22:31: > 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 > > > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000006ba17d05f1813a90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Yuri!

/etc/make.conf:<= br>
PORTSDIR=3D/work/freebsd/ports/main

= `portsdb-import`:
error: the PORTSDIR environment variable sh= ould point to a valid ports tree
Usage: /usr/local/bin/portsdb-import &l= t;db.sqlite> <file.sql> [{sync|async}]

An= y clues?

I don't work with SQL for about 20 ye= ars, any simple commands to start with as an example?

<= div>I usaually use grep and portgrep but this tools promises that we can do= deep search within ports.
Thats what I looking for!
Cheers!

Yuri <= yuri@freebsd.org> escreveu no dia quarta, 4/01/2023 =C3=A0(s) 22:31:=
Hi,


I developed the PortsDB project that imports FreeBSD ports into an
SQLite database: https://github.com/yurivict/freebsd-port= sdb
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.s= h



Regards,
Yuri




--
Nun= o Teixeira
FreeBSD Committer (ports)
--0000000000006ba17d05f1813a90--