From patchwork Sun Jul 12 08:46:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valters Jansons X-Patchwork-Id: 10034 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4gyfLS6QfZz3wb0 for ; Sun, 12 Jul 2026 08:46:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE1" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4gyfLS35vYz45Q for ; Sun, 12 Jul 2026 08:46:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4gyfLS29Q7z2xdl for ; Sun, 12 Jul 2026 08:46:24 +0000 (UTC) X-Original-To: location@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4gyfLR48FGz2xHj for ; Sun, 12 Jul 2026 08:46:23 +0000 (UTC) Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (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 (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4gyfLQ0861zCN for ; Sun, 12 Jul 2026 08:46:22 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=W2cn98LW; spf=pass (mail01.ipfire.org: domain of valter.jansons@gmail.com designates 2607:f8b0:4864:20::52a as permitted sender) smtp.mailfrom=valter.jansons@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1783845982; b=B1dP83jSYcdPMbMrYh1XH/eKoBPrrNul7q/wYO8obejeILN/oM8cknHUDKAVw4rKZCfF+k WrtnkMOPMM6quE4C4qdDxgN0KWh0vaFN5lUAVG8XfwcOsLmppW13SW9iovr/jG1vDlFKys L+PTtiAuFhfl8l7xeBv0AIquuKYR8XsldEwjn1CWlSYqnaWohsvACDgQQBkFaE2TRFlA/K Kd8Ftj4HMcwV3AClyG+HwYvRRWWxpLCaGw80Gs/HOPOrtvZdxdz/lFDKS7eFRN5xkjfKgh TtKhlmUDYBIYt6hoTMn3IosJ093or76mvwdIH0y6996ZNJouJFP+csjieSz77Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1783845982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=X/b6lUC0qd45a2BsGyedAn79Di6Mxx2XvHaw+2h/SQA=; b=WC6670/RhcrcS6NN6efJCdhUIjIXd/QnwdB3Dejn3hf98vEISKtTbimAU7LFgLMbBWFGcE n3X76jbpsmaz+/603PGBq5SslnN1HOMT3MtU6dPaDQzOQV9ifN3VkeEd/W85VZ8QhefEBS XSPGeEhAVTFHsnm8Qg8IZENU5sYWECvVvDXUMllC/WNYKcmbZVXCTonO6vDH5af0w0Er9S ZZTMPXr72yYhIEbU+nshBREP8EFoXn6iNRayarQG9fo5XJHA+eh7U3DG1Elce2YtJ+fAjD lg1BqKrH+xtxZPXz7anYz+bDCPvYaqBarhOCIHUbUhWJJ26eOabEqtOa+eVwkQ== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=W2cn98LW; spf=pass (mail01.ipfire.org: domain of valter.jansons@gmail.com designates 2607:f8b0:4864:20::52a as permitted sender) smtp.mailfrom=valter.jansons@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-c85b73ffb52so1082938a12.3 for ; Sun, 12 Jul 2026 01:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783845979; x=1784450779; darn=lists.ipfire.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=X/b6lUC0qd45a2BsGyedAn79Di6Mxx2XvHaw+2h/SQA=; b=W2cn98LW8tDefRQgR1hX/DEa0Ckz7/IfsJfobTpOhQm4JVONSmzw6O5u/opT2Gf1uk NQ+I2eZ4xIXipdRZNFv/f0yGMjbfntEE520yCz0zeAcqVeQ5kM5GPmB+ose61bC6hk/r +WR6UmkFG7+WuN0rGTi0j9LUT7dEFq3erSnhU7vyyQCyv7YrYASJdK2EDuWtayJsAi+l GoaN7lrDyAjjGWs7PFinHjmac2Dnvlvi76LAnd68lRy4sNq50VryQpD8wEH1VhyPf5kq j1Pfu+y5t25R7UaXduJr9mCAmEGjzR4J0uq5xKdHHH2aEfNgilOo2adsjAuq3PyinZtg XB4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783845979; x=1784450779; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=X/b6lUC0qd45a2BsGyedAn79Di6Mxx2XvHaw+2h/SQA=; b=U7J0hfVeZJ/Fn3oksFXOKGvQ71rjHvAlcQYYOPKECBOum6yrVK9kiGNcgSnnS1Vn4m PQX/FD7YSsVVJCKgUX9vPLbv9g88Nmr9YsfJp5/3KnS8VtuY3o1wGCZK4j9Zj/5XIOBV 79J2Pf1Kd/g20/K45ad27jWWCOdLVqY6XRwy3Pt27sY2rGPeVBxSUEAn6Ri3WkLDFC+j VMP3Hy5pZcFj4h0soWWKO8LdHRuMzEj5Ce2p/JeBUOqJPUMGokgYH9BUxqA95X1szluA XYKkQMB6gKtya5U3v81q7Oo7bpGnabp5P20a+RejiT57siSgJE5RjKk7edWMCEvjvjiM e+tQ== X-Gm-Message-State: AOJu0Yz0xmdw2HJm20aeNi1bWxuyr6qC/zSnCoEb2/03b+pUeDB95ezm +/H7lj6A8wBIHkGTE8NCkoyaJR3jX0MOvFGrnQ2AjZOD+92dTltB6RSEnDKwWv5i X-Gm-Gg: AfdE7ck/2bQ2Yx313RgjtBK4fqsd5B45yl0PWX/l5rhZ7fjYM+Arqzd1z9jf7WSPYbI 5pVTdVzJjq9HVBk7EnwyCZFw44UaAeCilqTYz7wJ2Qj6I7zgKhcWhYvnB9otchTLTwuX4NVfJdn dSuucxGltrDStGoD39aXGmYD2kbL7gqVWk/sPv4QESyuHFCdbXU89PQ7ZG534hGfLtA/j79ULT9 L4CwBY4+PWYNn3Uf3+10TSJnA0ErLIo9SQy5xbr6Q0IyMhr2KvVIz8DoHSDWxRxRFlb/trBMJnz nHdeGxQEcILaeXUVV+lqrUZ0iJEeN9hT2++nYKP2JaVoLohz01k6WfFYbznHoXhM6Ca3J5muqXP G430xN05OMw12nUROxOtiyMRtC9UcjvDfEMh3LhFqLM1ISF3sgrdfRUd/YmU2wRCNlHJtuziP4u rXQ7wPqGq5z2/wlZq2ZqYfrod5+ThZEA== X-Received: by 2002:a05:6a00:1826:b0:848:2f71:b659 with SMTP id d2e1a72fcca58-848897d6bc9mr4691833b3a.68.1783845979281; Sun, 12 Jul 2026 01:46:19 -0700 (PDT) Received: from VT14-G5.localdomain ([221.146.12.107]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84884c2b819sm2316784b3a.48.2026.07.12.01.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 01:46:18 -0700 (PDT) From: Valters Jansons To: location@lists.ipfire.org Cc: Claude Fable 5 Subject: [PATCH] man: Add manual page for `location-importer` Date: Sun, 12 Jul 2026 17:46:14 +0900 Message-ID: <20260712084614.126348-1-valter.jansons@gmail.com> X-Mailer: git-send-email 2.54.0 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4gyfLQ0861zCN X-Rspamd-Action: no action X-Spamd-Result: default: False [-6.55 / 11.00]; BAYES_HAM(-3.00)[100.00%]; R_DKIM_ALLOW(-1.69)[gmail.com:s=20251104]; DKIM_REPUTATION(-0.96)[-0.95943676823857]; SPF_REPUTATION_HAM(-0.50)[-0.50410211288391]; R_MISSING_CHARSET(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56]; MX_GOOD(-0.10)[gmail-smtp-in.l.google.com]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_REPUTATION_HAM(0.00)[asn: 15169(-0.31), country: US(-0.01), ip: 2607:f8b0:4864:20::(-0.82)]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52a:from]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ALIAS_RESOLVED(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[location@lists.ipfire.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org Currently, the `location-importer` binary gets installed without a manual page. It's expected that all tools installed get manpages. This commit proposes a generated manpage, introspecting the script's handlers and considering the structure of the other existing AsciiDoc files. Co-Authored-By: Claude Fable 5 Signed-off-by: Valters Jansons --- Makefile.am | 3 +- man/location-importer.txt | 116 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 man/location-importer.txt diff --git a/Makefile.am b/Makefile.am index 93c5aad..0d03238 100644 --- a/Makefile.am +++ b/Makefile.am @@ -566,7 +566,8 @@ MANPAGES_3 = \ man/loc_set_log_priority.3 MANPAGES_1 = \ - man/location.1 + man/location.1 \ + man/location-importer.1 MANPAGES_TXT = $(MANPAGES_TXT_3) $(MANPAGES_TXT_1) MANPAGES_TXT_3 = $(patsubst %.3,%.txt,$(MANPAGES_3)) diff --git a/man/location-importer.txt b/man/location-importer.txt new file mode 100644 index 0000000..283a466 --- /dev/null +++ b/man/location-importer.txt @@ -0,0 +1,116 @@ += location-importer(1) + +== NAME +location-importer - Fill the location database with data + +== SYNOPSIS +[verse] +`location-importer write [--signing-key=FILE] [--backup-signing-key=FILE] [--vendor=VENDOR] [--description=DESCRIPTION] [--license=LICENSE] [--version=VERSION] FILE` +`location-importer update-whois [SOURCE ...]` +`location-importer update-announcements SERVER` +`location-importer update-geofeeds` +`location-importer update-feeds [FEED ...]` +`location-importer update-overrides FILE ...` +`location-importer import-countries FILE` + +== DESCRIPTION +`location-importer` collects location data from various public sources +(the WHOIS databases of the Regional Internet Registries, BGP announcements, +geofeeds, and third-party feeds) and stores it in a PostgreSQL database. +From there, it compiles a database file in libloc format which can be +queried with location(1). + +== OPTIONS + +--database-host HOST:: +--database-name NAME:: +--database-username USERNAME:: +--database-password PASSWORD:: + The connection parameters for the PostgreSQL database which stores any + intermediate data. + + + These options are required for every command. + +--quiet:: + Enable quiet mode + +--debug:: + Enable debugging mode + +== COMMANDS + +'write [--signing-key=FILE] [--backup-signing-key=FILE] [--vendor=VENDOR] [--description=DESCRIPTION] [--license=LICENSE] [--version=VERSION] FILE':: + This command compiles a database in libloc format out of the contents + of the PostgreSQL database and writes it to the given file. + + + The database can be signed with the key given with '--signing-key'. + A second key can be given with '--backup-signing-key' to allow rolling + over to it at a later point. + + + The '--vendor', '--description' and '--license' parameters set the + metadata of the database, and '--version' selects the database format + version. + +'update-whois [SOURCE ...]':: + This command downloads and imports WHOIS data from the Regional + Internet Registries (AFRINIC, APNIC, ARIN, JPNIC, LACNIC, RIPE). + + + If one or more SOURCE arguments are given, only these sources will be + updated. + + + Countries have to be imported with 'import-countries' before any WHOIS + data can be imported. + +'update-announcements SERVER':: + This command imports announced prefixes from a BGP route server. + + + SERVER is the path to the UNIX domain socket of a locally running Bird + instance. + + + Any unroutable address space (e.g. RFC 1918, loopback, or link-local + networks) is filtered out. + +'update-geofeeds':: + This command refreshes all geofeeds (RFC 8805) which are referenced in + the database. + +'update-feeds [FEED ...]':: + This command updates data from third-party feeds, currently the AWS IP + ranges as well as the Spamhaus DROP and ASN-DROP lists. + + + If one or more FEED arguments are given, only these feeds will be + updated. + +'update-overrides FILE ...':: + This command imports override files which manually correct or amend + network and Autonomous System data. + + + Any previously imported overrides will be replaced. + +'import-countries FILE':: + This command imports the list of countries from the given file which + contains one country per line consisting of the country code, the + continent code and the name. + + + Any previously imported countries will be replaced. + +'--help':: + Shows a short help text on using this program. + +'--version':: + Shows the program's version and exits. + +== EXIT CODES +The 'location-importer' command will normally exit with code zero. +If there has been a problem and the requested action could not be performed, +the exit code is unequal to zero. + +== SEE ALSO +link:location[1] + +== BUG REPORTS +Please report all bugs to the bugtracker at https://bugzilla.ipfire.org/; +refer to https://wiki.ipfire.org/devel/bugzilla for details. + +== AUTHORS +Michael Tremer