From nobody Fri Jun 07 21:40:15 2024 X-Original-To: questions@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 4Vwvkd2hnWz5MKvb for ; Fri, 07 Jun 2024 21:40:25 +0000 (UTC) (envelope-from mirror176@hotmail.com) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11olkn20801.outbound.protection.outlook.com [IPv6:2a01:111:f403:2c15::801]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vwvkc2Wcjz4HWf for ; Fri, 7 Jun 2024 21:40:24 +0000 (UTC) (envelope-from mirror176@hotmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b="H9ii/fwa"; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of mirror176@hotmail.com designates 2a01:111:f403:2c15::801 as permitted sender) smtp.mailfrom=mirror176@hotmail.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vx+elhimX7T9B843h5feCNnb0QdIePIWAj0cEPUWbj/akqnJD5D1wIOBcmkmLyYMMtuTUphXWScemQxM7xRIJ46MX6w7WyOZoslk+rnIg9mY/Gw3Ojw1FU/3dfPjKOxtNi9h+/dNyNnsim1vZopSOB4oNgCf6SfouTT8UYRZEZXPhb8vFG6bfuid8wsUBV3EEPu67yaPPQQ0SB9pQ/oHsLbAfiMxdaw2akVTO4wyhWQOEtCiinb7he9plqssq6lpGGX3j0UASjfAC5q0mq2bWOMN8Du4MlxD0wmxljl9DD45EMAF8qqsOgU5NTEcydKzHScS4sP6hW1dMsJiuYYCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1rv68cxt6OJ1Bpjci40JiEZPOABSSUzDOBKGD3fz4I8=; b=LNrIpB7wp/Qs7evY7IgKJXu4jhG9pbmjgLc65C2QQlRHuo7DvnWJWjnTTeNcsUcALqfQZh7Jp10PcnButW24BPRIKtmrY4bxnmiTmezDvcE6oPGBplV1KLyD3JuAGSOQ1xutWDAn+U1DVrvup7iL8B7ISsWLM1ycPhEwNBVTqcsKGT5rdqV1G/VyhWUR89a3AxkcXXh02pErmSroTjGMHZBFTLi7+tfdaYUiO3dsLR31C3dOH/I82KLh9EyXS/AJgsNwlaA5aqhLnccvMGKTD4M0MSc9b+fDd/qKxbmrbhAWTOrn3oKRsyFqcGxVAWesVqJ34fOq5W5pCVlcjQlxKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1rv68cxt6OJ1Bpjci40JiEZPOABSSUzDOBKGD3fz4I8=; b=H9ii/fwaFOCoANmgFwnmoBPiI+lUzc89reJJtI8dpLv9ck5bqf+AE2S76J++zFkNAh3ySSIsEwoFGJMVwSZfPVp05qIPVcQCccxA/TLMKo3wuiiHhxQvOEansC1lcjO1P0lYCiNX2UbD24zHPIoP6tuTGBOlqSdLRIJiwtKo1RsKOipzv2+HQDw5G8z/f1etCkh+eSqbtYpmUfL+vJLfcW8HIuntu8AkbC6sHuCpP2KE0KmLHYYgaxJaydNlmv4zdaE8bdnRj/XgBRXH8coYFPwJplW3bjxT75jHKL3qdG522tqxrFVtR2dd1HyE5XZctPURTaBX+8dIofR5DSWnJA== Received: from CO1PR11MB4770.namprd11.prod.outlook.com (2603:10b6:303:94::19) by CY5PR11MB6487.namprd11.prod.outlook.com (2603:10b6:930:31::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30; Fri, 7 Jun 2024 21:40:19 +0000 Received: from CO1PR11MB4770.namprd11.prod.outlook.com ([fe80::bffd:9e35:4afa:a747]) by CO1PR11MB4770.namprd11.prod.outlook.com ([fe80::bffd:9e35:4afa:a747%3]) with mapi id 15.20.7633.033; Fri, 7 Jun 2024 21:40:19 +0000 Message-ID: Date: Fri, 7 Jun 2024 14:40:15 -0700 User-Agent: Mozilla Thunderbird Subject: Re: How to install geoiplookup? To: questions@freebsd.org References: <202406071553.40403.rody@dds.nl> Content-Language: en-US From: "Edward Sanford Sutton, III" In-Reply-To: <202406071553.40403.rody@dds.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [IAl0FceDZnCjqExjAmE6a5A0G0XHe9CP] X-ClientProxiedBy: MN2PR01CA0028.prod.exchangelabs.com (2603:10b6:208:10c::41) To CO1PR11MB4770.namprd11.prod.outlook.com (2603:10b6:303:94::19) X-Microsoft-Original-Message-ID: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR11MB4770:EE_|CY5PR11MB6487:EE_ X-MS-Office365-Filtering-Correlation-Id: dc3a900d-cd1f-4817-8f65-08dc873a6d23 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199019|440099019|3412199016|1602099003; X-Microsoft-Antispam-Message-Info: h+cjGicWBZgTLT/EdvzwTLCpdZkgnrmIjpP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lZVDhQU0VyU2gxK2FO?= =?utf-8?B?dkxmVDU0OHY0RSthNkJ0aXdCODBOUXMxZ2M1Q2hvdFNEcG5BTC9XQWM1K2kx?= =?utf-8?B?ZVVLOEd3U1I5UlRlNnNieFlLSlJpTjVJeno1TUM5MENqS1JYbWtFa0JxMDhO?= =?utf-8?B?SDUwTEpuMitoQ3pKbGN0eGhRUUx3ZFNUdnB6aXpxZFBMS0VlVEV6M1p6MU4w?= =?utf-8?B?UnJWckRTRFJIbjNzOEZFWEdUaGM5NWxnYzFzTEN6QTB1RzZLVkFVOTZuMm53?= =?utf-8?B?bDVzV1g3WlU1aTJwMUtCYzBNL0hUV1FVNFIrZG0xcHZlOEJmSGhtMDUzRzI1?= =?utf-8?B?eGxPdUxPOUtUeHEwczR5OWY4TVZuYU9TUFR3NEVJbE9TVzBxckloVEwwYnVT?= =?utf-8?B?L2JWYU5nL3I0OFJrL0dreWhzOEs0bklTUm5WNUlOT1ozSElid0oxdm40VnNo?= =?utf-8?Q?hLZhmnTXOT45StH45BEii14MmHhFRVoreG3sswM2Ald8=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-e8f36.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: dc3a900d-cd1f-4817-8f65-08dc873a6d23 X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4770.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 21:40:19.2215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6487 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.46 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.968]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f403::/49]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; FREEMAIL_FROM(0.00)[hotmail.com]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[hotmail.com:+] X-Rspamd-Queue-Id: 4Vwvkc2Wcjz4HWf On 6/7/24 06:53, Rody wrote: > Hi everyone, > > Trying to prepare myself to get command line geoip lookups working. Running > 13.3-RELEASE-p1 of freebsd. It seems the pkg libmaxminddb is installed by > default but missing the tools to access the data. Which tools are missing? My understanding is it is a library for accessing the database files once they are downloaded. There are no special options to that port (just documentation related) so installing from pkg or ports should give identical results for available tools and capabilities. Once you have a ports tree, you can check the options of that port with `cd /usr/ports/net/libmaxminddb;make showconfig`. https://www.freshports.org/net/libmaxminddb/ section "This port is required by" can help get an idea of other ports using this port; it only includes direct dependencies and does not handle dependencies that could be changed by changing options in ports. > The following page tells me to install the libmaxminddb via ports: > https://forums.freebsd.org/threads/geoiplookup-for-the-new-geolite2-country-db.69866/ > But it does not include info for when you've never used ports before. net/geoipupdate is a port that handles fetching the geoip2 databases. It is written by maxmind though it is in go instead of c and seems to have much more going on for inner workings. If the c version from the forums works in beneficial ways over the maxmind copy then maybe it could be made into a port for more users to benefit. There have been various changes to libmaximdb since that post in 2019 that should be reviewed for compatibility. > The following page tell what to do to get started with ports: > https://docs.freebsd.org/en/books/handbook/ports/ > And tells me that if ports was not installed during install, I should use a > series of commands to use git. > > Not sure if ports was indeed installed or not during install. Any way to find > out? if `ls /usr/ports` is missing/empty then you didn't install it from the installer (or moved it); you can get a ports tree and also later update the ports tree with git. > The following page recommends to use portsnap: > https://www.cyberciti.biz/faq/install-ports-in-freebsd/ > Portsnap seems to be installed by default and easier to use, but: > https://forums.freebsd.org/threads/portsnap-being-retired-whats-the-alternative.76463/ > suggests that maybe only git should be used? Portsnap is removed from 14+ though it is still present in /usr/ports/ports-mgmt/portsnap. Reading its makefile I see DEPRECATED= portsnap infrastructure will be removed after the EOL of 13.x EXPIRATION_DATE=2026-04-30 which tells me the present plan is you would be learning a dead end; it will remain a viable option to you until upgrading off of 13. The cyberciti.biz article covering portsnap form base for FreeBSD14 when updated last month is a bug in that article; its title should remove 14 or it should include git instructions. The article's content explains its steps only got to 13. https://www.freebsd.org/releases/14.0R/relnotes/ section about portsnap makes that clear for FreeBSD 14+. > Still, it seems the database was already installed automatically using pkg so > it should probably be deleted prior to starting with ports? Ports is the instructions to build and install software. Its install are registered as an installed package and the tree is used within a clean environment to build the official packages. If you need to change build options or need a version that is not in the pkg repo but is in a newer/older ports tree then you could build it yourself but otherwise the pkg installed version should be the same. > I imagine the geoiplookup tool is only a tiny binary and requires a lot of > work to get it installed this way, or am I missing something? The ports tree is a collection of 'how to make it work' steps, changes/fixes, etc. so getting an entry there is usually how it is made easier for FreeBSD users. As for documentation, you tried to follow it from multiple places to solve the problems as they arise which usually complicates things. Unless there is a known bug, I'd defer to what is in the handbook and other official FreeBSD documentation over what is in internet blogs and forums when available. The handbook and similar documents receives updates and tries to represent how things are currently working for what they cover; though not perfect, it is usually better than words of a random individual and more up to date than places where there may not be an 'edit' button later. > Rody > >