From nobody Thu Jul 8 20:35:12 2021 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 129D811F69CD for ; Thu, 8 Jul 2021 20:35:26 +0000 (UTC) (envelope-from admin@puredarwin.org) Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GLSj92c7yz4p8y for ; Thu, 8 Jul 2021 20:35:25 +0000 (UTC) (envelope-from admin@puredarwin.org) Received: by mail-wm1-x342.google.com with SMTP id a5-20020a7bc1c50000b02901e3bbe0939bso4873387wmj.0 for ; Thu, 08 Jul 2021 13:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puredarwin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=nkWK/mxeejUofcGdrm+lKcY2uWo2m03HOHgr0Ti5ivY=; b=H7dvpsUyagymlcuaDbxdcDbjUjPuaVTgkCmiktxVPNmGqNkzgLR49lfPhRmDOPDXE/ /Sc1u9/Iys0uoO4OU+r7oLdy3q0J6rZ7jVB3Y2doA+nGOchn/+aIvFuHowRpv+tXnyMr fMFY7u6XdXoJLm/bLe187lsQfvCKSpAtmRshNZhbifvM5xxCO40yxXWL7BixkPKtX/2W 9Phs2nL0eP1Z61ZCiYR4dXYV6Sylq2ykOvkzKi+rxWf5oXhvi1Nfk6yO71plbl+vX20A GnHFCfH1jkYhjISgvi3peZG/ie1w3LsJaRXuD6EtVpMVdlCp+M8raEFIa2O/XgqtftOz fhww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nkWK/mxeejUofcGdrm+lKcY2uWo2m03HOHgr0Ti5ivY=; b=b8j7Md0iWkevdNbJzdOO2aDpgEQOyG1MBv+nzNshLyMIjixoZ8xuHjXFUplFsR5ctR 982P8qHOZ4DdNi++Rdv+WHzl9bxlRbI4S3M6eE/UA+s35FCToz6DuPF1a3o4Arl8UA5O NlvtrLFGyOYsRrD5EEApjuDzX2PwigezMchAUhqjuMb3Mz2OROl0GGG3B3PeTcJdnYh5 oGdRKQ3n6n7u4x2f+RX4wmV0Qeqp58t/lWsdhPd5zTuBFEuwA8gLyZJpdnJ9Qnol1SLt dLr3ho0Rie6Lp8FkikkWVywAlQMOzim0iqcSiKIfBugilI6VS9NxLnBmPY4dyq5DAwYn GUHw== X-Gm-Message-State: AOAM531ItPGb+wvAcDgfPL+SmYqU+cWtpPQ0prwoGS6eIpLIdVRR8pKJ x7LNEJ2208CjA/iEd3zHN2eLmzpwOiDAiYKTVe3E4gfkQxif1FXKDo70YN4p X-Google-Smtp-Source: ABdhPJx01NeJLgQw1QZ3pvPr9pg/wGUnKQ6MwfBvaon+XX5NqNixNhrqui7LRw0LBcekDyH8GeZnWPPF/0hqWlcknxI= X-Received: by 2002:a1c:ed10:: with SMTP id l16mr7330234wmh.8.1625776523785; Thu, 08 Jul 2021 13:35:23 -0700 (PDT) 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 From: probono Date: Thu, 8 Jul 2021 20:35:12 +0000 Message-ID: Subject: Proposal: Include the Application Name in Ports and Packages To: freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GLSj92c7yz4p8y X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=puredarwin-org.20150623.gappssmtp.com header.s=20150623 header.b=H7dvpsUy; dmarc=none; spf=none (mx1.freebsd.org: domain of admin@puredarwin.org has no SPF policy when checking 2a00:1450:4864:20::342) smtp.mailfrom=admin@puredarwin.org X-Spamd-Result: default: False [1.54 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[puredarwin-org.20150623.gappssmtp.com:s=20150623]; FREEFALL_USER(0.00)[admin]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.46)[-0.462]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.999]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::342:from:127.0.2.255]; DMARC_NA(0.00)[puredarwin.org]; NEURAL_SPAM_SHORT(1.00)[1.000]; DKIM_TRACE(0.00)[puredarwin-org.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::342:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[probono@puredarwin.org,admin@puredarwin.org]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::342:from]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[probono@puredarwin.org,admin@puredarwin.org]; MAILMAN_DEST(0.00)[freebsd-ports]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N Hello, This is a proposal to include the Application Name in Ports and Packages. Happy to hear your thoughts on this. Kind regards, probono Terminology ----------- Application Port: A port that contains a graphical application and hence has an Exec= key in its share/applications/*.desktop file Application Name: The application name (as intended by the application author). It may contain uppercase characters, whitespace, and special characters. Examples: "Qalculate!", "KTurtle", "SpeedCrunch". Port Name: The package name is lowercase and does not contain special characters. Most frequently it is not identical to the Application Name. Examples: Examples: "math/qalculate", "lang/kturtle", "math/speedcrunch". Package Name: Same as with the Port Name. Examples: "qalculate", "kturtle", "speedcrunch". Situation --------- The Application Name is the #1 metadata that should be shown to users in application catalogs, package managers, app centers, app stores, and so on. Basic tasks should be simple. Knowing the Application Name is a very basic task yet suprisingly nether Ports nor Packages contain this information: Currently there is no way to know the Application Name from looking at the files in /usr/ports/, and pkg only displays the Package Name but not the Application Name. App centers like freshports.org, OctoPkg, and GhostBSD Software Station hence also cannot show the Application Name but have to resort to showing Port Names without having to download all packages first, which defeats the purpose of having Ports/Packages metadata outside of the packages themselves. When BSD was started, it was centered mostly around command line tools, which usually have names equal to the Package Name, so in the beginning this was not an issue. But with graphical applications, this is no longer the case. Heuristics ---------- 1. In most cases, the Application Name is contained in the value of the Name= key in the share/applications/*.desktop file of the main application contained in the port. 2. If one of the first few words in the pkg-desc file is the word "is", then the word(s) appearing before "is" in the pkg-desc file often contain the Application Name. But this heuristic breaks for descriptions that do not follow the "X is a Y" structure. 3. If the port contains an AppStream metainfo file in share/metainfo/, then the "name" key in the first "component" element often contains the Application Name. But over 1,200 ports with share/applications/* are currently lacking a share/applications/* file. Proposal -------- 1. For Application Ports, include the Application Name as a mandatory key in the Makefile. 2. Add checks to Ports tooling in order to ensure consistency of the Application Name across the desktop file, the pkg-desc file, and the AppStream metainfo file. 3. Populate the Application Name for all Application Ports (doing this initialy can largely be automated using the heuristics described above) 4. Once this is implemented, adjust pkg(8) metadata and tooling to bring the Application Name into Packages and their repositories as well 4. Once this is implemented, adjust pkg(8) metadata and tooling to bring the Application Name into Packages and their repositories as well 5. Update App centers like freshports.org, OctoPkg, and GhostBSD Software Station to display (and make searchable) the Application Name Best Practice ------------- HaikuDepot, the app center in Haiku, is using Application Names: https://www.haiku-os.org/docs/userguide/en/applications/haikudepot.html Interested parties ------------------ * GhostBSD: https://github.com/ghostbsd/software-station (confirmed) * helloSystem: https://github.com/helloSystem/hello/issues/173 (confirmed) * Potentially FreshPorts * Potentially NomadBSD * Potentially OctoPkg