From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2OhIMm1QUmSBFwEASxT56A (envelope-from ) for ; Wed, 03 May 2023 14:15:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mC8+MW1QUmSyKgAAG6o9tA (envelope-from ) for ; Wed, 03 May 2023 14:15:41 +0200 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 4CCE98790 for ; Wed, 3 May 2023 14:15:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puBNh-0004rt-W9; Wed, 03 May 2023 08:14:50 -0400 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 1puBNg-0004q9-7K for emacs-orgmode@gnu.org; Wed, 03 May 2023 08:14:48 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puBNd-0004AA-P7 for emacs-orgmode@gnu.org; Wed, 03 May 2023 08:14:47 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1puBNa-0008si-SC for emacs-orgmode@gnu.org; Wed, 03 May 2023 14:14:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: [PATCH] epm.el: A CLI tool for package.el Date: Wed, 3 May 2023 19:14:33 +0700 Message-ID: References: <87sfx7degz.fsf@gmail.com> <87v8ks6rhf.fsf@localhost> <87r0t3gahd.fsf@localhost> <87wn2ujk27.fsf@localhost> <87jzymk3dq.fsf@localhost> <87o7nsdkcw.fsf@localhost> <878remykby.fsf@localhost> <877cttirgy.fsf@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------0nSWvgzphY01egj4WpKTHvj0" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US In-Reply-To: <877cttirgy.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683116141; a=rsa-sha256; cv=none; b=A+js+U9r7q7M4lkSw/sEPVFgntllBn2TWnaHO9AOSeP9h97uNJS323RHsxDibO/JBMbHNc bN/wQzWKxW+jfwk1SlsMOwXVXXtJ7RQxyhncxoYL/UNA4/s4uDv4x/65EtjpiMgaF5xgJ4 uEE+yjZZk6e3LB1CMkdelxI6KwLTA7jt3Ru6lWIblugz8eBWSqVsjzNGHOphocn0q0j3rN j3L+Fpfeyi8ZTp4Jozae2A7TitWRBtU1x1hjdtFmbyGIMSaC0PbYfR6pDXvkfYC31M3Qwm SA+i81MlDAaKww1D+UzIAg6VEka1DDQIh+4jJalbb566hBQBrcDhSCQDMKmNPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683116141; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=GbDTFhUrAq7JU94/QyFHUL6YGvOURBEYzdaEeYciew8=; b=PVt2CUzVsC1mEscIxid/I8D4/CoFtdKCGOHtVYKH+NNPq/QvzvD6wb5Nw4PWv82+vRvSwG je/A6M8MMz4sGDwCJHY9BsHSQuuWrKrVtma+o44pAiwol3nr7nyBKaujIAKwm7Mw+hWwO6 Jnr0+Zxkcb83QjksdViTJ3YOQwUCeZVtb0grnyvuVIB+vZyhlKcEADlt3IeusylBaZ8C9M aI61pssyYofaN6RL5BCV+uHM2/TbnqSqZQfc7be0CfUr1RCSQFi6NN8gz2dsibYh8JNG1E q8hRcmV2jnMLViQlOfrD/BVguqxtpbAK0QRVWbdPSK3zYArrT1S7BC4nOIITXw== X-Migadu-Spam-Score: -0.21 X-Spam-Score: -0.21 X-Migadu-Queue-Id: 4CCE98790 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-TUID: Fz57cj61lV73 This is a multi-part message in MIME format. --------------0nSWvgzphY01egj4WpKTHvj0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 30/04/2023 17:39, Ihor Radchenko wrote: > Max Nikulin writes: > >> ./epm.el -Q --epm-dir $(emacs_pkgdir)/emacs-%e install compat > > Good idea. Although, we should not overdo this package management thing. > If we really need complex functionality here, we should better just use > cask/eldev instead of re-inventing the wheel. I have not tried cask or eldev, so I can not reason on supposed workflow. > Are you willing to improve the draft to be ready for upstream? See the attachment. Interface is subject to change to better fit particular use cases. > I think that we need to zoom out a bit and discuss the contexts where > Org build system is used: > > 1. During Org development, by developers who know what they are doing ...and who prefer failure to files installed to unexpected directory when configuration contains a mistake or it is not activated. > 2. By ordinary users, not necessarily familiar with GNU make and all the > associated build process conventions. For those who are not familiar with convention any target may be specified in docs, keeping usual meaning of the default "all" target. > For example, my `package-user-dir' contains a > number of forks with additional patches applied - it is not the > environment I want to develop (and test) Org in. I think, for ordinary user it is better to keep build time and runtime `package-user-dir' the same. Developers, especially when multiple versions are involved, should have isolated sandboxes similar to "python3 -m venv" and activating scripts setting proper environment variables. > Org users will likely use make autoloads, make, make docs, and make > repro. make autoloads should be necessary only to run org uncompiled. My impression is that some bugs may exist, so make clean and make autoloads are necessary during updates. > However, make repro and > optionally make docs should avoid re-using user packages as it may cause > inconsistent results if the `package-user-dir' is messed up. I agree concerning "make repro", but unsure for docs. > One way to handle the above scenarios might be your idea with AUTODEP. > By default, it will be "auto": > - make compile, docs :: Re-use default `package-user-dir' > - make repro :: Auto-download and ignore `package-user-dir' > - other targets :: Prompt the user > Alternatives will be meant to be used as > > AUTODEP=download/user/no make target. > > triggering unconditional downloading, using `package-user-dir', and not > using any guess, correspondingly. In general I agree that strategy may depend on specified target. The only issue that make allows to specify several targets. An I am unsure concerning user prompt. I have realized that as soon as build dependencies are involved, Makefile should use emacs -q, not emacs -Q since -Q excludes site-lisp directories created by e.g. elpa-compat debian package. > I think that it is stretching a bit beyond the complexity we should > allow within Org build system. In your scenario, I can simply do > make cleanpkg and re-download the latest dependencies. I would prefer clear error message that package version is not satisfactory. However such feature may be added later. >> #!/bin/sh >> ":"; # -*- mode: emacs-lisp; lexical-binding: t; -*- >> ":"; exec emacs --script "$0" "$@" > > Let's not lock to bash. AFAIK, our makefiles can currently work on > Windows. Using /bin/sh will lead to regression. It is POSIX shell, not BASH. I am unsure if make can be used on windows when e.g. cygwin is not available. Makefiles are full of POSIX tool invocations. Anyway, since emacs binary is customizable in Makefile, the correct way to use this script from Makefile is like (perhaps with more flags) $(EMACS_Q) --script mk/epm.el --epm-dir $(EPMDIR) missing compat A convenience way mk/epm.el -q report compat htmlize is for default emacs from PATH when a user works with shell prompt. >> (dir (directory-file-name (expand-file-name fmt-expanded)))) >> ;; `package-user-dir' ~/.emacs.d/elpa by default >> ;; `package-directory-list' does not include it > > What does this comment refer to? To lack of my experience with package.el and site-lisp infrastructure. --------------0nSWvgzphY01egj4WpKTHvj0 Content-Type: text/x-patch; charset=UTF-8; name="0001-epm.el-A-CLI-tool-for-package.el.patch" Content-Disposition: attachment; filename="0001-epm.el-A-CLI-tool-for-package.el.patch" Content-Transfer-Encoding: base64 RnJvbSA2ZTBkNzNhYmY1Mjc5MDFkZjA4MGYwZjVkN2QyNzI3MjJkODljODdhIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXggTmlrdWxpbiA8bWFuaWt1bGluQGdtYWlsLmNv bT4KRGF0ZTogV2VkLCAzIE1heSAyMDIzIDE4OjM5OjQ5ICswNzAwClN1YmplY3Q6IFtQQVRD SF0gZXB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RpdmVseSBFUE1ESVIgZW52aXJvbm1lbnQgdmFy aWFibGUgbWF5IGJlIHNwZWNpZmllZC4KK1xuIgorICAgICAgICAgICAgICAgICBlcG0tc2Ny aXB0LW5hbWUgKGNhciBjb21tYW5kLWxpbmUtYXJncykgZXBtLXNjcmlwdC1uYW1lKSkKKyAg KHBjYXNlLWRvbGlzdCAoYCgsbmFtZSAuICxmdW5jKSBlcG0tY29tbWFuZHMpCisgICAgKHBy aW5jIG5hbWUpCisgICAgKHRlcnByaSkKKyAgICAocHJpbmMKKyAgICAgKHJlcGxhY2UtcmVn ZXhwLWluLXN0cmluZworICAgICAgIlxcYFxcfFxuIiAiXFwxICAgICIKKyAgICAgIChkb2N1 bWVudGF0aW9uIGZ1bmMpICdmaXhlZGNhc2UgbmlsKSkKKyAgICAodGVycHJpKQorICAgICh0 ZXJwcmkpKSkKKworKGRlZnVuIGVwbS1jbWQtbWlzc2luZyAoXyBsaWJzKQorICAiUmVwb3J0 IG5vdCBpbnN0YWxsZWQgbGlicmFyaWVzIGFuZCBleGl0IHdpdGggbm9uLXplcm8gY29kZS4i CisgIChsZXQgKChtaXNzaW5nIChlcG0tbWlzc2luZyBsaWJzKSkpCisgICAgKHdoZW4gbWlz c2luZworICAgICAgKHByaW5jIChtYXBjb25jYXQgIydpZGVudGl0eSBtaXNzaW5nICIgIikp CisgICAgICAodGVycHJpKQorICAgICAgKGtpbGwtZW1hY3MgMSkpKSkKKworKGRlZnVuIGVw bS1jbWQtaW5zdGFsbCAoXyBsaWJzKQorICAiSW5zdGFsbCBwYWNrYWdlcyBmcm9tIExJQlMg dGhhdCBhcmUgbm90IGF2YWlsYWJsZSB5ZXQiCisgIDs7IFRPRE8gZm9yY2Ugb3B0aW9uIG9y IHVwZGF0ZSBjb21tYW5kCisgIChsZXQgKChtaXNzaW5nIChlcG0tbWlzc2luZyBsaWJzKSkp CisgICAgKHdoZW4gbWlzc2luZworICAgICAgKHBhY2thZ2UtcmVmcmVzaC1jb250ZW50cykK KyAgICAgIChtYWtlLWRpcmVjdG9yeSBwYWNrYWdlLXVzZXItZGlyICdwYXJlbnRzKSkKKyAg ICAoZG9saXN0IChwa2cgbWlzc2luZykKKyAgICAgIChwYWNrYWdlLWluc3RhbGwgKGludGVy biBwa2cpKSkpKQorCisoZGVmdW4gZXBtLWNtZC1yZXBvcnQgKF8gbGlicykKKyAgIlJlcG9y dCBwYXRocyBvZiBhdmFpbGFibGUgbGlicmFyaWVzIgorICAocHJpbmMgKGZvcm1hdCAicGFj a2FnZS11c2VyLWRpcjogJXNcbiIgcGFja2FnZS11c2VyLWRpcikpCisgIDs7IChwcmluYyAo Zm9ybWF0ICJsb2FkLXBhdGg6ICVzXG4iIGxvYWQtcGF0aCkpCisgIChkb2xpc3QgKG5hbWUg bGlicykKKyAgICA7OyAodmVyc2lvbi10by1saXN0IHZlcnNpb24pCisgICAgKHByaW5jIChm b3JtYXQgIiUtMjBzICVzICIgbmFtZQorCQkgICAoaWYgKHBhY2thZ2UtaW5zdGFsbGVkLXAg KGludGVybiBuYW1lKSkKKwkJICAgICAgICJwYWNrYWdlICIKKwkJICAgICAiICAgICAgICAi KSkpCisgICAgKHByaW5jIChsb2NhdGUtbGlicmFyeSBuYW1lKSkKKyAgICAodGVycHJpKSkp CisKKyhkZWZ2YXIgZXBtLWNvbW1hbmRzCisgICcoKCJoZWxwIiAuIGVwbS1jbWQtaGVscCkK KyAgICAoImluc3RhbGwiIC4gZXBtLWNtZC1pbnN0YWxsKQorICAgICgibWlzc2luZyIgLiBl cG0tY21kLW1pc3NpbmcpCisgICAgKCJyZXBvcnQiIC4gZXBtLWNtZC1yZXBvcnQpKSkKKwor KGRlZnVuIGVwbS1jb21tYW5kLWxpbmUtZnVuY3Rpb24gKCkKKyAgIkhhbmRsZSBjb21tYW5k IGxpbmUgb3B0aW9ucyBhbmQgYXJndW1lbnRzIHNwZWNpZmljIHRvIGVwbS4KKworSW1wbGVt ZW50cyBhIGhhbmRsZXIgZm9yIGBjb21tYW5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5vLWJ5dGUtY29t cGlsZTogdAorOzsgRW5kOgorOzs7IGVwbS5lbCBlbmRzIGhlcmUKLS0gCjIuMjUuMQoK --------------0nSWvgzphY01egj4WpKTHvj0--