From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QNz7BYVluGP3hAAAbAwnHQ (envelope-from ) for ; Fri, 06 Jan 2023 19:16:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uDn+BYVluGMrvAAA9RJhRA (envelope-from ) for ; Fri, 06 Jan 2023 19:16:37 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BE7B539D62 for ; Fri, 6 Jan 2023 19:16:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDrG7-0006Ch-Oz; Fri, 06 Jan 2023 13:16:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDrG6-0006CL-L9 for bug-guix@gnu.org; Fri, 06 Jan 2023 13:16:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDrG6-0004VA-DQ for bug-guix@gnu.org; Fri, 06 Jan 2023 13:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDrG6-0007C7-8N for bug-guix@gnu.org; Fri, 06 Jan 2023 13:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#50329: [PATCH v2 2/2] gnu: emacs-company-box: Remove unclearly licensed icons from source. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 06 Jan 2023 18:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50329 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50329@debbugs.gnu.org Cc: Maxime Devos , Nicolas Goaziou , Roman Scherer Received: via spool by 50329-submit@debbugs.gnu.org id=B50329.167302890727557 (code B ref 50329); Fri, 06 Jan 2023 18:16:02 +0000 Received: (at 50329) by debbugs.gnu.org; 6 Jan 2023 18:15:07 +0000 Received: from localhost ([127.0.0.1]:55828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrFC-0007AK-Jy for submit@debbugs.gnu.org; Fri, 06 Jan 2023 13:15:07 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDrFA-000790-Lt for 50329@debbugs.gnu.org; Fri, 06 Jan 2023 13:15:05 -0500 Received: by mail-wr1-f65.google.com with SMTP id w13so748490wrk.9 for <50329@debbugs.gnu.org>; Fri, 06 Jan 2023 10:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:cc:to:subject:date:from:from:to:cc:subject :date:message-id:reply-to; bh=kRSgb9JMxvsulX24bsa1p0Wm8YEuJAHnW48wWHdinYY=; b=jpz3v3Q1nyrbSS6vTB44act7aTyijtaXwa3ofmftx+bLePhro3fbQsAiq4XZnQyuHF TKhzWXw5F1HmYAKI/vrbX+AYZFhilcSoBAQRqHiVBoeavhbyggttS0YjiQHXZnoLIHUC M41h9UsA0YWX2BUQdXVrwsFXL46bACbjEnNIMuC82LCQcJYYAppsRrUPtqKyuuRXUrEJ Oe8AYig6oobLf/kw7Rv90j8FG1EgEYITCr2xf69B2kD/uEO9WYRmvBUa3dC3S/RVArwo zIZ5joRF95KxzWyPFP5n6pSuPeRo32T7Sp0cS0HaXDzrdUzcGMjiBorfAOyLfRWjyJzw b0Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:cc:to:subject:date:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kRSgb9JMxvsulX24bsa1p0Wm8YEuJAHnW48wWHdinYY=; b=LaFnXvqzN+e/q4I0nmhEatoib8UayJmsU/xZszSMfYecH2gqYCxKlIu9Oxn+2BZgP6 2lrDwNxt84X5jL7II7sBkRdnKwtFZUiOppO88rPOMtPQgkr1ajvUfxd63NFApkSGJLhA ZmkPCbvYbpz+YGatETIzZPQ70NV0jxYE3k8r6o8AIQ6hOVLBUEYfcsRl5EQERvvttLZW yB/vXsk98kG2rB+gQf1GVInB+r3uJeMTNNSi6qlDUsACSXTyATLYm5x0xhx2abv79lzI USpMGu+1U1ZH/OXG15Qet460FId6w565FiCcEb+ybYnHWz65SrliLiF/LKQdJfgmFax7 CffA== X-Gm-Message-State: AFqh2kolSGGpJzt9JBiyXzzOdKfkOLlEBY1e42KuX+8jRM3LKdHrtyet 1IJV0kIzzMgmfXMipnUrBEWW7WsYiQc= X-Google-Smtp-Source: AMrXdXtYTUcbqzgYHCmbzzPNQ2WkYhmUDy3Gm+yrEVNTRai0tQSXWzMIKOc6QRzY3xnCSzEkKNhkrA== X-Received: by 2002:a5d:5181:0:b0:2b6:7876:3cd4 with SMTP id k1-20020a5d5181000000b002b678763cd4mr4503553wrv.16.1673028898083; Fri, 06 Jan 2023 10:14:58 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z16-20020a5d4d10000000b00242209dd1ffsm1784414wrt.41.2023.01.06.10.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 10:14:57 -0800 (PST) From: Liliana Marie Prikler Date: Sun, 20 Mar 2022 14:29:36 +0100 Message-ID: <75596332b0ea292991f0f2e7f7820879bef86a3b.camel@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673028996; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kRSgb9JMxvsulX24bsa1p0Wm8YEuJAHnW48wWHdinYY=; b=ttUA3xaQcN0ozhqOG/V7ZY3eUJp0kpdOgRq51+HyeJrorL7+3YABh1X2LHh+n3dc+sVOXw /zPjaAs8mnykzoCe0/r0veFSOjGulQwt+g9ykJOHsG9c7gddxuYYu9vxcSnMZvmEkOzp4j PIFIRZ3km1ugvvkcXryvsmghczTIR29KoE1NfG0gDiMmtawPfrRydEsgFJTZ2ABkItIpMY K8mI0EXVXZ9t06eceEfqEfxWZQjB3u/a7b8WgDjJRyc+L5OqOzoAs2CR7BbjkkqrTzlhq2 8duex+ohSoLBlkaA2qUhE+2QngyTA/0jdhubko8SUkOJLjemcIf/NUF6f1H2UA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jpz3v3Q1; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673028996; a=rsa-sha256; cv=none; b=XMxtB9TLg5DOhm76V33JcIFmpJT8jsTJkGxq3LnvxKpwQU0SOb0V6i4Pg3YIgl10Yxzh4x /Bd3nFPHsptN71VUmz5x7F+gl1oJkwBB8Hl2H+e6K9q2VsJuiZdtC9NfCmoPpv70QZGcK/ Gsn/UALy5ZD7LqeNmy4NcKfl0p5bCPwj/NIdIxyLzRp/7cnSanIj91CcVDcm+fUbROmLWs BXPnZ2CbTUooG0jXQfGmlMvr+u8dY/3yX5zQYrL2fsD1BDnMFKsDlYVx+RzVw3J5W8Mhed 77ENFA+kC1BEyR5xs6hsuxMPDR8ErQPcHaGNedetN27/IObXxL4f8+yAn281pw== X-Spam: Yes X-Migadu-Queue-Id: BE7B539D62 X-Migadu-Spam: Yes X-Spam-Score: 6.94 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jpz3v3Q1; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 6.94 X-TUID: X1yqXJFu8d9P emacs-company-box bundles icons with unclear licenses. Confer . * gnu/packages/emacs-xyz.scm (%emacs-company-box-upstream-source): New variable. (emacs-company-box)[source]: Use a computed origin to remove unclearly licensed icons. Also remove source code which mentions said icons. --- gnu/packages/emacs-xyz.scm | 84 ++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 7 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index caa9b4ca6e..73f2e7a3a2 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -7845,6 +7845,15 @@ (define-public emacs-company These are distributed in separate files and can be used individually.") (license license:gpl3+))) +(define* (%emacs-company-box-upstream-source #:key commit version hash) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sebastiencs/company-box") + (commit commit))) + (file-name (git-file-name "emacs-company-box" version)) + (hash hash))) + (define-public emacs-company-box ;; There is no release yet. Version is extracted from the main ;; file. @@ -7856,13 +7865,74 @@ (define-public emacs-company-box (version (git-version version revision commit)) (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/sebastiencs/company-box") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "13fgmdy51gqdwijqfvb784pirx4lgva0y7ysi0c3fcx8f82cdj59")))) + (method (@@ (guix packages) computed-origin-method)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build emacs-utils) + (guix build utils)) + #~(begin + (use-modules (guix build utils) + (guix build emacs-utils)) + (let* ((dir (string-append "emacs-company-box-" #$version))) + + (set-path-environment-variable + "PATH" '("bin") + (list #+emacs-minimal + #+(canonical-package bash) + #+(canonical-package coreutils) + #+(canonical-package gzip) + #+(canonical-package tar))) + + ;; Copy the upstream source + (copy-recursively + #+(%emacs-lsp-treemacs-upstream-source + #:commit commit #:version version + #:hash + (content-hash + "13fgmdy51gqdwijqfvb784pirx4lgva0y7ysi0c3fcx8f82cdj59")) + dir) + + (with-directory-excursion dir + ;; The icons are unclearly licensed and possibly non-free, + ;; see + (with-directory-excursion "images" + (for-each delete-file-recursively + '("eclipse" "idea" "netbeans"))) + + ;; Also remove any mentions in the source code. + (make-file-writable "company-box-icons.el") + (emacs-batch-edit-file "company-box-icons.el" + '(progn + (while (search-forward-regexp + "(defvar company-box-icons-\\([a-z-]*\\)" + nil t) + (pcase (match-string 1) + ((or "images" + "all-the-icons" + "icons-in-terminal") nil) + (_ (beginning-of-line) + (kill-sexp))) + (basic-save-buffer)))) + + ;; Also patch source to not show broken icons as configuration + ;; option. + (substitute* "company-box-icons.el" + (("- .*, from.*editor.*") "") + (("\\(const :tag \"([a-z]*)\".*\\)" all tag) + (if (member tag + '("images" "all-the-icons" "icons-in-terminal")) + all + "")))) + + (invoke "tar" "cvfa" #$output + "--mtime=@0" + "--owner=root:0" + "--group=root:0" + "--sort=name" + "--hard-dereference" + dir)))))))) (build-system emacs-build-system) (propagated-inputs (list emacs-company emacs-dash emacs-frame-local)) -- 2.38.1