Received: (at 48463) by debbugs.gnu.org; 17 Jan 2022 21:13:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 17 16:13:15 2022 Received: from localhost ([127.0.0.1]:48286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n9ZJH-0004YT-Ju for submit <at> debbugs.gnu.org; Mon, 17 Jan 2022 16:13:15 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:41881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1n9ZJF-0004Xx-49 for 48463 <at> debbugs.gnu.org; Mon, 17 Jan 2022 16:13:02 -0500 Received: by mail-wm1-f66.google.com with SMTP id q141-20020a1ca793000000b00347b48dfb53so2444863wme.0 for <48463 <at> debbugs.gnu.org>; Mon, 17 Jan 2022 13:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version; bh=VzGdXAIs28AZDVu8HKTY1nj6yUIe7RnLRGGTnW9OrE0=; b=INL6VsVMuzCJAxgQ99X6kJ5VoFG9Zq2DIwc66eaM5droezmV4rMpDJjfb14nJVZwpw ADdIXVQQqGl4fozRSHVG5G25/c7tVeAAyFUdi84QgmUH3h8DQtzngmi0f7tzlIyvbaE6 PA5tmXrfvkNNRL0PiO0XxszJMJ+1S9koQUuPFDvv4vgI+c6xILkXtAZThtHfd/qkno2H qUOY0wJxjgh6STeILauk80q4DL36B9/t5SNRF7OxOpwwMx1blzj3oF+57fLayNQ5v8L/ /6w4iJPLd61gysWaovX3Iy7lIgAyh1gu4eHtSF0S7X2ZaGszq0Kl4eDg+f9ilaztcp88 fOWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version; bh=VzGdXAIs28AZDVu8HKTY1nj6yUIe7RnLRGGTnW9OrE0=; b=YJlxDwlOJ9/nuI3oL9rVps8NVuCsriXgJVBK6zjxoSAZPpAxTpkhMyXx5kiQ7CzrsI G/AetW2kZLMozXDbSie354WjtCiUF/PXQtKRgt5UlgD/j4Hqx5I0dfD6vohWFQoehrbB b9jEQdV1ZmglcMGg4C0wL5LXy3HH+anYfOyuOSy7+2XCdd66m4yPMs0NQfYvd5P0pFHb X0sPDV/KYO54ah1ba6Zoq8AUHfRLwPMr8p7AlgYq0lZoMt2XV1ORUodfCweQ2vPIjDYU 1CXQOgSM/s01LirfoAT64/Ds5NQMGlploxkiW4H4lGoZwYCh1IrZpZCCpIyCiSygJNn1 5W9w== X-Gm-Message-State: AOAM533hoKna0GPgR5WP5Ox4JIET432y9jbhMxS0/ZgP57kg1EuWrYzW 4GPt3KoAneaoVwErW49nyCk= X-Google-Smtp-Source: ABdhPJzEpE4x7EeP6Cyu5jQohhMFCKXHB/aTsb941ggA/acqd449ziguUaZkaLdBFELI+IwThV16YQ== X-Received: by 2002:a5d:64c4:: with SMTP id f4mr6146978wri.429.1642453975455; Mon, 17 Jan 2022 13:12:55 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l8sm459951wme.5.2022.01.17.13.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 13:12:53 -0800 (PST) Message-ID: <befbc28f660ebe87a8a4e86b3901266c9a475931.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN Date: Mon, 17 Jan 2022 22:12:52 +0100 In-Reply-To: <2EZU214MJAIBY.3EXSPSUMS5WW5@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> <de0a87c99fdbec2475b02fb87cba8e2d17ff26ce.camel@HIDDEN> <24FU0VP6N4ZZ7.3PE5LG30BSNUQ@HIDDEN> <e1aa36040fe6bb590834410d482bb8027603f2cc.camel@HIDDEN> <2EZU214MJAIBY.3EXSPSUMS5WW5@HIDDEN> Content-Type: multipart/mixed; boundary="=-c3Qhk/j28Tbyho3MHPTw" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-c3Qhk/j28Tbyho3MHPTw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi, I tried to get J ready for packaging, but thanks to my CPU not supporting AVX2 and some helpful discussion in IRC, I was able to avoid an error here. The (guix cpu) code is not meant to be used at runtime as the comment to ijconsole implies it wants it to be used. Rather, you should use it at compile time to bake in the correct tuning parameters, and it should ideally also support "cross-tuning" (though in that case you probably need to disable the tests because your CPU won't make sense of the code). ijconsole not only fails that, but it also fails at an even more basic task in Guix' launcher scripts, which is actually knowing the thing you launch. (We hardcode everything, period.) Now I could just disable everything AVX-related in J and push something that works on x86 and amd64, but since you do claim that AVX is important to J, there are also other options one could take here. One is to implement tuning for this package the correct way, though since it reinvents build systems, that's probably going to be a hard one. The other would be to define package variants (e.g. jsoftware-j-with- avx) and use those -- there ought to be an old blog post on Guix HPC detailing the rationale behind doing that. WDYT? Is AVX worth the trouble? --=-c3Qhk/j28Tbyho3MHPTw Content-Disposition: attachment; filename="0001-gnu-Add-j.patch" Content-Type: text/x-patch; name="0001-gnu-Add-j.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSA2YjE1ZGVkYTJlY2MwOWI3MzU0NWUzZmVjY2ZhYzdmM2Y2OTVjOWU4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiAiQi4gV2lsc29uIiA8ZWxhZXh1b3RlZUB3aWxzb25iLmNvbT4K RGF0ZTogV2VkLCAxMiBKYW4gMjAyMiAxODo0NDozNiArMDkwMApTdWJqZWN0OiBbUEFUQ0hdIGdu dTogQWRkIGouCgoqIGdudS9wYWNrYWdlcy9qc29mdHdhcmUuc2NtOiBOZXcgZmlsZS4KKiBnbnUv cGFja2FnZXMvcGF0Y2hlcy9qc29mdHdhcmUtajkwMS1mLWZpeGVzLnBhdGNoOiBOZXcgZmlsZS4K KiBnbnUvbG9jYWwubWsgW0dOVV9TWVNURU1fTU9EVUxFU106IEFkZCBqc29mdHdhcmUuc2NtLgpb ZGlzdF9wYXRjaF9EQVRBXTogQWRkIGpzb2Z0d2FyZS1qOTAxLWYtZml4ZXMucGF0Y2guCiogZ251 L3BhY2thZ2VzL2F1eC1maWxlcy9qc29mdHdhcmUvcHJvZmlsZXguaWpzOiBOZXcgZmlsZS4KKk1h a2VmaWxlLmFtIFtBVVhfRklMRVNdOiBBZGQgaXQgaGVyZS4KCi0tLQogTWFrZWZpbGUuYW0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAxICsKIGdudS9sb2NhbC5tayAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgMiArCiBnbnUvcGFja2FnZXMvYXV4LWZp bGVzL2pzb2Z0d2FyZS9wcm9maWxleC5panMgfCAgMTQgKwogZ251L3BhY2thZ2VzL2pzb2Z0d2Fy ZS5zY20gICAgICAgICAgICAgICAgICAgIHwgNDIxICsrKysrKysrKysrKysrKysrKwogLi4uL3Bh dGNoZXMvanNvZnR3YXJlLWo5MDEtZi1maXhlcy5wYXRjaCAgICAgIHwgIDgwICsrKysKIDUgZmls ZXMgY2hhbmdlZCwgNTE4IGluc2VydGlvbnMoKykKIGNyZWF0ZSBtb2RlIDEwMDY0NCBnbnUvcGFj a2FnZXMvYXV4LWZpbGVzL2pzb2Z0d2FyZS9wcm9maWxleC5panMKIGNyZWF0ZSBtb2RlIDEwMDY0 NCBnbnUvcGFja2FnZXMvanNvZnR3YXJlLnNjbQogY3JlYXRlIG1vZGUgMTAwNjQ0IGdudS9wYWNr YWdlcy9wYXRjaGVzL2pzb2Z0d2FyZS1qOTAxLWYtZml4ZXMucGF0Y2gKCmRpZmYgLS1naXQgYS9N YWtlZmlsZS5hbSBiL01ha2VmaWxlLmFtCmluZGV4IGExMGFlYjgxN2IuLjFlZmQ4YTliMjYgMTAw NjQ0Ci0tLSBhL01ha2VmaWxlLmFtCisrKyBiL01ha2VmaWxlLmFtCkBAIC0zNzksNiArMzc5LDcg QEAgQVVYX0ZJTEVTID0JCQkJCQlcCiAgIGdudS9wYWNrYWdlcy9hdXgtZmlsZXMvY2hyb21pdW0v bWFzdGVyLXByZWZlcmVuY2VzLmpzb24JCVwKICAgZ251L3BhY2thZ2VzL2F1eC1maWxlcy9lbWFj cy9ndWl4LWVtYWNzLmVsCQlcCiAgIGdudS9wYWNrYWdlcy9hdXgtZmlsZXMvZ3VpeC52aW0JCQlc CisgIGdudS9wYWNrYWdlcy9hdXgtZmlsZXMvanNvZnR3YXJlL3Byb2ZpbGV4LmlqcwkJCVwKICAg Z251L3BhY2thZ2VzL2F1eC1maWxlcy9saW51eC1saWJyZS81LjE1LWFybS5jb25mCVwKICAgZ251 L3BhY2thZ2VzL2F1eC1maWxlcy9saW51eC1saWJyZS81LjE1LWFybTY0LmNvbmYJXAogICBnbnUv cGFja2FnZXMvYXV4LWZpbGVzL2xpbnV4LWxpYnJlLzUuMTUtaTY4Ni5jb25mCVwKZGlmZiAtLWdp dCBhL2dudS9sb2NhbC5tayBiL2dudS9sb2NhbC5tawppbmRleCA3ZTA0NGQ0YTJiLi5lYjEzMDlj OWQ3IDEwMDY0NAotLS0gYS9nbnUvbG9jYWwubWsKKysrIGIvZ251L2xvY2FsLm1rCkBAIC0zMjUs NiArMzI1LDcgQEAgR05VX1NZU1RFTV9NT0RVTEVTID0JCQkJXAogICAlRCUvcGFja2FnZXMvamVt YWxsb2Muc2NtCQkJXAogICAlRCUvcGFja2FnZXMvanJubC5zY20JCQkJXAogICAlRCUvcGFja2Fn ZXMvam9zZS5zY20JCQkJXAorICAlRCUvcGFja2FnZXMvanNvZnR3YXJlLnNjbQkJCQlcCiAgICVE JS9wYWNrYWdlcy9qdWxpYS5zY20JCQlcCiAgICVEJS9wYWNrYWdlcy9qdWxpYS1qbGwuc2NtCQkJ XAogICAlRCUvcGFja2FnZXMvanVsaWEteHl6LnNjbQkJCVwKQEAgLTEyOTUsNiArMTI5Niw3IEBA IGRpc3RfcGF0Y2hfREFUQSA9CQkJCQkJXAogICAlRCUvcGFja2FnZXMvcGF0Y2hlcy9pcnJsaWNo dC11c2Utc3lzdGVtLWxpYnMucGF0Y2gJCVwKICAgJUQlL3BhY2thZ2VzL3BhdGNoZXMvaXNjLWRo Y3AtZ2NjLWNvbXBhdC5wYXRjaAkJXAogICAlRCUvcGFja2FnZXMvcGF0Y2hlcy9pc2wtMC4xMS4x LWFhcmNoNjQtc3VwcG9ydC5wYXRjaAlcCisgICVEJS9wYWNrYWdlcy9wYXRjaGVzL2pzb2Z0d2Fy ZS1qOTAxLWYtZml4ZXMucGF0Y2gJCVwKICAgJUQlL3BhY2thZ2VzL3BhdGNoZXMvanNvbi1jLTAu MTMtQ1ZFLTIwMjAtMTI3NjIucGF0Y2gJXAogICAlRCUvcGFja2FnZXMvcGF0Y2hlcy9qc29uLWMt MC4xMi1DVkUtMjAyMC0xMjc2Mi5wYXRjaAlcCiAgICVEJS9wYWNrYWdlcy9wYXRjaGVzL2pzb25j cHAtcGtnLWNvbmZpZy12ZXJzaW9uLnBhdGNoCQlcCmRpZmYgLS1naXQgYS9nbnUvcGFja2FnZXMv YXV4LWZpbGVzL2pzb2Z0d2FyZS9wcm9maWxleC5panMgYi9nbnUvcGFja2FnZXMvYXV4LWZpbGVz L2pzb2Z0d2FyZS9wcm9maWxleC5panMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAw MDAwMC4uMzBlMGQyMjllMgotLS0gL2Rldi9udWxsCisrKyBiL2dudS9wYWNrYWdlcy9hdXgtZmls ZXMvanNvZnR3YXJlL3Byb2ZpbGV4LmlqcwpAQCAtMCwwICsxLDE0IEBACisnanR5cGUganZlcnNp b24nPS4gKDMmeyx7LikgPDsuXzIgLCYnLycgOSE6MTQnJworYmFzZWRpcj0uICh7Ln4gXzIgeyBJ LkA6PSYnLycpIEJJTlBBVEgKKworc2hhcmU9LiAgYmFzZWRpciwnL3NoYXJlL2onCitzeXN0ZW09 LiBzaGFyZSwnL3N5c3RlbScKK3Rvb2xzPS4gIHNoYXJlLCcvdG9vbHMnCisKK3VzZXI9LiAgICBo b21lLCcvLmNvbmZpZy9qLycsanZlcnNpb24KK2FkZG9ucz0uICB1c2VyLCcvYWRkb25zJworYnJl YWs9LiAgIHVzZXIsJy9icmVhaycKK2NvbmZpZz0uICB1c2VyLCcvY29uZmlnJworaW5zdGFsbD0u IHVzZXIsJy9pbnN0YWxsJworc25hcD0uICAgIHVzZXIsJy9zbmFwJwordGVtcD0uICAgIHVzZXIs Jy90ZW1wJwpkaWZmIC0tZ2l0IGEvZ251L3BhY2thZ2VzL2pzb2Z0d2FyZS5zY20gYi9nbnUvcGFj a2FnZXMvanNvZnR3YXJlLnNjbQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwMDAw Li5jN2Q1YzRkN2I1Ci0tLSAvZGV2L251bGwKKysrIGIvZ251L3BhY2thZ2VzL2pzb2Z0d2FyZS5z Y20KQEAgLTAsMCArMSw0MjEgQEAKKzs7OyBHTlUgR3VpeCAtLS0gRnVuY3Rpb25hbCBwYWNrYWdl IG1hbmFnZW1lbnQgZm9yIEdOVQorOzs7IENvcHlyaWdodCDCqSAyMDIyIEIuIFdpbHNvbiA8ZWxh ZXh1b3RlZUB3aWxzb25iLmNvbT4KKzs7OworOzs7IFRoaXMgZmlsZSBpcyBwYXJ0IG9mIEdOVSBH dWl4LgorOzs7Cis7OzsgR05VIEd1aXggaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3Ry aWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdAorOzs7IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05V IEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Cis7OzsgdGhlIEZyZWUgU29m dHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IgKGF0 Cis7OzsgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgorOzs7Cis7OzsgR05VIEd1aXgg aXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0Cis7 OzsgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50 eSBvZgorOzs7IE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVS UE9TRS4gIFNlZSB0aGUKKzs7OyBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBk ZXRhaWxzLgorOzs7Cis7OzsgWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUg R05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKKzs7OyBhbG9uZyB3aXRoIEdOVSBHdWl4LiAgSWYg bm90LCBzZWUgPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LgorCisoZGVmaW5lLW1vZHVs ZSAoZ251IHBhY2thZ2VzIGpzb2Z0d2FyZSkKKyAgIzp1c2UtbW9kdWxlIChndWl4IGJ1aWxkIHV0 aWxzKQorICAjOnVzZS1tb2R1bGUgKGd1aXggYnVpbGQtc3lzdGVtIGdudSkKKyAgIzp1c2UtbW9k dWxlIChndWl4IGJ1aWxkLXN5c3RlbSB0cml2aWFsKQorICAjOnVzZS1tb2R1bGUgKGd1aXggZ2l0 LWRvd25sb2FkKQorICAjOnVzZS1tb2R1bGUgKChndWl4IGxpY2Vuc2VzKSAjOnByZWZpeCBsaWNl bnNlOikKKyAgIzp1c2UtbW9kdWxlIChndWl4IHBhY2thZ2VzKQorICAjOnVzZS1tb2R1bGUgKGd1 aXggdXRpbHMpCisgICM6dXNlLW1vZHVsZSAoZ251IHBhY2thZ2VzKQorICAjOnVzZS1tb2R1bGUg KGdudSBwYWNrYWdlcyBsaWJlZGl0KQorICAjOnVzZS1tb2R1bGUgKGdudSBwYWNrYWdlcyBsbHZt KQorICAjOnVzZS1tb2R1bGUgKGdudSBwYWNrYWdlcyBtYXRocykKKyAgIzp1c2UtbW9kdWxlIChn dWl4IGdleHApCisgICM6dXNlLW1vZHVsZSAoaWNlLTkgZnR3KQorICAjOnVzZS1tb2R1bGUgKGlj ZS05IG1hdGNoKQorICAjOnVzZS1tb2R1bGUgKGljZS05IHJlZ2V4KQorICAjOnVzZS1tb2R1bGUg KGljZS05IHJkZWxpbSkKKyAgIzp1c2UtbW9kdWxlIChzcmZpIHNyZmktMSkKKyAgIzp1c2UtbW9k dWxlIChzcmZpIHNyZmktMjYpCisgICM6dXNlLW1vZHVsZSAoc3JmaSBzcmZpLTcxKSkKKworCis7 OzsgVE9ETzogTWFrZSBpbXBvcnRlciBhbmQgcGFja2FnZXMgZm9yIEogYWRkb25zOgorOzs7IGh0 dHA6Ly93d3cuanNvZnR3YXJlLmNvbS9qYWwvCisKKzs7OyBUT0RPOiBQYWNrYWdlIHVwIGo4MHgg c2VyaWVzCisKKworKGRlZmluZSAoam5hbWUgcHJlZml4IHJlbGVhc2UtdHlwZSkKKyAgIlJldHVy biBhIHBhY2thZ2UgbmFtZSBmb3IgSiwgaW5jbHVkaW5nIFJFTEVBU0UtVFlQRSBvbmx5IGlmIG5v dCAncmVsZWFzZS4iCisgIChtYXRjaCByZWxlYXNlLXR5cGUKKyAgICAoJ3JlbGVhc2UgcHJlZml4 KQorICAgIChfICAgICAgICAoc3RyaW5nLWFwcGVuZCBwcmVmaXggIi0iIChzeW1ib2wtPnN0cmlu ZyByZWxlYXNlLXR5cGUpKSkpKQorCisoZGVmaW5lICh2ZXJzaW9uLW1ham9yK21pbm9yKiB2ZXJz aW9uKQorICAiTGlrZSB2ZXJzaW9uLW1ham9yK21pbm9yLCBidXQgcmV0dXJuaW5nIHR3byBzdHJp bmcgdmFsdWVzLiIKKyAgKGxldCAoKHBhcnRzIChzdHJpbmctc3BsaXQgdmVyc2lvbiAjXC4pKSkK KyAgICAodmFsdWVzIChmaXJzdCBwYXJ0cykgKHNlY29uZCBwYXJ0cykpKSkKKworKGRlZmluZSog KGpyZWxlYXNlLXN0cmluZyByZWxlYXNlLXR5cGUgIzpvcHRpb25hbCB2ZXJzaW9uLW1pbm9yKQor ICAiQ29uc3RydWN0IEogcmVsZWFzZSBpZGVudGlmaWVyIHN0cmluZy4iCisgIChsZXQgKChyZWxl YXNlLXR5cGUgKHN5bWJvbC0+c3RyaW5nIHJlbGVhc2UtdHlwZSkpKQorICAgIChpZiB2ZXJzaW9u LW1pbm9yCisgICAgICAgIChzdHJpbmctYXBwZW5kIHJlbGVhc2UtdHlwZSAiLSIgdmVyc2lvbi1t aW5vcikKKyAgICAgICAgcmVsZWFzZS10eXBlKSkpCisKKyhkZWZpbmUqIChqaW5mby0+Z2l0LXRh ZyB2ZXJzaW9uIHJlbGVhc2UtdHlwZSkKKyAgIkdpdmVuIHZlcnNpb24gcGFyYW1ldGVycywgY29u c3RydWN0IGEgZ2l0IHRhZyBmb3IgdXBzdHJlYW0gcmVsZWFzZXMuIgorICAobGV0ICgobWFqb3Ig bWlub3IgKHZlcnNpb24tbWFqb3IrbWlub3IqIHZlcnNpb24pKSkKKyAgICAoc3RyaW5nLWFwcGVu ZCAiaiIgbWFqb3IgIi0iIChqcmVsZWFzZS1zdHJpbmcgcmVsZWFzZS10eXBlIG1pbm9yKSkpKQor Cis7OyBHLWV4cCBzY3JpcHQgdGhhdCBkZXRlY3RzIEFWWC9BVlgyIHN1cHBvcnQgYXQgcnVudGlt ZSBhbmQgZXhlY3V0ZXMgamNvbnNvbGUKKzs7IHdpdGggdGhlIGFwcHJvcHJpYXRlIGxpYmouc28g YW5kIHByb2ZpbGUuaWpzLiIKKzs7IE5PVEU6IFRoaXMgc2hvdWxkIGJlIGJha2VkIGluIGF0IGNv bXBpbGUgdGltZSBpbnRvIGBqc29mdHdhcmUtaicuCisoZGVmaW5lIGlqY29uc29sZQorICAod2l0 aC1pbXBvcnRlZC1tb2R1bGVzICcoKGd1aXggY3B1KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGd1aXggbWVtb2l6YXRpb24pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ3VpeCBw cm9maWxpbmcpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ3VpeCBzZXRzKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHNyZmkgc3JmaS0yNikpCisgICAgKHByb2dyYW0tZmlsZSAi aWpjb25zb2xlIgorICAgICAgI34oYmVnaW4KKyAgICAgICAgICAodXNlLW1vZHVsZXMgKChndWl4 IGNwdSkgICAgICM6c2VsZWN0IChjcHUtZmxhZ3MgY3VycmVudC1jcHUpKQorICAgICAgICAgICAg ICAgICAgICAgICAoKGd1aXggc2V0cykgICAgIzpzZWxlY3QgKHNldC1jb250YWlucz8pKQorICAg ICAgICAgICAgICAgICAgICAgICAoKHNyZmkgc3JmaS0yNikgIzpzZWxlY3QgKGN1dGUpKSkKKwor ICAgICAgICAgIDs7IEFzc3VtZSB0aGF0IHRoaXMgc2NyaXB0IHdpbGwgYmUgaW5zdGFsbGVkIHVu ZGVyIGJpbi8uCisgICAgICAgICAgKGRlZmluZSAlYmFzZWRpciAoZGlybmFtZSAoZGlybmFtZSAo Y3VycmVudC1maWxlbmFtZSkpKSkKKworICAgICAgICAgIChsZXQqICgoamNvbnNvbGUgKHN0cmlu Zy1hcHBlbmQgJWJhc2VkaXIgIi9saWJleGVjL2ovamNvbnNvbGUiKSkKKyAgICAgICAgICAgICAg ICAgKGNwdS1oYXMtZmxhZz8KKyAgICAgICAgICAgICAgICAgICAoY3V0ZSBzZXQtY29udGFpbnM/ IChjcHUtZmxhZ3MgKGN1cnJlbnQtY3B1KSkgPD4pKQorICAgICAgICAgICAgICAgICAobGliaiAo Zm9ybWF0ICNmICJ+YS9saWIvai9saWJqfmEuc28iICViYXNlZGlyCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIiIjOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb25k ICgoY3B1LWhhcy1mbGFnPyAiYXZ4MiIpICItYXZ4MiIpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKChjcHUtaGFzLWZsYWc/ICJhdngiKSAiLWF2eCIpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVsc2UgIiIpKSkpCisgICAgICAgICAgICAgICAg IChqcHJvZmlsZSAoc3RyaW5nLWFwcGVuZCAlYmFzZWRpciAiL2V0Yy9qL3Byb2ZpbGUuaWpzIikp KQorICAgICAgICAgICAgKGFwcGx5IGV4ZWNsIGpjb25zb2xlICJpamNvbnNvbGUiICItbGliIiBs aWJqICItanByb2ZpbGUiIGpwcm9maWxlCisgICAgICAgICAgICAgICAgICAgKGNkciAoY29tbWFu ZC1saW5lKSkpKSkpKSkKKworKGRlZmluZSogKG1ha2UtaiBiYXNlLXZlcnNpb24gaGFzaAorICAg ICAgICAgICAgICAgICAjOmtleQorICAgICAgICAgICAgICAgICByZXZpc2lvbgorICAgICAgICAg ICAgICAgICBjb21taXQKKyAgICAgICAgICAgICAgICAgdGFnCisgICAgICAgICAgICAgICAgIChy ZWxlYXNlLXR5cGUgJ3JlbGVhc2UpCisgICAgICAgICAgICAgICAgIChwYXRjaGVzICcoKSkKKyAg ICAgICAgICAgICAgICAgKG1vZHVsZXMgJygpKQorICAgICAgICAgICAgICAgICAoc25pcHBldCAj ZikKKyAgICAgICAgICAgICAgICAgKGV4dHJhLWlucHV0cyAnKCkpCisgICAgICAgICAgICAgICAg IChleHRyYS1lbnZhcnMgJygpKQorICAgICAgICAgICAgICAgICAoYnVpbGRlciAiZ3VpeC5nbnUu b3JnIikpCisgIChsZXQgKChtYWpvciBtaW5vciAodmVyc2lvbi1tYWpvcittaW5vciogYmFzZS12 ZXJzaW9uKSkpCisgICAgKHBhY2thZ2UKKyAgICAgIChuYW1lIChqbmFtZSAianNvZnR3YXJlLWoi IHJlbGVhc2UtdHlwZSkpCisgICAgICAodmVyc2lvbgorICAgICAgIChpZiBjb21taXQgKGdpdC12 ZXJzaW9uIGJhc2UtdmVyc2lvbiByZXZpc2lvbiBjb21taXQpIGJhc2UtdmVyc2lvbikpCisgICAg ICAoc291cmNlCisgICAgICAgKG9yaWdpbgorICAgICAgICAgKG1ldGhvZCBnaXQtZmV0Y2gpCisg ICAgICAgICAodXJpIChnaXQtcmVmZXJlbmNlCisgICAgICAgICAgICAgICAodXJsICJodHRwczov L2dpdGh1Yi5jb20vanNvZnR3YXJlL2pzb3VyY2UiKQorICAgICAgICAgICAgICAgKGNvbW1pdCAo b3IgY29tbWl0IHRhZworICAgICAgICAgICAgICAgICAgICAgICAgICAgKGppbmZvLT5naXQtdGFn IGJhc2UtdmVyc2lvbiByZWxlYXNlLXR5cGUpKSkpKQorICAgICAgICAgKHNoYTI1NiAoYmFzZTMy IGhhc2gpKQorICAgICAgICAgKGZpbGUtbmFtZSAoZ2l0LWZpbGUtbmFtZSBuYW1lIHZlcnNpb24p KQorICAgICAgICAgKHBhdGNoZXMgcGF0Y2hlcykKKyAgICAgICAgIChtb2R1bGVzIG1vZHVsZXMp CisgICAgICAgICAoc25pcHBldCBzbmlwcGV0KSkpCisgICAgICAoYnVpbGQtc3lzdGVtIGdudS1i dWlsZC1zeXN0ZW0pCisgICAgICAobmF0aXZlLWlucHV0cyAobGlzdCBjbGFuZy10b29sY2hhaW4p KQorICAgICAgKGlucHV0cworICAgICAgIDs7IGlqY29uc29sZSBhbmQgcHJvZmlsZS5panMgc3Rp bGwgcmVxdWlyZSBsYWJlbHMKKyAgICAgICBgKCgiaWpjb25zb2xlIiAsaWpjb25zb2xlKQorICAg ICAgICAgKCJwcm9maWxleC5panMiICwoc2VhcmNoLWF1eGlsaWFyeS1maWxlICJqc29mdHdhcmUv cHJvZmlsZXguaWpzIikpCisgICAgICAgICAoImxpYmVkaXQiICxsaWJlZGl0KQorICAgICAgICAg KCJsaWJvbXAiICxsaWJvbXApCisgICAgICAgICAsQGV4dHJhLWlucHV0cykpCisgICAgICAoYXJn dW1lbnRzCisgICAgICAgYCgjOm1vZHVsZXMgKCgoaWNlLTkgZnR3KSAjOnNlbGVjdCAoc2NhbmRp cikpCisgICAgICAgICAgICAgICAgICAgICgoaWNlLTkgcG9wZW4pICM6c2VsZWN0IChvcGVuLXBp cGUqIGNsb3NlLXBpcGUpKQorICAgICAgICAgICAgICAgICAgICAoKGljZS05IHJlZ2V4KSAjOnNl bGVjdCAobWF0Y2g6c3Vic3RyaW5nIHN0cmluZy1tYXRjaCkpCisgICAgICAgICAgICAgICAgICAg ICgoaWNlLTkgdGhyZWFkcykgIzpzZWxlY3QgKHBhcmFsbGVsIHBhci1mb3ItZWFjaCkpCisgICAg ICAgICAgICAgICAgICAgICgoc3JmaSBzcmZpLTI2KSAjOnNlbGVjdCAoY3V0KSkKKyAgICAgICAg ICAgICAgICAgICAgKChzcmZpIHNyZmktMSkgIzpzZWxlY3QgKGZvbGQpKQorICAgICAgICAgICAg ICAgICAgICAsQCVnbnUtYnVpbGQtc3lzdGVtLW1vZHVsZXMpCisgICAgICAgICAjOnBoYXNlcwor ICAgICAgICAgOzsgVXBzdHJlYW0ncyBidWlsZCBzeXN0ZW0gY29uc2lzdHMgb2YgYWQtaG9jIHNj cmlwdHMgdGhhdCBidWlsZCB1cAorICAgICAgICAgOzsgKHZlcnkgY29tcGxpY2F0ZWQpIGVudmly b25tZW50IHZhcmlhYmxlcyB0byBwYXNzIHRvIG1ha2UuCisgICAgICAgICA7OyBUaGUgYmFzaWMg YnVpbGQgcHJvY2VzcyBsb29rcyBsaWtlIHRoaXM6CisgICAgICAgICA7OworICAgICAgICAgOzsg ICAxKSBDb3B5IGpzcmMvanZlcnNpb24teC5oIHRvIGpzcmMvanZlcnNpb24uaCBhbmQgZWRpdCB2 YWx1ZXM7CisgICAgICAgICA7OyAgIDIpIFNldCBqcGxhdGZvcm0gYW5kIGo2NHggZW52aXJvbm1l bnQgdmFyaWFibGVzOworICAgICAgICAgOzsgICAzKSBSdW4gbWFrZTIvYnVpbGRfamNvbnNvbGUu c2ggYW5kIG1ha2UyL2J1aWxkX2xpYmouc2g7CisgICAgICAgICA7OworICAgICAgICAgOzsgSG93 ZXZlciwgdXBzdHJlYW0gZXhwZWN0cyB1c2VycyB0byBydW4gSiBkaXJlY3RseSBmcm9tIHRoZSBz b3VyY2UKKyAgICAgICAgIDs7IGRpcmVjdG9yeTsgdGhleSBkbyBub3Qgc3VwcGx5IGEgbWFrZSBg aW5zdGFsbCcgdGFyZ2V0LiAgVGh1cyBpdAorICAgICAgICAgOzsgdGFrZXMgc29tZSBtYXNzYWdp bmcgdG8gaW5zdGFsbCBmaWxlcyBpbiBGSFMtc3R5bGUgZGlyZWN0b3JpZXMuCisgICAgICAgICAo bW9kaWZ5LXBoYXNlcyAlc3RhbmRhcmQtcGhhc2VzCisgICAgICAgICAgIDs7IEluIHBhcnRpY3Vs YXIsIHdlIGhhdmUgdG8gc2V0IHVwCisgICAgICAgICAgIDs7CisgICAgICAgICAgIDs7ICAgMSkg anNyYy9qdmVyc2lvbi5oIGFzIGluIGEgdHlwaWNhbCBidWlsZDsKKyAgICAgICAgICAgOzsgICAy KSBqbGlicmFyeS9iaW4vcHJvZmlsZXguaWpzIHRvIHBvaW50IHRvIHdyaXRhYmxlIGRpcmVjdG9y aWVzOworICAgICAgICAgICA7OyAgIDMpIG1ha2UyL2J1aWxkXyouc2ggdG8gcmVzcGVjdCBzdGFu ZGFyZCBidWlsZCBjb252ZW50aW9uczsKKyAgICAgICAgICAgOzsgICA0KSBqc3JjL2pjb25zb2xl LmMgdG8gZml4IGxpYmVkaXQgZGxvcGVuOyBhbmQKKyAgICAgICAgICAgOzsgICA1KSBIYXJkIGNv ZGVkIHJlZmVyZW5jZXMgdG8gYWRkb25zIGRpcmVjdG9yeS4KKyAgICAgICAgICAgKHJlcGxhY2Ug J2NvbmZpZ3VyZQorICAgICAgICAgICAgIChsYW1iZGEqICgjOmtleSB0YXJnZXQgaW5wdXRzIG91 dHB1dHMgIzphbGxvdy1vdGhlci1rZXlzKQorICAgICAgICAgICAgICAgKGxldCogKChjbGFuZy10 b29sY2hhaW4gKGFzc29jLXJlZiBpbnB1dHMgImNsYW5nLXRvb2xjaGFpbiIpKQorICAgICAgICAg ICAgICAgICAgICAgIChjbGFuZyAoc3RyaW5nLWFwcGVuZCBjbGFuZy10b29sY2hhaW4gIi9iaW4v Y2xhbmciKSkKKyAgICAgICAgICAgICAgICAgICAgICAobGliZWRpdCAoYXNzb2MtcmVmIGlucHV0 cyAibGliZWRpdCIpKQorICAgICAgICAgICAgICAgICAgICAgIChvdXQgKGFzc29jLXJlZiBvdXRw dXRzICJvdXQiKSkpCisgICAgICAgICAgICAgICAgIDs7IFNldCB1cCBidWlsZCBjb25zdGFudHMK KyAgICAgICAgICAgICAgICAgKGNvcHktZmlsZSAianNyYy9qdmVyc2lvbi14LmgiICJqc3JjL2p2 ZXJzaW9uLmgiKQorICAgICAgICAgICAgICAgICAoc3Vic3RpdHV0ZSogImpzcmMvanZlcnNpb24u aCIKKyAgICAgICAgICAgICAgICAgICAoKCJeI2RlZmluZSBqdmVyc2lvbi4qJCIpCisgICAgICAg ICAgICAgICAgICAgIChmb3JtYXQgI2YgIiNkZWZpbmUganZlcnNpb24gfnNcbiIgLG1ham9yKSkK KyAgICAgICAgICAgICAgICAgICAoKCJeI2RlZmluZSBqdHlwZS4qJCIpCisgICAgICAgICAgICAg ICAgICAgIChmb3JtYXQgI2YgIiNkZWZpbmUganR5cGUgfnNcbiIKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAsKGpyZWxlYXNlLXN0cmluZyByZWxlYXNlLXR5cGUgbWlub3IpKSkKKyAgICAg ICAgICAgICAgICAgICAoKCJeI2RlZmluZSBqYnVpbGRlci4qJCIpCisgICAgICAgICAgICAgICAg ICAgIChmb3JtYXQgI2YgIiNkZWZpbmUgamJ1aWxkZXIgfnNcbiIgLGJ1aWxkZXIpKSkKKyAgICAg ICAgICAgICAgICAgOzsgTXVuZ2UgdGhlIGJ1aWxkIHNjcmlwdHMgaW50byByZWFzb246CisgICAg ICAgICAgICAgICAgIDs7IDEuIFNob3J0LWNpcmN1aXQgdGhlIGZyYWdpbGUgY29tcGlsZXIgZGV0 ZWN0aW9uOworICAgICAgICAgICAgICAgICA7OyAyLiBNYWtlIHN1cmUgdG8gaW5jbHVkZSBvdXIg Q0ZMQUdTIGFuZCBMRkxBR1M7IGFuZAorICAgICAgICAgICAgICAgICA7OyAzLiBQcm9wYWdhdGUg c2NyaXB0IGVycm9ycyB0byB0b3AgbGV2ZWwuCisgICAgICAgICAgICAgICAgIChmb3ItZWFjaAor ICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoZmlsZSkKKyAgICAgICAgICAgICAgICAgICAgKHdp dGgtZGlyZWN0b3J5LWV4Y3Vyc2lvbiAibWFrZTIiCisgICAgICAgICAgICAgICAgICAgICAgKHN1 YnN0aXR1dGUqIGZpbGUKKyAgICAgICAgICAgICAgICAgICAgICAgIDs7IFRoZSBgY29tcGlsZXIn IHZhcmlhYmxlIGRvZXNuJ3QgcG9pbnQgdG8gdGhlIGFjdHVhbAorICAgICAgICAgICAgICAgICAg ICAgICAgOzsgY29tcGlsZXIuICBJdCBpcyBqdXN0IGEgc3dpdGNoIHRvIHRlbGwgdGhlIGJ1aWxk CisgICAgICAgICAgICAgICAgICAgICAgICA7OyBzY3JpcHRzIHdoZXRoZXIgdG8gdXNlIGdjYy0g b3IgY2xhbmctc3BlY2lmaWMgZmxhZ3MuCisgICAgICAgICAgICAgICAgICAgICAgICAoKCJeY29t cGlsZXI9LiokIikgImNvbXBpbGVyPWNsYW5nXG4iKQorICAgICAgICAgICAgICAgICAgICAgICAg KCgiXkxERkxBR1M9XCIiIGRlZikgKHN0cmluZy1hcHBlbmQgZGVmICIkTERGTEFHUyAiKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICgoIl4oY29tbW9uPVwiKShcXCRVU0VUSFJFQUQuKikkIiBf IGRlZiByZXN0KQorICAgICAgICAgICAgICAgICAgICAgICAgIChzdHJpbmctYXBwZW5kIGRlZiAi JENGTEFHUyAiIHJlc3QpKQorICAgICAgICAgICAgICAgICAgICAgICAgKCgiXiMhLioiIHNoZWJh bmcpCisgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgc2hlYmFuZyAic2V0 IC1vIGVycmV4aXRcbiIpKSkpKQorICAgICAgICAgICAgICAgICAgJygiYnVpbGRfamNvbnNvbGUu c2giICJidWlsZF9saWJqLnNoIikpCisgICAgICAgICAgICAgICAgIDs7IFRoZSBqY29uc29sZSBt YW51YWxseSBsb2FkcyBsaWJlZGl0IHdpdGggZGxvcGVuLiAgVGhlIHBhdGgKKyAgICAgICAgICAg ICAgICAgOzsgbXVzdCBiZSBhYnNvbHV0ZSB0byBjb3JyZWN0bHkgcG9pbnQgdG8gb3VyIGlucHV0 LgorICAgICAgICAgICAgICAgICAoc3Vic3RpdHV0ZSogImpzcmMvamNvbnNvbGUuYyIKKyAgICAg ICAgICAgICAgICAgICAoKCJsaWJlZGl0XFwuc29cXC5bMC05XSIgc28tZmlsZSkKKyAgICAgICAg ICAgICAgICAgICAgKGZvcm1hdCAjZiAifmEvbGliL35hIiBsaWJlZGl0IHNvLWZpbGUpKSkKKyAg ICAgICAgICAgICAgICAgOzsgVGhlIH5hZGRvbnMvZGV2IGRpcmVjdG9yeSBzdXBwbGllcyB0ZW50 YXRpdmUgSi1zY3JpcHQKKyAgICAgICAgICAgICAgICAgOzsgZGVmaW5pdGlvbnMgb2YgbmV3IEog ZW5naW5lIGZ1bmN0aW9uYWxpdHkuICBTaW5jZSB3ZSBwb2ludAorICAgICAgICAgICAgICAgICA7 OyB+YWRkb25zIHVuZGVyIHRoZSB+dXNlciBkaXJlY3RvcnksIHdlIG1vdmUgaXQgdW5kZXIgfnN5 c3RlbQorICAgICAgICAgICAgICAgICA7OyBpbnN0ZWFkLCB3aGljaCBzaXRzIGFzLWlzIGluIHRo ZSBvdXRwdXQuCisgICAgICAgICAgICAgICAgICh3aXRoLWRpcmVjdG9yeS1leGN1cnNpb24gImpz cmMiCisgICAgICAgICAgICAgICAgICAgKGZvci1lYWNoCisgICAgICAgICAgICAgICAgICAgIChs YW1iZGEgKGZpbGUpCisgICAgICAgICAgICAgICAgICAgICAgKHN1YnN0aXR1dGUqIGZpbGUgKCgi fmFkZG9ucy9kZXYiKSAifnN5c3RlbS9kZXYiKSkpCisgICAgICAgICAgICAgICAgICAgIChzY2Fu ZGlyICIuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmRhIChmKSAoZXE/IChz dGF0OnR5cGUgKHN0YXQgZikpICdyZWd1bGFyKSkpKSkKKyAgICAgICAgICAgICAgICAgOzsgSW1w bGVtZW50YXRpb24gb2YgOSE6MTQgcmVjb3JkcyBidWlsZCB0aW1lIHdoaWNoIGJyZWFrcworICAg ICAgICAgICAgICAgICA7OyByZXByb2R1Y2liaWxpdHkuICBOb3RlIHRoYXQgdXBzdHJlYW0gY29k ZSBkZXBlbmRzIG9uIHRoZQorICAgICAgICAgICAgICAgICA7OyBleGFjdCBmb3JtYXQgb2YgdGhl c2Ugc3RyaW5ncywgc28gd2UgbmVlZCB0byBtaW1pYyB0aGUKKyAgICAgICAgICAgICAgICAgOzsg c3RhbmRhcmQuCisgICAgICAgICAgICAgICAgIChzdWJzdGl0dXRlKiAianNyYy9qLmMiCisgICAg ICAgICAgICAgICAgICAgKCgiX19EQVRFX18iKSAiXCJKYW4gMDEgMTk3MFwiIikKKyAgICAgICAg ICAgICAgICAgICAoKCJfX1RJTUVfXyIpICJcIjAwOjAwOjAwXCIiKSkKKyAgICAgICAgICAgICAg ICAgOzsgVXBzdHJlYW0gcmVjb21tZW5kcyB1c2luZyBjbGFuZywgd2l0aCBHQ0Mgc3VwcG9ydCBi ZWluZworICAgICAgICAgICAgICAgICA7OyBzZWNvbmQtY2xhc3MsIG9mdGVuIHJlc3VsdGluZyBp biBidWlsZCBmYWlsdXJlcy4KKyAgICAgICAgICAgICAgICAgKHNldGVudiAiQ0MiIGNsYW5nKSkp KQorCisgICAgICAgICAgIDs7IFRoZSBidWlsZCBvdXRwdXQgZGVwZW5kcyBwcmltYXJpbHkgb24g dGhlIHZhbHVlcyBvZiB0aGUKKyAgICAgICAgICAgOzsgYGpwbGF0Zm9ybScgYW5kIGBqNjR4JyBl bnZpcm9ubWVudCB2YXJpYWJsZXMuICBJZiB0aGUgdGFyZ2V0IGlzCisgICAgICAgICAgIDs7IEFS TSwgdGhlbiBganBsYXRmb3JtJyBpcyAicmFzcGJlcnJ5Iiwgb3RoZXJ3aXNlIGl0IGlzIGBsaW51 eCcuCisgICAgICAgICAgIDs7IEluIGFkZGl0aW9uIHRvIDMyLSBhbmQgNjQtIGJpdCB2ZXJzaW9u cywgYGo2NHgnIGNvbnRyb2xscworICAgICAgICAgICA7OyB3aGV0aGVyIEFWWCBvciBBVlgyIHZh cmlhbnRzIG9mIGxpYmogYXJlIGJ1aWx0LgorICAgICAgICAgICA7OworICAgICAgICAgICA7OyBI b3dldmVyLCBidWlsZCB0YXJnZXRzIGFyZSBub3QgZmluZS1ncmFpbmVkIGVub3VnaCB0byBkaXN0 aW5ndWlzaAorICAgICAgICAgICA7OyBiZXR3ZWVuIENQVSBmZWF0dXJlcy4gIFRodXMgd2UgYnVp bGQgYW5kIGluc3RhbGwgYWxsIHZhcmlhbnRzIG9mCisgICAgICAgICAgIDs7IGxpYmosIGV4cGVj dGluZyBqY29uc29sZSB0byBiZSBjYWxsZWQgd2l0aCBhIHdyYXBwZXIgc2NyaXB0IHRoYXQKKyAg ICAgICAgICAgOzsgZGV0ZWN0cyBBVlggZmVhdHVyZXMgYW5kIGxvYWRzIHRoZSBhcHByb3ByaWF0 ZSBsaWJqIGF0IHJ1bnRpbWUuCisgICAgICAgICAgIChyZXBsYWNlICdidWlsZAorICAgICAgICAg ICAgIChsYW1iZGEgXworICAgICAgICAgICAgICAgKHNldGVudiAiVVNFX09QRU5NUCIgIjEiKQor ICAgICAgICAgICAgICAgKHNldGVudiAiVVNFX1RIUkVBRCIgIjEiKQorICAgICAgICAgICAgICAg KGZvci1lYWNoIChsYW1iZGEgKHZhci12YWwpIChhcHBseSBzZXRlbnYgdmFyLXZhbCkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgKHF1b3RlICxleHRyYS1lbnZhcnMpKQorICAgICAgICAgICAg ICAgOzsgVGhlIGJ1aWxkIHNjcmlwdHMgYXNzdW1lIHRoYXQgUFdEIGlzIG1ha2UyLgorICAgICAg ICAgICAgICAgKHdpdGgtZGlyZWN0b3J5LWV4Y3Vyc2lvbiAibWFrZTIiCisgICAgICAgICAgICAg ICAgIChsZXQqICgocGxhdGZvcm0gLChpZiAodGFyZ2V0LWFybT8pICJyYXNwYmVycnkiICJsaW51 eCIpKQorICAgICAgICAgICAgICAgICAgICAgICAgKHRhcmdldC1iaXQgLChpZiAodGFyZ2V0LTY0 Yml0PykgIjY0IiAiMzIiKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChydW4gKGxhbWJkYSog KHNjcmlwdCAjOmtleSAoYXZ4ICIiKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo aW52b2tlICJlbnYiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3Ry aW5nLWFwcGVuZCAianBsYXRmb3JtPSIgcGxhdGZvcm0pCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoc3RyaW5nLWFwcGVuZCAiajY0eD1qIiB0YXJnZXQtYml0IGF2eCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcmlwdCkpKSkKKyAgICAg ICAgICAgICAgICAgICAocGFyYWxsZWwKKyAgICAgICAgICAgICAgICAgICAgOzsgU2luY2UgamNv bnNvbGUgZG9lc24ndCBkZXBlbmQgb24gQVZYIGZlYXR1cmVzLCB3ZSBqdXN0CisgICAgICAgICAg ICAgICAgICAgIDs7IGJ1aWxkIGl0IG9uY2UuCisgICAgICAgICAgICAgICAgICAgIChydW4gIi4v YnVpbGRfamNvbnNvbGUuc2giKQorICAgICAgICAgICAgICAgICAgICAocnVuICIuL2J1aWxkX2xp Ymouc2giKQorICAgICAgICAgICAgICAgICAgICAod2hlbiAjZmFsc2UgOzsgLCh0YXJnZXQtNjRi aXQ/KQorICAgICAgICAgICAgICAgICAgICAgIChydW4gIi4vYnVpbGRfbGliai5zaCIgIzphdngg ImF2eCIpCisgICAgICAgICAgICAgICAgICAgICAgKHJ1biAiLi9idWlsZF9saWJqLnNoIiAjOmF2 eCAiYXZ4MiIpKSkpKSkpCisgICAgICAgICAgIDs7IFRoZSB0ZXN0IHN1aXRlIGlzIGV4cGVjdGVk IHRvIGJlIHJ1biBhcyBmb2xsb3dzIGZvciBlYWNoIHZhcmlhbnQKKyAgICAgICAgICAgOzsgb2Yg bGliaiB0aGF0IHdlIGJ1aWxkOgorICAgICAgICAgICA7OworICAgICAgICAgICA7OyAgICAgJCBl Y2hvICdSVU4gZGRhbGwnIHwgamNvbnNvbGUgdGVzdC90c3UuaWpzCisgICAgICAgICAgIDs7Cisg ICAgICAgICAgIDs7IFRoaXMgcmVxdWlyZXMgYSB3b3JraW5nIGpjb25zb2xlIHdpdGggYWNjZXNz aWJsZSBqbGlicmFyeSBmaWxlcy4KKyAgICAgICAgICAgOzsgV2Ugc2ltcGx5IHBsYWNlIHRoZXNl IGFsbCB1bmRlciB0ZXN0L2Jpbi4KKyAgICAgICAgICAgKHJlcGxhY2UgJ2NoZWNrCisgICAgICAg ICAgICAgKGxhbWJkYSogKCM6a2V5IHRlc3RzPyAjOmFsbG93LW90aGVyLWtleXMpCisgICAgICAg ICAgICAgICAod2hlbiB0ZXN0cz8KKyAgICAgICAgICAgICAgICAgKGxldCAoKHBsYXRmb3JtICwo aWYgKHRhcmdldC1hcm0/KSAicmFzcGJlcnJ5IiAibGludXgiKSkpCisgICAgICAgICAgICAgICAg ICAgKG1rZGlyLXAgInRlc3QvYmluIikKKyAgICAgICAgICAgICAgICAgICAoZm9yLWVhY2gKKyAg ICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoZGlyKQorICAgICAgICAgICAgICAgICAgICAgIChs ZXQgKChzb3VyY2UgKHN0cmluZy1hcHBlbmQgImpsaWJyYXJ5LyIgZGlyKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoZGVzdCAoc3RyaW5nLWFwcGVuZCAidGVzdC9iaW4vIiBkaXIpKSkK KyAgICAgICAgICAgICAgICAgICAgICAgIChiZWdpbgorICAgICAgICAgICAgICAgICAgICAgICAg ICAobWtkaXItcCBkZXN0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAoY29weS1yZWN1cnNp dmVseSBzb3VyY2UgZGVzdCkpKSkKKyAgICAgICAgICAgICAgICAgICAgJygic3lzdGVtIiAidG9v bHMiICJhZGRvbnMiKSkKKyAgICAgICAgICAgICAgICAgICA7OyBUaGUgamxpYnJhcnkvZGV2IGRp cmVjdG9yeSBvbmx5IGV4aXN0cyBzb21ldGltZXMsIGJ1dAorICAgICAgICAgICAgICAgICAgIDs7 IHdoZW4gaXQgZG9lcywgaXQgbmVlZHMgdG8gYmUgaW4gfnN5c3RlbS4KKyAgICAgICAgICAgICAg ICAgICAoZm9yLWVhY2gKKyAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoZGV2LWRpcikKKyAg ICAgICAgICAgICAgICAgICAgICAoaWYgKGZpbGUtZXhpc3RzPyBkZXYtZGlyKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAoY29weS1yZWN1cnNpdmVseSBkZXYtZGlyICJ0ZXN0L2Jpbi9zeXN0 ZW0vZGV2IikpKQorICAgICAgICAgICAgICAgICAgICAnKCJqbGlicmFyeS9kZXYiICJqbGlicmFy eS9hZGRvbnMvZGV2IikpCisgICAgICAgICAgICAgICAgICAgKHBhci1mb3ItZWFjaAorICAgICAg ICAgICAgICAgICAgICAobGFtYmRhIChkaXIpCisgICAgICAgICAgICAgICAgICAgICAgKGxldCog KChiaW4gKHN0cmluZy1hcHBlbmQgImJpbi8iIHBsYXRmb3JtKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKGpiaXQgLChpZiAodGFyZ2V0LTY0Yml0PykgImo2NCIgImozMiIpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoamNvbnNvbGUgKHN0cmluZy1hcHBlbmQgYmluICIv IiBqYml0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAiL2pjb25zb2xlIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzb3VyY2Ug KHN0cmluZy1hcHBlbmQgYmluICIvIiBkaXIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoZGVzdCAoc3RyaW5nLWFwcGVuZCAidGVzdC9iaW4vIiBkaXIpKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgIChiZWdpbgorICAgICAgICAgICAgICAgICAgICAgICAgICAobWtkaXItcCBkZXN0 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAoY29weS1yZWN1cnNpdmVseSBzb3VyY2UgZGVz dCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGluc3RhbGwtZmlsZSAiamxpYnJhcnkvYmlu L3Byb2ZpbGUuaWpzIiBkZXN0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5zdGFsbC1m aWxlIGpjb25zb2xlIGRlc3QpCisgICAgICAgICAgICAgICAgICAgICAgICAgIChsZXQqICgoamNv bnNvbGUgKHN0cmluZy1hcHBlbmQgZGVzdCAiL2pjb25zb2xlIikpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAodGVzdHMgInRlc3QvdHN1LmlqcyIpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAocG9ydCAob3Blbi1waXBlKiBPUEVOX1dSSVRFIGpjb25zb2xlIHRl c3RzKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRpc3BsYXkgIlJVTiBkZGFsbFxu IiBwb3J0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bmxlc3MgKHplcm8/IChzdGF0 dXM6ZXhpdC12YWwgKGNsb3NlLXBpcGUgcG9ydCkpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGVycm9yICJTb21lIEogYnVpbGQgdGVzdHMgZmFpbGVkLiIpKSkpKSkKKyAgICAgICAg ICAgICAgICAgICAgKHNjYW5kaXIgKHN0cmluZy1hcHBlbmQgImJpbi8iIHBsYXRmb3JtKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobmVnYXRlIChjdXQgbWVtYmVyIDw+ICcoIi4iICIu LiIpKSkpKQorICAgICAgICAgICAgICAgICAgICN0KSkpKQorICAgICAgICAgICA7OyBOb3cgdGhh dCBldmVyeXRoaW5nIGlzIGJ1aWx0LCBpbnN0YWxsYXRpb24gaXMgZmFpcmx5CisgICAgICAgICAg IDs7IHN0cmFpZ2h0Zm9yd2FyZCwgZm9sbG93aW5nIEZIUyBjb252ZW50aW9ucy4gIFRoZSBvbmx5 IHF1aXJrIGlzCisgICAgICAgICAgIDs7IHRoYXQgd2UgaW5zdGFsbCBqY29uc29sZSB1bmRlciAv bGliZXhlYyB0byBtYWtlIHJvb20gZm9yIHRoZQorICAgICAgICAgICA7OyB3cmFwcGVyIHJlcGxh Y2VtZW50IHVuZGVyIC9iaW4uCisgICAgICAgICAgIChyZXBsYWNlICdpbnN0YWxsCisgICAgICAg ICAgICAgKGxhbWJkYSogKCM6a2V5IG91dHB1dHMgaW5wdXRzICM6YWxsb3ctb3RoZXIta2V5cykK KyAgICAgICAgICAgICAgIChsZXQqICgocGxhdGZvcm0gLChpZiAodGFyZ2V0LWFybT8pICJyYXNw YmVycnkiICJsaW51eCIpKQorICAgICAgICAgICAgICAgICAgICAgIChqYml0ICwoaWYgKHRhcmdl dC02NGJpdD8pICJqNjQiICJqMzIiKSkKKyAgICAgICAgICAgICAgICAgICAgICAob3V0IChhc3Nv Yy1yZWYgb3V0cHV0cyAib3V0IikpCisgICAgICAgICAgICAgICAgICAgICAgKGJpbiAoc3RyaW5n LWFwcGVuZCBvdXQgIi9iaW4iKSkKKyAgICAgICAgICAgICAgICAgICAgICAoZXRjIChzdHJpbmct YXBwZW5kIG91dCAiL2V0Yy9qIikpCisgICAgICAgICAgICAgICAgICAgICAgKGxpYiAoc3RyaW5n LWFwcGVuZCBvdXQgIi9saWIvaiIpKQorICAgICAgICAgICAgICAgICAgICAgIChsaWJleGVjIChz dHJpbmctYXBwZW5kIG91dCAiL2xpYmV4ZWMvaiIpKQorICAgICAgICAgICAgICAgICAgICAgIChz aGFyZSAoc3RyaW5nLWFwcGVuZCBvdXQgIi9zaGFyZS9qIikpCisgICAgICAgICAgICAgICAgICAg ICAgKHN5c3RlbSAoc3RyaW5nLWFwcGVuZCBzaGFyZSAiL3N5c3RlbSIpKQorICAgICAgICAgICAg ICAgICAgICAgIChkZXYgKHN0cmluZy1hcHBlbmQgc3lzdGVtICIvZGV2IikpKQorICAgICAgICAg ICAgICAgICAobWtkaXItcCBiaW4pCisgICAgICAgICAgICAgICAgIChjb3B5LWZpbGUgKGFzc29j LXJlZiBpbnB1dHMgImlqY29uc29sZSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0 cmluZy1hcHBlbmQgYmluICIvaWpjb25zb2xlLSIgLG1ham9yKSkKKyAgICAgICAgICAgICAgICAg KG1rZGlyLXAgbGliKQorICAgICAgICAgICAgICAgICAoZm9yLWVhY2gKKyAgICAgICAgICAgICAg ICAgIChsYW1iZGEgKGphcmNoKQorICAgICAgICAgICAgICAgICAgICAobGV0KiAoKGpiaW4gKHN0 cmluZy1qb2luIGAoImJpbiIgLHBsYXRmb3JtICxqYXJjaCkgIi8iKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIChqYXZ4LW1hdGNoIChzdHJpbmctbWF0Y2ggImF2eC4qIiBqYXJjaCkpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAoamF2eCAoaWYgKG5vdCBqYXZ4LW1hdGNoKSAiIgor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYXRjaDpzdWJzdHJpbmcgamF2 eC1tYXRjaCkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNlcCAoaWYgamF2eC1tYXRj aCAiLSIgIiIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNvdXJjZSAoc3RyaW5nLWFw cGVuZCBqYmluICIvbGliai5zbyIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRlc3Qg KGZvcm1hdCAjZiAifmEvbGlian5hfmEuc28iIGxpYiBzZXAgamF2eCkpKQorICAgICAgICAgICAg ICAgICAgICAgIChjb3B5LWZpbGUgc291cmNlIGRlc3QpKSkKKyAgICAgICAgICAgICAgICAgIChz Y2FuZGlyIChzdHJpbmctYXBwZW5kICJiaW4vIiBwbGF0Zm9ybSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIChuZWdhdGUgKGN1dCBtZW1iZXIgPD4gJygiLiIgIi4uIikpKSkpCisgICAgICAg ICAgICAgICAgIChpbnN0YWxsLWZpbGUKKyAgICAgICAgICAgICAgICAgIChzdHJpbmctYXBwZW5k ICJiaW4vIiBwbGF0Zm9ybSAiLyIgamJpdCAiL2pjb25zb2xlIikKKyAgICAgICAgICAgICAgICAg IGxpYmV4ZWMpCisgICAgICAgICAgICAgICAgIChjb3B5LXJlY3Vyc2l2ZWx5ICJqbGlicmFyeS9z eXN0ZW0iIHN5c3RlbSkKKyAgICAgICAgICAgICAgICAgKGZvci1lYWNoCisgICAgICAgICAgICAg ICAgICAobGFtYmRhIChzb3VyY2UtZGV2KQorICAgICAgICAgICAgICAgICAgICAoaWYgKGFjY2Vz cz8gc291cmNlLWRldiBSX09LKQorICAgICAgICAgICAgICAgICAgICAgICAgKGNvcHktcmVjdXJz aXZlbHkgc291cmNlLWRldiBkZXYpKSkKKyAgICAgICAgICAgICAgICAgICcoImpsaWJyYXJ5L2Rl diIgImpsaWJyYXJ5L2FkZG9ucy9kZXYiKSkKKyAgICAgICAgICAgICAgICAgKGluc3RhbGwtZmls ZSAiamxpYnJhcnkvYmluL3Byb2ZpbGUuaWpzIiBldGMpCisgICAgICAgICAgICAgICAgIChjb3B5 LWZpbGUgKGFzc29jLXJlZiBpbnB1dHMgInByb2ZpbGV4LmlqcyIpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgZXRjICIvcHJvZmlsZXguaWpzIikpKSkpKSkpCisg ICAgICAoaG9tZS1wYWdlICJodHRwczovL3d3dy5qc29mdHdhcmUuY29tLyIpCisgICAgICAoc3lu b3BzaXMgIkFzY2lpLW9ubHksIGFycmF5IHByb2dyYW1taW5nIGxhbmd1YWdlIGluIHRoZSBBUEwg ZmFtaWx5IikKKyAgICAgIChkZXNjcmlwdGlvbgorICAgICAgICJKIGlzIGEgaGlnaC1sZXZlbCwg Z2VuZXJhbC1wdXJwb3NlIHByb2dyYW1taW5nIGxhbmd1YWdlIHRoYXQgaXMKK3BhcnRpY3VsYXJs eSBzdWl0ZWQgdG8gdGhlIG1hdGhlbWF0aWNhbCwgc3RhdGlzdGljYWwsIGFuZCBsb2dpY2FsIGFu YWx5c2lzIG9mCitkYXRhLiAgSXQgaXMgYSBwb3dlcmZ1bCB0b29sIGZvciBkZXZlbG9waW5nIGFs Z29yaXRobXMgYW5kIGV4cGxvcmluZyBwcm9ibGVtcwordGhhdCBhcmUgbm90IGFscmVhZHkgd2Vs bCB1bmRlcnN0b29kLiIpCisgICAgICAobGljZW5zZSBsaWNlbnNlOmdwbDMrKSkpKQorCisKKyhk ZWZpbmUtcHVibGljIGpzb2Z0d2FyZS1qLTkwMQorICAobWFrZS1qICI5MDEuZiIKKyAgICAgICAg ICAiMTc3NjAyMW0wajFhYW56d2c2MGJ5ODNuNTNwdzdpNmFmZDV3cGxmemN6d2s4Ynl3YXg0cCIK KyAgICAgICAgICAjOnBhdGNoZXMgKHNlYXJjaC1wYXRjaGVzICJqc29mdHdhcmUtajkwMS1mLWZp eGVzLnBhdGNoIikpKQorCisKKyhkZWZpbmUgai1idWlsZC1jb25maWd1cmF0aW9uLXdpdGgtc2xl ZWYKKyAgOzsgWFhYOiBsYWJlbCByZXF1aXJlZCBiZWNhdXNlIG9mIGlqY29uc29sZSBhbmQgcHJv ZmlsZS5panMgaW4gbWFrZS1qLgorICA7OyAgICAgIGlmIGxhYmVscyBhcmUgZHJvcHBlZCBpbiBt YWtlLWosIGRyb3AgdGhlbSBoZXJlIHRvby4KKyAgOzsgWFhYOiBzbGVlZiBpcyBzdGlsbCBiZWlu ZyBidW5kbGVkIGluIGogYW5kIHVuYnVuZGxpbmcgaXQgY2F1c2VzIGJ1aWxkCisgIDs7ICAgICAg ZXJyb3JzLi4uIGludmVzdGlnYXRlIHRoZW0gYW5kIHVuYnVuZGxlCisgIGAoIzpleHRyYS1pbnB1 dHMgKCgic2xlZWYiICxzbGVlZikpCisgICAgIzpleHRyYS1lbnZhcnMgKCgiVVNFX1NMRUVGX1NS QyIgIjAiKQorICAgICAgICAgICAgICAgICAgICAoIkxERkxBR1MiICItbHNsZWVmIikpKSkKKwor KGRlZmluZS1wdWJsaWMganNvZnR3YXJlLWotOTAyCisgIChhcHBseSBtYWtlLWogIjkwMi5iIgor ICAgICAgICAgIjBqNjd2Z2lrcWZsd2pxYWNzZGljYXN2eXYxazU0czJjOHZqZ3dtZjBpeDdsNDFw NHhxejAiCisgICAgICAgICBqLWJ1aWxkLWNvbmZpZ3VyYXRpb24td2l0aC1zbGVlZikpCisKKyhk ZWZpbmUtcHVibGljIGpzb2Z0d2FyZS1qLTkwMworICAoYXBwbHkgbWFrZS1qICI5MDMuYSIKKyAg ICAgICAgICIxZmNmbDdxN2Mydmo0Zm1ucXFjOGM2aHdnc2ptMjBmZjkzdjh4eGZuaWFzc3MxYjJm bWM0IgorICAgICAgICAgIzp0YWcgIjkwMy1yZWxlYXNlLWEiCisgICAgICAgICBqLWJ1aWxkLWNv bmZpZ3VyYXRpb24td2l0aC1zbGVlZikpCisKKyhkZWZpbmUtcHVibGljIChqc29mdHdhcmUtaWpj b25zb2xlLXN5bWxpbmsganBrZykKKyAgIlByb3ZpZGUgYmluL2lqY29uc29sZSBzeW1saW5rIHRo YXQgcG9pbnRzIHRvIHBrZydzCitiaW4vaWpjb25zb2xlLTxqdmVyc2lvbj4uIgorICAocGFja2Fn ZQorICAgIChuYW1lICJqc29mdHdhcmUtaWpjb25zb2xlIikKKyAgICAodmVyc2lvbiAocGFja2Fn ZS12ZXJzaW9uIGpwa2cpKQorICAgIChzb3VyY2UgI2YpCisgICAgKGJ1aWxkLXN5c3RlbSB0cml2 aWFsLWJ1aWxkLXN5c3RlbSkKKyAgICAocHJvcGFnYXRlZC1pbnB1dHMgYCgoImpwa2ciICxqcGtn KSkpCisgICAgKGFyZ3VtZW50cworICAgICAgYCgjOm1vZHVsZXMgKChndWl4IGJ1aWxkIHV0aWxz KQorICAgICAgICAgICAgICAgICAgIChzcmZpIHNyZmktMjYpKQorICAgICAgICAjOmJ1aWxkZXIK KyAgICAgICAgKGJlZ2luCisgICAgICAgICAgKHVzZS1tb2R1bGVzICgoZ3VpeCBidWlsZCB1dGls cykgIzpzZWxlY3QgKG1rZGlyLXApKQorICAgICAgICAgICAgICAgICAgICAgICAoKGljZS05IHJl Z2V4KSAjOnNlbGVjdCAoc3RyaW5nLW1hdGNoKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKChp Y2UtOSBmdHcpICM6c2VsZWN0IChzY2FuZGlyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKChz cmZpIHNyZmktMjYpICM6c2VsZWN0IChjdXQpKSkKKyAgICAgICAgICAobGV0KiAoKG91dCAoYXNz b2MtcmVmICVvdXRwdXRzICJvdXQiKSkKKyAgICAgICAgICAgICAgICAgKGpwa2cgKGFzc29jLXJl ZiAlYnVpbGQtaW5wdXRzICJqcGtnIikpCisgICAgICAgICAgICAgICAgIChpamNvbnNvbGUgKGNh ciAoc2NhbmRpciAoc3RyaW5nLWFwcGVuZCBqcGtnICIvYmluIikKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChjdXQgc3RyaW5nLW1hdGNoICJpamNvbnNvbGUtLioiIDw+ KSkpKQorICAgICAgICAgICAgICAgICAoc291cmNlIChzdHJpbmctYXBwZW5kIGpwa2cgIi9iaW4v IiBpamNvbnNvbGUpKQorICAgICAgICAgICAgICAgICAoZGVzdCAoc3RyaW5nLWFwcGVuZCBvdXQg Ii9iaW4vaWpjb25zb2xlIikpKQorICAgICAgICAgICAgKG1rZGlyLXAgKGRpcm5hbWUgZGVzdCkp CisgICAgICAgICAgICAoc3ltbGluayBzb3VyY2UgZGVzdCkpKSkpCisgIChob21lLXBhZ2UgKHBh Y2thZ2UtaG9tZS1wYWdlIGpwa2cpKQorICAoc3lub3BzaXMgIlByb3ZpZGUgYGlqY29uc29sZScg c3ltbGluayB0byBkZWZhdWx0IGludGVycHJldGVyIHZlcnNpb24iKQorICAoZGVzY3JpcHRpb24K KyAgIlRoZSBpbnRlcnByZXRlciBwcm92aWRlZCBieSB0aGUgSiBwYWNrYWdlIGhhcyBhIGZpbGVu YW1lIGxpa2UKK2lqY29uc29sZS08dmVyc2lvbj4sIHdoaWNoIHByb3ZpZGVzIHN1cHBvcnQgZm9y IGhhdmluZyBtdWx0aXBsZSwgY29uY3VycmVudAordmVyc2lvbnMgaW5zdGFsbGVkLiAgVGhpcyBw YWNrYWdlIHByb3ZpZGVzIGEgdmVyc2lvbi1hZ25vc3RpYyBgaWpjb25zb2xlJworc3ltbGluayB0 byBpbnRlcnByZXRlciB2ZXJzaW9uIGluZGljYXRlZCBhbmQgYnVpbGQgdGltZS4iKQorICAobGlj ZW5zZSBsaWNlbnNlOmdwbDMrKSkpCmRpZmYgLS1naXQgYS9nbnUvcGFja2FnZXMvcGF0Y2hlcy9q c29mdHdhcmUtajkwMS1mLWZpeGVzLnBhdGNoIGIvZ251L3BhY2thZ2VzL3BhdGNoZXMvanNvZnR3 YXJlLWo5MDEtZi1maXhlcy5wYXRjaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAw MDAwLi4wYWM3ZTk0ZGU0Ci0tLSAvZGV2L251bGwKKysrIGIvZ251L3BhY2thZ2VzL3BhdGNoZXMv anNvZnR3YXJlLWo5MDEtZi1maXhlcy5wYXRjaApAQCAtMCwwICsxLDgwIEBACitUaGlzIHBhdGNo IGZpeGVzIHR3byBzZXBhcmF0ZSBpc3N1ZXMgd2l0aCB1c3RyZWFtIHNvdXJjZXM6CisKKyogTm9y bWFsaXplIGltcG9ydCBwYXRocyBpbiBqc3JjL2NpcC5jCisKK1Vwc3RyZWFtIGNsYWltcyB0byBo YXZlIHNvbWUgYnVpbGQgcmVxdWlyZW1lbnRzIHRoYXQgZm9yY2UgdGhlbSB0byB1c2Ugc3RyYW5n ZQoraW1wb3J0IHBhdGhzLiBIb3dldmVyLCB0aGVzZSBwYXRocyBkbyBub3QgZXhpc3QgaW5zaWRl IG91ciBidWlsZCBjaHJvb3QuCisKKyogRml4IHVuaXRpdGlhbGl6ZWQgdmFyaWFibGUgd2Fybmlu ZworCitDbGFuZyA5IGlzc3VlcyBzb21lIHdhcm5pbmdzIHdoaWNoIGNhdXNlIHRoZSBidWlsZCB0 byBmYWlsIHNpbmNlIHVwc3RyZWFtCitjb21waWxlcyB3aXRoIC1XZXJyb3IuCisKKworZGlmZiAt LWdpdCBhL2pzcmMvY2lwLmMgYi9qc3JjL2NpcC5jCitpbmRleCA2MWRhNDA4OC4uZmIzYzAzYjYg MTAwNjQ0CistLS0gYS9qc3JjL2NpcC5jCisrKysgYi9qc3JjL2NpcC5jCitAQCAtMyw5ICszLDkg QEAKKyAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAqLworIC8qIENvbmp1bmN0aW9uczogSW5uZXIgUHJvZHVj dCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgCistI2lu Y2x1ZGUgIi4uLy4uL2pzb3VyY2UvanNyYy9qLmgiCistI2luY2x1ZGUgIi4uLy4uL2pzb3VyY2Uv anNyYy92YXNtLmgiCistI2luY2x1ZGUgIi4uLy4uL2pzb3VyY2UvanNyYy9nZW1tLmgiCisrI2lu Y2x1ZGUgImouaCIKKysjaW5jbHVkZSAidmFzbS5oIgorKyNpbmNsdWRlICJnZW1tLmgiCisgCisg I2RlZmluZSBNQVhBUk9XUyAzODQgIC8vIG1heCByb3dzIG9mIGEgdGhhdCB3ZSBjYW4gcHJvY2Vz cyB0byBzdGF5IGluIEwyIGNhY2hlICAgYSBzdHJpcCBpcyBtKkNBQ0hFSEVJR0hULCB6IHN0cmlw IGlzIG0qQ0FDSEVXSURUSCAgIHRoaXMgaXMgd2lyZWQgdG8gMTI4KjMgLSBjaGVjayBpZiB5b3Ug Y2hhZ2UKKyAKK0BAIC0xMDU3LDE1ICsxMDU3LDE1IEBAIHN0YXRpYyBBIGp0aXBieChKIGp0LEEg YSxBIHcsQyBjLEMgZCl7QSBnPTAseDAseDEsejtCKmF2LCphdjAsYiwqdjAsKnYxLCp6djtDIGMw CisgIHN3aXRjaChjKXsKKyAgIGNhc2UgQ1BMVVNET1Q6CisgI2RlZmluZSBGIHw9CistI2luY2x1 ZGUgIi4uLy4uL2pzb3VyY2UvanNyYy9jaXBfdC5oIgorKyNpbmNsdWRlICJjaXBfdC5oIgorICAg IGJyZWFrOworICAgY2FzZSBDU1RBUkRPVDoKKyAjZGVmaW5lIEYgJj0KKy0jaW5jbHVkZSAiLi4v Li4vanNvdXJjZS9qc3JjL2NpcF90LmgiCisrI2luY2x1ZGUgImNpcF90LmgiCisgICAgYnJlYWs7 CisgICBjYXNlIENORToKKyAjZGVmaW5lIEYgXj0KKy0jaW5jbHVkZSAiLi4vLi4vanNvdXJjZS9q c3JjL2NpcF90LmgiCisrI2luY2x1ZGUgImNpcF90LmgiCisgICAgYnJlYWs7CisgIH0KKyAgUiB6 OworZGlmZiAtLWdpdCBhL2pzcmMvZ2VtbS5jIGIvanNyYy9nZW1tLmMKK2luZGV4IDUxZmUzMDZl Li5iMTA1ZGZjMSAxMDA2NDQKKy0tLSBhL2pzcmMvZ2VtbS5jCisrKysgYi9qc3JjL2dlbW0uYwor QEAgLTMxOCw3ICszMTgsNyBAQCBkZ2VtbV9ubiAgICAgICAgIChJICAgICAgICAgICAgICBtLAor ICAgICAgICAgICAgICAgICAgICBfQik7CisgCisgLy8gbG9vcCAzCistICAgICAgICAgICAgSSBp OworKyAgICAgICAgICAgIEkgaT0wOworICNwcmFnbWEgb21wIHBhcmFsbGVsIGZvciBkZWZhdWx0 KG5vbmUpLHByaXZhdGUoaSksc2hhcmVkKGosbCxBLEMsbWIsbmMsa2MsYWxwaGEsX2JldGEsX21j LF9CLHJzX2EsY3NfYSxyc19jLGNzX2MpCisgICAgICAgICAgICAgZm9yIChpPTA7IGk8bWI7ICsr aSkgeworICAgICAgICAgICAgICAgICBJIG1jOworQEAgLTUwMSw3ICs1MDEsNyBAQCBpZ2VtbV9u biAgICAgICAgIChJICAgICAgICAgICAgICBtLAorICAgICAgICAgICAgICAgICAgICBfQik7Cisg CisgLy8gbG9vcCAzCistICAgICAgICAgICAgSSBpOworKyAgICAgICAgICAgIEkgaT0wOworICNw cmFnbWEgb21wIHBhcmFsbGVsIGZvciBkZWZhdWx0KG5vbmUpLHByaXZhdGUoaSksc2hhcmVkKGos bCxBLEMsbWIsbmMsa2MsYWxwaGEsX2JldGEsX21jLF9CLHJzX2EsY3NfYSxyc19jLGNzX2MpCisg ICAgICAgICAgICAgZm9yIChpPTA7IGk8bWI7ICsraSkgeworICAgICAgICAgICAgICAgICBJIG1j OworQEAgLTgzMSw3ICs4MzEsNyBAQCB6Z2VtbV9ubiAgICAgICAgIChJICAgICAgICAgICAgICBt LAorICAgICAgICAgICAgICAgICAgICBfQik7CisgCisgLy8gbG9vcCAzCistICAgICAgICAgICAg SSBpOworKyAgICAgICAgICAgIEkgaT0wOworICNwcmFnbWEgb21wIHBhcmFsbGVsIGZvciBkZWZh dWx0KG5vbmUpLHByaXZhdGUoaSksc2hhcmVkKGosbCxBLEMsbWIsbmMsa2MsYWxwaGEsX2JldGEs X21jLF9CLHJzX2EsY3NfYSxyc19jLGNzX2MpCisgICAgICAgICAgICAgZm9yIChpPTA7IGk8bWI7 ICsraSkgeworICAgICAgICAgICAgICAgICBJIG1jOwotLSAKMi4zNC4wCgo= --=-c3Qhk/j28Tbyho3MHPTw--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 17 Jan 2022 01:25:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 16 20:25:15 2022 Received: from localhost ([127.0.0.1]:44533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n9Glg-0000rm-Pk for submit <at> debbugs.gnu.org; Sun, 16 Jan 2022 20:25:15 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:13694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n9Gle-0000rB-5k for 48463 <at> debbugs.gnu.org; Sun, 16 Jan 2022 20:25:07 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1642382706; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=3w2pKe0BfwFJ1d1bCwlONmtFn6l+i+zE3c/07Wl7RnU=; b=cbCSK2GyySLSX7mXHQkp5aw3FnRWk945/WgbGPovsvsfqa6VC/qUwMSvN14toco1WiaDokgW B1lBtLukNYLVAGAb9urrgPBPjTYj9a28Pp3sh+Nks2vxbXlX1svUqibpJNN+P39e/X6b3zzf zCKLZCaBF3gfUJXS6x1eNeI/b/ljastbl2Ml4Pe1DsskWou1JJTv9Up3qmXVH3XMbrusxFr1 nSC6xpWxMM0sLFBBeqYAIafa4QIzjvZ4RZgjvD/a6C0QMRfURWIe/1gnuCkYms31MhOpmwPN /pmURVr3wFjcgPJ9Qg/VCFI0l+skqailk0v50njq6uB6JRthQHyVnQ== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 61e4c56ce0071250cf85429f (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Mon, 17 Jan 2022 01:24:59 GMT Received: from localhost (q045100.dynamic.ppp.asahi-net.or.jp [203.181.45.100]) by wilsonb.com (Postfix) with ESMTPSA id AEC4DA04CC; Mon, 17 Jan 2022 01:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1642382694; bh=3w2pKe0BfwFJ1d1bCwlONmtFn6l+i+zE3c/07Wl7RnU=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=j4Z7z6S/rbCwBrL3cjd+mKkFEir/+6OaGqHs93P0V9bHzDv4dGBRjZlZdbVDLUpDE mV2/3PYTQ35G6iuexvSt/9nuLpjtzEGeDOZAux6DPP/VT+zcKKfR/k3i2Y4drl++Og IjdphI2R/JB4ZwCvC9P8mMYxLqGMTCAKrldLxXjA6VzYSsFWYg0qhlfUgvORb42ByL IiRQGEe2kzNJin4FQyIfBrQGnvpLqnhyQaCADaZzEY6LFcpM+Seai5ZIzPEQDaqmBN KNnnJOkY8uCHclm+1fHEEs1CU43au1RBBLKbb4bNmXG0FwvwDUOwy/x18gq2U7GhxV O+FH3B4KA5HEIahjNDZUWO2FU52hxCJfHqTtOTrOWRhiFxXb5QizxqioX+XBBuiy1e WZ+KjMVKHvb7TEeHaJK1RBNgCYGJqQjmiiibPNpu6QwMG/q3fvJ8UDiqNJDRzleJbN FjlXFNWvcroqGlfG9iYlfq6k44eG+Tt17ITBrI93xRTdBMVi0xD4bJsPvIye1ZeD0v 2EiXKSoqRJ84hT9wgb1Ftk2lflCL7guEsTr5J5OvuGTuoBWAg+Pbu92kXz1GoEiDI9 qFgwl7XZCCswKcgsDTQ+ZhQouWAajy0EQlojnj0VEBIWv6krdXCZY2Azbx8eHKkTAx L7MB8BW9XyobO8lspmwhZ7kA= Date: Mon, 17 Jan 2022 10:24:49 +0900 To: Liliana Marie Prikler <liliana.prikler@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> <de0a87c99fdbec2475b02fb87cba8e2d17ff26ce.camel@HIDDEN> <24FU0VP6N4ZZ7.3PE5LG30BSNUQ@HIDDEN> <e1aa36040fe6bb590834410d482bb8027603f2cc.camel@HIDDEN> In-Reply-To: <e1aa36040fe6bb590834410d482bb8027603f2cc.camel@HIDDEN> Message-Id: <2EZU214MJAIBY.3EXSPSUMS5WW5@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_164079252dd080b57e5a8564_=_" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_164079252dd080b57e5a8564_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Again, thanks for the consistent quick turn-around, lately. > > How about we just go ahead and treat MINOR as mandatory as well? > In other words minor should always have a value >=3D "a" and 902 was just= > missing it? Fair enough, in that case making version mandatory sounds > like the way to go. Exactly. Thanks to your close reading of the patch and your opinionated suggestions,= we were able to catch this > > The file-union seems like a cludgy workaround to me. What we really > > want is an easy, direct way to get handles on the input files. Heck, > > program-file objects already have a name property; why can't we use > > that? Attached patches are a proof-of-concept. > That proof of concept does look nice, but for one we're trying to move > away from labels, and for the other, it's on a scale that I don't want > to decide as part of a package addition. If you feel it has value > outside of the proposed usage for j, discussing it under a different > number or perhaps on guix-devel might be worth it. Of course. It would be kind of ridiculous to merge some random, only vaguel= y related patch deep in the internals of the system, as part of a simple pack= age addendum. We're not writing bills for the Senate here! Whether or not the patch is valuable, I could learn a lot from any ensuing discussion, so I might take up your idea to post separately. > > That said, if this is going to turn into a big rabbit hole, can we just= > > munge the J package inputs into whatever you think is best? > As said in my previous mail, that'd be > > > (define jsoftware-aux-files > > > (file-union "jsoftware-aux-files" > > > `(("profile.ijs" ,(search-aux-file ...) > > > ("ijconsole" ,(program-file ...)))) > In my personal opinion, you can then simply add jsoftware-aux-files as > input and (search-input-file "ijconsole") instead of the current assoc- > ref. WDYT? Sounds clear to me! However, for some reason, right now if 'search-auxiliary-file' is inside a file-union, I'm getting ENOENT on the file somewhere: Backtrace: 2 (primitive-load "/gnu/store/fk7mr923n47r7wj7xqlfmh80jc5?")= In ice-9/eval.scm: 619:8 1 (_ #f) In unknown file: 0 (stat "/home/x/devel/org.gnu.savannah/guix/gnu/package?" ?= ) ERROR: In procedure stat: In procedure stat: No such file or directory: "/home/x/devel/org.gnu.sa= vannah/guix/gnu/packages/aux-files/jsoftware/profilex.ijs" builder for `/gnu/store/4zhrg7g17bqpmlgp5i58vbsc5g8xsl1s-jsoftware-aux-= files.drv' failed with exit code 1 build of /gnu/store/4zhrg7g17bqpmlgp5i58vbsc5g8xsl1s-jsoftware-aux-file= s.drv failed View build log at '/var/log/guix/drvs/4z/hrg7g17bqpmlgp5i58vbsc5g8xsl1s= -jsoftware-aux-files.drv.bz2'. cannot build derivation `/gnu/store/ax3nwc5xybqcirxadm4ynz99jsq3l3j7-js= oftware-j-903.a.drv': 1 dependencies couldn't be built guix build: error: build of `/gnu/store/ax3nwc5xybqcirxadm4ynz99jsq3l3j= 7-jsoftware-j-903.a.drv' failed Running `stat <path>` from the command line on the offending path succeeds = as expected, and moving the 'search-auxiliary-file' out of the file-union and into the package inputs lets the build proceed. I'm stumped. Attached is the package definition, for reference. > Don't worry, I don't plan to drag this out too long, but I also don't > planning on pushing this today. There are definitely some stylistic > choices that I want to make under the considerations here (basically, > we can just merge major and minor into a single base that'd be "903.a", > for example), but it's almost bedtime and I want to relax a little > before going to sleep. Sure. I'm mostly just way out of my depth here, getting sent on deep rabbit-holes every time you respond give me some feedback to chew on. :P Definitely down for some stylistic improvements. Let me know! Hope you got some nice relaxation time in! ------_=_164079252dd080b57e5a8564_=_ Content-Disposition: attachment; filename=jsoftware.scm Content-Type: text/plain Content-Transfer-Encoding: quoted-printable ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages jsoftware) #:use-module (guix build utils) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) #:use-module (gnu packages maths) #:use-module (guix gexp) #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 rdelim) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-71)) ;;; TODO: Make importer and packages for J addons: ;;; http://www.jsoftware.com/jal/ ;;; TODO: Package up j80x series (define (jname prefix release-type) "Return a package name for J, including RELEASE-TYPE only if not 'release= ." (match release-type ('release prefix) (_ (string-append prefix "-" (symbol->string release-type))))) ;; We want a version string where packages specifications like pkg@MAJOR wo= rk. ;; This requires that the first version part separator be dot. Subsequent ;; separators are hyphen, mirror `git-version' etc. (define* (jversion->string major minor #:optional revision commit) "Return a version string formatted like MAJOR.MINOR-REVISION-COMMIT. Onl= y MAJOR is required, and MINOR defaults to ``0'' if not supplied." (let* ((commit (and commit (string-take commit 7))) (sub-parts (filter (cut (compose not eq?) #f <>) (list minor revision commit)))) (string-append major "." (string-join sub-parts "-")))) (define* (jrelease-string release-type #:optional version-minor) "Construct J release identifier string." (let ((release-type (symbol->string release-type))) (if version-minor (string-append release-type "-" version-minor) release-type))) (define* (jinfo->git-tag version-major release-type #:optional version-mino= r) "Given version parameters, construct a git tag for upstream releases." (string-append "j" version-major (jrelease-string release-type version-mi= nor))) (define jsoftware-aux-files (file-union "jsoftware-aux-files" ;; profilex.ijs overrides ~install and ~addons directories to reside u= nder ;; the user-writable ~user. This allows local-install of addons via ;; pacman. ;; TODO: Guix-ify J addons as well. `(("profilex.ijs" ,(search-auxiliary-file "jsoftware/profilex.ijs")) ;; Gexp script that detects AVX/AVX2 support at runtime and executes ;; jconsole with the appropriate libj.so and profile.ijs." ("ijconsole" ,(with-imported-modules '((guix cpu) (guix memoization) (guix profiling) (guix sets) (srfi srfi-26)) (program-file "ijconsole" #~(begin (use-modules ((guix cpu) #:select (cpu-flags current-cpu= )) ((guix sets) #:select (set-contains?)) ((srfi srfi-26) #:select (cute))) ;; Assume that this script will be installed under bin/. (define %basedir (dirname (dirname (current-filename)))) (let* ((jconsole (string-append %basedir "/libexec/j/jconsol= e")) (cpu-has-flag? (cute set-contains? (cpu-flags (current-cpu)) <>)) (libj (format #f "~a/lib/j/libj~a.so" %basedir (cond ((cpu-has-flag? "avx2") "-avx2") ((cpu-has-flag? "avx") "-avx") (else "")))) (jprofile (string-append %basedir "/etc/j/profile.ijs= "))) (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jprofile (cdr (command-line))))))))))) (define* (make-j #:key version revision hash tag commit (release-type 'release) (patches '()) (extra-inputs '()) (extra-envars '()) (builder "guix.gnu.org")) (let* ((version-major version-minor (if (pair? version) (car+cdr version) (values version #f)))) (package (name (jname "jsoftware-j" release-type)) (version (jversion->string version-major version-minor revision commit))= (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/jsoftware/jsource") (commit (or commit tag (jinfo->git-tag version-major release-type version-minor))))) (sha256 (base32 hash)) (file-name (git-file-name name version)) (patches patches))) (build-system gnu-build-system) (native-inputs (list clang-toolchain)) (inputs (cons* libedit libomp jsoftware-aux-files extra-inputs)) (arguments `(#:tests? #f #:modules (((ice-9 ftw) #:select (scandir)) ((ice-9 popen) #:select (open-pipe* close-pipe)) ((ice-9 regex) #:select (match:substring string-match)) ((ice-9 threads) #:select (parallel par-for-each)) ((srfi srfi-26) #:select (cut)) ((srfi srfi-1) #:select (fold)) ,@%gnu-build-system-modules) #:phases ;; Upstream's build system consists of ad-hoc scripts that build buil= d up ;; (very complicated) environment variables to pass to make. The bas= ic ;; build process looks like this: ;; ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values; ;; 2) Set jplatform and j64x environment variables; ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; ;; ;; However, upstream expects users to run J directly from the source ;; directory; they do not supply a make `install' target. Thus it ta= kes ;; some massaging to install files in FHS-style directories. (modify-phases %standard-phases ;; In particular, we have to set up ;; ;; 1) jsrc/jversion.h as in a typical build; ;; 2) jlibrary/bin/profilex.ijs to point to writable directories;= ;; 3) make2/build_*.sh to respect standard build conventions; ;; 4) jsrc/jconsole.c to fix libedit dlopen; and ;; 5) Hard coded references to addons directory. (replace 'configure (lambda* (#:key target inputs outputs #:allow-other-keys) (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")) (clang (string-append clang-toolchain "/bin/clang")) (libedit (assoc-ref inputs "libedit")) (out (assoc-ref outputs "out"))) ;; Set up build constants (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") (substitute* "jsrc/jversion.h" (("^#define jversion.*$") (format #f "#define jversion ~s\n" ,version-major)) (("^#define jtype.*$") (format #f "#define jtype ~s\n" ,(jrelease-string release-type version-minor))) (("^#define jbuilder.*$") (format #f "#define jbuilder ~s\n" ,builder))) ;; Munge the build scripts into reason: ;; 1. Short-circuit the fragile compiler detection; ;; 2. Make sure to include our CFLAGS and LFLAGS; and ;; 3. Propagate script errors to top level. (for-each (lambda (file) (with-directory-excursion "make2" (substitute* file ;; The `compiler' variable doesn't point to the actual= ;; compiler. It is just a switch to tell the build ;; scripts whether to use gcc- or clang-specific flags= =2E (("^compiler=3D.*$") "compiler=3Dclang\n") (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS ")= ) (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) (string-append def "$CFLAGS " rest)) (("^#!.*" shebang) (string-append shebang "set -o errexit\n"))))) '("build_jconsole.sh" "build_libj.sh")) ;; The jconsole manually loads libedit with dlopen. The path= ;; must be absolute to correctly point to our input. (substitute* "jsrc/jconsole.c" (("libedit\\.so\\.[0-9]" so-file) (format #f "~a/lib/~a" libedit so-file))) ;; The ~addons/dev directory supplies tentative J-script ;; definitions of new J engine functionality. Since we point= ;; ~addons under the ~user directory, we move it under ~syste= m ;; instead, which sits as-is in the output. (with-directory-excursion "jsrc" (for-each (lambda (file) (substitute* file (("~addons/dev") "~system/dev"))) (scandir "." (lambda (f) (eq? (stat:type (stat f)) 'regular))))) ;; Implementation of 9!:14 records build time which breaks bu= ild ;; reproducibility. Note that upstream code depends on the e= xact ;; format of these strings, so we need to mimic the standard.= (substitute* "jsrc/j.c" (("__DATE__") "\"Jan 01 1970\"") (("__TIME__") "\"00:00:00\"")) ;; Upstream recommends using clang, with GCC support being ;; second-class, often resulting in build failures. (setenv "CC" clang)))) ;; The build output depends primarily on the values of the `jplatfo= rm' ;; and `j64x' environment variables. If the target is ARM, then ;; `jplatform' is "raspberry", otherwise it is `linux'. In additio= n to ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX2 ;; variants of libj are built. ;; ;; However, build targets are not fine-grained enough to distinguis= h ;; between CPU features. Thus we build and install all variants of= ;; libj, expecting jconsole to be called with a wrapper script that= ;; detects AVX features and loads the appropriate libj at runtime. (replace 'build (lambda _ (setenv "USE_OPENMP" "1") (setenv "USE_THREAD" "1") (for-each (lambda (var-val) (apply setenv var-val)) (quote ,extra-envars)) ;; The build scripts assume that PWD is make2. (with-directory-excursion "make2" (let* ((platform ,(if (target-arm?) "raspberry" "linux")) (target-bit ,(if (target-64bit?) "64" "32")) (run (lambda* (script #:key (avx "")) (invoke "env" (string-append "jplatform=3D" platform)= (string-append "j64x=3Dj" target-bit av= x) script)))) (parallel ;; Since jconsole doesn't depend on AVX features, we just= ;; build it once. (run "./build_jconsole.sh") (run "./build_libj.sh") (if ,(target-64bit?) (parallel (run "./build_libj.sh" #:avx "avx") (run "./build_libj.sh" #:avx "avx2")))))))) ;; The test suite is expected to be run as follows for each variant= of ;; libj that we build: ;; ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs ;; ;; This requires a working jconsole with accessible jlibrary files.= We ;; simply place these all under test/bin. (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (let ((platform ,(if (target-arm?) "raspberry" "linux"))) (mkdir-p "test/bin") (for-each (lambda (dir) (let ((source (string-append "jlibrary/" dir)) (dest (string-append "test/bin/" dir))) (begin (mkdir-p dest) (copy-recursively source dest)))) '("system" "tools" "addons")) ;; The jlibrary/dev directory only sometimes exists, but ne= eds ;; to be copied into the ~system directory when it does. (for-each (lambda (dev-dir) (if (file-exists? dev-dir) (copy-recursively dev-dir "test/bin/system/dev"))) '("jlibrary/dev" "jlibrary/addons/dev")) (par-for-each (lambda (dir) (let* ((bin (string-append "bin/" platform)) (jbit ,(if (target-64bit?) "j64" "j32")) (jconsole (string-append bin "/" jbit "/jconsole")) (source (string-append bin "/" dir)) (dest (string-append "test/bin/" dir))) (begin (mkdir-p dest) (copy-recursively source dest) (install-file "jlibrary/bin/profile.ijs" dest) (install-file jconsole dest) (let* ((jconsole (string-append dest "/jconsole")) (tests "test/tsu.ijs") (port (open-pipe* OPEN_WRITE jconsole tests)= )) (display "RUN ddall\n" port) (when (not (zero? (status:exit-val (close-pipe port)))) (error "Some J build tests failed.")))))) (scandir (string-append "bin/" platform) (negate (cut member <> '("." ".."))))) #t)))) ;; Now that everything is built, installation is fairly ;; straightforward, following FHS conventions. The only quirk is t= hat ;; we install jconsole under /libexec to make room for the wrapper ;; replacement under /bin. (replace 'install (lambda* (#:key outputs inputs #:allow-other-keys) (let* ((platform ,(if (target-arm?) "raspberry" "linux")) (jbit ,(if (target-64bit?) "j64" "j32")) (out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (etc (string-append out "/etc/j")) (lib (string-append out "/lib/j")) (libexec (string-append out "/libexec/j")) (share (string-append out "/share/j")) (system (string-append share "/system")) (dev (string-append system "/dev"))) (mkdir-p bin) (copy-file (search-input-file inputs "ijconsole") (string-append bin "/ijconsole-" ,version-major)) (mkdir-p lib) (for-each (lambda (jarch) (let* ((jbin (string-join `("bin" ,platform ,jarch) "/"))= (javx-match (string-match "avx.*" jarch)) (javx (if (not javx-match) "" (match:substring javx-match))) (sep (if javx-match "-" "")) (source (string-append jbin "/libj.so")) (dest (format #f "~a/libj~a~a.so" lib sep javx))) (copy-file source dest))) (scandir (string-append "bin/" platform) (negate (cut member <> '("." ".."))))) (install-file (string-append "bin/" platform "/" jbit "/jcons= ole") libexec) (copy-recursively "jlibrary/system" system) (for-each (lambda (source-dev) (if (access? source-dev R_OK) (copy-recursively source-dev dev))) '("jlibrary/dev" "jlibrary/addons/dev")) (install-file "jlibrary/bin/profile.ijs" etc) (install-file (search-input-file inputs "profilex.ijs") etc))))))) (home-page "https://www.jsoftware.com/") (synopsis "Ascii-only, array programming language in the APL family") (description "J is a high-level, general-purpose programming language that is particularly suited to the mathematical, statistical, and logical analysis = of data. It is a powerful tool for developing algorithms and exploring proble= ms that are not already well understood.") (license license:gpl3+)))) (define-public jsoftware-j-901 (make-j #:version '("901" . "f") #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) (define j-build-configuration-with-sleef `(#:extra-inputs (,sleef) #:extra-envars (("USE_SLEEF_SRC" "0") ("LDFLAGS" "-lsleef")))) (define-public jsoftware-j-902 (apply make-j (append j-build-configuration-with-sleef `(#:version ,'("902" . "b") #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))) (define-public jsoftware-j-903 (apply make-j (append j-build-configuration-with-sleef `(#:version ,'("903" . "a") #:tag "903-release-a" #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))) (define-public (jsoftware-ijconsole-symlink jpkg) "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jversi= on>" (package (name "jsoftware-ijconsole") (version (package-version jpkg)) (source #f) (build-system trivial-build-system) (propagated-inputs `(("jpkg" ,jpkg))) (arguments `(#:modules ((guix build utils) (srfi srfi-26)) #:builder (begin (use-modules ((guix build utils) #:select (mkdir-p)) ((ice-9 regex) #:select (string-match)) ((ice-9 ftw) #:select (scandir)) ((srfi srfi-26) #:select (cut))) (let* ((out (assoc-ref %outputs "out")) (jpkg (assoc-ref %build-inputs "jpkg")) (ijconsole (car (scandir (string-append jpkg "/bin") (cut string-match "ijconsole-.*" <>)= ))) (source (string-append jpkg "/bin/" ijconsole)) (dest (string-append out "/bin/ijconsole"))) (mkdir-p (dirname dest)) (symlink source dest))))) (home-page (package-home-page jpkg)) (synopsis "Provide `ijconsole' symlink to default interpreter version") (description "The interpreter provided by the J package has a filename like ijconsole-<version>, which provides support for having multiple, concurrent= versions installed. This package provides a version-agnostic `ijconsole' symlink to interpreter version indicated and build time.") (license license:gpl3+))) ------_=_164079252dd080b57e5a8564_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 16 Jan 2022 19:53:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 16 14:53:39 2022 Received: from localhost ([127.0.0.1]:44304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n9Bat-00054t-HD for submit <at> debbugs.gnu.org; Sun, 16 Jan 2022 14:53:39 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1n9Bar-00054g-Nf for 48463 <at> debbugs.gnu.org; Sun, 16 Jan 2022 14:53:38 -0500 Received: by mail-wm1-f65.google.com with SMTP id 25-20020a05600c231900b003497473a9c4so19485562wmo.5 for <48463 <at> debbugs.gnu.org>; Sun, 16 Jan 2022 11:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=tlTC491pnqjsi565i7zJHtObnMseSjyX9hffAsKUMmk=; b=Mqx0+9qGt1XdeaiwX13jNS2lRd4IfqxT6N7Sp+HYWoEIB09ydcBp/+hIQDl6/TfaA3 v+WCSR4bJNR9RAgMhiasT9NCkiKNsoAMzaFHJwQsU0sigQkVUSArr3rRnr+rnSI7g0H4 u71M2e2splKniSlHsYMCifSJLiynMWhUfG0AuU2JWskiCjZZI7JI6OwUnS2R0fpN6/8p jClG14kveZsSK8gcW3QWdBpSXHmFAY+nnwnFrGNn+wbVg3RMaGj2vlDwTBLTE/ZyHlwh +wBe6ZnlctZKAKmbdG0n6fdyRReWJ0Nlwdy6c/2+r5UA/5R7C0eH1QAaiLl7lcOCbqtd NRHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=tlTC491pnqjsi565i7zJHtObnMseSjyX9hffAsKUMmk=; b=v5BVkI07dJP3jzJCay7+YhGSoTh81g5/ljBOQHkg0UKYvdGuRSTKsprFNaHbvHOqnn Az/m+o8Ncpk2E6axp67+uHtjXBbz8qOYK2DxW8cWs+E0i1THGwXPr22FIQF8Huo4KIvL LjCS1UBT8C1iwRlTzpy/125olN149KCk8+J7cMHyg97Sq46zFs9knbgiPLd16yw1MXHW USJQKbJkPXZkB1iKDMgr0+TJOmN55Sk3Lm6qgfVRkKQ2+bt8B9HRJHXp7QZofUnMuZUc PD0Cf3+c4CcKxe/sslPXQ8D/rbIA8qeQlZErJfOOu7l2wrLTFSoe+GpFLCWr+uh5UkbG 93Nw== X-Gm-Message-State: AOAM530dUiVPbatdnNd3Lhke/waH9F63OTeA7o/n6K6kvPAIkEOxGDrS Npp2IM/yF2rB1kchzUvrcLc= X-Google-Smtp-Source: ABdhPJxa/hsJbYxiDKH9uQrAvqJHztK2wNHq5Siy18vAtOBeSSxB7ffyrFGze/b9qqO7Nl0KGOoilw== X-Received: by 2002:a1c:f205:: with SMTP id s5mr17786315wmc.33.1642362811611; Sun, 16 Jan 2022 11:53:31 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id g6sm262038wmq.11.2022.01.16.11.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jan 2022 11:53:31 -0800 (PST) Message-ID: <e1aa36040fe6bb590834410d482bb8027603f2cc.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN Date: Sun, 16 Jan 2022 20:53:29 +0100 In-Reply-To: <24FU0VP6N4ZZ7.3PE5LG30BSNUQ@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> <de0a87c99fdbec2475b02fb87cba8e2d17ff26ce.camel@HIDDEN> <24FU0VP6N4ZZ7.3PE5LG30BSNUQ@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Am Montag, dem 17.01.2022 um 00:19 +0900 schrieb elaexuotee@HIDDEN: > > > Interesting idea. How about just always forcing a MINOR part, > > > setting to "0" if upstream doesn't have one? > > That'd declare regular releases as MAJOR.0 in the version field, > > which I'm not sure if we want that. In the case of random commits > > I'm less reserved, as they don't correspond to releases anyway. > > I see your point. In fact, upstream releases start with MINOR part "a" > and "count up" through the letters over the course of a year. It's a > pretty simple scheme. For example, J 901 started at "j901-release-a" > and ended at "j901-release-f". > > When I originally wrote this package, I noticed that the release tag > for the first J 902 was "j902-release", and so treaded MINOR as > potentially optional. > However, after checking upstream's forums, this looks to just be a git > tag mishap. > > How about we just go ahead and treat MINOR as mandatory as well? In other words minor should always have a value >= "a" and 902 was just missing it? Fair enough, in that case making version mandatory sounds like the way to go. > > > If you have a better idea, I am all ears. > > You could define that file-union right after ijconsole. If you want > > to > > golf even more, you could define ijconsole inside that file-union, > > i.e. > >  (define jsoftware-aux-files > >    (file-union "jsoftware-aux-files" > >      `(("profile.ijs" ,(search-aux-file ...) > >        ("ijconsole" ,(program-file ...)))) > > > > I'm not quite sure if you want to use jsoftware-aux-files directly as > > input or whether it's wiser to stuff it into another union like > > (file-union "jsoftware-aux-input" `(("aux" ,jsoftware-aux-files))). > > search-input-file will probably do the right thing regardless. > > The new style should also still work with assoc-ref, it'd just be > > weirder to look at. Lastly, you could code up a (search-file-input) > > just in case; I'm not sure if we have one already. > > The file-union seems like a cludgy workaround to me. What we really > want is an easy, direct way to get handles on the input files. Heck, > program-file objects already have a name property; why can't we use > that? Attached patches are a proof-of-concept. That proof of concept does look nice, but for one we're trying to move away from labels, and for the other, it's on a scale that I don't want to decide as part of a package addition. If you feel it has value outside of the proposed usage for j, discussing it under a different number or perhaps on guix-devel might be worth it. > That said, if this is going to turn into a big rabbit hole, can we just > munge the J package inputs into whatever you think is best? As said in my previous mail, that'd be > > (define jsoftware-aux-files > > (file-union "jsoftware-aux-files" > > `(("profile.ijs" ,(search-aux-file ...) > > ("ijconsole" ,(program-file ...)))) In my personal opinion, you can then simply add jsoftware-aux-files as input and (search-input-file "ijconsole") instead of the current assoc- ref. WDYT? Don't worry, I don't plan to drag this out too long, but I also don't planning on pushing this today. There are definitely some stylistic choices that I want to make under the considerations here (basically, we can just merge major and minor into a single base that'd be "903.a", for example), but it's almost bedtime and I want to relax a little before going to sleep. Cheers
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 16 Jan 2022 15:19:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 16 10:19:46 2022 Received: from localhost ([127.0.0.1]:44064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n97Ji-0008Lx-9W for submit <at> debbugs.gnu.org; Sun, 16 Jan 2022 10:19:46 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:51750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n97Je-0008Li-KA for 48463 <at> debbugs.gnu.org; Sun, 16 Jan 2022 10:19:36 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1642346374; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=kBy6pnncoTjqeLyx3HbB1ZXMU3pbm/35Miv4GXFyDu8=; b=wNxhyTYg3l1/pfJNAtMDBmqEDtLGrHL1v3fOi+FZHJm15bNGFWUdvQ+83RN/+dIoLYCz9i2K aODDtE2d+NNRvQK0hUcn5p/prUTFJLCitTzcfSYeIAQYVYkREajyFzUbzptCb3v6MS/2Gf4z OiHHKXbIhR+k5ny7De6nIHf1qN70VmrDactVakIhbvO1FhG6s93Dyh2POzDboBXR9yRqgSXb NlKBiE6Xz9xHJDmCAr55SA4KgSpAkjEqwkwamG6x5e4zqt3RR4F3u1Mx+PCuoGTxVW6CjtZP WrBvlHaTJpToeEWOGqlDxlqYjSKcL4g/wir7PFOIVyY7Y0F1kOzYRA== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 61e4378162864ab101d02082 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Sun, 16 Jan 2022 15:19:29 GMT Received: from localhost (q045100.dynamic.ppp.asahi-net.or.jp [203.181.45.100]) by wilsonb.com (Postfix) with ESMTPSA id 6D308A2E55; Sun, 16 Jan 2022 15:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1642346364; bh=kBy6pnncoTjqeLyx3HbB1ZXMU3pbm/35Miv4GXFyDu8=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=XWQgKH/1x2w3nKLOWDHYafnDPNzI+KXEaV/FRK6AXcEbKkHyXq88Yyfr4n4voJ7St gT+NuPdeEhdZJAyALqXW0AyvgI3g7CJSCn9lxGYyr8S/hHiYFEt/qO6zlxDLtRTiDM ehFTgSu8HP5nJii3RLDL8/eB3uHW7GiL9Z7ObZyNFtp7OzV4+WAeHedaRkPMJZVvab Pinu6QWaItBsUWD2yiZZDfb3k2HAi6aHmfp99dvurqTe4IqIlDcPaJfNiErbr+0Of3 uJ8T+2w0aS+UeNxC5CK+VpCnCYeIU3SN41MEcMG5C79JyyS9goK704hn+u3HiZDvKP WdcyGAxD33dZQIk3Ep1G9bfHowhRvj+f3n4gu4mUiUntqGxWd3Qfaa+NFfqo7HUP7/ gMlIbYnUPm5HoxrbZFqsTVEHMfybx79dO4ocO0LtyLy1QYu+vSUqck0M+eqRGvxabf 2aD+mHLx8Ri2ljTO/dhahozvG7CSAtqEGy2oR6vHyQnvDv7yiuvqITRGnwBXykPyqG IoEvCjOe0ylChp1LsFGmo6CDZOLd5zi4IMSoc7cJx7gp/n2MCdXZiSQSgpTsSCYEwI JRJ7uyZF+u9fbhKcJ90KpGoYxPWBIOXzUPaSJUgZEcFsSwzIV6v5lFPFZ2TChcZfNU IpjF/QabEET0ZRP/XqmU8QCE= Date: Mon, 17 Jan 2022 00:19:18 +0900 To: Liliana Marie Prikler <liliana.prikler@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> <de0a87c99fdbec2475b02fb87cba8e2d17ff26ce.camel@HIDDEN> In-Reply-To: <de0a87c99fdbec2475b02fb87cba8e2d17ff26ce.camel@HIDDEN> Message-Id: <24FU0VP6N4ZZ7.3PE5LG30BSNUQ@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_33aee0f95b15bd0b163d3f05_=_" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_33aee0f95b15bd0b163d3f05_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > Interesting idea. How about just always forcing a MINOR part, setting > > to "0" if upstream doesn't have one? > That'd declare regular releases as MAJOR.0 in the version field, which > I'm not sure if we want that. In the case of random commits I'm less > reserved, as they don't correspond to releases anyway. I see your point. In fact, upstream releases start with MINOR part "a" and "count up" through the letters over the course of a year. It's a pretty sim= ple scheme. For example, J 901 started at "j901-release-a" and ended at "j901-release-f". When I originally wrote this package, I noticed that the release tag for th= e first J 902 was "j902-release", and so treaded MINOR as potentially optiona= l. However, after checking upstream's forums, this looks to just be a git tag mishap. How about we just go ahead and treat MINOR as mandatory as well? > > If you have a better idea, I am all ears. > You could define that file-union right after ijconsole. If you want to > golf even more, you could define ijconsole inside that file-union, i.e. > (define jsoftware-aux-files > (file-union "jsoftware-aux-files" > `(("profile.ijs" ,(search-aux-file ...) > ("ijconsole" ,(program-file ...)))) >=20 > I'm not quite sure if you want to use jsoftware-aux-files directly as > input or whether it's wiser to stuff it into another union like=20 > (file-union "jsoftware-aux-input" `(("aux" ,jsoftware-aux-files))). > search-input-file will probably do the right thing regardless. > The new style should also still work with assoc-ref, it'd just be > weirder to look at. Lastly, you could code up a (search-file-input) > just in case; I'm not sure if we have one already. The file-union seems like a cludgy workaround to me. What we really want is= an easy, direct way to get handles on the input files. Heck, program-file obje= cts already have a name property; why can't we use that? Attached patches are a= proof-of-concept. That said, if this is going to turn into a big rabbit hole, can we just mun= ge the J package inputs into whatever you think is best? ------_=_33aee0f95b15bd0b163d3f05_=_ Content-Disposition: attachment; filename*0*=UTF-8''0001-packages-Expand-range-of-objects-add-input-label; filename*1*=-can.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom 3b8e7fa8fbd58e7e164e3730c708419f612b8549 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Sun, 16 Jan 2022 23:54:51 +0900 =53ubject: [PATCH 1/2] packages: Expand range of objects 'add-input-label' = =63an =20label =54o: guix-patches@HIDDEN =0A* guix/packages.scm (%auxiliary-files-subpath-dir): New variable. =28add-input-label): Support labels from the name property of =6Fbjects that have one. Also, name auxiliary files from their =73ubpath. =2D-- =20guix/packages.scm | 24 +++++++++++++++++++++++- =201 file changed, 23 insertions(+), 1 deletion(-) =0Adiff --git a/guix/packages.scm b/guix/packages.scm =69ndex 9d5b23eb8a..4feea8ad5f 100644 =2D-- a/guix/packages.scm =2B++ b/guix/packages.scm =40@ -7,6 +7,7 @@ =20;;; Copyright =C2=A9 2019 Marius Bakke <mbakke@HIDDEN> =20;;; Copyright =C2=A9 2020, 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN= =6Fm> =20;;; Copyright =C2=A9 2021 Chris Marusich <cmmarusich@HIDDEN> =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =20;;; =20;;; This file is part of GNU Guix. =20;;; =40@ -569,6 +570,10 @@ (define-record-type* <package> =20 (default (current-definition-location)) =20 (innate))) =20= =2B;; Note: This morally imports from gnu/packages.scm, but since they impo= =72t us, =2B;; we define here instead. =2B(define %auxiliary-files-subdir-path "/gnu/packages/aux-files") =2B =20(define (add-input-label input) =20 "Add an input label to INPUT." =20 (match input =40@ -576,7 +581,24 @@ (define (add-input-label input) =20 (list (package-name package) package)) =20 (((? package? package) output) ;XXX: ugly? =20 (list (package-name package) package output)) =2D ((? gexp-input?) ;XXX: misplaced because 'native?' field is ig= =6Eored? =2B ((? local-file? local-file) =2B (list (local-file-name local-file) local-file)) =2B ((? plain-file? plain-file) =2B (list (plain-file-name plain-file) plain-file)) =2B ((? computed-file? computed-file) =2B (list (computed-file-name computed-file) computed-file)) =2B ((? program-file? program-file) =2B (list (program-file-name program-file) program-file)) =2B ((? scheme-file? scheme-file) =2B (list (scheme-file-name scheme-file) scheme-file)) =2B ((? string? path) =2B (let* ((regex (string-append %auxiliary-files-subdir-path "/(.*)"))= =0A+ (match (string-match regex input))) =2B `(,(if match =2B (match:substring match 1) =2B "_") =2B ,input))) =2B ((? gexp-input?) ;XXX: misplaced because 'native?' field is ign= =6Fred? =20 (let ((obj (gexp-input-thing input)) =20 (output (gexp-input-output input))) =20 `(,(if (package? obj) =2D-=20 =32.34.0 =0A= ------_=_33aee0f95b15bd0b163d3f05_=_ Content-Disposition: attachment; filename=0002-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom d32fd0cb243f6b51a9b2c178279a19015b621df2 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Wed, 12 Jan 2022 18:44:36 +0900 =53ubject: [PATCH 2/2] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/aux-files/jsoftware/profilex.ijs: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: Register it. =2D-- =20gnu/local.mk | 1 + =20gnu/packages/aux-files/jsoftware/profilex.ijs | 14 + =20gnu/packages/jsoftware.scm | 424 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 ++++ =204 files changed, 519 insertions(+) =20create mode 100644 gnu/packages/aux-files/jsoftware/profilex.ijs =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 3335d368df..fdbcb364c7 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -1293,6 +1293,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/irrlicht-use-system-libs.patch \ =20 %D%/packages/patches/isc-dhcp-gcc-compat.patch \ =20 %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ =20 %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ =20 %D%/packages/patches/jsoncpp-pkg-config-version.patch \ =64iff --git a/gnu/packages/aux-files/jsoftware/profilex.ijs b/gnu/packages= =2Faux-files/jsoftware/profilex.ijs =6Eew file mode 100644 =69ndex 0000000000..30e0d229e2 =2D-- /dev/null =2B++ b/gnu/packages/aux-files/jsoftware/profilex.ijs =40@ -0,0 +1,14 @@ =2B'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9!:14'' =2Bbasedir=3D. ({.~ _2 { I.@:=3D&'/') BINPATH =2B =2Bshare=3D. basedir,'/share/j' =2Bsystem=3D. share,'/system' =2Btools=3D. share,'/tools' =2B =2Buser=3D. home,'/.config/j/',jversion =2Baddons=3D. user,'/addons' =2Bbreak=3D. user,'/break' =2Bconfig=3D. user,'/config' =2Binstall=3D. user,'/install' =2Bsnap=3D. user,'/snap' =2Btemp=3D. user,'/temp' =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..e907f03d24 =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,424 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module (guix build utils) =2B #:use-module (guix build-system gnu) =2B #:use-module (guix build-system trivial) =2B #:use-module (guix git-download) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module (guix packages) =2B #:use-module (guix utils) =2B #:use-module (gnu packages) =2B #:use-module (gnu packages libedit) =2B #:use-module (gnu packages llvm) =2B #:use-module (gnu packages maths) =2B #:use-module (guix gexp) =2B #:use-module (ice-9 ftw) =2B #:use-module (ice-9 match) =2B #:use-module (ice-9 regex) =2B #:use-module (ice-9 rdelim) =2B #:use-module (srfi srfi-1) =2B #:use-module (srfi srfi-26) =2B #:use-module (srfi srfi-71)) =2B =2B =2B;;; TODO: Make importer and packages for J addons: =2B;;; http://www.jsoftware.com/jal/ =2B =2B;;; TODO: Package up j80x series =2B =2B =2B(define (jname prefix release-type) =2B "Return a package name for J, including RELEASE-TYPE only if not 'rele= =61se." =2B (match release-type =2B ('release prefix) =2B (_ (string-append prefix "-" (symbol->string release-type))))= =29 =2B =2B;; We want a version string where packages specifications like pkg@MAJOR= =20work. =2B;; This requires that the first version part separator be dot. Subseque= =6Et =2B;; separators are hyphen, mirror `git-version' etc. =2B(define* (jversion->string major minor #:optional revision commit) =2B "Return a version string formatted like MAJOR.MINOR-REVISION-COMMIT. = =4Fnly =2B MAJOR is required, and MINOR defaults to ``0'' if not supplied." =2B (let* ((commit (and commit (string-take commit 7))) =2B (sub-parts (filter (cut (compose not eq?) #f <>) =2B (list minor revision commit)))) =2B (string-append major "." (string-join sub-parts "-")))) =2B =2B(define* (jrelease-string release-type #:optional version-minor) =2B "Construct J release identifier string." =2B (let ((release-type (symbol->string release-type))) =2B (if version-minor =2B (string-append release-type "-" version-minor) =2B release-type))) =2B =2B(define* (jinfo->git-tag version-major release-type #:optional version-m= =69nor) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (string-append "j" version-major (jrelease-string release-type versio= =6E-minor))) =2B =2B;; G-exp script that detects AVX/AVX2 support at runtime and executes jc= =6Fnsole =2B;; with the appropriate libj.so and profile.ijs." =2B(define ijconsole =2B (with-imported-modules '((guix cpu) =2B (guix memoization) =2B (guix profiling) =2B (guix sets) =2B (srfi srfi-26)) =2B (program-file "ijconsole" =2B #~(begin =2B (use-modules ((guix cpu) #:select (cpu-flags current-cpu))= =0A+ ((guix sets) #:select (set-contains?)) =2B ((srfi srfi-26) #:select (cute))) =2B =2B ;; Assume that this script will be installed under bin/. =2B (define %basedir (dirname (dirname (current-filename)))) =2B =2B (let* ((jconsole (string-append %basedir "/libexec/j/jconsole"= =29) =2B (cpu-has-flag? =2B (cute set-contains? (cpu-flags (current-cpu)) <>)) =2B (libj (format #f "~a/lib/j/libj~a.so" %basedir =2B (cond ((cpu-has-flag? "avx2") "-avx2") =2B ((cpu-has-flag? "avx") "-avx") =2B (else "")))) =2B (jprofile (string-append %basedir "/etc/j/profile.ijs")= =29) =2B (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jp= =72ofile =2B (cdr (command-line)))))))) =2B =2B(define* (make-j #:key =2B version =2B revision =2B hash =2B tag =2B commit =2B (release-type 'release) =2B (patches '()) =2B (extra-inputs '()) =2B (extra-envars '()) =2B (builder "guix.gnu.org")) =2B (let* ((version-major version-minor (if (pair? version) =2B (car+cdr version) =2B (values version #f)))) =2B (package =2B (name (jname "jsoftware-j" release-type)) =2B (version (jversion->string version-major version-minor revision commi= =74)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (or commit tag =2B (jinfo->git-tag version-major =2B release-type =2B version-minor))))) =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (build-system gnu-build-system) =2B (native-inputs (list clang-toolchain)) =2B (inputs (cons* libedit libomp ijconsole =2B ;; profilex.ijs overrides ~install and ~addons =2B ;; directories to reside under the user-writable ~use= =72. =2B ;; This allows local-install of addons via pacman. T= =4FDO: =2B ;; Guix-ify J addons as well. =2B (search-auxiliary-file "jsoftware/profilex.ijs") =2B extra-inputs)) =2B (arguments =2B `(#:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-match))= =0A+ ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that build b= =75ild up =2B ;; (very complicated) environment variables to pass to make. The = =62asic =2B ;; build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values;= =0A+ ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the sour= =63e =2B ;; directory; they do not supply a make `install' target. Thus it= =20takes =2B ;; some massaging to install files in FHS-style directories. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable directori= =65s; =2B ;; 3) make2/build_*.sh to respect standard build conventions; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")= =29 =2B (clang (string-append clang-toolchain "/bin/clang")) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version-major)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" =2B ,(jrelease-string release-type version-minor)))= =0A+ (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the act= =75al =2B ;; compiler. It is just a switch to tell the build= =0A+ ;; scripts whether to use gcc- or clang-specific f= =6Cags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS= =20")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) =2B (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n"))))) =2B '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. The p= =61th =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-script =2B ;; definitions of new J engine functionality. Since we po= =69nt =2B ;; ~addons under the ~user directory, we move it under ~sy= =73tem =2B ;; instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"))) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))))) =2B ;; Implementation of 9!:14 records build time which breaks= =20build =2B ;; reproducibility. Note that upstream code depends on th= =65 exact =2B ;; format of these strings, so we need to mimic the standa= =72d. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support being= =0A+ ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B =2B ;; The build output depends primarily on the values of the `jpla= =74form' =2B ;; and `j64x' environment variables. If the target is ARM, then= =0A+ ;; `jplatform' is "raspberry", otherwise it is `linux'. In add= =69tion to =2B ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX= =32 =2B ;; variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to disting= =75ish =2B ;; between CPU features. Thus we build and install all variants= =20of =2B ;; libj, expecting jconsole to be called with a wrapper script t= =68at =2B ;; detects AVX features and loads the appropriate libj at runtim= =65. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (target-bit ,(if (target-64bit?) "64" "32")) =2B (run (lambda* (script #:key (avx "")) =2B (invoke "env" =2B (string-append "jplatform=3D" platfo= =72m) =2B (string-append "j64x=3Dj" target-bit= =20avx) =2B script)))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, we j= =75st =2B ;; build it once. =2B (run "./build_jconsole.sh") =2B (run "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (run "./build_libj.sh" #:avx "avx") =2B (run "./build_libj.sh" #:avx "avx2")))))))) =2B ;; The test suite is expected to be run as follows for each vari= =61nt of =2B ;; libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary fil= =65s. We =2B ;; simply place these all under test/bin. =2B (replace 'check =2B (lambda* (#:key tests? #:allow-other-keys) =2B (when tests? =2B (let ((platform ,(if (target-arm?) "raspberry" "linux"))) =2B (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, but= =20needs =2B ;; to be copied into the ~system directory when it does.= =0A+ (for-each =2B (lambda (dev-dir) =2B (if (file-exists? dev-dir) =2B (copy-recursively dev-dir "test/bin/system/dev")))= =0A+ '("jlibrary/dev" "jlibrary/addons/dev")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((bin (string-append "bin/" platform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append bin "/" jbit =2B "/jconsole")) =2B (source (string-append bin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest) =2B (install-file jconsole dest) =2B (let* ((jconsole (string-append dest "/jconsole"= =29) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jconsole tes= =74s))) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed.")))))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B #t)))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only quirk i= =73 that =2B ;; we install jconsole under /libexec to make room for the wrapp= =65r =2B ;; replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (out (assoc-ref outputs "out")) =2B (bin (string-append out "/bin")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec/j")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p bin) =2B (copy-file (assoc-ref inputs "ijconsole") =2B (string-append bin "/ijconsole-" ,version-major= =29) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,platform ,jarch) "/= =22)) =2B (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep javx)= =29) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B (install-file (string-append "bin/" platform "/" jbit "/jc= =6Fnsole") =2B libexec) =2B (copy-recursively "jlibrary/system" system) =2B (for-each =2B (lambda (source-dev) =2B (if (access? source-dev R_OK) =2B (copy-recursively source-dev dev))) =2B '("jlibrary/dev" "jlibrary/addons/dev")) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (copy-file (assoc-ref inputs "jsoftware/profilex.ijs") =2B (string-append etc "/profilex.ijs")))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL family")= =0A+ (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring pro= =62lems =2Bthat are not already well understood.") =2B (license license:gpl3+)))) =2B =2B =2B(define-public jsoftware-j-901 =2B (make-j =2B #:version '("901" . "f") =2B #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" =2B #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) =2B =2B =2B(define j-build-configuration-with-sleef =2B `(#:extra-inputs (,sleef) =2B #:extra-envars (("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef")))) =2B =2B(define-public jsoftware-j-902 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B `(#:version ,'("902" . "b") =2B #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))= =29 =2B =2B =2B(define-public jsoftware-j-903 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B `(#:version ,'("903" . "a") =2B #:tag "903-release-a" =2B #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))= =29 =2B =2B =2B(define-public (jsoftware-ijconsole-symlink jpkg) =2B "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jve= =72sion>" =2B (package =2B (name "jsoftware-ijconsole") =2B (version (package-version jpkg)) =2B (source #f) =2B (build-system trivial-build-system) =2B (propagated-inputs `(("jpkg" ,jpkg))) =2B (arguments =2B `(#:modules ((guix build utils) =2B (srfi srfi-26)) =2B #:builder =2B (begin =2B (use-modules ((guix build utils) #:select (mkdir-p)) =2B ((ice-9 regex) #:select (string-match)) =2B ((ice-9 ftw) #:select (scandir)) =2B ((srfi srfi-26) #:select (cut))) =2B (let* ((out (assoc-ref %outputs "out")) =2B (jpkg (assoc-ref %build-inputs "jpkg")) =2B (ijconsole (car (scandir (string-append jpkg "/bin") =2B (cut string-match "ijconsole-.*" = =3C>)))) =2B (source (string-append jpkg "/bin/" ijconsole)) =2B (dest (string-append out "/bin/ijconsole"))) =2B (mkdir-p (dirname dest)) =2B (symlink source dest))))) =2B (home-page (package-home-page jpkg)) =2B (synopsis "Provide `ijconsole' symlink to default interpreter version"= =29 =2B (description =2B "The interpreter provided by the J package has a filename like =2Bijconsole-<version>, which provides support for having multiple, concurr= =65nt =2Bversions installed. This package provides a version-agnostic `ijconsole= =27 =2Bsymlink to interpreter version indicated and build time.") =2B (license license:gpl3+))) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.34.0 =0A= ------_=_33aee0f95b15bd0b163d3f05_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 16 Jan 2022 08:04:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 16 03:04:31 2022 Received: from localhost ([127.0.0.1]:42412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n90Wd-0007I4-AN for submit <at> debbugs.gnu.org; Sun, 16 Jan 2022 03:04:31 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1n90WM-0007HX-Tt for 48463 <at> debbugs.gnu.org; Sun, 16 Jan 2022 03:04:29 -0500 Received: by mail-wm1-f68.google.com with SMTP id d18-20020a05600c251200b0034974323cfaso16580709wma.4 for <48463 <at> debbugs.gnu.org>; Sun, 16 Jan 2022 00:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=vxBFgIvkYYNrAMqu8X5GLdW9fjhwwQ+E/nc9BnDn9Oc=; b=l25V799OioNwIBkJ50DhRJc1/Viuto7c7481s2PRSqatu8bO+Zl7d/O1GY763W5RFT h3vBHR3vc/gHZ2BLgslhV/dxHB0nnwT6z+IWVXRYEr+flj8RyxrBLL0UNKHAOBCwHtHG D3t54INz1kmtywdhjOLeX8ME5ScqTdf7F4D5zaejqC+/9mrrhkqXCuJCBN+bw9Z4JnVw td0eyhWKSDUvAAokl7MsMvz2tdwSE8K7VaPaSr9LMo0tIrJsJIhOIRYjkvN+CVqQL2LD Z16B3sYhwLeBUhRhXNF1KedJ0I4aTk1qqfyXIJVbf/myp5g9eqkGIzYWWN/YLhhLmRNW BgJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=vxBFgIvkYYNrAMqu8X5GLdW9fjhwwQ+E/nc9BnDn9Oc=; b=JF+Gpomo9Pth4FcyQRZK9KMkzRMtSBsKvnQ1pdKiYqbQrXKzbHOUoxsSfpajKh0En8 8BWAixjUepqorXn1lEUxz7auhvXt2ZMYJumSshHDQ0/khqQQ8cloBgI6JHDPM0Osa5q/ BHjmu/ijz7ZLfQapGBuUe1Ydugn+roLuUJK2EudWFFcXL4pyNGjq/0a+AAYlRuPCKq9G IhemdIsIMCCK/DiWfErYp902V5BiRhEgq9dpy0WMDv8WESBTDn1icYJFJakyDUeTMzd/ mlpER6Jl6vANBPY30mD/aJ4xRTrtzHhk3Med0Gtz/q/VtwWf6GpBilKwvGMiqsQbGU2a y/YA== X-Gm-Message-State: AOAM53211BXPslQvr8lFcbyx4nX9ngiuVPdivz5fzCtiSjdj018BCh2E qAqvVyJelr5RsUOi97XOReI= X-Google-Smtp-Source: ABdhPJwThAOSdFOKLBWIec0RC+2vi43xjKtI+fTvFO47usYaW4XWBpqG7nqzhAPaZK4/gW2uFEGIOQ== X-Received: by 2002:a7b:cf2b:: with SMTP id m11mr22015721wmg.153.1642320248845; Sun, 16 Jan 2022 00:04:08 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id c4sm5298910wma.1.2022.01.16.00.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jan 2022 00:04:08 -0800 (PST) Message-ID: <de0a87c99fdbec2475b02fb87cba8e2d17ff26ce.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN Date: Sun, 16 Jan 2022 09:04:06 +0100 In-Reply-To: <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Am Sonntag, dem 16.01.2022 um 14:29 +0900 schrieb elaexuotee@HIDDEN: > Good day. > > > > > > I just changed the logic to always keep a dot after MAJOR, and > > > then use hyphens after that. > > I'm not quite sure if I agree with that decision, but you're right > > that @MAJOR ought to be supported. How about enforcing that MINOR > > exists if REVISION and COMMIT are used and setting it to "0" if > > there hasn't been an "a" beta or release yet? > > Interesting idea. How about just always forcing a MINOR part, setting > to "0" if upstream doesn't have one? That'd declare regular releases as MAJOR.0 in the version field, which I'm not sure if we want that. In the case of random commits I'm less reserved, as they don't correspond to releases anyway. > > > > > +  (native-inputs `(("clang-toolchain" ,clang-toolchain))) > > > +  (inputs (cons* `("libedit" ,libedit) > > > +                 `("libomp" ,libomp) > > > +                 `("ijconsole" ,(ijconsole)) > > > +                 extra-inputs)) > > My variant already had these translated to the new style. If > > you're not using old style on purpose – and I don't think you do – > > you might want to make your life easier by dropping these labels > > and going with plain (list)s. > > Yeah, I had trouble getting that to work nicely with the ijconsole > input. See below for more details. > > > You might want to use an aux-file for that. Name it > > jsoftware/profile.ijs if it's just a plain file (which I assume). > > I recently pushed a commit towards renpy which replaces a large > > format block by fetching an auxiliary file and substitute*, which > > you can take as reference if you're unsure. Note that renpy still > > uses old-style inputs, so the assoc-ref makes sense in that case; > > however, you should be able to also express this pattern in terms > > of search-input-file somehow (or otherwise express it as gexp). > > Oooh. Neat. That makes adding and testing changes their much nicer. > > Note, I wasn't able to find a nice way to get this working together > with the new inputs syntax, since `search-input-files' only searches > under input paths which are directories. > > The ijconsole and profilex input are regular files, so it raises a > search-error. One workaronud is to put ijconsole and profilex > together under a file-union input, but I found that almost worse than > just using old-style syntax. > > If you have a better idea, I am all ears. You could define that file-union right after ijconsole. If you want to golf even more, you could define ijconsole inside that file-union, i.e. (define jsoftware-aux-files (file-union "jsoftware-aux-files" `(("profile.ijs" ,(search-aux-file ...) ("ijconsole" ,(program-file ...)))) I'm not quite sure if you want to use jsoftware-aux-files directly as input or whether it's wiser to stuff it into another union like (file-union "jsoftware-aux-input" `(("aux" ,jsoftware-aux-files))). search-input-file will probably do the right thing regardless. The new style should also still work with assoc-ref, it'd just be weirder to look at. Lastly, you could code up a (search-file-input) just in case; I'm not sure if we have one already. Cheers
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 16 Jan 2022 05:30:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 16 00:30:28 2022 Received: from localhost ([127.0.0.1]:42314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n8y7Q-0002p8-Ln for submit <at> debbugs.gnu.org; Sun, 16 Jan 2022 00:30:28 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:48803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n8y7M-0002om-CY for 48463 <at> debbugs.gnu.org; Sun, 16 Jan 2022 00:30:20 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1642311016; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=VSec8Vgc6lZVVq2icT8XtxWTf//CnXvJjxHsafS5FFg=; b=EYmNoEISF/O0TtLZuCF70oEkSn29f+u9+mknDafXVFTlXBN6/hAzsVspoRZknpincb2AEg4X 0KmQ856URqgSSm8flLHCOKAHzCCOEIJaS42GVCzqsEoiPTcJyTHz/nS4VmdFCM/CICgN9oWU LgD/uwo0h7CYTkieByhYc7r+gpbKoAFus81r1wVEEiSIbeRnW0XSg935SJUzBBp6gVvT6s7k tytx0yJguLTeMxxPOkzApQ5vV1licLIcbz7tTW2v46BrUJJjmThgoaI7B/7TIwUSenFFCnj+ TVhmGpMiBw8mY0JLgdpb+x6EBYeNrjoQ8KCiQJk1lZvrxNIrdHnxAQ== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 61e3ad6213aac22fbe3da903 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Sun, 16 Jan 2022 05:30:10 GMT Received: from localhost (q045100.dynamic.ppp.asahi-net.or.jp [203.181.45.100]) by wilsonb.com (Postfix) with ESMTPSA id 68AFFA04C7; Sun, 16 Jan 2022 05:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1642311005; bh=VSec8Vgc6lZVVq2icT8XtxWTf//CnXvJjxHsafS5FFg=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=T2illMgd13ySjVdXsVE3n7HqHiDbiskdJyrevXD1KbwB1zH7xjbGOuT6Zw1AO0bBn VZv/HdUCLs+DIfgWxx8h1kSEF0io9+zx9359J/pKTYByyC0XY/7OLLXI+8aR40FXkf BXv8U49J2vc+T53HvMnbB9weGpFjD1LEnMs5eoI1UWLXkW4aQ0cp6gK17P4teSUA5W LPO1KLIXBqRQ9NicDD6VmXSvFdk1vTUKPAoW8DQdnocRzwlIHwobcLGUfXkh27xDE+ CsbzZ6j7W5AJeoGFtPBGKCu3ldqYQFJzOgZsSMBSffWq9HuOVa5A6Wlb+3UGyNV2BI d+jG6N9R8BphP4awY7fQw6TE/u3vpMyo9f+vd+fCcGofr/MwIpkwXbPJ51Upy+7s+T yZZFeRqLxLLwqhHIYHQSCh5qO1B/jClgFrHU85AWczzkEYdMhIUqe9hYoqOGPIEsDT JD4S4kLMZEo7wQfwcamTJNBy+I/WedJKo6DrRLieoLMaHobdiHE3pgR3yKUxYDJada Zp00hJWIp4wSsuoVPg4glKbZu2YW7AyYmAhzI7+D3h9AY0lIR7xoCMn7oq3VUdfSso +FiNpzKnQRIBioya+DERxrdNlUvhPr2K2Y1g+KM+cgPZhYQ7bMgWbsQujli7GAXMdt ALqOYN0CCGQaAeBmErlWMzPs= Date: Sun, 16 Jan 2022 14:29:58 +0900 To: Liliana Marie Prikler <liliana.prikler@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> In-Reply-To: <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> Message-Id: <25Z6NGGGNJYD1.3S7A1QLFX7I9Y@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_21b9c7414791ef730b72da0d_=_" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_21b9c7414791ef730b72da0d_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Good day. > > I just changed the logic to always keep a dot after MAJOR, and then > > use hyphens after that. > I'm not quite sure if I agree with that decision, but you're right that > @MAJOR ought to be supported. How about enforcing that MINOR exists if > REVISION and COMMIT are used and setting it to "0" if there hasn't been > an "a" beta or release yet? Interesting idea. How about just always forcing a MINOR part, setting to "0= " if upstream doesn't have one? > > + (native-inputs `(("clang-toolchain" ,clang-toolchain))) > > + (inputs (cons* `("libedit" ,libedit) > > + `("libomp" ,libomp) > > + `("ijconsole" ,(ijconsole)) > > + extra-inputs)) > My variant already had these translated to the new style. If you're > not using old style on purpose =E2=80=93 and I don't think you do =E2=80=93= you might > want to make your life easier by dropping these labels and going with > plain (list)s. Yeah, I had trouble getting that to work nicely with the ijconsole input. S= ee below for more details. > You might want to use an aux-file for that. Name it > jsoftware/profile.ijs if it's just a plain file (which I assume). I > recently pushed a commit towards renpy which replaces a large format > block by fetching an auxiliary file and substitute*, which you can take > as reference if you're unsure. Note that renpy still uses old-style > inputs, so the assoc-ref makes sense in that case; however, you should > be able to also express this pattern in terms of search-input-file > somehow (or otherwise express it as gexp). Oooh. Neat. That makes adding and testing changes their much nicer. Note, I wasn't able to find a nice way to get this working together with th= e new inputs syntax, since `search-input-files' only searches under input pat= hs which are directories. The ijconsole and profilex input are regular files, so it raises a search-e= rror. One workaronud is to put ijconsole and profilex together under a file-union= input, but I found that almost worse than just using old-style syntax. If you have a better idea, I am all ears. Cheers! ------_=_21b9c7414791ef730b72da0d_=_ Content-Disposition: attachment; filename=0001-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom 49d44631c736bb45fe5f32ee446e7af506f5145c Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Wed, 12 Jan 2022 18:44:36 +0900 =53ubject: [PATCH] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/aux-files/jsoftware/profilex.ijs: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: Register it. =2D-- =20gnu/local.mk | 1 + =20gnu/packages/aux-files/jsoftware/profilex.ijs | 14 + =20gnu/packages/jsoftware.scm | 428 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 ++++ =204 files changed, 523 insertions(+) =20create mode 100644 gnu/packages/aux-files/jsoftware/profilex.ijs =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 3335d368df..fdbcb364c7 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -1293,6 +1293,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/irrlicht-use-system-libs.patch \ =20 %D%/packages/patches/isc-dhcp-gcc-compat.patch \ =20 %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ =20 %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ =20 %D%/packages/patches/jsoncpp-pkg-config-version.patch \ =64iff --git a/gnu/packages/aux-files/jsoftware/profilex.ijs b/gnu/packages= =2Faux-files/jsoftware/profilex.ijs =6Eew file mode 100644 =69ndex 0000000000..30e0d229e2 =2D-- /dev/null =2B++ b/gnu/packages/aux-files/jsoftware/profilex.ijs =40@ -0,0 +1,14 @@ =2B'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9!:14'' =2Bbasedir=3D. ({.~ _2 { I.@:=3D&'/') BINPATH =2B =2Bshare=3D. basedir,'/share/j' =2Bsystem=3D. share,'/system' =2Btools=3D. share,'/tools' =2B =2Buser=3D. home,'/.config/j/',jversion =2Baddons=3D. user,'/addons' =2Bbreak=3D. user,'/break' =2Bconfig=3D. user,'/config' =2Binstall=3D. user,'/install' =2Bsnap=3D. user,'/snap' =2Btemp=3D. user,'/temp' =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..a28e786123 =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,428 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module (guix build utils) =2B #:use-module (guix build-system gnu) =2B #:use-module (guix build-system trivial) =2B #:use-module (guix git-download) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module (guix packages) =2B #:use-module (guix utils) =2B #:use-module (gnu packages) =2B #:use-module (gnu packages libedit) =2B #:use-module (gnu packages llvm) =2B #:use-module (gnu packages maths) =2B #:use-module (guix gexp) =2B #:use-module (ice-9 ftw) =2B #:use-module (ice-9 match) =2B #:use-module (ice-9 regex) =2B #:use-module (ice-9 rdelim) =2B #:use-module (srfi srfi-1) =2B #:use-module (srfi srfi-26) =2B #:use-module (srfi srfi-71)) =2B =2B =2B;;; TODO: Make importer and packages for J addons: =2B;;; http://www.jsoftware.com/jal/ =2B =2B;;; TODO: Package up j80x series =2B =2B =2B(define (jname prefix release-type) =2B "Return a package name for J, including RELEASE-TYPE only if not 'rele= =61se." =2B (match release-type =2B ('release prefix) =2B (_ (string-append prefix "-" (symbol->string release-type))))= =29 =2B =2B;; We want a version string where packages specifications like pkg@MAJOR= =20work. =2B;; This requires that the first version part separator be dot. Subseque= =6Et =2B;; separators are hyphen, mirror `git-version' etc. =2B(define* (jversion->string major #:optional minor revision commit) =2B "Return a version string formatted like MAJOR.MINOR-REVISION-COMMIT. = =4Fnly =2B MAJOR is required, and MINOR defaults to ``0'' if not supplied." =2B (let* ((commit (and commit (string-take commit 7))) =2B (minor (or minor "0")) =2B (sub-parts (filter (cut (compose not eq?) #f <>) =2B (list minor revision commit)))) =2B (string-append major "." (string-join sub-parts "-")))) =2B =2B(define* (jrelease-string release-type #:optional version-minor) =2B "Construct J release identifier string." =2B (let ((release-type (symbol->string release-type))) =2B (if version-minor =2B (string-append release-type "-" version-minor) =2B release-type))) =2B =2B(define* (jinfo->git-tag version-major release-type #:optional version-m= =69nor) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (string-append "j" version-major (jrelease-string release-type versio= =6E-minor))) =2B =2B;; G-exp script that detects AVX/AVX2 support at runtime and executes jc= =6Fnsole =2B;; with the appropriate libj.so and profile.ijs." =2B(define ijconsole =2B (with-imported-modules '((guix cpu) =2B (guix memoization) =2B (guix profiling) =2B (guix sets) =2B (srfi srfi-26)) =2B (program-file "ijconsole" =2B #~(begin =2B (use-modules ((guix cpu) #:select (cpu-flags current-cpu))= =0A+ ((guix sets) #:select (set-contains?)) =2B ((srfi srfi-26) #:select (cute))) =2B =2B ;; Assume that this script will be installed under bin/. =2B (define %basedir (dirname (dirname (current-filename)))) =2B =2B (let* ((jconsole (string-append %basedir "/libexec/j/jconsole"= =29) =2B (cpu-has-flag? =2B (cute set-contains? (cpu-flags (current-cpu)) <>)) =2B (libj (format #f "~a/lib/j/libj~a.so" %basedir =2B (cond ((cpu-has-flag? "avx2") "-avx2") =2B ((cpu-has-flag? "avx") "-avx") =2B (else "")))) =2B (jprofile (string-append %basedir "/etc/j/profile.ijs")= =29) =2B (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jp= =72ofile =2B (cdr (command-line)))))))) =2B =2B(define* (make-j #:key =2B version =2B revision =2B hash =2B tag =2B commit =2B (release-type 'release) =2B (patches '()) =2B (extra-inputs '()) =2B (extra-envars '()) =2B (builder "guix.gnu.org")) =2B (let* ((version-major version-minor (if (pair? version) =2B (car+cdr version) =2B (values version #f)))) =2B (package =2B (name (jname "jsoftware-j" release-type)) =2B (version (jversion->string version-major version-minor revision commi= =74)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (or commit tag =2B (jinfo->git-tag version-major =2B release-type =2B version-minor))))) =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (build-system gnu-build-system) =2B (native-inputs (list clang-toolchain)) =2B (inputs (cons* `("libedit" ,libedit) =2B `("libomp" ,libomp) =2B `("ijconsole" ,ijconsole) =2B ;; profilex.ijs overrides ~install and ~addons =2B ;; directories to reside under the user-writable ~use= =72. =2B ;; This allows local-install of addons via pacman. T= =4FDO: =2B ;; Guix-ify J addons as well. =2B `("profilex" ,(search-auxiliary-file =2B "jsoftware/profilex.ijs")) =2B extra-inputs)) =2B (arguments =2B `(#:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-match))= =0A+ ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that build b= =75ild up =2B ;; (very complicated) environment variables to pass to make. The = =62asic =2B ;; build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values;= =0A+ ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the sour= =63e =2B ;; directory; they do not supply a make `install' target. Thus it= =20takes =2B ;; some massaging to install files in FHS-style directories. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable directori= =65s; =2B ;; 3) make2/build_*.sh to respect standard build conventions; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")= =29 =2B (clang (string-append clang-toolchain "/bin/clang")) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version-major)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" =2B ,(jrelease-string release-type version-minor)))= =0A+ (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the act= =75al =2B ;; compiler. It is just a switch to tell the build= =0A+ ;; scripts whether to use gcc- or clang-specific f= =6Cags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS= =20")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) =2B (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n"))))) =2B '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. The p= =61th =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-script =2B ;; definitions of new J engine functionality. Since we po= =69nt =2B ;; ~addons under the ~user directory, we move it under ~sy= =73tem =2B ;; instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"))) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))))) =2B ;; Implementation of 9!:14 records build time which breaks= =20build =2B ;; reproducibility. Note that upstream code depends on th= =65 exact =2B ;; format of these strings, so we need to mimic the standa= =72d. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support being= =0A+ ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B =2B ;; The build output depends primarily on the values of the `jpla= =74form' =2B ;; and `j64x' environment variables. If the target is ARM, then= =0A+ ;; `jplatform' is "raspberry", otherwise it is `linux'. In add= =69tion to =2B ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX= =32 =2B ;; variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to disting= =75ish =2B ;; between CPU features. Thus we build and install all variants= =20of =2B ;; libj, expecting jconsole to be called with a wrapper script t= =68at =2B ;; detects AVX features and loads the appropriate libj at runtim= =65. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (target-bit ,(if (target-64bit?) "64" "32")) =2B (run (lambda* (script #:key (avx "")) =2B (invoke "env" =2B (string-append "jplatform=3D" platfo= =72m) =2B (string-append "j64x=3Dj" target-bit= =20avx) =2B script)))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, we j= =75st =2B ;; build it once. =2B (run "./build_jconsole.sh") =2B (run "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (run "./build_libj.sh" #:avx "avx") =2B (run "./build_libj.sh" #:avx "avx2")))))))) =2B ;; The test suite is expected to be run as follows for each vari= =61nt of =2B ;; libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary fil= =65s. We =2B ;; simply place these all under test/bin. =2B (replace 'check =2B (lambda* (#:key tests? #:allow-other-keys) =2B (when tests? =2B (let ((platform ,(if (target-arm?) "raspberry" "linux"))) =2B (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, but= =20needs =2B ;; to be copied into the ~system directory when it does.= =0A+ (for-each =2B (lambda (dev-dir) =2B (if (file-exists? dev-dir) =2B (copy-recursively dev-dir "test/bin/system/dev")))= =0A+ '("jlibrary/dev" "jlibrary/addons/dev")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((bin (string-append "bin/" platform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append bin "/" jbit =2B "/jconsole")) =2B (source (string-append bin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest) =2B (install-file jconsole dest) =2B (let* ((jconsole (string-append dest "/jconsole"= =29) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jconsole tes= =74s))) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed.")))))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B #t)))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only quirk i= =73 that =2B ;; we install jconsole under /libexec to make room for the wrapp= =65r =2B ;; replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (out (assoc-ref outputs "out")) =2B (bin (string-append out "/bin")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec/j")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p bin) =2B (copy-file (assoc-ref inputs "ijconsole") =2B (string-append bin "/ijconsole-" ,version-major= =29) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,platform ,jarch) "/= =22)) =2B (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep javx)= =29) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B (install-file (string-append "bin/" platform "/" jbit "/jc= =6Fnsole") =2B libexec) =2B (copy-recursively "jlibrary/system" system) =2B (for-each =2B (lambda (source-dev) =2B (if (access? source-dev R_OK) =2B (copy-recursively source-dev dev))) =2B '("jlibrary/dev" "jlibrary/addons/dev")) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (copy-file (assoc-ref inputs "profilex") =2B (string-append etc "/profilex.ijs")))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL family")= =0A+ (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring pro= =62lems =2Bthat are not already well understood.") =2B (license license:gpl3+)))) =2B =2B =2B(define-public jsoftware-j-901 =2B (make-j =2B #:version '("901" . "f") =2B #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" =2B #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) =2B =2B =2B(define j-build-configuration-with-sleef =2B `(#:extra-inputs (("sleef" ,sleef)) =2B #:extra-envars (("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef")))) =2B =2B(define-public jsoftware-j-902 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B `(#:version ,'("902" . "b") =2B #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))= =29 =2B =2B =2B(define-public jsoftware-j-903 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B `(#:version ,'("903" . "a") =2B #:tag "903-release-a" =2B #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))= =29 =2B =2B =2B(define-public (jsoftware-ijconsole-symlink jpkg) =2B "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jve= =72sion>" =2B (package =2B (name "jsoftware-ijconsole") =2B (version (package-version jpkg)) =2B (source #f) =2B (build-system trivial-build-system) =2B (propagated-inputs `(("jpkg" ,jpkg))) =2B (arguments =2B `(#:modules ((guix build utils) =2B (srfi srfi-26)) =2B #:builder =2B (begin =2B (use-modules ((guix build utils) #:select (mkdir-p)) =2B ((ice-9 regex) #:select (string-match)) =2B ((ice-9 ftw) #:select (scandir)) =2B ((srfi srfi-26) #:select (cut))) =2B (let* ((out (assoc-ref %outputs "out")) =2B (jpkg (assoc-ref %build-inputs "jpkg")) =2B (ijconsole (car (scandir (string-append jpkg "/bin") =2B (cut string-match "ijconsole-.*" = =3C>)))) =2B (source (string-append jpkg "/bin/" ijconsole)) =2B (dest (string-append out "/bin/ijconsole"))) =2B (mkdir-p (dirname dest)) =2B (symlink source dest))))) =2B (home-page (package-home-page jpkg)) =2B (synopsis "Provide `ijconsole' symlink to default interpreter version"= =29 =2B (description =2B "The interpreter provided by the J package has a filename like =2Bijconsole-<version>, which provides support for having multiple, concurr= =65nt =2Bversions installed. This package provides a version-agnostic `ijconsole= =27 =2Bsymlink to interpreter version indicated and build time.") =2B (license license:gpl3+))) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.34.0 =0A= ------_=_21b9c7414791ef730b72da0d_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 15 Jan 2022 15:08:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 15 10:08:26 2022 Received: from localhost ([127.0.0.1]:41486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n8kfK-0004Rz-Ft for submit <at> debbugs.gnu.org; Sat, 15 Jan 2022 10:08:26 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1n8kfH-0004RU-3n for 48463 <at> debbugs.gnu.org; Sat, 15 Jan 2022 10:08:25 -0500 Received: by mail-wm1-f67.google.com with SMTP id q9-20020a7bce89000000b00349e697f2fbso12854620wmj.0 for <48463 <at> debbugs.gnu.org>; Sat, 15 Jan 2022 07:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=islX97OJwrM6m7on2gRO/1jrcbn22Amy5og/OjHQWsQ=; b=Tjm3M6/3FjM4gmslw/5O6IRRca+uObGft9ps1+LdObelg9fz5RdoMYBYoa/cC+Hnwd K0yGjexf19jV5ANhPn4JbQK3JPudlKQWbEBoErZbDpLW0B/mqJQ15qS29sIzmg1GSEGg +k4hxjUuiDF/gT1jJniVSG1KirqlcDXj9GwEVsJTTDpZqVIegy7Y1ZaE2SPoDqFh+xub Z1qOY03W0uGmZmUAzLBZwLnY3CeBusIQKtDil21s3Un5I0yUjmvuBPUhJpiqOkGp731J Hdx2m50HQI1pXTTt9rgqy1SQbGRVv/qyFCVB1zYud2EclOrflgYTFFw89R4olmAZwN+N dVfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=islX97OJwrM6m7on2gRO/1jrcbn22Amy5og/OjHQWsQ=; b=JAJ8q/ibGdlcdl0INhRE99Dvc45LhnRqWR7cgud40n2MK2plPPit1c+Q4IdVtSkVxO PSr0Cd/5L+SlQGpZy0ido09bM10JIQXOrNfMNt5IGfOoXhDyEpcXGrWVE+jNqS33s7P4 GDuhpPTpM4GRNRpot2J216bViKVeo+rbgwrCBcU8bZ7wYzsyPTTZt848k1HlPFJU369u uMJ1h5BOUVxgPkB7bzO2+bVsVy4SMRYQ1YB1u1866rCGfkKtXWmjVBHsJ0Q8MxKa1mhA Te6/DloacrQVZC4pBOW1Qo+QkZgdUAfHvTD3hRNdveEAE1hkOiD5DmHaZkP+kw7lYcBt Zx5w== X-Gm-Message-State: AOAM533hb0oNka/lT1YEBKOhgTbQPA3lgBMjzg7RHe47ph9fz+GdQIkD 4lCjcjVcAoev2xGSjWVSnTI= X-Google-Smtp-Source: ABdhPJzbbyNIW4mbQexSnyXR30EdSwEFIU9AYDGoiOFzEu0FeVL3ZReJBHnXK4Yrs7bxGeNUlKUgQw== X-Received: by 2002:a5d:64aa:: with SMTP id m10mr1591643wrp.295.1642259297083; Sat, 15 Jan 2022 07:08:17 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l4sm10115356wry.85.2022.01.15.07.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jan 2022 07:08:16 -0800 (PST) Message-ID: <83aba994536bec60f79900d551d4801c967742bd.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN Date: Sat, 15 Jan 2022 16:08:13 +0100 In-Reply-To: <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Am Samstag, dem 15.01.2022 um 23:05 +0900 schrieb elaexuotee@HIDDEN: > Thanks for staying on top of this patch review. > > Liliana Marie Prikler wrote: > > Hi, > > > > Note, that the current ve [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [209.85.128.67 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.67 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) Hi, Am Samstag, dem 15.01.2022 um 23:05 +0900 schrieb elaexuotee@HIDDEN: > Thanks for staying on top of this patch review. > > Liliana Marie Prikler <liliana.prikler@HIDDEN> wrote: > > Hi, > > > > Note, that the current version still ignores commit. I've attached > > a proof of concept patch, which fixes that, plus some other minor > > things, but it now uses a pair for version. Also it's untested, so > > treat with care. > > Oh! I see. You're wanting the version string to have optional > REVISION and COMMIT parts, like `git-version'. That makes a lot of > sense. > > There was a small issue with `jversion->string' in your patch, which > produces MAJOR-REVISION-COMMIT if no MINOR value is provided. I want > to make sure that users can always have specifications like > "jsoftware-j@MAJOR" in their profile manifest, but guix doesn't treat > hyphen as a version separator. > > I just changed the logic to always keep a dot after MAJOR, and then > use hyphens after that. I'm not quite sure if I agree with that decision, but you're right that @MAJOR ought to be supported. How about enforcing that MINOR exists if REVISION and COMMIT are used and setting it to "0" if there hasn't been an "a" beta or release yet? > > > > > Good idea. Upstream's build scripts condition a *lot* of > > > behaviour on he j64avx environment variable, so it might not be > > > straightforward, but I will put this on the to-do list of future > > > improvements. > > > > > > (Note, the code block quoted here got much simplified in the > > > current patch.) > > Reading /proc/cpuinfo is not nice. Please use (guix cpu), which > > also provides you the flags that you need. > > Oh nice. A new, shiny module! This is exactly what I was looking for > when originally writing the script. Updated. LGTM. > + (native-inputs `(("clang-toolchain" ,clang-toolchain))) > + (inputs (cons* `("libedit" ,libedit) > + `("libomp" ,libomp) > + `("ijconsole" ,(ijconsole)) > + extra-inputs)) My variant already had these translated to the new style. If you're not using old style on purpose – and I don't think you do – you might want to make your life easier by dropping these labels and going with plain (list)s. > + (call-with-output-file "jlibrary/bin/profilex.ijs" > + (lambda (port) > + (display > + (string-join > + (list > + "share=. '/share/j',~ ({.~ _2 { I.@:=&'/') > BINPATH" > + "system=. share,'/system'" > + "tools=. share,'/tools'" > + ;; Upstream defaults to spamming $HOME with > unhidden > + ;; userdata directories. Set this to be > + ;; $HOME/.config/j/<jversion> instead > + "'jtype jversion'=. (3&{,{.) <;._2 ,&'/' > 9!:14''" > + "jversion=. ({.~ i.&'-') jversion" > + "user=. home,'/.config/j/',jversion" > + "addons=. user,'/addons'" > + "break=. user,'/break'" > + "config=. user,'/config'" > + "install=. user,'/install'" > + "snap=. user,'/snap'" > + "temp=. user,'/temp'" > + "\n") > + "\n") > + port))) You might want to use an aux-file for that. Name it jsoftware/profile.ijs if it's just a plain file (which I assume). I recently pushed a commit towards renpy which replaces a large format block by fetching an auxiliary file and substitute*, which you can take as reference if you're unsure. Note that renpy still uses old-style inputs, so the assoc-ref makes sense in that case; however, you should be able to also express this pattern in terms of search-input-file somehow (or otherwise express it as gexp). Cheers
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 15 Jan 2022 14:06:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 15 09:06:19 2022 Received: from localhost ([127.0.0.1]:39560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n8jh5-0002IR-8X for submit <at> debbugs.gnu.org; Sat, 15 Jan 2022 09:06:19 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:28222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n8jh1-0002I8-Oi for 48463 <at> debbugs.gnu.org; Sat, 15 Jan 2022 09:06:10 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1642255567; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=XAnNNB9yGko7znAV+H8/qRVsxUmf1EXcuNva3BkGBAM=; b=jdycPzGSmOiG8gjx5p4fEuWBO/8CB5ARcjH3u4+J1/AY2FWXIyTw7KmcXKRWuTeq4g6UySis E9oLVi0y4LT8im1UYbp2w/7e1vS/ZzjPvgUcPOTTi76kv0lG6FSbyJtBs6yQwNPxR/ges4N9 3NHVoFC7qM4gUWjEzx7NegM5XCeeFNpuKVFfDvMYQi0YBGo9J7fgUmY36RnZoOKMy1LKEEPR 7LpWw650PiUrsmRmJC00Rx1U9AqKk3HpzjbJc+aOj5k44+a+lD5+SdsIR4weNe+iiUOm5koI 7czsr1Z+gP7VD2V4oGAkDmxkHh3giE9c5L/FtvpEQ1NIy14Tvt2mmw== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 61e2d4ca69943108c558ec6d (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Sat, 15 Jan 2022 14:06:01 GMT Received: from localhost (aj097104.dynamic.ppp.asahi-net.or.jp [220.150.97.104]) by wilsonb.com (Postfix) with ESMTPSA id A5C0BA0AC0; Sat, 15 Jan 2022 14:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1642255556; bh=XAnNNB9yGko7znAV+H8/qRVsxUmf1EXcuNva3BkGBAM=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=8hqsFIAII2X1D1ZuVlxq48J86ZF9doSY3jQ+VEOq5oyb/vWxxsJqUIdpPxGlj4rjd fWWeZWJjZtXFy6hDjNDlQrcxuGfiC6Qk7Ed5Ba5T1uWViiqkXJaLstqGP7LgJAcP7/ yiDz6g/Qv7PQfTHuUMZ3wUVgoFLFFEPmvNyRr/JpDUYrHqykRU2i41K9eKTe9pTVeA hakRC3Ronl4gmk7HzsZ3litBFVC7rQ1wTkuH+5Ic7ft0Bqrp8DvfF0wU/uTWi1A1aW zylFQ2YjoM3vgRiri2YYZtEejS3XOQYQpkHiDnuAhZGY4rG0EFdAVtvOnL6rUfqiZv DapQpHgzOGmMmCvabKsIC19JuleySJnYSnml37dQ6jcgi2XwYMGbJgNXSQ76+aQdhV pm6pD3xp5A3LV5thXTDRk1eHiM1NRC7H4nNP6KdonyGwwFBxmSYzmo1RIv2bNgd4N/ lp2JPOCYJN3IZYX37e8ec6YG78EVRBHaufXpBrg48Sxx0vROiRSAnV5JfCpz62zdZP J5p3FhTlShytWA9z3a/SdCL17SGkMBC82F6Bc2FenrW/CYAYw2935vG56fJV7UYBEX Y68BCMEipenfVIjOmZ6KMsowFBlBz3AKpe5pM1RyeaIoZoHlOQmTlRyX+m1uuCkkAr Tlm7BlAEsRliLAd21VK3N9kw= Date: Sat, 15 Jan 2022 23:05:24 +0900 To: Liliana Marie Prikler <liliana.prikler@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> In-Reply-To: <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> Message-Id: <24ZUUMG4QYSHN.2OS7YAMCKREUA@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_33e6df1872b8c2946bb50f5f_=_" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_33e6df1872b8c2946bb50f5f_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for staying on top of this patch review. Liliana Marie Prikler <liliana.prikler@HIDDEN> wrote: > Hi, >=20 > Note, that the current version still ignores commit. I've attached a > proof of concept patch, which fixes that, plus some other minor things, > but it now uses a pair for version. Also it's untested, so treat with > care. Oh! I see. You're wanting the version string to have optional REVISION and COMMIT parts, like `git-version'. That makes a lot of sense. There was a small issue with `jversion->string' in your patch, which produc= es MAJOR-REVISION-COMMIT if no MINOR value is provided. I want to make sure th= at users can always have specifications like "jsoftware-j@MAJOR" in their prof= ile manifest, but guix doesn't treat hyphen as a version separator. I just changed the logic to always keep a dot after MAJOR, and then use hyp= hens after that. > > Good idea. Upstream's build scripts condition a *lot* of behaviour on > > the j64avx environment variable, so it might not be straightforward, > > but I will put this on the to-do list of future improvements. > >=20 > > (Note, the code block quoted here got much simplified in the current > > patch.) > Reading /proc/cpuinfo is not nice. Please use (guix cpu), which also > provides you the flags that you need. Oh nice. A new, shiny module! This is exactly what I was looking for when originally writing the script. Updated. ------_=_33e6df1872b8c2946bb50f5f_=_ Content-Disposition: attachment; filename=0001-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom 13450733d99eafc3bc3fe84629224e653dd85753 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Wed, 12 Jan 2022 18:44:36 +0900 =53ubject: [PATCH] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: Register it. =2D-- =20gnu/local.mk | 1 + =20gnu/packages/jsoftware.scm | 452 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 ++++ =203 files changed, 533 insertions(+) =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex f72d2680af..b90295278a 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -1293,6 +1293,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/irrlicht-use-system-libs.patch \ =20 %D%/packages/patches/isc-dhcp-gcc-compat.patch \ =20 %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ =20 %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ =20 %D%/packages/patches/jsoncpp-pkg-config-version.patch \ =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..6f5aeeb1cb =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,452 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module (guix build utils) =2B #:use-module (guix build-system gnu) =2B #:use-module (guix build-system trivial) =2B #:use-module (guix git-download) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module (guix packages) =2B #:use-module (guix utils) =2B #:use-module (gnu packages) =2B #:use-module (gnu packages libedit) =2B #:use-module (gnu packages llvm) =2B #:use-module (gnu packages maths) =2B #:use-module (guix gexp) =2B #:use-module (ice-9 ftw) =2B #:use-module (ice-9 match) =2B #:use-module (ice-9 regex) =2B #:use-module (ice-9 rdelim) =2B #:use-module (srfi srfi-1) =2B #:use-module (srfi srfi-26) =2B #:use-module (srfi srfi-71)) =2B =2B =2B;;; TODO: Make importer and packages for J addons: =2B;;; http://www.jsoftware.com/jal/ =2B =2B;;; TODO: Package up j80x series =2B =2B =2B(define (jname prefix release-type) =2B "Return a package name for J, including RELEASE-TYPE only if not 'rele= =61se." =2B (match release-type =2B ('release prefix) =2B (_ (string-append prefix "-" (symbol->string release-type))))= =29 =2B =2B;; We want a version string where packages specifications like pkg@MAJOR= =20work. =2B;; This requires that the first version part separator be dot. Subseque= =6Et =2B;; separators are hyphen, mirror `git-version' etc. =2B(define* (jversion->string major #:optional minor revision commit) =2B "Return a version string formatted like MAJOR.MINOR-REVISION-COMMIT. = =4Fnly =2B MAJOR is required, but ensure that the first separator is dot and subs= =65quent =2B are hypen." =2B (let* ((commit (and commit (string-take commit 7))) =2B (sub-parts (filter (cut (compose not eq?) #f <>) =2B (list minor revision commit)))) =2B (match sub-parts =2B (() major) =2B (_ (string-append major "." (string-join sub-parts "-")))))) =2B =2B(define* (jrelease-string release-type #:optional version-minor) =2B "Construct J release identifier string." =2B (let ((release-type (symbol->string release-type))) =2B (if version-minor =2B (string-append release-type "-" version-minor) =2B release-type))) =2B =2B(define* (jinfo->git-tag version-major release-type #:optional version-m= =69nor) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (string-append "j" version-major (jrelease-string release-type versio= =6E-minor))) =2B =2B(define (ijconsole) =2B "Generate a G-exp script that detects AVX/AVX2 support at runtime and =2B executes jconsole with the appropriate libj.so and profile.ijs." =2B (with-imported-modules '((guix cpu) =2B (guix memoization) =2B (guix profiling) =2B (guix sets) =2B (srfi srfi-26)) =2B (program-file "ijconsole" =2B #~(begin =2B (use-modules ((guix cpu) #:select (cpu-flags current-cpu))= =0A+ ((guix sets) #:select (set-contains?)) =2B ((srfi srfi-26) #:select (cute))) =2B =2B ;; Assume that this script will be installed under bin/. =2B (define %basedir (dirname (dirname (current-filename)))) =2B =2B (let* ((jconsole (string-append %basedir "/libexec/j/jconsole"= =29) =2B (cpu-has-flag? =2B (cute set-contains? (cpu-flags (current-cpu)) <>)) =2B (libj (format #f "~a/lib/j/libj~a.so" %basedir =2B (cond ((cpu-has-flag? "avx2") "-avx2") =2B ((cpu-has-flag? "avx") "-avx") =2B (else "")))) =2B (jprofile (string-append %basedir "/etc/j/profile.ijs")= =29) =2B (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jp= =72ofile =2B (cdr (command-line)))))))) =2B =2B(define* (make-j #:key =2B version =2B revision =2B hash =2B tag =2B commit =2B (release-type 'release) =2B (patches '()) =2B (extra-inputs '()) =2B (extra-envars '()) =2B (builder "guix.gnu.org")) =2B (let* ((version-major version-minor (if (pair? version) =2B (car+cdr version) =2B (values version #f)))) =2B (package =2B (name (jname "jsoftware-j" release-type)) =2B (version (jversion->string version-major version-minor revision commi= =74)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (or commit tag =2B (jinfo->git-tag version-major =2B release-type =2B version-minor))))) =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (build-system gnu-build-system) =2B (native-inputs `(("clang-toolchain" ,clang-toolchain))) =2B (inputs (cons* `("libedit" ,libedit) =2B `("libomp" ,libomp) =2B `("ijconsole" ,(ijconsole)) =2B extra-inputs)) =2B (arguments =2B `(#:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-match))= =0A+ ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that build b= =75ild up =2B ;; (very complicated) environment variables to pass to make. The = =62asic =2B ;; build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values;= =0A+ ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the sour= =63e =2B ;; directory; they do not supply a make `install' target. Thus it= =20takes =2B ;; some massaging to install files in FHS-style directories. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable directori= =65s; =2B ;; 3) make2/build_*.sh to respect standard build conventions; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")= =29 =2B (clang (string-append clang-toolchain "/bin/clang")) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version-major)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" =2B ,(jrelease-string release-type version-minor)))= =0A+ (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Create profilex.ijs overrides to point to the correct s= =74ore =2B ;; items. Note that we set ~install and ~addons directori= =65s to =2B ;; reside under ~user to allow installing and loading addo= =6Es. =2B ;; TODO: Guix-ify J addons as well. =2B (call-with-output-file "jlibrary/bin/profilex.ijs" =2B (lambda (port) =2B (display =2B (string-join =2B (list =2B "share=3D. '/share/j',~ ({.~ _2 { I.@:=3D&'/') B= =49NPATH" =2B "system=3D. share,'/system'" =2B "tools=3D. share,'/tools'" =2B ;; Upstream defaults to spamming $HOME with unhi= =64den =2B ;; userdata directories. Set this to be =2B ;; $HOME/.config/j/<jversion> instead =2B "'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9!:14= =27'" =2B "jversion=3D. ({.~ i.&'-') jversion" =2B "user=3D. home,'/.config/j/',jversion" =2B "addons=3D. user,'/addons'" =2B "break=3D. user,'/break'" =2B "config=3D. user,'/config'" =2B "install=3D. user,'/install'" =2B "snap=3D. user,'/snap'" =2B "temp=3D. user,'/temp'" =2B "\n") =2B "\n") =2B port))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the act= =75al =2B ;; compiler. It is just a switch to tell the build= =0A+ ;; scripts whether to use gcc- or clang-specific f= =6Cags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS= =20")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) =2B (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n"))))) =2B '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. The p= =61th =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-script =2B ;; definitions of new J engine functionality. Since we po= =69nt =2B ;; ~addons under the ~user directory, we move it under ~sy= =73tem =2B ;; instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"))) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))))) =2B ;; Implementation of 9!:14 records build time which breaks= =20build =2B ;; reproducibility. Note that upstream code depends on th= =65 exact =2B ;; format of these strings, so we need to mimic the standa= =72d. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support being= =0A+ ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B =2B ;; The build output depends primarily on the values of the `jpla= =74form' =2B ;; and `j64x' environment variables. If the target is ARM, then= =0A+ ;; `jplatform' is "raspberry", otherwise it is `linux'. In add= =69tion to =2B ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX= =32 =2B ;; variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to disting= =75ish =2B ;; between CPU features. Thus we build and install all variants= =20of =2B ;; libj, expecting jconsole to be called with a wrapper script t= =68at =2B ;; detects AVX features and loads the appropriate libj at runtim= =65. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (target-bit ,(if (target-64bit?) "64" "32")) =2B (run (lambda* (script #:key (avx "")) =2B (invoke "env" =2B (string-append "jplatform=3D" platfo= =72m) =2B (string-append "j64x=3Dj" target-bit= =20avx) =2B script)))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, we j= =75st =2B ;; build it once. =2B (run "./build_jconsole.sh") =2B (run "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (run "./build_libj.sh" #:avx "avx") =2B (run "./build_libj.sh" #:avx "avx2")))))))) =2B ;; The test suite is expected to be run as follows for each vari= =61nt of =2B ;; libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary fil= =65s. We =2B ;; simply place these all under test/bin. =2B (replace 'check =2B (lambda* (#:key tests? #:allow-other-keys) =2B (when tests? =2B (let ((platform ,(if (target-arm?) "raspberry" "linux"))) =2B (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, but= =20needs =2B ;; to be copied into the ~system directory when it does.= =0A+ (for-each =2B (lambda (dev-dir) =2B (if (file-exists? dev-dir) =2B (copy-recursively dev-dir "test/bin/system/dev")))= =0A+ '("jlibrary/dev" "jlibrary/addons/dev")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((bin (string-append "bin/" platform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append bin "/" jbit =2B "/jconsole")) =2B (source (string-append bin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest) =2B (install-file jconsole dest) =2B (let* ((jconsole (string-append dest "/jconsole"= =29) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jconsole tes= =74s))) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed.")))))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B #t)))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only quirk i= =73 that =2B ;; we install jconsole under /libexec to make room for the wrapp= =65r =2B ;; replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (ijconsole (assoc-ref inputs "ijconsole")) =2B (jconsole (string-append "bin/" platform "/" =2B jbit "/jconsole")) =2B (out (assoc-ref outputs "out")) =2B (bin (string-append out "/bin")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec/j")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p bin) =2B (copy-file ijconsole (string-append bin "/ijconsole-" =2B ,version-major)) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,platform ,jarch) "/= =22)) =2B (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep javx)= =29) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B (install-file jconsole libexec) =2B (copy-recursively "jlibrary/system" system) =2B (for-each =2B (lambda (source-dev) =2B (if (access? source-dev R_OK) =2B (copy-recursively source-dev dev))) =2B '("jlibrary/dev" "jlibrary/addons/dev")) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (install-file "jlibrary/bin/profilex.ijs" etc))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL family")= =0A+ (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring pro= =62lems =2Bthat are not already well understood.") =2B (license license:gpl3+)))) =2B =2B =2B(define-public jsoftware-j-901 =2B (make-j =2B #:version '("901" . "f") =2B #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" =2B #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) =2B =2B =2B(define j-build-configuration-with-sleef =2B `(#:extra-inputs (("sleef" ,sleef)) =2B #:extra-envars (("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef")))) =2B =2B(define-public jsoftware-j-902 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B `(#:version ,'("902" . "b") =2B #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))= =29 =2B =2B =2B(define-public jsoftware-j-903 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B `(#:version ,'("903" . "a") =2B #:tag "903-release-a" =2B #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))= =29 =2B =2B =2B(define-public (jsoftware-ijconsole-symlink jpkg) =2B "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jve= =72sion>" =2B (package =2B (name "jsoftware-ijconsole") =2B (version (package-version jpkg)) =2B (source #f) =2B (build-system trivial-build-system) =2B (propagated-inputs `(("jpkg" ,jpkg))) =2B (arguments =2B `(#:modules ((guix build utils) =2B (srfi srfi-26)) =2B #:builder =2B (begin =2B (use-modules ((guix build utils) #:select (mkdir-p)) =2B ((ice-9 regex) #:select (string-match)) =2B ((ice-9 ftw) #:select (scandir)) =2B ((srfi srfi-26) #:select (cut))) =2B (let* ((out (assoc-ref %outputs "out")) =2B (jpkg (assoc-ref %build-inputs "jpkg")) =2B (ijconsole (car (scandir (string-append jpkg "/bin") =2B (cut string-match "ijconsole-.*" = =3C>)))) =2B (source (string-append jpkg "/bin/" ijconsole)) =2B (dest (string-append out "/bin/ijconsole"))) =2B (mkdir-p (dirname dest)) =2B (symlink source dest))))) =2B (home-page (package-home-page jpkg)) =2B (synopsis "Provide `ijconsole' symlink to default interpreter version"= =29 =2B (description =2B "The interpreter provided by the J package has a filename like =2Bijconsole-<version>, which provides support for having multiple, concurr= =65nt =2Bversions installed. This package provides a version-agnostic `ijconsole= =27 =2Bsymlink to interpreter version indicated and build time.") =2B (license license:gpl3+))) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.34.0 =0A= ------_=_33e6df1872b8c2946bb50f5f_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 13 Jan 2022 17:51:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 13 12:51:33 2022 Received: from localhost ([127.0.0.1]:34529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n84Fy-0003E8-1B for submit <at> debbugs.gnu.org; Thu, 13 Jan 2022 12:51:33 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1n84Fv-0003De-6M for 48463 <at> debbugs.gnu.org; Thu, 13 Jan 2022 12:51:24 -0500 Received: by mail-wr1-f65.google.com with SMTP id v6so11522432wra.8 for <48463 <at> debbugs.gnu.org>; Thu, 13 Jan 2022 09:51:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version; bh=TiLzPqS84Soyeo+KYJJ2y1c2+4NiIpOQa+ALShIxOcc=; b=mPI+ar5FM5BtuF3iEHFmVwmPgU2cllQreG937dFG3A+cueXNeybXbfJRo1KuwNil6N MdmeX0AV9S9RdGM2677pm1hshA3QY29y8JMUAM4qyPoX3vN3rVQ7KzPoLMKD9wIr2f73 JZfADFuzWRXujC/nvOHx0G7LV3BeplzwcmhQ8WA5mM3m2ls6anlBdbwEJn/AWy7KDz4H wpdm2MyMpbHwtUUxvitjcL+u8CtDLiFknKtruKGfJNg6AqbAPM5Co9r19a+lF6ZMMEKV 82vQ0umIFohg6iMZwHpShAkUWkGWUHUPy5JdMMIPDETI5eaakGMjuI+9v5Vrf1diQknd +pAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version; bh=TiLzPqS84Soyeo+KYJJ2y1c2+4NiIpOQa+ALShIxOcc=; b=z+DQstol/67lmWX/+aUjZoJiJIIK+hhmiNSdAh590ab0mCl1WUQOE4GbuheAG54ERZ teRxPh04sgoBaAm/WTKIbnVdDsnpPMXDdVVfQp3sFULbz7Hex4NJTuOVv8/fJH9JpYQ4 gSwAg9ro4IiOFwAcTow6kjamekfvkqben8RCDFaqmGwstqOt6Dz5UTodd+x7JzrFFNw/ 7lmhXKNb4BCfk5lR6RxilZW3VGFP/G/cpFyLTKMPMY4lA0BK3qsF8KJgXSLZbrgdeYjU EFxBTQRN5i5ZGZLdJHA4TPVDXUQ6zQE4ps94xlQhB0xky7xW9QogcLxCOyk32RXfdaj7 nxoQ== X-Gm-Message-State: AOAM5313jFkhohLYq4WSh805Vs3e4K/gjx+s3u7kSc/UaaqMa15J8vJk CzQ+vv1tvAiGntCpyg3BXRI= X-Google-Smtp-Source: ABdhPJzL2W5BKjhYXvb0oR3+7IF51aIz5YKdJsLEdlUAvoLQ39qY9nLTBxReGBM9j1rIDd9W1/HbwA== X-Received: by 2002:adf:e291:: with SMTP id v17mr4869706wri.479.1642096277247; Thu, 13 Jan 2022 09:51:17 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id m35sm14254388wms.1.2022.01.13.09.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jan 2022 09:51:16 -0800 (PST) Message-ID: <62d37956f16c08bc4ce26e44da16dce704ddd0f8.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN Date: Thu, 13 Jan 2022 18:51:14 +0100 In-Reply-To: <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> Content-Type: multipart/mixed; boundary="=-oVps8UgJulS5Eykt4b4j" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-oVps8UgJulS5Eykt4b4j Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Hi, Am Donnerstag, dem 13.01.2022 um 16:51 +0900 schrieb elaexuotee@HIDDEN: > > > > > +(define* (make-j #:key > > > +                (builder "guix.gnu.org") > > > +                vername > > > +                revision > > > +                hash > > > +                (type 'release) > > > +                commit > > > +                (patches '()) > > > +                (extra-inputs '()) > > > +                (extra-envars '())) > > > + (package > > > +  (name (jname "jsoftware-j" type)) > > > +  (version (jversion->string vername revision)) > > > +  (source > > > +   (origin > > > +     (method git-fetch) > > > +     (uri (git-reference > > > +           (url "https://github.com/jsoftware/jsource") > > > +           (commit (or commit (jinfo->git-tag vername type > > > revision)))) > > Vername sounds a little weird, make that version-base or something > > clearer. Also, the argument #:commit is used in an unclear fashion > > -- > > if you were to pass an actual commit hash to it, it'd still be > > treated > > as a release and not be using git-version. > > Cool. I had a similar sense, but our ideas are a lot sharper than the > ones I had. This actually prompted me to do some code cleanup, > leveraging now-me who has a bit more Guile experience than past-me. > At the very least, variable names should be more descriptive and > consistent, overall. Note, that the current version still ignores commit. I've attached a proof of concept patch, which fixes that, plus some other minor things, but it now uses a pair for version. Also it's untested, so treat with care. > Good idea. Upstream's build scripts condition a *lot* of behaviour on > the j64avx environment variable, so it might not be straightforward, > but I will put this on the to-do list of future improvements. > > (Note, the code block quoted here got much simplified in the current > patch.) Reading /proc/cpuinfo is not nice. Please use (guix cpu), which also provides you the flags that you need. Cheers --=-oVps8UgJulS5Eykt4b4j Content-Disposition: attachment; filename="0001-gnu-Add-j.patch" Content-Type: text/x-patch; name="0001-gnu-Add-j.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSA5M2JkNDc4NTY1NjVhZjE0MDdiNjYyYWNmYWU4ODU3ODIxYzU3MWM4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiAiQi4gV2lsc29uIiA8ZWxhZXh1b3RlZUB3aWxzb25iLmNvbT4K RGF0ZTogV2VkLCAxMiBKYW4gMjAyMiAxODo0NDozNiArMDkwMApTdWJqZWN0OiBbUEFUQ0hdIGdu dTogQWRkIGouCgoqIGdudS9wYWNrYWdlcy9qc29mdHdhcmUuc2NtOiBOZXcgZmlsZS4KKiBnbnUv cGFja2FnZXMvcGF0Y2hlcy9qc29mdHdhcmUtajkwMS1mLWZpeGVzLnBhdGNoOiBOZXcgZmlsZS4K KiBnbnUvbG9jYWwubWsgW0dOVV9TWVNURU1fTU9EVUxFU106IFJlZ2lzdGVyIGpzb2Z0d2FyZS4K W2Rpc3RfcGF0Y2hfREFUQV06IEFkZCBqc29mdHdhcmUtajkwMS1mLWZpeGVzLnBhdGNoLgotLS0K IGdudS9sb2NhbC5tayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgMiArCiBn bnUvcGFja2FnZXMvanNvZnR3YXJlLnNjbSAgICAgICAgICAgICAgICAgICAgfCA0NTkgKysrKysr KysrKysrKysrKysrCiAuLi4vcGF0Y2hlcy9qc29mdHdhcmUtajkwMS1mLWZpeGVzLnBhdGNoICAg ICAgfCAgODAgKysrCiAzIGZpbGVzIGNoYW5nZWQsIDU0MSBpbnNlcnRpb25zKCspCiBjcmVhdGUg bW9kZSAxMDA2NDQgZ251L3BhY2thZ2VzL2pzb2Z0d2FyZS5zY20KIGNyZWF0ZSBtb2RlIDEwMDY0 NCBnbnUvcGFja2FnZXMvcGF0Y2hlcy9qc29mdHdhcmUtajkwMS1mLWZpeGVzLnBhdGNoCgpkaWZm IC0tZ2l0IGEvZ251L2xvY2FsLm1rIGIvZ251L2xvY2FsLm1rCmluZGV4IGVmNzNmOTIzN2EuLmU2 OWE2OTAyN2EgMTAwNjQ0Ci0tLSBhL2dudS9sb2NhbC5taworKysgYi9nbnUvbG9jYWwubWsKQEAg LTMyNSw2ICszMjUsNyBAQCBHTlVfU1lTVEVNX01PRFVMRVMgPQkJCQlcCiAgICVEJS9wYWNrYWdl cy9qZW1hbGxvYy5zY20JCQlcCiAgICVEJS9wYWNrYWdlcy9qcm5sLnNjbQkJCQlcCiAgICVEJS9w YWNrYWdlcy9qb3NlLnNjbQkJCQlcCisgICVEJS9wYWNrYWdlcy9qc29mdHdhcmUuc2NtCQkJCVwK ICAgJUQlL3BhY2thZ2VzL2p1bGlhLnNjbQkJCVwKICAgJUQlL3BhY2thZ2VzL2p1bGlhLWpsbC5z Y20JCQlcCiAgICVEJS9wYWNrYWdlcy9qdWxpYS14eXouc2NtCQkJXApAQCAtMTI5MCw2ICsxMjkx LDcgQEAgZGlzdF9wYXRjaF9EQVRBID0JCQkJCQlcCiAgICVEJS9wYWNrYWdlcy9wYXRjaGVzL2ly cmxpY2h0LXVzZS1zeXN0ZW0tbGlicy5wYXRjaAkJXAogICAlRCUvcGFja2FnZXMvcGF0Y2hlcy9p c2MtZGhjcC1nY2MtY29tcGF0LnBhdGNoCQlcCiAgICVEJS9wYWNrYWdlcy9wYXRjaGVzL2lzbC0w LjExLjEtYWFyY2g2NC1zdXBwb3J0LnBhdGNoCVwKKyAgJUQlL3BhY2thZ2VzL3BhdGNoZXMvanNv ZnR3YXJlLWo5MDEtZi1maXhlcy5wYXRjaAkJXAogICAlRCUvcGFja2FnZXMvcGF0Y2hlcy9qc29u LWMtMC4xMy1DVkUtMjAyMC0xMjc2Mi5wYXRjaAlcCiAgICVEJS9wYWNrYWdlcy9wYXRjaGVzL2pz b24tYy0wLjEyLUNWRS0yMDIwLTEyNzYyLnBhdGNoCVwKICAgJUQlL3BhY2thZ2VzL3BhdGNoZXMv anNvbmNwcC1wa2ctY29uZmlnLXZlcnNpb24ucGF0Y2gJCVwKZGlmZiAtLWdpdCBhL2dudS9wYWNr YWdlcy9qc29mdHdhcmUuc2NtIGIvZ251L3BhY2thZ2VzL2pzb2Z0d2FyZS5zY20KbmV3IGZpbGUg bW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMDAwMC4uNTE5NjRkZDVhYgotLS0gL2Rldi9udWxsCisr KyBiL2dudS9wYWNrYWdlcy9qc29mdHdhcmUuc2NtCkBAIC0wLDAgKzEsNDU5IEBACis7OzsgR05V IEd1aXggLS0tIEZ1bmN0aW9uYWwgcGFja2FnZSBtYW5hZ2VtZW50IGZvciBHTlUKKzs7OyBDb3B5 cmlnaHQgwqkgMjAyMiBCLiBXaWxzb24gPGVsYWV4dW90ZWVAd2lsc29uYi5jb20+Cis7OzsKKzs7 OyBUaGlzIGZpbGUgaXMgcGFydCBvZiBHTlUgR3VpeC4KKzs7OworOzs7IEdOVSBHdWl4IGlzIGZy ZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQKKzs7 OyB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1 Ymxpc2hlZCBieQorOzs7IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJz aW9uIDMgb2YgdGhlIExpY2Vuc2UsIG9yIChhdAorOzs7IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIg dmVyc2lvbi4KKzs7OworOzs7IEdOVSBHdWl4IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRo YXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dAorOzs7IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRo b3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKKzs7OyBNRVJDSEFOVEFCSUxJVFkgb3Ig RklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlCis7OzsgR05VIEdlbmVy YWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4KKzs7OworOzs7IFlvdSBzaG91bGQg aGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCis7 OzsgYWxvbmcgd2l0aCBHTlUgR3VpeC4gIElmIG5vdCwgc2VlIDxodHRwOi8vd3d3LmdudS5vcmcv bGljZW5zZXMvPi4KKworKGRlZmluZS1tb2R1bGUgKGdudSBwYWNrYWdlcyBqc29mdHdhcmUpCisg ICM6dXNlLW1vZHVsZSAoZ3VpeCBidWlsZCB1dGlscykKKyAgIzp1c2UtbW9kdWxlIChndWl4IGJ1 aWxkLXN5c3RlbSBnbnUpCisgICM6dXNlLW1vZHVsZSAoZ3VpeCBidWlsZC1zeXN0ZW0gdHJpdmlh bCkKKyAgIzp1c2UtbW9kdWxlIChndWl4IGdpdC1kb3dubG9hZCkKKyAgIzp1c2UtbW9kdWxlICgo Z3VpeCBsaWNlbnNlcykgIzpwcmVmaXggbGljZW5zZTopCisgICM6dXNlLW1vZHVsZSAoZ3VpeCBw YWNrYWdlcykKKyAgIzp1c2UtbW9kdWxlIChndWl4IHV0aWxzKQorICAjOnVzZS1tb2R1bGUgKGdu dSBwYWNrYWdlcykKKyAgIzp1c2UtbW9kdWxlIChnbnUgcGFja2FnZXMgbGliZWRpdCkKKyAgIzp1 c2UtbW9kdWxlIChnbnUgcGFja2FnZXMgbGx2bSkKKyAgIzp1c2UtbW9kdWxlIChnbnUgcGFja2Fn ZXMgbWF0aHMpCisgICM6dXNlLW1vZHVsZSAoZ3VpeCBnZXhwKQorICAjOnVzZS1tb2R1bGUgKGlj ZS05IGZ0dykKKyAgIzp1c2UtbW9kdWxlIChpY2UtOSBtYXRjaCkKKyAgIzp1c2UtbW9kdWxlIChp Y2UtOSByZWdleCkKKyAgIzp1c2UtbW9kdWxlIChpY2UtOSByZGVsaW0pCisgICM6dXNlLW1vZHVs ZSAoc3JmaSBzcmZpLTEpCisgICM6dXNlLW1vZHVsZSAoc3JmaSBzcmZpLTI2KQorICAjOnVzZS1t b2R1bGUgKHNyZmkgc3JmaS03MSkpCisKKworOzs7IFRPRE86IE1ha2UgaW1wb3J0ZXIgYW5kIHBh Y2thZ2VzIGZvciBKIGFkZG9uczoKKzs7OyBodHRwOi8vd3d3Lmpzb2Z0d2FyZS5jb20vamFsLwor Cis7OzsgVE9ETzogUGFja2FnZSB1cCBqODB4IHNlcmllcworCisKKyhkZWZpbmUgKGpuYW1lIHBy ZWZpeCByZWxlYXNlLXR5cGUpCisgICJSZXR1cm4gYSBwYWNrYWdlIG5hbWUgZm9yIEosIGluY2x1 ZGluZyBSRUxFQVNFLVRZUEUgb25seSBpZiBub3QgJ3JlbGVhc2UuIgorICAobWF0Y2ggcmVsZWFz ZS10eXBlCisgICAgKCdyZWxlYXNlIHByZWZpeCkKKyAgICAoXyAgICAgICAgKHN0cmluZy1hcHBl bmQgcHJlZml4ICItIiAoc3ltYm9sLT5zdHJpbmcgcmVsZWFzZS10eXBlKSkpKSkKKworKGRlZmlu ZSogKGp2ZXJzaW9uLT5zdHJpbmcgbWFqb3IgIzpvcHRpb25hbCBtaW5vciByZXZpc2lvbiBjb21t aXQpCisgICJSZXR1cm4gYSB2ZXJzaW9uIHN0cmluZyBmb3JtYXR0ZWQgbGlrZSBNQUpPUiwgTUFK T1IuTUlOT1IsIG9yCitNQUpPUlsuTUlOT1JdLVJFVklTSU9OLUNPTU1JVCBkZXBlbmRpbmcgb24g dGhlIGdpdmVuIHBhcmFtZXRlcnMuIgorICAobWF0Y2ggKGxpc3QgbWlub3IgcmV2aXNpb24gY29t bWl0KQorICAgICgoI2YgI2YgI2YpIG1ham9yKQorICAgICgobWlub3IgI2YgI2YpIChzdHJpbmct YXBwZW5kIG1ham9yICIuIiBtaW5vcikpCisgICAgKChtaW5vciByZXZpc2lvbiBjb21taXQpCisg ICAgIChzdHJpbmctYXBwZW5kIChpZiBtaW5vciAoc3RyaW5nLWFwcGVuZCBtYWpvciAiLiIgbWlu b3IpIG1ham9yKQorICAgICAgICAgICAgICAgICAgICAiLSIgcmV2aXNpb24gIi0iIGNvbW1pdCkp KSkKKworKGRlZmluZSogKGpyZWxlYXNlLXN0cmluZyByZWxlYXNlLXR5cGUgIzpvcHRpb25hbCBt aW5vcikKKyAgIkNvbnN0cnVjdCBKIHJlbGVhc2UgaWRlbnRpZmllciBzdHJpbmcuIgorICAobGV0 ICgocmVsZWFzZS10eXBlIChzeW1ib2wtPnN0cmluZyByZWxlYXNlLXR5cGUpKSkKKyAgICAoaWYg bWlub3IKKyAgICAgICAgKHN0cmluZy1hcHBlbmQgcmVsZWFzZS10eXBlICItIiBtaW5vcikKKyAg ICAgICAgcmVsZWFzZS10eXBlKSkpCisKKyhkZWZpbmUqIChqaW5mby0+Z2l0LXRhZyBtYWpvciBy ZWxlYXNlLXR5cGUgIzpvcHRpb25hbCBtaW5vcikKKyAgIkdpdmVuIHZlcnNpb24gcGFyYW1ldGVy cywgY29uc3RydWN0IGEgZ2l0IHRhZyBmb3IgdXBzdHJlYW0gcmVsZWFzZXMuIgorICAoc3RyaW5n LWFwcGVuZCAiaiIgbWFqb3IgKGpyZWxlYXNlLXN0cmluZyByZWxlYXNlLXR5cGUgbWlub3IpKSkK KworKGRlZmluZSAoaWpjb25zb2xlKQorICAiR2VuZXJhdGUgYSBHLWV4cCBzY3JpcHQgdGhhdCBk ZXRlY3RzIEFWWC9BVlgyIHN1cHBvcnQgYXQgcnVudGltZSBhbmQKK2V4ZWN1dGVzIGpjb25zb2xl IHdpdGggdGhlIGFwcHJvcHJpYXRlIGxpYmouc28gYW5kIHByb2ZpbGUuaWpzLiIKKyAgKHByb2dy YW0tZmlsZSAiaWpjb25zb2xlIgorICAgICN+KGJlZ2luCisgICAgICAgICh1c2UtbW9kdWxlcyAo KGljZS05IHJkZWxpbSkgIzpzZWxlY3QgKHJlYWQtbGluZSkpCisgICAgICAgICAgICAgICAgICAg ICAoKGljZS05IHJlZ2V4KSAjOnNlbGVjdCAocmVnZXhwLW1hdGNoPyBzdHJpbmctbWF0Y2gpKSkK KworICAgICAgICA7OyBBc3N1bWUgdGhhdCB0aGlzIHNjcmlwdCB3aWxsIGJlIGluc3RhbGxlZCB1 bmRlciBiaW4vLgorICAgICAgICAoZGVmaW5lICViYXNlZGlyIChkaXJuYW1lIChkaXJuYW1lIChj dXJyZW50LWZpbGVuYW1lKSkpKQorCisgICAgICAgIChkZWZpbmUgKGNwdS1mZWF0dXJlLWxpbmU/ IHN0cmluZykKKyAgICAgICAgICAoc3RyaW5nLXByZWZpeD8gImZsYWdzIiBzdHJpbmcpKQorCisg ICAgICAgIChkZWZpbmUgKGNvbnRhaW5zLXdvcmQ/IHdvcmQgc3RyaW5nKQorICAgICAgICAgIChy ZWdleHAtbWF0Y2g/CisgICAgICAgICAgICAoc3RyaW5nLW1hdGNoIChzdHJpbmctam9pbiBgKCJc XDwiICx3b3JkICJcXD4iKSAiIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nKSkp CisKKyAgICAgICAgKGRlZmluZSAoaGFzLWNwdS1mZWF0dXJlPyBmZWF0dXJlKQorICAgICAgICAg ICh3aXRoLWlucHV0LWZyb20tZmlsZSAiL3Byb2MvY3B1aW5mbyIKKyAgICAgICAgICAgICAobGFt YmRhICgpCisgICAgICAgICAgICAgICAoY2F0Y2ggJ2ZvdW5kCisgICAgICAgICAgICAgICAgIChs YW1iZGEgKCkKKyAgICAgICAgICAgICAgICAgICAobGV0IGxvb3AgKChsaW5lIChyZWFkLWxpbmUp KSkKKyAgICAgICAgICAgICAgICAgICAgIChjb25kICgoZW9mLW9iamVjdD8gbGluZSkgI2YpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAoKGFuZCAoY3B1LWZlYXR1cmUtbGluZT8gbGluZSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb250YWlucy13b3JkPyBmZWF0dXJl IGxpbmUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAnZm91bmQpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGVsc2UgKGxvb3AgKHJlYWQtbGluZSkpKSkpKQorICAg ICAgICAgICAgICAgICAoY29uc3QgI3QpKSkpKQorCisgICAgICAgIChsZXQqICgoamNvbnNvbGUg KHN0cmluZy1hcHBlbmQgJWJhc2VkaXIgIi9saWJleGVjL2ovamNvbnNvbGUiKSkKKyAgICAgICAg ICAgICAgIChsaWJqIChmb3JtYXQgI2YgIn5hL2xpYi9qL2xpYmotfmEuc28iICViYXNlZGlyCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb25kICgoaGFzLWNwdS1mZWF0dXJlPyAiYXZ4 MiIpICJhdngyIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChoYXMtY3B1 LWZlYXR1cmU/ICJhdngiKSAiYXZ4IikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGVsc2UgIiIpKSkpCisgICAgICAgICAgICAgICAoanByb2ZpbGUgKHN0cmluZy1hcHBlbmQg JWJhc2VkaXIgIi9ldGMvai9wcm9maWxlLmlqcyIpKSkKKyAgICAgICAgICAoYXBwbHkgZXhlY2wg amNvbnNvbGUgImlqY29uc29sZSIgIi1saWIiIGxpYmogIi1qcHJvZmlsZSIganByb2ZpbGUKKyAg ICAgICAgICAgICAgICAgKGNkciAoY29tbWFuZC1saW5lKSkpKSkpKQorCisoZGVmaW5lKiAobWFr ZS1qICM6a2V5CisgICAgICAgICAgICAgICAgIHZlcnNpb24KKyAgICAgICAgICAgICAgICAgcmV2 aXNpb24KKyAgICAgICAgICAgICAgICAgaGFzaAorICAgICAgICAgICAgICAgICBjb21taXQKKyAg ICAgICAgICAgICAgICAgdGFnCisgICAgICAgICAgICAgICAgIChyZWxlYXNlLXR5cGUgJ3JlbGVh c2UpCisgICAgICAgICAgICAgICAgIChwYXRjaGVzICcoKSkKKyAgICAgICAgICAgICAgICAgKGV4 dHJhLWlucHV0cyAnKCkpCisgICAgICAgICAgICAgICAgIChleHRyYS1lbnZhcnMgJygpKQorICAg ICAgICAgICAgICAgICAoYnVpbGRlciAiZ3VpeC5nbnUub3JnIikpCisgIChsZXQgKChtYWpvciBt aW5vciAoaWYgKHBhaXI/IHZlcnNpb24pCisgICAgICAgICAgICAgICAgICAgICAgICAgKGNhcitj ZHIgdmVyc2lvbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAodmFsdWVzIHZlcnNpb24gIiIp KSkpCisgICAgKHBhY2thZ2UKKyAgICAgIChuYW1lIChqbmFtZSAianNvZnR3YXJlLWoiIHJlbGVh c2UtdHlwZSkpCisgICAgICAodmVyc2lvbiAoanZlcnNpb24tPnN0cmluZyBtYWpvciBtaW5vciBy ZXZpc2lvbiBjb21taXQpKQorICAgICAgKHNvdXJjZQorICAgICAgIChvcmlnaW4KKyAgICAgICAg IChtZXRob2QgZ2l0LWZldGNoKQorICAgICAgICAgKHVyaSAoZ2l0LXJlZmVyZW5jZQorICAgICAg ICAgICAgICAgKHVybCAiaHR0cHM6Ly9naXRodWIuY29tL2pzb2Z0d2FyZS9qc291cmNlIikKKyAg ICAgICAgICAgICAgIChjb21taXQgKG9yCisgICAgICAgICAgICAgICAgICAgICAgICBjb21taXQK KyAgICAgICAgICAgICAgICAgICAgICAgIHRhZyAoamluZm8tPmdpdC10YWcgbWFqb3IKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZS10eXBlCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbm9yKSkpKSkKKyAgICAg ICAgIChzaGEyNTYgKGJhc2UzMiBoYXNoKSkKKyAgICAgICAgIChmaWxlLW5hbWUgKGdpdC1maWxl LW5hbWUgbmFtZSB2ZXJzaW9uKSkKKyAgICAgICAgIChwYXRjaGVzIHBhdGNoZXMpKSkKKyAgICAg IChidWlsZC1zeXN0ZW0gZ251LWJ1aWxkLXN5c3RlbSkKKyAgICAgIChuYXRpdmUtaW5wdXRzCisg ICAgICAgKGxpc3QgY2xhbmctdG9vbGNoYWluKSkKKyAgICAgIChpbnB1dHMgKGNvbnMqIGxpYmVk aXQgbGlib21wIChpamNvbnNvbGUpIGV4dHJhLWlucHV0cykpCisgICAgICAoYXJndW1lbnRzCisg ICAgICAgYCgjOm1vZHVsZXMgKCgoaWNlLTkgZnR3KSAjOnNlbGVjdCAoc2NhbmRpcikpCisgICAg ICAgICAgICAgICAgICAgICgoaWNlLTkgcG9wZW4pICM6c2VsZWN0IChvcGVuLXBpcGUqIGNsb3Nl LXBpcGUpKQorICAgICAgICAgICAgICAgICAgICAoKGljZS05IHJlZ2V4KSAjOnNlbGVjdCAobWF0 Y2g6c3Vic3RyaW5nIHN0cmluZy1tYXRjaCkpCisgICAgICAgICAgICAgICAgICAgICgoaWNlLTkg dGhyZWFkcykgIzpzZWxlY3QgKHBhcmFsbGVsIHBhci1mb3ItZWFjaCkpCisgICAgICAgICAgICAg ICAgICAgICgoc3JmaSBzcmZpLTI2KSAjOnNlbGVjdCAoY3V0KSkKKyAgICAgICAgICAgICAgICAg ICAgKChzcmZpIHNyZmktMSkgIzpzZWxlY3QgKGZvbGQpKQorICAgICAgICAgICAgICAgICAgICAs QCVnbnUtYnVpbGQtc3lzdGVtLW1vZHVsZXMpCisgICAgICAgICAjOnBoYXNlcworICAgICAgICAg OzsgVXBzdHJlYW0ncyBidWlsZCBzeXN0ZW0gY29uc2lzdHMgb2YgYWQtaG9jIHNjcmlwdHMgdGhh dCBidWlsZCBidWlsZCB1cAorICAgICAgICAgOzsgKHZlcnkgY29tcGxpY2F0ZWQpIGVudmlyb25t ZW50IHZhcmlhYmxlcyB0byBwYXNzIHRvIG1ha2UuICBUaGUgYmFzaWMKKyAgICAgICAgIDs7IGJ1 aWxkIHByb2Nlc3MgbG9va3MgbGlrZSB0aGlzOgorICAgICAgICAgOzsKKyAgICAgICAgIDs7ICAg MSkgQ29weSBqc3JjL2p2ZXJzaW9uLXguaCB0byBqc3JjL2p2ZXJzaW9uLmggYW5kIGVkaXQgdmFs dWVzOworICAgICAgICAgOzsgICAyKSBTZXQganBsYXRmb3JtIGFuZCBqNjR4IGVudmlyb25tZW50 IHZhcmlhYmxlczsKKyAgICAgICAgIDs7ICAgMykgUnVuIG1ha2UyL2J1aWxkX2pjb25zb2xlLnNo IGFuZCBtYWtlMi9idWlsZF9saWJqLnNoOworICAgICAgICAgOzsKKyAgICAgICAgIDs7IEhvd2V2 ZXIsIHVwc3RyZWFtIGV4cGVjdHMgdXNlcnMgdG8gcnVuIEogZGlyZWN0bHkgZnJvbSB0aGUgc291 cmNlCisgICAgICAgICA7OyBkaXJlY3Rvcnk7IHRoZXkgZG8gbm90IHN1cHBseSBhIG1ha2UgYGlu c3RhbGwnIHRhcmdldC4gIFRodXMgaXQgdGFrZXMKKyAgICAgICAgIDs7IHNvbWUgbWFzc2FnaW5n IHRvIGluc3RhbGwgZmlsZXMgaW4gRkhTLXN0eWxlIGRpcmVjdG9yaWVzLgorICAgICAgICAgKG1v ZGlmeS1waGFzZXMgJXN0YW5kYXJkLXBoYXNlcworICAgICAgICAgICA7OyBJbiBwYXJ0aWN1bGFy LCB3ZSBoYXZlIHRvIHNldCB1cAorICAgICAgICAgICA7OworICAgICAgICAgICA7OyAgIDEpIGpz cmMvanZlcnNpb24uaCBhcyBpbiBhIHR5cGljYWwgYnVpbGQ7CisgICAgICAgICAgIDs7ICAgMikg amxpYnJhcnkvYmluL3Byb2ZpbGV4LmlqcyB0byBwb2ludCB0byB3cml0YWJsZSBkaXJlY3Rvcmll czsKKyAgICAgICAgICAgOzsgICAzKSBtYWtlMi9idWlsZF8qLnNoIHRvIHJlc3BlY3Qgc3RhbmRh cmQgYnVpbGQgY29udmVudGlvbnM7CisgICAgICAgICAgIDs7ICAgNCkganNyYy9qY29uc29sZS5j IHRvIGZpeCBsaWJlZGl0IGRsb3BlbjsgYW5kCisgICAgICAgICAgIDs7ICAgNSkgSGFyZCBjb2Rl ZCByZWZlcmVuY2VzIHRvIGFkZG9ucyBkaXJlY3RvcnkuCisgICAgICAgICAgIChyZXBsYWNlICdj b25maWd1cmUKKyAgICAgICAgICAgICAobGFtYmRhKiAoIzprZXkgdGFyZ2V0IGlucHV0cyBvdXRw dXRzICM6YWxsb3ctb3RoZXIta2V5cykKKyAgICAgICAgICAgICAgIChsZXQqICgoY2xhbmctdG9v bGNoYWluIChhc3NvYy1yZWYgaW5wdXRzICJjbGFuZy10b29sY2hhaW4iKSkKKyAgICAgICAgICAg ICAgICAgICAgICAoY2xhbmcgKHN0cmluZy1hcHBlbmQgY2xhbmctdG9vbGNoYWluICIvYmluL2Ns YW5nIikpCisgICAgICAgICAgICAgICAgICAgICAgKGxpYmVkaXQgKGFzc29jLXJlZiBpbnB1dHMg ImxpYmVkaXQiKSkKKyAgICAgICAgICAgICAgICAgICAgICAob3V0IChhc3NvYy1yZWYgb3V0cHV0 cyAib3V0IikpKQorICAgICAgICAgICAgICAgICA7OyBTZXQgdXAgYnVpbGQgY29uc3RhbnRzCisg ICAgICAgICAgICAgICAgIChjb3B5LWZpbGUgImpzcmMvanZlcnNpb24teC5oIiAianNyYy9qdmVy c2lvbi5oIikKKyAgICAgICAgICAgICAgICAgKHN1YnN0aXR1dGUqICJqc3JjL2p2ZXJzaW9uLmgi CisgICAgICAgICAgICAgICAgICAgKCgiXiNkZWZpbmUganZlcnNpb24uKiQiKQorICAgICAgICAg ICAgICAgICAgICAoZm9ybWF0ICNmICIjZGVmaW5lIGp2ZXJzaW9uIH5zXG4iICxtYWpvcikpCisg ICAgICAgICAgICAgICAgICAgKCgiXiNkZWZpbmUganR5cGUuKiQiKQorICAgICAgICAgICAgICAg ICAgICAoZm9ybWF0ICNmICIjZGVmaW5lIGp0eXBlIH5zXG4iCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgLChqcmVsZWFzZS1zdHJpbmcgcmVsZWFzZS10eXBlIG1pbm9yKSkpCisgICAgICAg ICAgICAgICAgICAgKCgiXiNkZWZpbmUgamJ1aWxkZXIuKiQiKQorICAgICAgICAgICAgICAgICAg ICAoZm9ybWF0ICNmICIjZGVmaW5lIGpidWlsZGVyIH5zXG4iICxidWlsZGVyKSkpCisgICAgICAg ICAgICAgICAgIDs7IENyZWF0ZSBwcm9maWxleC5panMgb3ZlcnJpZGVzIHRvIHBvaW50IHRvIHRo ZSBjb3JyZWN0IHN0b3JlCisgICAgICAgICAgICAgICAgIDs7IGl0ZW1zLiAgTm90ZSB0aGF0IHdl IHNldCB+aW5zdGFsbCBhbmQgfmFkZG9ucyBkaXJlY3RvcmllcyB0bworICAgICAgICAgICAgICAg ICA7OyByZXNpZGUgdW5kZXIgfnVzZXIgdG8gYWxsb3cgaW5zdGFsbGluZyBhbmQgbG9hZGluZyBh ZGRvbnMuCisgICAgICAgICAgICAgICAgIDs7IFRPRE86IEd1aXgtaWZ5IEogYWRkb25zIGFzIHdl bGwuCisgICAgICAgICAgICAgICAgIChjYWxsLXdpdGgtb3V0cHV0LWZpbGUgImpsaWJyYXJ5L2Jp bi9wcm9maWxleC5panMiCisgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAocG9ydCkKKyAgICAg ICAgICAgICAgICAgICAgIChkaXNwbGF5CisgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1q b2luCisgICAgICAgICAgICAgICAgICAgICAgIChsaXN0CisgICAgICAgICAgICAgICAgICAgICAg ICAic2hhcmU9LiAnL3NoYXJlL2onLH4gKHsufiBfMiB7IEkuQDo9JicvJykgQklOUEFUSCIKKyAg ICAgICAgICAgICAgICAgICAgICAgICJzeXN0ZW09LiBzaGFyZSwnL3N5c3RlbSciCisgICAgICAg ICAgICAgICAgICAgICAgICAidG9vbHM9LiBzaGFyZSwnL3Rvb2xzJyIKKyAgICAgICAgICAgICAg ICAgICAgICAgIDs7IFVwc3RyZWFtIGRlZmF1bHRzIHRvIHNwYW1taW5nICRIT01FIHdpdGggdW5o aWRkZW4KKyAgICAgICAgICAgICAgICAgICAgICAgIDs7IHVzZXJkYXRhIGRpcmVjdG9yaWVzLiAg U2V0IHRoaXMgdG8gYmUKKyAgICAgICAgICAgICAgICAgICAgICAgIDs7ICRIT01FLy5jb25maWcv ai88anZlcnNpb24+IGluc3RlYWQKKyAgICAgICAgICAgICAgICAgICAgICAgICInanR5cGUganZl cnNpb24nPS4gKDMmeyx7LikgPDsuXzIgLCYnLycgOSE6MTQnJyIKKyAgICAgICAgICAgICAgICAg ICAgICAgICJqdmVyc2lvbj0uICh7Ln4gaS4mJy0nKSBqdmVyc2lvbiIKKyAgICAgICAgICAgICAg ICAgICAgICAgICJ1c2VyPS4gaG9tZSwnLy5jb25maWcvai8nLGp2ZXJzaW9uIgorICAgICAgICAg ICAgICAgICAgICAgICAgImFkZG9ucz0uIHVzZXIsJy9hZGRvbnMnIgorICAgICAgICAgICAgICAg ICAgICAgICAgImJyZWFrPS4gdXNlciwnL2JyZWFrJyIKKyAgICAgICAgICAgICAgICAgICAgICAg ICJjb25maWc9LiB1c2VyLCcvY29uZmlnJyIKKyAgICAgICAgICAgICAgICAgICAgICAgICJpbnN0 YWxsPS4gdXNlciwnL2luc3RhbGwnIgorICAgICAgICAgICAgICAgICAgICAgICAgInNuYXA9LiB1 c2VyLCcvc25hcCciCisgICAgICAgICAgICAgICAgICAgICAgICAidGVtcD0uIHVzZXIsJy90ZW1w JyIKKyAgICAgICAgICAgICAgICAgICAgICAgICJcbiIpCisgICAgICAgICAgICAgICAgICAgICAg ICJcbiIpCisgICAgICAgICAgICAgICAgICAgICAgcG9ydCkpKQorICAgICAgICAgICAgICAgICA7 OyBNdW5nZSB0aGUgYnVpbGQgc2NyaXB0cyBpbnRvIHJlYXNvbjoKKyAgICAgICAgICAgICAgICAg OzsgMS4gU2hvcnQtY2lyY3VpdCB0aGUgZnJhZ2lsZSBjb21waWxlciBkZXRlY3Rpb247CisgICAg ICAgICAgICAgICAgIDs7IDIuIE1ha2Ugc3VyZSB0byBpbmNsdWRlIG91ciBDRkxBR1MgYW5kIExG TEFHUzsgYW5kCisgICAgICAgICAgICAgICAgIDs7IDMuIFByb3BhZ2F0ZSBzY3JpcHQgZXJyb3Jz IHRvIHRvcCBsZXZlbC4KKyAgICAgICAgICAgICAgICAgKGZvci1lYWNoCisgICAgICAgICAgICAg ICAgICAobGFtYmRhIChmaWxlKQorICAgICAgICAgICAgICAgICAgICAod2l0aC1kaXJlY3Rvcnkt ZXhjdXJzaW9uICJtYWtlMiIKKyAgICAgICAgICAgICAgICAgICAgICAoc3Vic3RpdHV0ZSogZmls ZQorICAgICAgICAgICAgICAgICAgICAgICAgOzsgVGhlIGBjb21waWxlcicgdmFyaWFibGUgZG9l c24ndCBwb2ludCB0byB0aGUgYWN0dWFsCisgICAgICAgICAgICAgICAgICAgICAgICA7OyBjb21w aWxlci4gIEl0IGlzIGp1c3QgYSBzd2l0Y2ggdG8gdGVsbCB0aGUgYnVpbGQKKyAgICAgICAgICAg ICAgICAgICAgICAgIDs7IHNjcmlwdHMgd2hldGhlciB0byB1c2UgZ2NjLSBvciBjbGFuZy1zcGVj aWZpYyBmbGFncy4KKyAgICAgICAgICAgICAgICAgICAgICAgICgoIl5jb21waWxlcj0uKiQiKSAi Y29tcGlsZXI9Y2xhbmdcbiIpCisgICAgICAgICAgICAgICAgICAgICAgICAoKCJeTERGTEFHUz1c IiIgZGVmKSAoc3RyaW5nLWFwcGVuZCBkZWYgIiRMREZMQUdTICIpKQorICAgICAgICAgICAgICAg ICAgICAgICAgKCgiXihjb21tb249XCIpKFxcJFVTRVRIUkVBRC4qKSQiIF8gZGVmIHJlc3QpCisg ICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgZGVmICIkQ0ZMQUdTICIgcmVz dCkpCisgICAgICAgICAgICAgICAgICAgICAgICAoKCJeIyEuKiIgc2hlYmFuZykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAoc3RyaW5nLWFwcGVuZCBzaGViYW5nICJzZXQgLW8gZXJyZXhpdFxu IikpKSkpCisgICAgICAgICAgICAgICAgICAnKCJidWlsZF9qY29uc29sZS5zaCIgImJ1aWxkX2xp Ymouc2giKSkKKyAgICAgICAgICAgICAgICAgOzsgVGhlIGpjb25zb2xlIG1hbnVhbGx5IGxvYWRz IGxpYmVkaXQgd2l0aCBkbG9wZW4uICBUaGUgcGF0aAorICAgICAgICAgICAgICAgICA7OyBtdXN0 IGJlIGFic29sdXRlIHRvIGNvcnJlY3RseSBwb2ludCB0byBvdXIgaW5wdXQuCisgICAgICAgICAg ICAgICAgIChzdWJzdGl0dXRlKiAianNyYy9qY29uc29sZS5jIgorICAgICAgICAgICAgICAgICAg ICgoImxpYmVkaXRcXC5zb1xcLlswLTldIiBzby1maWxlKQorICAgICAgICAgICAgICAgICAgICAo Zm9ybWF0ICNmICJ+YS9saWIvfmEiIGxpYmVkaXQgc28tZmlsZSkpKQorICAgICAgICAgICAgICAg ICA7OyBUaGUgfmFkZG9ucy9kZXYgZGlyZWN0b3J5IHN1cHBsaWVzIHRlbnRhdGl2ZSBKLXNjcmlw dAorICAgICAgICAgICAgICAgICA7OyBkZWZpbml0aW9ucyBvZiBuZXcgSiBlbmdpbmUgZnVuY3Rp b25hbGl0eS4gIFNpbmNlIHdlIHBvaW50CisgICAgICAgICAgICAgICAgIDs7IH5hZGRvbnMgdW5k ZXIgdGhlIH51c2VyIGRpcmVjdG9yeSwgd2UgbW92ZSBpdCB1bmRlciB+c3lzdGVtCisgICAgICAg ICAgICAgICAgIDs7IGluc3RlYWQsIHdoaWNoIHNpdHMgYXMtaXMgaW4gdGhlIG91dHB1dC4KKyAg ICAgICAgICAgICAgICAgKHdpdGgtZGlyZWN0b3J5LWV4Y3Vyc2lvbiAianNyYyIKKyAgICAgICAg ICAgICAgICAgICAoZm9yLWVhY2gKKyAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoZmlsZSkK KyAgICAgICAgICAgICAgICAgICAgICAoc3Vic3RpdHV0ZSogZmlsZSAoKCJ+YWRkb25zL2RldiIp ICJ+c3lzdGVtL2RldiIpKSkKKyAgICAgICAgICAgICAgICAgICAgKHNjYW5kaXIgIi4iCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKGYpIChlcT8gKHN0YXQ6dHlwZSAoc3Rh dCBmKSkgJ3JlZ3VsYXIpKSkpKQorICAgICAgICAgICAgICAgICA7OyBJbXBsZW1lbnRhdGlvbiBv ZiA5IToxNCByZWNvcmRzIGJ1aWxkIHRpbWUgd2hpY2ggYnJlYWtzIGJ1aWxkCisgICAgICAgICAg ICAgICAgIDs7IHJlcHJvZHVjaWJpbGl0eS4gIE5vdGUgdGhhdCB1cHN0cmVhbSBjb2RlIGRlcGVu ZHMgb24gdGhlIGV4YWN0CisgICAgICAgICAgICAgICAgIDs7IGZvcm1hdCBvZiB0aGVzZSBzdHJp bmdzLCBzbyB3ZSBuZWVkIHRvIG1pbWljIHRoZSBzdGFuZGFyZC4KKyAgICAgICAgICAgICAgICAg KHN1YnN0aXR1dGUqICJqc3JjL2ouYyIKKyAgICAgICAgICAgICAgICAgICAoKCJfX0RBVEVfXyIp ICJcIkphbiAwMSAxOTcwXCIiKQorICAgICAgICAgICAgICAgICAgICgoIl9fVElNRV9fIikgIlwi MDA6MDA6MDBcIiIpKQorICAgICAgICAgICAgICAgICA7OyBVcHN0cmVhbSByZWNvbW1lbmRzIHVz aW5nIGNsYW5nLCB3aXRoIEdDQyBzdXBwb3J0IGJlaW5nCisgICAgICAgICAgICAgICAgIDs7IHNl Y29uZC1jbGFzcywgb2Z0ZW4gcmVzdWx0aW5nIGluIGJ1aWxkIGZhaWx1cmVzLgorICAgICAgICAg ICAgICAgICAoc2V0ZW52ICJDQyIgY2xhbmcpKSkpCisKKyAgICAgICAgICAgOzsgVGhlIGJ1aWxk IG91dHB1dCBkZXBlbmRzIHByaW1hcmlseSBvbiB0aGUgdmFsdWVzIG9mIHRoZSBganBsYXRmb3Jt JworICAgICAgICAgICA7OyBhbmQgYGo2NHgnIGVudmlyb25tZW50IHZhcmlhYmxlcy4gIElmIHRo ZSB0YXJnZXQgaXMgQVJNLCB0aGVuCisgICAgICAgICAgIDs7IGBqcGxhdGZvcm0nIGlzICJyYXNw YmVycnkiLCBvdGhlcndpc2UgaXQgaXMgYGxpbnV4Jy4gIEluIGFkZGl0aW9uIHRvCisgICAgICAg ICAgIDs7IDMyLSBhbmQgNjQtIGJpdCB2ZXJzaW9ucywgYGo2NHgnIGNvbnRyb2xscyB3aGV0aGVy IEFWWCBvciBBVlgyCisgICAgICAgICAgIDs7IHZhcmlhbnRzIG9mIGxpYmogYXJlIGJ1aWx0Lgor ICAgICAgICAgICA7OworICAgICAgICAgICA7OyBIb3dldmVyLCBidWlsZCB0YXJnZXRzIGFyZSBu b3QgZmluZS1ncmFpbmVkIGVub3VnaCB0byBkaXN0aW5ndWlzaAorICAgICAgICAgICA7OyBiZXR3 ZWVuIENQVSBmZWF0dXJlcy4gIFRodXMgd2UgYnVpbGQgYW5kIGluc3RhbGwgYWxsIHZhcmlhbnRz IG9mCisgICAgICAgICAgIDs7IGxpYmosIGV4cGVjdGluZyBqY29uc29sZSB0byBiZSBjYWxsZWQg d2l0aCBhIHdyYXBwZXIgc2NyaXB0IHRoYXQKKyAgICAgICAgICAgOzsgZGV0ZWN0cyBBVlggZmVh dHVyZXMgYW5kIGxvYWRzIHRoZSBhcHByb3ByaWF0ZSBsaWJqIGF0IHJ1bnRpbWUuCisgICAgICAg ICAgIChyZXBsYWNlICdidWlsZAorICAgICAgICAgICAgIChsYW1iZGEgXworICAgICAgICAgICAg ICAgKHNldGVudiAiVVNFX09QRU5NUCIgIjEiKQorICAgICAgICAgICAgICAgKHNldGVudiAiVVNF X1RIUkVBRCIgIjEiKQorICAgICAgICAgICAgICAgKGZvci1lYWNoIChsYW1iZGEgKHZhci12YWwp IChhcHBseSBzZXRlbnYgdmFyLXZhbCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgKHF1b3Rl ICxleHRyYS1lbnZhcnMpKQorICAgICAgICAgICAgICAgOzsgVGhlIGJ1aWxkIHNjcmlwdHMgYXNz dW1lIHRoYXQgUFdEIGlzIG1ha2UyLgorICAgICAgICAgICAgICAgKHdpdGgtZGlyZWN0b3J5LWV4 Y3Vyc2lvbiAibWFrZTIiCisgICAgICAgICAgICAgICAgIChsZXQqICgocGxhdGZvcm0gLChpZiAo dGFyZ2V0LWFybT8pICJyYXNwYmVycnkiICJsaW51eCIpKQorICAgICAgICAgICAgICAgICAgICAg ICAgKHRhcmdldC1iaXQgLChpZiAodGFyZ2V0LTY0Yml0PykgIjY0IiAiMzIiKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgIChydW4gKGxhbWJkYSogKHNjcmlwdCAjOmtleSAoYXZ4ICIiKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW52b2tlICJlbnYiCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nLWFwcGVuZCAianBsYXRmb3JtPSIgcGxh dGZvcm0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nLWFw cGVuZCAiajY0eD1qIiB0YXJnZXQtYml0IGF2eCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNjcmlwdCkpKSkKKyAgICAgICAgICAgICAgICAgICAocGFyYWxsZWwKKyAg ICAgICAgICAgICAgICAgICAgOzsgU2luY2UgamNvbnNvbGUgZG9lc24ndCBkZXBlbmQgb24gQVZY IGZlYXR1cmVzLCB3ZSBqdXN0CisgICAgICAgICAgICAgICAgICAgIDs7IGJ1aWxkIGl0IG9uY2Uu CisgICAgICAgICAgICAgICAgICAgIChydW4gIi4vYnVpbGRfamNvbnNvbGUuc2giKQorICAgICAg ICAgICAgICAgICAgICAocnVuICIuL2J1aWxkX2xpYmouc2giKQorICAgICAgICAgICAgICAgICAg ICAoaWYgLCh0YXJnZXQtNjRiaXQ/KQorICAgICAgICAgICAgICAgICAgICAgICAgKHBhcmFsbGVs CisgICAgICAgICAgICAgICAgICAgICAgICAgKHJ1biAiLi9idWlsZF9saWJqLnNoIiAjOmF2eCAi YXZ4IikKKyAgICAgICAgICAgICAgICAgICAgICAgICAocnVuICIuL2J1aWxkX2xpYmouc2giICM6 YXZ4ICJhdngyIikpKSkpKSkpCisgICAgICAgICAgIDs7IFRoZSB0ZXN0IHN1aXRlIGlzIGV4cGVj dGVkIHRvIGJlIHJ1biBhcyBmb2xsb3dzIGZvciBlYWNoIHZhcmlhbnQgb2YKKyAgICAgICAgICAg OzsgbGliaiB0aGF0IHdlIGJ1aWxkOgorICAgICAgICAgICA7OworICAgICAgICAgICA7OyAgICAg JCBlY2hvICdSVU4gZGRhbGwnIHwgamNvbnNvbGUgdGVzdC90c3UuaWpzCisgICAgICAgICAgIDs7 CisgICAgICAgICAgIDs7IFRoaXMgcmVxdWlyZXMgYSB3b3JraW5nIGpjb25zb2xlIHdpdGggYWNj ZXNzaWJsZSBqbGlicmFyeSBmaWxlcy4gIFdlCisgICAgICAgICAgIDs7IHNpbXBseSBwbGFjZSB0 aGVzZSBhbGwgdW5kZXIgdGVzdC9iaW4uCisgICAgICAgICAgIChyZXBsYWNlICdjaGVjaworICAg ICAgICAgICAgIChsYW1iZGEqICgjOmtleSB0ZXN0cz8gIzphbGxvdy1vdGhlci1rZXlzKQorICAg ICAgICAgICAgICAgKHdoZW4gdGVzdHM/CisgICAgICAgICAgICAgICAgIChsZXQgKChwbGF0Zm9y bSAsKGlmICh0YXJnZXQtYXJtPykgInJhc3BiZXJyeSIgImxpbnV4IikpKQorICAgICAgICAgICAg ICAgICAgIChta2Rpci1wICJ0ZXN0L2JpbiIpCisgICAgICAgICAgICAgICAgICAgKGZvci1lYWNo CisgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKGRpcikKKyAgICAgICAgICAgICAgICAgICAg ICAobGV0ICgoc291cmNlIChzdHJpbmctYXBwZW5kICJqbGlicmFyeS8iIGRpcikpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGRlc3QgKHN0cmluZy1hcHBlbmQgInRlc3QvYmluLyIgZGly KSkpCisgICAgICAgICAgICAgICAgICAgICAgICAoYmVnaW4KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgKG1rZGlyLXAgZGVzdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGNvcHktcmVj dXJzaXZlbHkgc291cmNlIGRlc3QpKSkpCisgICAgICAgICAgICAgICAgICAgICcoInN5c3RlbSIg InRvb2xzIiAiYWRkb25zIikpCisgICAgICAgICAgICAgICAgICAgOzsgVGhlIGpsaWJyYXJ5L2Rl diBkaXJlY3Rvcnkgb25seSBzb21ldGltZXMgZXhpc3RzLCBidXQgbmVlZHMKKyAgICAgICAgICAg ICAgICAgICA7OyB0byBiZSBjb3BpZWQgaW50byB0aGUgfnN5c3RlbSBkaXJlY3Rvcnkgd2hlbiBp dCBkb2VzLgorICAgICAgICAgICAgICAgICAgIChmb3ItZWFjaAorICAgICAgICAgICAgICAgICAg ICAobGFtYmRhIChkZXYtZGlyKQorICAgICAgICAgICAgICAgICAgICAgIChpZiAoZmlsZS1leGlz dHM/IGRldi1kaXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgIChjb3B5LXJlY3Vyc2l2ZWx5 IGRldi1kaXIgInRlc3QvYmluL3N5c3RlbS9kZXYiKSkpCisgICAgICAgICAgICAgICAgICAgICco ImpsaWJyYXJ5L2RldiIgImpsaWJyYXJ5L2FkZG9ucy9kZXYiKSkKKyAgICAgICAgICAgICAgICAg ICAocGFyLWZvci1lYWNoCisgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKGRpcikKKyAgICAg ICAgICAgICAgICAgICAgICAobGV0KiAoKGJpbiAoc3RyaW5nLWFwcGVuZCAiYmluLyIgcGxhdGZv cm0pKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoamJpdCAsKGlmICh0YXJnZXQtNjRi aXQ/KSAiajY0IiAiajMyIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqY29uc29s ZSAoc3RyaW5nLWFwcGVuZCBiaW4gIi8iIGpiaXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICIvamNvbnNvbGUiKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHNvdXJjZSAoc3RyaW5nLWFwcGVuZCBiaW4gIi8iIGRpcikpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChkZXN0IChzdHJpbmctYXBwZW5kICJ0ZXN0L2Jpbi8i IGRpcikpKQorICAgICAgICAgICAgICAgICAgICAgICAgKGJlZ2luCisgICAgICAgICAgICAgICAg ICAgICAgICAgIChta2Rpci1wIGRlc3QpCisgICAgICAgICAgICAgICAgICAgICAgICAgIChjb3B5 LXJlY3Vyc2l2ZWx5IHNvdXJjZSBkZXN0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAoaW5z dGFsbC1maWxlICJqbGlicmFyeS9iaW4vcHJvZmlsZS5panMiIGRlc3QpCisgICAgICAgICAgICAg ICAgICAgICAgICAgIChpbnN0YWxsLWZpbGUgamNvbnNvbGUgZGVzdCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgKGxldCogKChqY29uc29sZSAoc3RyaW5nLWFwcGVuZCBkZXN0ICIvamNvbnNv bGUiKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0ZXN0cyAidGVzdC90c3Uu aWpzIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3J0IChvcGVuLXBpcGUq IE9QRU5fV1JJVEUgamNvbnNvbGUgdGVzdHMpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoZGlzcGxheSAiUlVOIGRkYWxsXG4iIHBvcnQpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHdoZW4gKG5vdCAoemVybz8gKHN0YXR1czpleGl0LXZhbAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2xvc2UtcGlwZSBwb3J0KSkpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGVycm9yICJTb21lIEogYnVpbGQgdGVzdHMgZmFpbGVk LiIpKSkpKSkKKyAgICAgICAgICAgICAgICAgICAgKHNjYW5kaXIgKHN0cmluZy1hcHBlbmQgImJp bi8iIHBsYXRmb3JtKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobmVnYXRlIChjdXQg bWVtYmVyIDw+ICcoIi4iICIuLiIpKSkpKQorICAgICAgICAgICAgICAgICAgICN0KSkpKQorICAg ICAgICAgICA7OyBOb3cgdGhhdCBldmVyeXRoaW5nIGlzIGJ1aWx0LCBpbnN0YWxsYXRpb24gaXMg ZmFpcmx5CisgICAgICAgICAgIDs7IHN0cmFpZ2h0Zm9yd2FyZCwgZm9sbG93aW5nIEZIUyBjb252 ZW50aW9ucy4gIFRoZSBvbmx5IHF1aXJrIGlzIHRoYXQKKyAgICAgICAgICAgOzsgd2UgaW5zdGFs bCBqY29uc29sZSB1bmRlciAvbGliZXhlYyB0byBtYWtlIHJvb20gZm9yIHRoZSB3cmFwcGVyCisg ICAgICAgICAgIDs7IHJlcGxhY2VtZW50IHVuZGVyIC9iaW4uCisgICAgICAgICAgIChyZXBsYWNl ICdpbnN0YWxsCisgICAgICAgICAgICAgKGxhbWJkYSogKCM6a2V5IG91dHB1dHMgaW5wdXRzICM6 YWxsb3ctb3RoZXIta2V5cykKKyAgICAgICAgICAgICAgIChsZXQqICgocGxhdGZvcm0gLChpZiAo dGFyZ2V0LWFybT8pICJyYXNwYmVycnkiICJsaW51eCIpKQorICAgICAgICAgICAgICAgICAgICAg IChqYml0ICwoaWYgKHRhcmdldC02NGJpdD8pICJqNjQiICJqMzIiKSkKKyAgICAgICAgICAgICAg ICAgICAgICAoaWpjb25zb2xlIChhc3NvYy1yZWYgaW5wdXRzICJpamNvbnNvbGUiKSkKKyAgICAg ICAgICAgICAgICAgICAgICAoamNvbnNvbGUgKHN0cmluZy1hcHBlbmQgImJpbi8iIHBsYXRmb3Jt ICIvIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqYml0 ICIvamNvbnNvbGUiKSkKKyAgICAgICAgICAgICAgICAgICAgICAob3V0IChhc3NvYy1yZWYgb3V0 cHV0cyAib3V0IikpCisgICAgICAgICAgICAgICAgICAgICAgKGJpbiAoc3RyaW5nLWFwcGVuZCBv dXQgIi9iaW4iKSkKKyAgICAgICAgICAgICAgICAgICAgICAoZXRjIChzdHJpbmctYXBwZW5kIG91 dCAiL2V0Yy9qIikpCisgICAgICAgICAgICAgICAgICAgICAgKGxpYiAoc3RyaW5nLWFwcGVuZCBv dXQgIi9saWIvaiIpKQorICAgICAgICAgICAgICAgICAgICAgIChsaWJleGVjIChzdHJpbmctYXBw ZW5kIG91dCAiL2xpYmV4ZWMvaiIpKQorICAgICAgICAgICAgICAgICAgICAgIChzaGFyZSAoc3Ry aW5nLWFwcGVuZCBvdXQgIi9zaGFyZS9qIikpCisgICAgICAgICAgICAgICAgICAgICAgKHN5c3Rl bSAoc3RyaW5nLWFwcGVuZCBzaGFyZSAiL3N5c3RlbSIpKQorICAgICAgICAgICAgICAgICAgICAg IChkZXYgKHN0cmluZy1hcHBlbmQgc3lzdGVtICIvZGV2IikpKQorICAgICAgICAgICAgICAgICAo bWtkaXItcCBiaW4pCisgICAgICAgICAgICAgICAgIChjb3B5LWZpbGUgaWpjb25zb2xlIChzdHJp bmctYXBwZW5kIGJpbiAiL2lqY29uc29sZS0iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICxtYWpvcikpCisgICAgICAgICAgICAgICAgIChta2Rp ci1wIGxpYikKKyAgICAgICAgICAgICAgICAgKGZvci1lYWNoCisgICAgICAgICAgICAgICAgICAo bGFtYmRhIChqYXJjaCkKKyAgICAgICAgICAgICAgICAgICAgKGxldCogKChqYmluIChzdHJpbmct am9pbiBgKCJiaW4iICxwbGF0Zm9ybSAsamFyY2gpICIvIikpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAoamF2eC1tYXRjaCAoc3RyaW5nLW1hdGNoICJhdnguKiIgamFyY2gpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGphdnggKGlmIChub3QgamF2eC1tYXRjaCkgIiIKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2g6c3Vic3RyaW5nIGphdngtbWF0 Y2gpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXAgKGlmIGphdngtbWF0Y2ggIi0i ICIiKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChzb3VyY2UgKHN0cmluZy1hcHBlbmQg amJpbiAiL2xpYmouc28iKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChkZXN0IChmb3Jt YXQgI2YgIn5hL2xpYmp+YX5hLnNvIiBsaWIgc2VwIGphdngpKSkKKyAgICAgICAgICAgICAgICAg ICAgICAoY29weS1maWxlIHNvdXJjZSBkZXN0KSkpCisgICAgICAgICAgICAgICAgICAoc2NhbmRp ciAoc3RyaW5nLWFwcGVuZCAiYmluLyIgcGxhdGZvcm0pCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAobmVnYXRlIChjdXQgbWVtYmVyIDw+ICcoIi4iICIuLiIpKSkpKQorICAgICAgICAgICAg ICAgICAoaW5zdGFsbC1maWxlIGpjb25zb2xlIGxpYmV4ZWMpCisgICAgICAgICAgICAgICAgIChj b3B5LXJlY3Vyc2l2ZWx5ICJqbGlicmFyeS9zeXN0ZW0iIHN5c3RlbSkKKyAgICAgICAgICAgICAg ICAgKGZvci1lYWNoCisgICAgICAgICAgICAgICAgICAobGFtYmRhIChzb3VyY2UtZGV2KQorICAg ICAgICAgICAgICAgICAgICAoaWYgKGFjY2Vzcz8gc291cmNlLWRldiBSX09LKQorICAgICAgICAg ICAgICAgICAgICAgICAgKGNvcHktcmVjdXJzaXZlbHkgc291cmNlLWRldiBkZXYpKSkKKyAgICAg ICAgICAgICAgICAgICcoImpsaWJyYXJ5L2RldiIgImpsaWJyYXJ5L2FkZG9ucy9kZXYiKSkKKyAg ICAgICAgICAgICAgICAgKGluc3RhbGwtZmlsZSAiamxpYnJhcnkvYmluL3Byb2ZpbGUuaWpzIiBl dGMpCisgICAgICAgICAgICAgICAgIChpbnN0YWxsLWZpbGUgImpsaWJyYXJ5L2Jpbi9wcm9maWxl eC5panMiIGV0YykpKSkpKSkKKyAgICAgIChob21lLXBhZ2UgImh0dHBzOi8vd3d3Lmpzb2Z0d2Fy ZS5jb20vIikKKyAgICAgIChzeW5vcHNpcyAiQXNjaWktb25seSwgYXJyYXkgcHJvZ3JhbW1pbmcg bGFuZ3VhZ2UgaW4gdGhlIEFQTCBmYW1pbHkiKQorICAgICAgKGRlc2NyaXB0aW9uCisgICAgICAg IkogaXMgYSBoaWdoLWxldmVsLCBnZW5lcmFsLXB1cnBvc2UgcHJvZ3JhbW1pbmcgbGFuZ3VhZ2Ug dGhhdCBpcworcGFydGljdWxhcmx5IHN1aXRlZCB0byB0aGUgbWF0aGVtYXRpY2FsLCBzdGF0aXN0 aWNhbCwgYW5kIGxvZ2ljYWwgYW5hbHlzaXMgb2YKK2RhdGEuICBJdCBpcyBhIHBvd2VyZnVsIHRv b2wgZm9yIGRldmVsb3BpbmcgYWxnb3JpdGhtcyBhbmQgZXhwbG9yaW5nIHByb2JsZW1zCit0aGF0 IGFyZSBub3QgYWxyZWFkeSB3ZWxsIHVuZGVyc3Rvb2QuIikKKyAgICAgIChsaWNlbnNlIGxpY2Vu c2U6Z3BsMyspKSkpCisKKworKGRlZmluZS1wdWJsaWMganNvZnR3YXJlLWotOTAxCisgIChtYWtl LWoKKyAgICM6dmVyc2lvbiAnKCI5MDEiIC4gImYiKQorICAgIzpoYXNoICIxNzc2MDIxbTBqMWFh bnp3ZzYwYnk4M241M3B3N2k2YWZkNXdwbGZ6Y3p3azhieXdheDRwIgorICAgIzpwYXRjaGVzIChz ZWFyY2gtcGF0Y2hlcyAianNvZnR3YXJlLWo5MDEtZi1maXhlcy5wYXRjaCIpKSkKKworCisoZGVm aW5lIGotYnVpbGQtY29uZmlndXJhdGlvbi13aXRoLXNsZWVmCisgIGAoIzpleHRyYS1pbnB1dHMg KCxzbGVlZikKKyAgICAjOmV4dHJhLWVudmFycyAoKCJVU0VfU0xFRUZfU1JDIiAiMCIpCisgICAg ICAgICAgICAgICAgICAgICgiTERGTEFHUyIgIi1sc2xlZWYiKSkpKQorCisoZGVmaW5lLXB1Ymxp YyBqc29mdHdhcmUtai05MDIKKyAgKGFwcGx5IG1ha2UtagorICAgICAgICAgIzp2ZXJzaW9uICco IjkwMiIgLiAiYiIpCisgICAgICAgICAjOmhhc2ggIjBqNjd2Z2lrcWZsd2pxYWNzZGljYXN2eXYx azU0czJjOHZqZ3dtZjBpeDdsNDFwNHhxejAiCisgICAgICAgICBqLWJ1aWxkLWNvbmZpZ3VyYXRp b24td2l0aC1zbGVlZikpCisKKworKGRlZmluZS1wdWJsaWMganNvZnR3YXJlLWotOTAzCisgIChh cHBseSBtYWtlLWoKKyAgICAgICAgICM6dmVyc2lvbiAnKCI5MDMiIC4gImEiKQorICAgICAgICAg Izp0YWcgIjkwMy1yZWxlYXNlLWEiCisgICAgICAgICAjOmhhc2ggIjFmY2ZsN3E3YzJ2ajRmbW5x cWM4YzZod2dzam0yMGZmOTN2OHh4Zm5pYXNzczFiMmZtYzQiCisgICAgICAgICBqLWJ1aWxkLWNv bmZpZ3VyYXRpb24td2l0aC1zbGVlZikpCisKKyhkZWZpbmUtcHVibGljIChqc29mdHdhcmUtaWpj b25zb2xlLXN5bWxpbmsganBrZykKKyAgIlByb3ZpZGUgYmluL2lqY29uc29sZSBzeW1saW5rIHRo YXQgcG9pbnRzIHRvIHBrZydzIGJpbi9pamNvbnNvbGUtPGp2ZXJzaW9uPiIKKyAgKHBhY2thZ2UK KyAgICAobmFtZSAianNvZnR3YXJlLWlqY29uc29sZSIpCisgICAgKHZlcnNpb24gKHBhY2thZ2Ut dmVyc2lvbiBqcGtnKSkKKyAgICAoc291cmNlICNmKQorICAgIChidWlsZC1zeXN0ZW0gdHJpdmlh bC1idWlsZC1zeXN0ZW0pCisgICAgKHByb3BhZ2F0ZWQtaW5wdXRzIGAoKCJqcGtnIiAsanBrZykp KQorICAgIChhcmd1bWVudHMKKyAgICAgIGAoIzptb2R1bGVzICgoZ3VpeCBidWlsZCB1dGlscykK KyAgICAgICAgICAgICAgICAgICAoc3JmaSBzcmZpLTI2KSkKKyAgICAgICAgIzpidWlsZGVyCisg ICAgICAgIChiZWdpbgorICAgICAgICAgICh1c2UtbW9kdWxlcyAoKGd1aXggYnVpbGQgdXRpbHMp ICM6c2VsZWN0IChta2Rpci1wKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKChpY2UtOSByZWdl eCkgIzpzZWxlY3QgKHN0cmluZy1tYXRjaCkpCisgICAgICAgICAgICAgICAgICAgICAgICgoaWNl LTkgZnR3KSAjOnNlbGVjdCAoc2NhbmRpcikpCisgICAgICAgICAgICAgICAgICAgICAgICgoc3Jm aSBzcmZpLTI2KSAjOnNlbGVjdCAoY3V0KSkpCisgICAgICAgICAgKGxldCogKChvdXQgKGFzc29j LXJlZiAlb3V0cHV0cyAib3V0IikpCisgICAgICAgICAgICAgICAgIChqcGtnIChhc3NvYy1yZWYg JWJ1aWxkLWlucHV0cyAianBrZyIpKQorICAgICAgICAgICAgICAgICAoaWpjb25zb2xlIChjYXIg KHNjYW5kaXIgKHN0cmluZy1hcHBlbmQganBrZyAiL2JpbiIpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoY3V0IHN0cmluZy1tYXRjaCAiaWpjb25zb2xlLS4qIiA8Pikp KSkKKyAgICAgICAgICAgICAgICAgKHNvdXJjZSAoc3RyaW5nLWFwcGVuZCBqcGtnICIvYmluLyIg aWpjb25zb2xlKSkKKyAgICAgICAgICAgICAgICAgKGRlc3QgKHN0cmluZy1hcHBlbmQgb3V0ICIv YmluL2lqY29uc29sZSIpKSkKKyAgICAgICAgICAgIChta2Rpci1wIChkaXJuYW1lIGRlc3QpKQor ICAgICAgICAgICAgKHN5bWxpbmsgc291cmNlIGRlc3QpKSkpKQorICAoaG9tZS1wYWdlIChwYWNr YWdlLWhvbWUtcGFnZSBqcGtnKSkKKyAgKHN5bm9wc2lzICJQcm92aWRlIGBpamNvbnNvbGUnIHN5 bWxpbmsgdG8gZGVmYXVsdCBpbnRlcnByZXRlciB2ZXJzaW9uIikKKyAgKGRlc2NyaXB0aW9uCisg ICJUaGUgaW50ZXJwcmV0ZXIgcHJvdmlkZWQgYnkgdGhlIEogcGFja2FnZSBoYXMgYSBmaWxlbmFt ZSBsaWtlCitpamNvbnNvbGUtPHZlcnNpb24+LCB3aGljaCBwcm92aWRlcyBzdXBwb3J0IGZvciBo YXZpbmcgbXVsdGlwbGUsIGNvbmN1cnJlbnQKK3ZlcnNpb25zIGluc3RhbGxlZC4gIFRoaXMgcGFj a2FnZSBwcm92aWRlcyBhIHZlcnNpb24tYWdub3N0aWMgYGlqY29uc29sZScKK3N5bWxpbmsgdG8g aW50ZXJwcmV0ZXIgdmVyc2lvbiBpbmRpY2F0ZWQgYW5kIGJ1aWxkIHRpbWUuIikKKyAgKGxpY2Vu c2UgbGljZW5zZTpncGwzKykpKQpkaWZmIC0tZ2l0IGEvZ251L3BhY2thZ2VzL3BhdGNoZXMvanNv ZnR3YXJlLWo5MDEtZi1maXhlcy5wYXRjaCBiL2dudS9wYWNrYWdlcy9wYXRjaGVzL2pzb2Z0d2Fy ZS1qOTAxLWYtZml4ZXMucGF0Y2gKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMDAw MC4uMGFjN2U5NGRlNAotLS0gL2Rldi9udWxsCisrKyBiL2dudS9wYWNrYWdlcy9wYXRjaGVzL2pz b2Z0d2FyZS1qOTAxLWYtZml4ZXMucGF0Y2gKQEAgLTAsMCArMSw4MCBAQAorVGhpcyBwYXRjaCBm aXhlcyB0d28gc2VwYXJhdGUgaXNzdWVzIHdpdGggdXN0cmVhbSBzb3VyY2VzOgorCisqIE5vcm1h bGl6ZSBpbXBvcnQgcGF0aHMgaW4ganNyYy9jaXAuYworCitVcHN0cmVhbSBjbGFpbXMgdG8gaGF2 ZSBzb21lIGJ1aWxkIHJlcXVpcmVtZW50cyB0aGF0IGZvcmNlIHRoZW0gdG8gdXNlIHN0cmFuZ2UK K2ltcG9ydCBwYXRocy4gSG93ZXZlciwgdGhlc2UgcGF0aHMgZG8gbm90IGV4aXN0IGluc2lkZSBv dXIgYnVpbGQgY2hyb290LgorCisqIEZpeCB1bml0aXRpYWxpemVkIHZhcmlhYmxlIHdhcm5pbmcK KworQ2xhbmcgOSBpc3N1ZXMgc29tZSB3YXJuaW5ncyB3aGljaCBjYXVzZSB0aGUgYnVpbGQgdG8g ZmFpbCBzaW5jZSB1cHN0cmVhbQorY29tcGlsZXMgd2l0aCAtV2Vycm9yLgorCisKK2RpZmYgLS1n aXQgYS9qc3JjL2NpcC5jIGIvanNyYy9jaXAuYworaW5kZXggNjFkYTQwODguLmZiM2MwM2I2IDEw MDY0NAorLS0tIGEvanNyYy9jaXAuYworKysrIGIvanNyYy9jaXAuYworQEAgLTMsOSArMyw5IEBA CisgLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKi8KKyAvKiBDb25qdW5jdGlvbnM6IElubmVyIFByb2R1Y3Qg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworIAorLSNpbmNs dWRlICIuLi8uLi9qc291cmNlL2pzcmMvai5oIgorLSNpbmNsdWRlICIuLi8uLi9qc291cmNlL2pz cmMvdmFzbS5oIgorLSNpbmNsdWRlICIuLi8uLi9qc291cmNlL2pzcmMvZ2VtbS5oIgorKyNpbmNs dWRlICJqLmgiCisrI2luY2x1ZGUgInZhc20uaCIKKysjaW5jbHVkZSAiZ2VtbS5oIgorIAorICNk ZWZpbmUgTUFYQVJPV1MgMzg0ICAvLyBtYXggcm93cyBvZiBhIHRoYXQgd2UgY2FuIHByb2Nlc3Mg dG8gc3RheSBpbiBMMiBjYWNoZSAgIGEgc3RyaXAgaXMgbSpDQUNIRUhFSUdIVCwgeiBzdHJpcCBp cyBtKkNBQ0hFV0lEVEggICB0aGlzIGlzIHdpcmVkIHRvIDEyOCozIC0gY2hlY2sgaWYgeW91IGNo YWdlCisgCitAQCAtMTA1NywxNSArMTA1NywxNSBAQCBzdGF0aWMgQSBqdGlwYngoSiBqdCxBIGEs QSB3LEMgYyxDIGQpe0EgZz0wLHgwLHgxLHo7QiphdiwqYXYwLGIsKnYwLCp2MSwqenY7QyBjMAor ICBzd2l0Y2goYyl7CisgICBjYXNlIENQTFVTRE9UOgorICNkZWZpbmUgRiB8PQorLSNpbmNsdWRl ICIuLi8uLi9qc291cmNlL2pzcmMvY2lwX3QuaCIKKysjaW5jbHVkZSAiY2lwX3QuaCIKKyAgICBi cmVhazsKKyAgIGNhc2UgQ1NUQVJET1Q6CisgI2RlZmluZSBGICY9CistI2luY2x1ZGUgIi4uLy4u L2pzb3VyY2UvanNyYy9jaXBfdC5oIgorKyNpbmNsdWRlICJjaXBfdC5oIgorICAgIGJyZWFrOwor ICAgY2FzZSBDTkU6CisgI2RlZmluZSBGIF49CistI2luY2x1ZGUgIi4uLy4uL2pzb3VyY2UvanNy Yy9jaXBfdC5oIgorKyNpbmNsdWRlICJjaXBfdC5oIgorICAgIGJyZWFrOworICB9CisgIFIgejsK K2RpZmYgLS1naXQgYS9qc3JjL2dlbW0uYyBiL2pzcmMvZ2VtbS5jCitpbmRleCA1MWZlMzA2ZS4u YjEwNWRmYzEgMTAwNjQ0CistLS0gYS9qc3JjL2dlbW0uYworKysrIGIvanNyYy9nZW1tLmMKK0BA IC0zMTgsNyArMzE4LDcgQEAgZGdlbW1fbm4gICAgICAgICAoSSAgICAgICAgICAgICAgbSwKKyAg ICAgICAgICAgICAgICAgICAgX0IpOworIAorIC8vIGxvb3AgMworLSAgICAgICAgICAgIEkgaTsK KysgICAgICAgICAgICBJIGk9MDsKKyAjcHJhZ21hIG9tcCBwYXJhbGxlbCBmb3IgZGVmYXVsdChu b25lKSxwcml2YXRlKGkpLHNoYXJlZChqLGwsQSxDLG1iLG5jLGtjLGFscGhhLF9iZXRhLF9tYyxf Qixyc19hLGNzX2EscnNfYyxjc19jKQorICAgICAgICAgICAgIGZvciAoaT0wOyBpPG1iOyArK2kp IHsKKyAgICAgICAgICAgICAgICAgSSBtYzsKK0BAIC01MDEsNyArNTAxLDcgQEAgaWdlbW1fbm4g ICAgICAgICAoSSAgICAgICAgICAgICAgbSwKKyAgICAgICAgICAgICAgICAgICAgX0IpOworIAor IC8vIGxvb3AgMworLSAgICAgICAgICAgIEkgaTsKKysgICAgICAgICAgICBJIGk9MDsKKyAjcHJh Z21hIG9tcCBwYXJhbGxlbCBmb3IgZGVmYXVsdChub25lKSxwcml2YXRlKGkpLHNoYXJlZChqLGws QSxDLG1iLG5jLGtjLGFscGhhLF9iZXRhLF9tYyxfQixyc19hLGNzX2EscnNfYyxjc19jKQorICAg ICAgICAgICAgIGZvciAoaT0wOyBpPG1iOyArK2kpIHsKKyAgICAgICAgICAgICAgICAgSSBtYzsK K0BAIC04MzEsNyArODMxLDcgQEAgemdlbW1fbm4gICAgICAgICAoSSAgICAgICAgICAgICAgbSwK KyAgICAgICAgICAgICAgICAgICAgX0IpOworIAorIC8vIGxvb3AgMworLSAgICAgICAgICAgIEkg aTsKKysgICAgICAgICAgICBJIGk9MDsKKyAjcHJhZ21hIG9tcCBwYXJhbGxlbCBmb3IgZGVmYXVs dChub25lKSxwcml2YXRlKGkpLHNoYXJlZChqLGwsQSxDLG1iLG5jLGtjLGFscGhhLF9iZXRhLF9t YyxfQixyc19hLGNzX2EscnNfYyxjc19jKQorICAgICAgICAgICAgIGZvciAoaT0wOyBpPG1iOyAr K2kpIHsKKyAgICAgICAgICAgICAgICAgSSBtYzsKLS0gCjIuMzQuMAoK --=-oVps8UgJulS5Eykt4b4j--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 13 Jan 2022 07:51:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 13 02:51:40 2022 Received: from localhost ([127.0.0.1]:60003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n7utQ-0004gn-DH for submit <at> debbugs.gnu.org; Thu, 13 Jan 2022 02:51:40 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:16371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n7utN-0004gW-3p for 48463 <at> debbugs.gnu.org; Thu, 13 Jan 2022 02:51:31 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1642060289; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=EHk7TyEC5GxK28hM7IBOU3ZJHge+qXcBvFDCWTRqQ9Q=; b=pxqQmsAXfW1GNAWhRW1tKVBdoPPbHG2WX6yF3nqXGjiaAvgFWPCyNcP0pd2beJRdV5kMA+ZA JafUzmSTnVLGLr2g7VabvTPj5CiDxfQApburFhApg39wAi2JkSaLENLYETO2FIxr7qjzjseC BVPZfhX7xi7lpaPK7H0QwJuaO44lcuCuOw7lRIyO5r3vpz5yqL71IGVJxr+t9WRCb9jZWt5i 7gov8OvvlzKj9N89nFKapftH+pjduhOqGIg9o7by0ks+GaWVdbN/NkJdWLeI8ORMFfBPHIoL UuB0MdWg79NkHfy5JsuHI81tXvuS668WmyUpcNDkf4CInmkhfv32Og== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 61dfd9fb69943108c547b7f1 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Thu, 13 Jan 2022 07:51:22 GMT Received: from localhost (aj097104.dynamic.ppp.asahi-net.or.jp [220.150.97.104]) by wilsonb.com (Postfix) with ESMTPSA id E73FAA04CC; Thu, 13 Jan 2022 07:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1642060278; bh=EHk7TyEC5GxK28hM7IBOU3ZJHge+qXcBvFDCWTRqQ9Q=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=RCKH/0gxBoIaMZlwyrheoIYQGuVbsA4EaetpDFWV/DhJOBAFC78cHbbbU8seWSKbD fULTrrdTsZ80ep/OUNge5RmjsE/sqJmDBzb7iBZIicq3+cTVTlP5lix3NxCAHUYkwu BO1WI5itsp+taohKFPDtj6gDyPJYxa88YapaXRp5HSmUgYzjfkwWXiRyajQvhw/2sO 7Z3gN/KyzHhpLcvR2asV1CN4xLHhGeyVDCz2b2VtrA+tNoOzizTbmskJ//nfjzR7Pe 2UQq/46EpfzDkfDYCzsiB/yOWPg7aPC8lOBTNSJp1gR8GobKuhwH90g3DBFKvzG2OH kAG9Ba1WlxhkfyXZ5pm+LJnCf3pPhOeqSMgkod3qaTIZ2dd5EQ2yHrKsgRV0nvAoz0 IBOI6oLmDyj6a6614O/01F1MloccadO3H2SIz71OhXC0T81YXzCccWPTMHDhFwQttl ZixGXtBrK3hFklWHOcCefHO77jZ4m8h8+HubxeH66bpwgu34FpYJJwRc6cTgyrGjnZ Xtq8PjfJWHV7NnO8MOJ+rVtzTXHQt7lo82JufIGoAnvi7Hxr+ZJOUFIbxp2g2mQl24 GmcKX5hRa9YThs9D1xZSlZNLk5NTCQM29BMXaXZz+Q/ePTAgHGnL5esSjSs0uPDEqD C1ErWp/YEeWFzq7J6MAMR17Q= Date: Thu, 13 Jan 2022 16:51:08 +0900 To: Liliana Marie Prikler <liliana.prikler@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> In-Reply-To: <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> Message-Id: <3MMTDZQJQ8IR6.334ZWY8AD0487@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_4054760516fd6ec72eeb5231_=_" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Maxime Devos <maximedevos@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_4054760516fd6ec72eeb5231_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > +(define-module (gnu packages jsoftware) > > + #:use-module ((guix build utils)) > > + [...] >=20 > Double bracketing is pointless, use it only when needed. Ah, nice catch. I had a bunch of #:select keys and forgot to kill the paren= s when removing. > > +(define* (make-j #:key > > + (builder "guix.gnu.org") > > + vername > > + revision > > + hash > > + (type 'release) > > + commit > > + (patches '()) > > + (extra-inputs '()) > > + (extra-envars '())) > > + (package > > + (name (jname "jsoftware-j" type)) > > + (version (jversion->string vername revision)) > > + (source > > + (origin > > + (method git-fetch) > > + (uri (git-reference > > + (url "https://github.com/jsoftware/jsource") > > + (commit (or commit (jinfo->git-tag vername type > > revision)))) > Vername sounds a little weird, make that version-base or something > clearer. Also, the argument #:commit is used in an unclear fashion -- > if you were to pass an actual commit hash to it, it'd still be treated > as a release and not be using git-version.=20 Cool. I had a similar sense, but our ideas are a lot sharper than the ones = I had. This actually prompted me to do some code cleanup, leveraging now-me w= ho has a bit more Guile experience than past-me. At the very least, variable n= ames should be more descriptive and consistent, overall. > On a related note > > +(define (jversion->string version revision) > > + "Return a string representation of a J version and (optional) > > revision pair." > > + (let ((postfix (if (not revision) "" > > + (string-append "." revision)))) > > + (string-append version postfix))) > should also take commit and revision should probably be dashed. In > that way, when packaging commits between releases we can use > "jrevision.guix-revision" as the complete revision. >=20 > In short, I'd add a #:tag argument to override the tag and treat commit > like a let-bound commit. Done. > > + `(#:modules (((ice-9 ftw) #:select (scandir)) > > + ((ice-9 popen) #:select (open-pipe* close-pipe)) > > + ((ice-9 regex) #:select (match:substring string- > > match)) > > + ((ice-9 threads) #:select (parallel par-for-each)) > > + ((srfi srfi-26) #:select (cut)) > > + ((srfi srfi-1) #:select (fold)) > > + ,@%gnu-build-system-modules) > It's nice that you annotated all those, but note that it probably > wouldn't have been needed. If you notice this list getting longer and > longer as you update, consider dropping the #:selects. >=20 > > + (replace 'build > > + (lambda _ > > + (setenv "USE_OPENMP" "1") > > + (setenv "USE_THREAD" "1") > > + (for-each (lambda (var-val) (apply setenv var-val)) > > + (quote ,extra-envars)) > > + ;; The build scripts assume that PWD is make2. > > + (with-directory-excursion "make2" > > + (let* ((platform ,(if (target-arm?) "raspberry" > > "linux")) > > + (jplat (string-append "jplatform=3D" platform)) > > + (target-bit ,(if (target-64bit?) "64" "32")) > > + (jbit (string-append "j64x=3D" "j" target-bit)) > > + (jbit-avx (string-append jbit "avx")) > > + (jbit-avx2 (string-append jbit "avx2"))) > > + (parallel > > + ;; Since jconsole doesn't depend on AVX features, > > we just > > + ;; build it once. > > + (invoke "env" jplat jbit "./build_jconsole.sh") > > + (invoke "env" jplat jbit "./build_libj.sh") > > + (if ,(target-64bit?) > > + (parallel > > + (invoke "env" jplat jbit-avx > > "./build_libj.sh") > > + (invoke "env" jplat jbit-avx2 > > + "./build_libj.sh")))))))) > Maxime already made a comment w.r.t. 32bit AVX here, but I think this > would be a prime example to use the CPU tuning that was recently > landed. =20 Good idea. Upstream's build scripts condition a *lot* of behaviour on the j64avx environment variable, so it might not be straightforward, but I will= put this on the to-do list of future improvements. (Note, the code block quoted here got much simplified in the current patch.= ) > Most of the above (except the semantics of the make-j keyword > arguments) are not blockers in my opinion. Cheers! ------_=_4054760516fd6ec72eeb5231_=_ Content-Disposition: attachment; filename=0001-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom aa3015b070d2314e61a18072610bafb62cc41794 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Wed, 12 Jan 2022 18:44:36 +0900 =53ubject: [PATCH] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: Register it. =2D-- =20gnu/local.mk | 1 + =20gnu/packages/jsoftware.scm | 457 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 +++ =203 files changed, 538 insertions(+) =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 1706663bde..0cbb8899ee 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -1290,6 +1290,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/irrlicht-use-system-libs.patch \ =20 %D%/packages/patches/isc-dhcp-gcc-compat.patch \ =20 %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ =20 %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ =20 %D%/packages/patches/jsoncpp-pkg-config-version.patch \ =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..8c593b5b23 =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,457 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module (guix build utils) =2B #:use-module (guix build-system gnu) =2B #:use-module (guix build-system trivial) =2B #:use-module (guix git-download) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module (guix packages) =2B #:use-module (guix utils) =2B #:use-module (gnu packages) =2B #:use-module (gnu packages libedit) =2B #:use-module (gnu packages llvm) =2B #:use-module (gnu packages maths) =2B #:use-module (guix gexp) =2B #:use-module (ice-9 ftw) =2B #:use-module (ice-9 match) =2B #:use-module (ice-9 regex) =2B #:use-module (ice-9 rdelim) =2B #:use-module (srfi srfi-26)) =2B =2B =2B;;; TODO: Make importer and packages for J addons: =2B;;; http://www.jsoftware.com/jal/ =2B =2B;;; TODO: Package up j80x series =2B =2B =2B(define (jname prefix release-type) =2B "Return a package name for J, including RELEASE-TYPE only if not 'rele= =61se." =2B (match release-type =2B ('release prefix) =2B (_ (string-append prefix "-" (symbol->string release-type))))= =29 =2B =2B(define* (jversion->string major #:optional revision commit) =2B "Return a version string formatted like MAJOR.REVISION-COMMIT or =2B MAJOR.REVISION, MAJOR.COMMIT, or just MAJOR according to existing =2B parameters." =2B (match `(,revision ,commit) =2B ((#f #f) major) =2B ((_ #f) (string-append major "." revision)) =2B ((#f _) (string-append major "." commit)) =2B ((_ _) (string-append major "." revision "-" commit)))) =2B =2B(define* (jrelease-string release-type #:optional version-revision) =2B "Construct J release identifier string." =2B (let ((release-type (symbol->string release-type))) =2B (if version-revision =2B (string-append release-type "-" version-revision) =2B release-type))) =2B =2B(define* (jinfo->git-tag version-major release-type #:optional version-r= =65vision) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (string-append "j" version-major (jrelease-string release-type versio= =6E-revision))) =2B =2B(define (ijconsole) =2B "Generate a G-exp script that detects AVX/AVX2 support at runtime and =2B executes jconsole with the appropriate libj.so and profile.ijs." =2B (program-file "ijconsole" =2B #~(begin =2B (use-modules ((ice-9 rdelim) #:select (read-line)) =2B ((ice-9 regex) #:select (regexp-match? string-match= =29)) =2B =2B ;; Assume that this script will be installed under bin/. =2B (define %basedir (dirname (dirname (current-filename)))) =2B =2B (define (cpu-feature-line? string) =2B (string-prefix? "flags" string)) =2B =2B (define (contains-word? word string) =2B (regexp-match? =2B (string-match (string-join `("\\<" ,word "\\>") "") =2B string))) =2B =2B (define (has-cpu-feature? feature) =2B (with-input-from-file "/proc/cpuinfo" =2B (lambda () =2B (catch 'found =2B (lambda () =2B (let loop ((line (read-line))) =2B (cond ((eof-object? line) #f) =2B ((and (cpu-feature-line? line) =2B (contains-word? feature line)) =2B (throw 'found)) =2B (else (loop (read-line)))))) =2B (const #t))))) =2B =2B (let* ((jconsole (string-append %basedir "/libexec/j/jconsole"))= =0A+ (libj (format #f "~a/lib/j/libj-~a.so" %basedir =2B (cond ((has-cpu-feature? "avx2") "avx2") =2B ((has-cpu-feature? "avx") "avx") =2B (else "")))) =2B (jprofile (string-append %basedir "/etc/j/profile.ijs")))= =0A+ (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jpr= =6Ffile =2B (cdr (command-line))))))) =2B =2B(define* (make-j #:key =2B version-major =2B version-revision =2B hash =2B tag =2B (release-type 'release) =2B (patches '()) =2B (extra-inputs '()) =2B (extra-envars '()) =2B (builder "guix.gnu.org")) =2B (package =2B (name (jname "jsoftware-j" release-type)) =2B (version (jversion->string version-major version-revision)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (or tag (jinfo->git-tag version-major =2B release-type =2B version-revision))))) =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (build-system gnu-build-system) =2B (native-inputs `(("clang-toolchain" ,clang-toolchain))) =2B (inputs (cons* `("libedit" ,libedit) =2B `("libomp" ,libomp) =2B `("ijconsole" ,(ijconsole)) =2B extra-inputs)) =2B (arguments =2B `(#:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-match))= =0A+ ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that build b= =75ild up =2B ;; (very complicated) environment variables to pass to make. The = =62asic =2B ;; build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values;= =0A+ ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the sour= =63e =2B ;; directory; they do not supply a make `install' target. Thus it= =20takes =2B ;; some massaging to install files in FHS-style directories. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable directori= =65s; =2B ;; 3) make2/build_*.sh to respect standard build conventions; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")= =29 =2B (clang (string-append clang-toolchain "/bin/clang")) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version-major)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" =2B ,(jrelease-string release-type version-revision= =29)) =2B (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Create profilex.ijs overrides to point to the correct s= =74ore =2B ;; items. Note that we set ~install and ~addons directori= =65s to =2B ;; reside under ~user to allow installing and loading addo= =6Es. =2B ;; TODO: Guix-ify J addons as well. =2B (call-with-output-file "jlibrary/bin/profilex.ijs" =2B (lambda (port) =2B (display =2B (string-join =2B (list =2B "share=3D. '/share/j',~ ({.~ _2 { I.@:=3D&'/') B= =49NPATH" =2B "system=3D. share,'/system'" =2B "tools=3D. share,'/tools'" =2B ;; Upstream defaults to spamming $HOME with unhi= =64den =2B ;; userdata directories. Set this to be =2B ;; $HOME/.config/j/<jversion> instead =2B "'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9!:14= =27'" =2B "jversion=3D. ({.~ i.&'-') jversion" =2B "user=3D. home,'/.config/j/',jversion" =2B "addons=3D. user,'/addons'" =2B "break=3D. user,'/break'" =2B "config=3D. user,'/config'" =2B "install=3D. user,'/install'" =2B "snap=3D. user,'/snap'" =2B "temp=3D. user,'/temp'" =2B "\n") =2B "\n") =2B port))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the act= =75al =2B ;; compiler. It is just a switch to tell the build= =0A+ ;; scripts whether to use gcc- or clang-specific f= =6Cags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS= =20")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) =2B (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n"))))) =2B '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. The p= =61th =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-script =2B ;; definitions of new J engine functionality. Since we po= =69nt =2B ;; ~addons under the ~user directory, we move it under ~sy= =73tem =2B ;; instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"))) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))))) =2B ;; Implementation of 9!:14 records build time which breaks= =20build =2B ;; reproducibility. Note that upstream code depends on th= =65 exact =2B ;; format of these strings, so we need to mimic the standa= =72d. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support being= =0A+ ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B =2B ;; The build output depends primarily on the values of the `jpla= =74form' =2B ;; and `j64x' environment variables. If the target is ARM, then= =0A+ ;; `jplatform' is "raspberry", otherwise it is `linux'. In add= =69tion to =2B ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX= =32 =2B ;; variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to disting= =75ish =2B ;; between CPU features. Thus we build and install all variants= =20of =2B ;; libj, expecting jconsole to be called with a wrapper script t= =68at =2B ;; detects AVX features and loads the appropriate libj at runtim= =65. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (target-bit ,(if (target-64bit?) "64" "32")) =2B (run (lambda* (script #:key (avx "")) =2B (invoke "env" =2B (string-append "jplatform=3D" platfo= =72m) =2B (string-append "j64x=3Dj" target-bit= =20avx) =2B script)))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, we j= =75st =2B ;; build it once. =2B (run "./build_jconsole.sh") =2B (run "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (run "./build_libj.sh" #:avx "avx") =2B (run "./build_libj.sh" #:avx "avx2")))))))) =2B ;; The test suite is expected to be run as follows for each vari= =61nt of =2B ;; libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary fil= =65s. We =2B ;; simply place these all under test/bin. =2B (replace 'check =2B (lambda* (#:key tests? #:allow-other-keys) =2B (when tests? =2B (let ((platform ,(if (target-arm?) "raspberry" "linux"))) =2B (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, but= =20needs =2B ;; to be copied into the ~system directory when it does.= =0A+ (for-each =2B (lambda (dev-dir) =2B (if (file-exists? dev-dir) =2B (copy-recursively dev-dir "test/bin/system/dev")))= =0A+ '("jlibrary/dev" "jlibrary/addons/dev")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((bin (string-append "bin/" platform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append bin "/" jbit =2B "/jconsole")) =2B (source (string-append bin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest) =2B (install-file jconsole dest) =2B (let* ((jconsole (string-append dest "/jconsole"= =29) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jconsole tes= =74s))) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed.")))))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B #t)))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only quirk i= =73 that =2B ;; we install jconsole under /libexec to make room for the wrapp= =65r =2B ;; replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (ijconsole (assoc-ref inputs "ijconsole")) =2B (jconsole (string-append "bin/" platform "/" =2B jbit "/jconsole")) =2B (out (assoc-ref outputs "out")) =2B (bin (string-append out "/bin")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec/j")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p bin) =2B (copy-file ijconsole (string-append bin "/ijconsole-" =2B ,version-major)) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,platform ,jarch) "/= =22)) =2B (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep javx)= =29) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" platform) =2B (negate (cut member <> '("." ".."))))) =2B (install-file jconsole libexec) =2B (copy-recursively "jlibrary/system" system) =2B (for-each =2B (lambda (source-dev) =2B (if (access? source-dev R_OK) =2B (copy-recursively source-dev dev))) =2B '("jlibrary/dev" "jlibrary/addons/dev")) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (install-file "jlibrary/bin/profilex.ijs" etc))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL family")= =0A+ (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring pro= =62lems =2Bthat are not already well understood.") =2B (license license:gpl3+))) =2B =2B =2B(define-public jsoftware-j-901 =2B (make-j =2B #:version-major "901" =2B #:version-revision "f" =2B #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" =2B #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) =2B =2B =2B(define j-build-configuration-with-sleef =2B `(#:extra-inputs (("sleef" ,sleef)) =2B #:extra-envars (("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef")))) =2B =2B(define-public jsoftware-j-902 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B '(#:version-major "902" =2B #:version-revision "b" =2B #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))= =29 =2B =2B =2B(define-public jsoftware-j-903 =2B (apply make-j =2B (append j-build-configuration-with-sleef =2B '(#:version-major "903" =2B #:version-revision "a" =2B #:tag "903-release-a" =2B #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))= =29 =2B =2B =2B(define-public (jsoftware-ijconsole-symlink jpkg) =2B "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jve= =72sion>" =2B (package =2B (name "jsoftware-ijconsole") =2B (version (package-version jpkg)) =2B (source #f) =2B (build-system trivial-build-system) =2B (propagated-inputs `(("jpkg" ,jpkg))) =2B (arguments =2B `(#:modules ((guix build utils) =2B (srfi srfi-26)) =2B #:builder =2B (begin =2B (use-modules ((guix build utils) #:select (mkdir-p)) =2B ((ice-9 regex) #:select (string-match)) =2B ((ice-9 ftw) #:select (scandir)) =2B ((srfi srfi-26) #:select (cut))) =2B (let* ((out (assoc-ref %outputs "out")) =2B (jpkg (assoc-ref %build-inputs "jpkg")) =2B (ijconsole (car (scandir (string-append jpkg "/bin") =2B (cut string-match "ijconsole-.*" = =3C>)))) =2B (source (string-append jpkg "/bin/" ijconsole)) =2B (dest (string-append out "/bin/ijconsole"))) =2B (mkdir-p (dirname dest)) =2B (symlink source dest))))) =2B (home-page (package-home-page jpkg)) =2B (synopsis "Provide `ijconsole' symlink to default interpreter version"= =29 =2B (description =2B "The interpreter provided by the J package has a filename like =2Bijconsole-<version>, which provides support for having multiple, concurr= =65nt =2Bversions installed. This package provides a version-agnostic `ijconsole= =27 =2Bsymlink to interpreter version indicated and build time.") =2B (license license:gpl3+))) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.34.0 =0A= ------_=_4054760516fd6ec72eeb5231_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 12 Jan 2022 19:55:44 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 12 14:55:44 2022 Received: from localhost ([127.0.0.1]:59209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n7jii-0004kO-6R for submit <at> debbugs.gnu.org; Wed, 12 Jan 2022 14:55:44 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1n7jiT-0004js-7m for 48463 <at> debbugs.gnu.org; Wed, 12 Jan 2022 14:55:43 -0500 Received: by mail-wr1-f68.google.com with SMTP id l25so6137265wrb.13 for <48463 <at> debbugs.gnu.org>; Wed, 12 Jan 2022 11:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=K2uyHQFk9rnYfWcXZUJEEcbOofOKCQuQkFR4e5KTCi0=; b=WKAVhb9vuzm7QkMC9WTtXxGoPFON2Fo/jReDk+JV1oz4Xg2NL6vXpdLSh3BkVv2f+n 050nANBa7VX1BwdfZa+Utb9pqbxD958oblQl9Ef3Lkhh0zmq2woal48S9xNjRmqfkNDL GV8Cp03RXWj6P5PpVg0ZBA3Y2u0+EZgcJmkhp7cGsvr9raqSBzFo9AuEJPbJLUVGO7VX Jp7ZqPAZ5k8EaWSN59DpiDWmurwkBeVIotaJd7l0JStBVPVph0bTJRZjkBikUivm5Q31 iiFbsVAHd0z5dNOlTKZT6ZUeADJficjkQ6aYzPq5Tnv3ENAMimGP11zKcStFNjXGxEc6 B2sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=K2uyHQFk9rnYfWcXZUJEEcbOofOKCQuQkFR4e5KTCi0=; b=eelp4pW2qvQulGbQxSDfvEHCAt8y94KYqu+A0xhWc8AocPt6o4GQ/uSK0Csj1Q9oTZ l3SKyzXDElWK4aJc5Xg4/Y8XBgJocKhMWxjUXd8IxjTOQH9UwpXb90xbjTHl5CZIJajv GJlPkh7600SGVXvk0LbaUWfUdkpJLku8o1tRiQD3QGy7C9mJjfcbfU0/PDyIaJCfNwpy RZVwc3oxHA0Z2LqtC2dpHLU0YIegFd+6ZHnQBoo0fCWW0zqkVqoxmYKzTrTxhAnoEqyw HMMOnDg6inAU91ngzI/0+ORLyuECVQ+HqGMZ06DhMBeSyx9kv6HXNb+p3oqTjcZnNeIf 7VYA== X-Gm-Message-State: AOAM533adiHW0U1YgVEK78YF5uP0O1FFS8Pscm+czhKDGbr0QafZ7/c8 GYXgqXF0qPPvSc5Ik+Rg5kM= X-Google-Smtp-Source: ABdhPJyLQjFhXsHwe/jZXmPDtXQsRwQIpao5EsiAha3nZPOd7heHC1ZYLTEirj5N1CaUY6i7aKndMQ== X-Received: by 2002:a5d:690c:: with SMTP id t12mr1144270wru.536.1642017323089; Wed, 12 Jan 2022 11:55:23 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z5sm5035975wmf.25.2022.01.12.11.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 11:55:22 -0800 (PST) Message-ID: <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN, Maxime Devos <maximedevos@HIDDEN> Date: Wed, 12 Jan 2022 20:55:21 +0100 In-Reply-To: <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, > +(define-module (gnu packages jsoftware) > + #:use-module ((guix build utils)) > + [...] Double bracketing is pointless, use it only when needed. > +(define* (make-j #:key > + (builder "guix.gnu.org") > + vername > + revision > + hash > + (type 'release) > + commit > + (patches '()) > + (extra-inputs '()) > + (extra-envars '())) > + (package > + (name (jname "jsoftware-j" type)) > + (version (jversion->string vername revision)) > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/jsoftware/jsource") > + (commit (or commit (jinfo->git-tag vername type > revision)))) Vername sounds a little weird, make that version-base or something clearer. Also, the argument #:commit is used in an unclear fashion -- if you were to pass an actual commit hash to it, it'd still be treated as a release and not be using git-version. On a related note > +(define (jversion->string version revision) > + "Return a string representation of a J version and (optional) > revision pair." > + (let ((postfix (if (not revision) "" > + (string-append "." revision)))) > + (string-append version postfix))) should also take commit and revision should probably be dashed. In that way, when packaging commits between releases we can use "jrevision.guix-revision" as the complete revision. In short, I'd add a #:tag argument to override the tag and treat commit like a let-bound commit. > + `(#:modules (((ice-9 ftw) #:select (scandir)) > + ((ice-9 popen) #:select (open-pipe* close-pipe)) > + ((ice-9 regex) #:select (match:substring string- > match)) > + ((ice-9 threads) #:select (parallel par-for-each)) > + ((srfi srfi-26) #:select (cut)) > + ((srfi srfi-1) #:select (fold)) > + ,@%gnu-build-system-modules) It's nice that you annotated all those, but note that it probably wouldn't have been needed. If you notice this list getting longer and longer as you update, consider dropping the #:selects. > + (replace 'build > + (lambda _ > + (setenv "USE_OPENMP" "1") > + (setenv "USE_THREAD" "1") > + (for-each (lambda (var-val) (apply setenv var-val)) > + (quote ,extra-envars)) > + ;; The build scripts assume that PWD is make2. > + (with-directory-excursion "make2" > + (let* ((platform ,(if (target-arm?) "raspberry" > "linux")) > + (jplat (string-append "jplatform=" platform)) > + (target-bit ,(if (target-64bit?) "64" "32")) > + (jbit (string-append "j64x=" "j" target-bit)) > + (jbit-avx (string-append jbit "avx")) > + (jbit-avx2 (string-append jbit "avx2"))) > + (parallel > + ;; Since jconsole doesn't depend on AVX features, > we just > + ;; build it once. > + (invoke "env" jplat jbit "./build_jconsole.sh") > + (invoke "env" jplat jbit "./build_libj.sh") > + (if ,(target-64bit?) > + (parallel > + (invoke "env" jplat jbit-avx > "./build_libj.sh") > + (invoke "env" jplat jbit-avx2 > + "./build_libj.sh")))))))) Maxime already made a comment w.r.t. 32bit AVX here, but I think this would be a prime example to use the CPU tuning that was recently landed. Most of the above (except the semantics of the make-j keyword arguments) are not blockers in my opinion. Cheers
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 12 Jan 2022 12:07:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 12 07:07:34 2022 Received: from localhost ([127.0.0.1]:56389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n7cPW-0001hZ-HF for submit <at> debbugs.gnu.org; Wed, 12 Jan 2022 07:07:34 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:52555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n7cPT-0001hA-N1 for 48463 <at> debbugs.gnu.org; Wed, 12 Jan 2022 07:07:25 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1641989243; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=MEreWgqurGcxMV8ZznYEUkmEIRS8TdbMJ25yFmEcArA=; b=STN4FaIC1Uum+HSmFkjOiEnR4S83uF579IYKWHf7tjgPKEDNndb3+dsBaKGcXBt8j3J8XrOo EZDNkFdUfulA3vdsk0G7ZxRKfg03ORXr2TNXH28pE3PmVE93A8+HAONBvTgjS+XJc3BnKiYm 5RkU5SU516mE0AeCxa/8VliIp+NZiMsxEb0quLrOaO//IOnrM0/m92MYRlq7LtSi/9t6nJm2 RVeXAAn074eOgb9a40mCMn3SAUHomvtjm70eJ30nSOY0nZ2xf7N6kZjr7/Bw8o7Xbd1SKEt4 xS5ofJ4iO6qdiEIi4Fay1mIFQK/cytSc921cD9Q6ExcZpm1wOGGTsA== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n08.prod.us-east-1.postgun.com with SMTP id 61dec4769c5d22ce31147056 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Wed, 12 Jan 2022 12:07:18 GMT Received: from localhost (aj097104.dynamic.ppp.asahi-net.or.jp [220.150.97.104]) by wilsonb.com (Postfix) with ESMTPSA id 6E283A04D6; Wed, 12 Jan 2022 12:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1641989228; bh=MEreWgqurGcxMV8ZznYEUkmEIRS8TdbMJ25yFmEcArA=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=4ME7M3md7DgrTgYJu7iL9JyjjWbqFo8lGzimyLKEwFyuH+jS/coOhtzJ8oc9PZJ1t dASiJqdp2BR6gZkqqy4+WN4u6Fnr8VVDWE14PccT3+sY3z9627FgXPE5tR5y2DOBNy GE/O3tqkbXLPXa/qiqhlpCDRoVYMAwVnbfIJffDoWnRcOFdFot7Cwujkb56MpxyNht xx7VtCXgqKfgwZ7FHhPM0CMI5qzZwDGXx/hx/QU8OLW4Gsdfya9ROdpWaAtUmkAawM PIOVR0JXQHeQQSiyhaidzAlgIQEYqrPL1tImah13Bo+BZpzaxDACXFBxYRB0nyb723 h1zW3FEcMPv5hxfDxX2jdVCLCevAfksPFy0MvvRTEzbStT1NULOrweOOa12oVHkHhE UK139nRr8AIJGX4Kd3NnWxppy1qliyeHzDBSwamdH2v5Q625xW2m5/1GrZ3dtXtxQo LM7zndqlZLMC7NPWvuQwiz2JDGdwTEsQ/did50cJDA1avUtePlfh1NfQjLRriren5v EBbNQVRylrDBHNB4U1FKxm9Ca5BX2cbEab6L8NU23C1dYYYOHQYXveOruv+BrPL1eX ZNuHAPnLLB3b4+3Juf7XhNKrt3CHcem24F5UWDE7RJdnHvdkl4Bti9XfIYihK8CKaI lshRJjOcZORQFw3C68Vyxvus= Date: Wed, 12 Jan 2022 21:07:45 +0900 To: Maxime Devos <maximedevos@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> In-Reply-To: <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> Message-Id: <2P322C327XW0Q.21O5A4IFGMNDI@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_37270a30602a14be45b721a4_=_" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: Liliana Marie Prikler <liliana.prikler@HIDDEN>, 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_37270a30602a14be45b721a4_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > + `(#:tests? #f > > [...] > > + (replace 'check > > + (lambda* (#:key tests? #:allow-other-keys) > > + (when tests? [...])))) >=20 > I think #:tests? #false should be removed, otherwise this > check phase would never do anything. Nice catch! Thanks. Disabled tests when tweaking builds and forgot to remov= e. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ;; The jlibrary/dev directory only sometimes exists, > > but needs > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ;; to be copied into the ~system directory when it > > does. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (for-each > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda (dev-dir) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (if (access? dev-dir R_OK) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (copy-recursively de= v-dir > > "test/bin/system/dev"))) >=20 >=20 > Are you testing for file permissions, or for the existence of the file? > If the latter, I'd recommend using 'file-exists?' instead. >=20 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (if (access? source-dev R_OK) Just existence. Thanks for the pointer. Changed. ------_=_37270a30602a14be45b721a4_=_ Content-Disposition: attachment; filename=0001-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom 648efabc2d9e7b9a28d22d47ea53451bc5b46cf3 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Wed, 12 Jan 2022 18:44:36 +0900 =53ubject: [PATCH] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: Register it. =2D-- =20gnu/local.mk | 1 + =20gnu/packages/jsoftware.scm | 454 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 +++ =203 files changed, 535 insertions(+) =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 1706663bde..0cbb8899ee 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -1290,6 +1290,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/irrlicht-use-system-libs.patch \ =20 %D%/packages/patches/isc-dhcp-gcc-compat.patch \ =20 %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ =20 %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ =20 %D%/packages/patches/jsoncpp-pkg-config-version.patch \ =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..97b561ec27 =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,454 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module ((guix build utils)) =2B #:use-module ((guix build-system gnu)) =2B #:use-module ((guix build-system trivial)) =2B #:use-module ((guix git-download)) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module ((guix packages)) =2B #:use-module ((guix utils)) =2B #:use-module ((gnu packages)) =2B #:use-module ((gnu packages libedit)) =2B #:use-module ((gnu packages llvm)) =2B #:use-module ((gnu packages maths)) =2B #:use-module ((guix gexp)) =2B #:use-module ((ice-9 ftw)) =2B #:use-module ((ice-9 match)) =2B #:use-module ((ice-9 regex)) =2B #:use-module ((ice-9 rdelim)) =2B #:use-module ((srfi srfi-26))) =2B =2B =2B;;; TODO: Make importer and packages for J addons: =2B;;; http://www.jsoftware.com/jal/ =2B =2B;;; TODO: Package up j80x series =2B =2B =2B(define (jname prefix jtype) =2B "Return a package name for the given prefix and jtype, e.g. `jlib', =2B `jlib-beta', `j', and `j-beta'." =2B (let ((postfix (if (eq? jtype 'release) "" =2B (string-append "-" (symbol->string jtype))))) =2B (string-append prefix postfix))) =2B =2B(define (jversion->string version revision) =2B "Return a string representation of a J version and (optional) revision= =20pair." =2B (let ((postfix (if (not revision) "" =2B (string-append "." revision)))) =2B (string-append version postfix))) =2B =2B(define (jinfo->git-tag jversion jtype jrevision) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (let ((postfix (if (not jrevision) "" =2B (string-append "-" jrevision)))) =2B (string-append "j" jversion "-" (symbol->string jtype) postfix))) =2B =2B(define (ijconsole) =2B "Generate a G-exp script that detects AVX/AVX2 support at runtime and =2B executes jconsole with the appropriate libj.so and profile.ijs." =2B (program-file "ijconsole" =2B #~(begin =2B (use-modules ((ice-9 rdelim) #:select (read-line)) =2B ((ice-9 regex) #:select (regexp-match? string-match= =29)) =2B =2B ;; Assume that this script will be installed under bin/. =2B (define %basedir (dirname (dirname (current-filename)))) =2B =2B (define (cpu-feature-line? string) =2B (string-prefix? "flags" string)) =2B =2B (define (contains-word? word string) =2B (regexp-match? =2B (string-match (string-join `("\\<" ,word "\\>") "") =2B string))) =2B =2B (define (has-cpu-feature? feature) =2B (with-input-from-file "/proc/cpuinfo" =2B (lambda () =2B (catch 'found =2B (lambda () =2B (let loop ((line (read-line))) =2B (cond ((eof-object? line) #f) =2B ((and (cpu-feature-line? line) =2B (contains-word? feature line)) =2B (throw 'found)) =2B (else (loop (read-line)))))) =2B (const #t))))) =2B =2B (let* ((jconsole (string-append %basedir "/libexec/j/jconsole"))= =0A+ (libj (format #f "~a/lib/j/libj-~a.so" %basedir =2B (cond ((has-cpu-feature? "avx2") "avx2") =2B ((has-cpu-feature? "avx") "avx") =2B (else "")))) =2B (jprofile (string-append %basedir "/etc/j/profile.ijs")))= =0A+ (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jpr= =6Ffile =2B (cdr (command-line))))))) =2B =2B(define* (make-j #:key =2B (builder "guix.gnu.org") =2B vername =2B revision =2B hash =2B (type 'release) =2B commit =2B (patches '()) =2B (extra-inputs '()) =2B (extra-envars '())) =2B (package =2B (name (jname "jsoftware-j" type)) =2B (version (jversion->string vername revision)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (or commit (jinfo->git-tag vername type revision))))= =29 =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (build-system gnu-build-system) =2B (native-inputs `(("clang-toolchain" ,clang-toolchain))) =2B (inputs (cons* `("libedit" ,libedit) =2B `("libomp" ,libomp) =2B `("ijconsole" ,(ijconsole)) =2B extra-inputs)) =2B (arguments =2B `(#:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-match))= =0A+ ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that build b= =75ild up =2B ;; (very complicated) environment variables to pass to make. The = =62asic =2B ;; build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values;= =0A+ ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the sour= =63e =2B ;; directory; they do not supply a make `install' target. Thus it= =20takes =2B ;; some massaging to install files in FHS-style directories. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable directori= =65s; =2B ;; 3) make2/build_*.sh to respect standard build conventions; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")= =29 =2B (clang (string-append clang-toolchain "/bin/clang")) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" (symbol->string ',type)= =29) =2B (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Create profilex.ijs overrides to point to the correct s= =74ore =2B ;; items. Note that we set ~install and ~addons directori= =65s to =2B ;; reside under ~user to allow installing and loading addo= =6Es. =2B ;; TODO: Guix-ify J addons as well. =2B (call-with-output-file "jlibrary/bin/profilex.ijs" =2B (lambda (port) =2B (display =2B (string-join =2B (list =2B "share=3D. '/share/j',~ ({.~ _2 { I.@:=3D&'/') B= =49NPATH" =2B "system=3D. share,'/system'" =2B "tools=3D. share,'/tools'" =2B ;; Upstream defaults to spamming $HOME with unhi= =64den =2B ;; userdata directories. Set this to be =2B ;; $HOME/.j/<jtype>/<jversion> instead =2B "'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9!:14= =27'" =2B "jversion=3D. ({.~ i.&'-') jversion" =2B "jsuffix=3D. >@{&('';'-beta') jtype -: 'beta'" =2B "user=3D. home,'/.config/j/',jversion,jsuffix" =2B "addons=3D. user,'/addons'" =2B "break=3D. user,'/break'" =2B "config=3D. user,'/config'" =2B "install=3D. user,'/install'" =2B "snap=3D. user,'/snap'" =2B "temp=3D. user,'/temp'" =2B "\n") =2B "\n") =2B port))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the act= =75al =2B ;; compiler. It is just a switch to tell the build= =0A+ ;; scripts whether to use gcc- or clang-specific f= =6Cags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS= =20")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) =2B (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n"))))) =2B '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. The p= =61th =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-script =2B ;; definitions of new J engine functionality. Since we po= =69nt =2B ;; ~addons under the ~user directory, we move it under ~sy= =73tem =2B ;; instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"))) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))))) =2B ;; Implementation of 9!:14 records build time which breaks= =20build =2B ;; reproducibility. Note that upstream code depends on th= =65 exact =2B ;; format of these strings, so we need to mimic the standa= =72d. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support being= =0A+ ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B =2B ;; The build output depends primarily on the values of the `jpla= =74form' =2B ;; and `j64x' environment variables. If the target is ARM, then= =0A+ ;; `jplatform' is "raspberry", otherwise it is `linux'. In add= =69tion to =2B ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX= =32 =2B ;; variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to disting= =75ish =2B ;; between CPU features. Thus we build and install all variants= =20of =2B ;; libj, expecting jconsole to be called with a wrapper script t= =68at =2B ;; detects AVX features and loads the appropriate libj at runtim= =65. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (jplat (string-append "jplatform=3D" platform)) =2B (target-bit ,(if (target-64bit?) "64" "32")) =2B (jbit (string-append "j64x=3D" "j" target-bit)) =2B (jbit-avx (string-append jbit "avx")) =2B (jbit-avx2 (string-append jbit "avx2"))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, we j= =75st =2B ;; build it once. =2B (invoke "env" jplat jbit "./build_jconsole.sh") =2B (invoke "env" jplat jbit "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (invoke "env" jplat jbit-avx "./build_libj.sh") =2B (invoke "env" jplat jbit-avx2 =2B "./build_libj.sh")))))))) =2B ;; The test suite is expected to be run as follows for each vari= =61nt of =2B ;; libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary fil= =65s. We =2B ;; simply place these all under test/bin. =2B (replace 'check =2B (lambda* (#:key tests? #:allow-other-keys) =2B (when tests? =2B (let ((jplatform ,(if (target-arm?) "raspberry" "linux")))= =0A+ (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, but= =20needs =2B ;; to be copied into the ~system directory when it does.= =0A+ (for-each =2B (lambda (dev-dir) =2B (if (file-exists? dev-dir) =2B (copy-recursively dev-dir "test/bin/system/dev")))= =0A+ '("jlibrary/dev" "jlibrary/addons/dev")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((jbin (string-append "bin/" jplatform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append jbin "/" jbit =2B "/jconsole")) =2B (source (string-append jbin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest) =2B (install-file jconsole dest) =2B (let* ((jc (string-append dest "/jconsole")) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jc tests))) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed.")))))) =2B (scandir (string-append "bin/" jplatform) =2B (negate (cut member <> '("." ".."))))) =2B #t)))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only quirk i= =73 that =2B ;; we install jconsole under /libexec to make room for the wrapp= =65r =2B ;; replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((jplat ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (ijconsole (assoc-ref inputs "ijconsole")) =2B (interp (string-join `("bin" ,jplat ,jbit "jconsole")= =20"/")) =2B (out (assoc-ref outputs "out")) =2B (bin (string-append out "/bin")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec/j")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p bin) =2B (copy-file ijconsole (string-append bin "/ijconsole-" ,ver= =6Eame)) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,jplat ,jarch) "/"))= =0A+ (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep javx)= =29) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" jplat) =2B (negate (cut member <> '("." ".."))))) =2B (install-file interp libexec) =2B (copy-recursively "jlibrary/system" system) =2B (for-each =2B (lambda (source-dev) =2B (if (access? source-dev R_OK) =2B (copy-recursively source-dev dev))) =2B '("jlibrary/dev" "jlibrary/addons/dev")) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (install-file "jlibrary/bin/profilex.ijs" etc))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL family")= =0A+ (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring pro= =62lems =2Bthat are not already well understood.") =2B (license license:gpl3+))) =2B =2B =2B(define-public jsoftware-j-901 =2B (make-j =2B #:vername "901" =2B #:revision "f" =2B #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" =2B #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) =2B =2B =2B(define jlib-build-configuration-with-sleef =2B `(#:extra-inputs (("sleef" ,sleef)) =2B #:extra-envars (("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef")))) =2B =2B(define-public jsoftware-j-902 =2B (apply make-j =2B (append jlib-build-configuration-with-sleef =2B '(#:vername "902" =2B #:revision "b" =2B #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))= =29 =2B =2B =2B(define-public jsoftware-j-903 =2B (apply make-j =2B (append jlib-build-configuration-with-sleef =2B '(#:vername "903" =2B #:revision "a" =2B #:commit "903-release-a" =2B #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))= =29 =2B =2B;; Keep until j904-beta is released. =2B(define-public jsoftware-j-903-beta =2B (apply make-j =2B (append jlib-build-configuration-with-sleef =2B `(#:vername "903" =2B #:revision "w" =2B #:type ,'beta =2B #:hash "0kd63mrkaq0bs42gw0wrlb14fymhigznx1lrb698dgv6fzlfglim")))= =29 =2B =2B =2B(define-public (jsoftware-ijconsole-symlink jpkg) =2B "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jve= =72sion>" =2B (package =2B (name "jsoftware-ijconsole") =2B (version (package-version jpkg)) =2B (source #f) =2B (build-system trivial-build-system) =2B (propagated-inputs `(("jpkg" ,jpkg))) =2B (arguments =2B `(#:modules ((guix build utils) =2B (srfi srfi-26)) =2B #:builder =2B (begin =2B (use-modules ((guix build utils) #:select (mkdir-p)) =2B ((ice-9 regex) #:select (string-match)) =2B ((ice-9 ftw) #:select (scandir)) =2B ((srfi srfi-26) #:select (cut))) =2B (let* ((out (assoc-ref %outputs "out")) =2B (jpkg (assoc-ref %build-inputs "jpkg")) =2B (interp (car (scandir (string-append jpkg "/bin") =2B (cut string-match "ijconsole-.*" = =3C>)))) =2B (source (string-append jpkg "/bin/" interp)) =2B (dest (string-append out "/bin/ijconsole"))) =2B (mkdir-p (dirname dest)) =2B (symlink source dest))))) =2B (home-page (package-home-page jpkg)) =2B (synopsis "Provide `ijconsole' symlink to default interpreter version"= =29 =2B (description =2B "The interpreter provided by the J package has a filename like =2Bijconsole-<version>, which provides support for having multiple, concurr= =65nt =2Bversions installed. This package provides a version-agnostic `ijconsole= =27 =2Bsymlink to interpreter version indicated and build time.") =2B (license license:gpl3+))) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.34.0 =0A= ------_=_37270a30602a14be45b721a4_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 12 Jan 2022 11:10:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 12 06:10:31 2022 Received: from localhost ([127.0.0.1]:56319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n7bWR-000862-Jf for submit <at> debbugs.gnu.org; Wed, 12 Jan 2022 06:10:31 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:54634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maximedevos@HIDDEN>) id 1n7bWP-00085p-RY for 48463 <at> debbugs.gnu.org; Wed, 12 Jan 2022 06:10:30 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id hnAU260064UW6Th01nAUZk; Wed, 12 Jan 2022 12:10:28 +0100 Message-ID: <90704c2259f576a14fb1268219e8c0dc2b3bf289.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Maxime Devos <maximedevos@HIDDEN> To: elaexuotee@HIDDEN, Liliana Marie Prikler <liliana.prikler@HIDDEN> Date: Wed, 12 Jan 2022 11:10:27 +0000 In-Reply-To: <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-3zL5+zD1FIgPWqUa30KQ" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1641985828; bh=SpPFrDKADb3DzdGgE/7yX35htZR5FkGoRVsdpz/Zccs=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Wb1FUdId43uID8BK61CjazmwFYkl4f8ZwB5f1aHZ9HD0+LtILOUhKayVSFTonFo7b YkhMrqKK80Fh9lHoTrmwdS8CZZ/xHFcO2tEKCAmlANpmUkScm0xZUS81IoR8oceTga Oqfc5Rp8+AtKqFhQ9bGwM5qlF6ggG2YFSBo99kLmj/0BiY60HWbntmgLVz54H/qP79 f4TCy8N7mbgHn4OR1ovqIHmM+MFOnkqnJxFE45nw9uiSvJ7xey/N3g9LoW/m03Eq8l /xRlpUK7D+5n5ht5KHUy3IkjC1z4u44mvpaXG086xZALS8mNKKk7kDty0efUzst/sv rGyxY8wNgLuyQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-3zL5+zD1FIgPWqUa30KQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 SGksCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCA7OyBUaGUgamxpYnJhcnkvZGV2 IGRpcmVjdG9yeSBvbmx5IHNvbWV0aW1lcyBleGlzdHMsCj4gYnV0IG5lZWRzCj4gK8KgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoCA7OyB0byBiZSBjb3BpZWQgaW50byB0aGUgfnN5c3RlbSBk aXJlY3Rvcnkgd2hlbiBpdAo+IGRvZXMuCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oCAoZm9yLWVhY2gKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAobGFtYmRh IChkZXYtZGlyKQo+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAoaWYg KGFjY2Vzcz8gZGV2LWRpciBSX09LKQo+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqAgKGNvcHktcmVjdXJzaXZlbHkgZGV2LWRpcgo+ICJ0ZXN0L2Jpbi9zeXN0ZW0v ZGV2IikpKQoKCkFyZSB5b3UgdGVzdGluZyBmb3IgZmlsZSBwZXJtaXNzaW9ucywgb3IgZm9yIHRo ZSBleGlzdGVuY2Ugb2YgdGhlIGZpbGU/CklmIHRoZSBsYXR0ZXIsIEknZCByZWNvbW1lbmQgdXNp bmcgJ2ZpbGUtZXhpc3RzPycgaW5zdGVhZC4KCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqAgKGlmIChhY2Nlc3M/IHNvdXJjZS1kZXYgUl9PSykKCgpMaWtld2lzZS4KCkdyZWV0 aW5ncywKTWF4aW1lLgo= --=-3zL5+zD1FIgPWqUa30KQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYd63IxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vtsAQDd+Q3X9aYN4vZKMMMQNuVPxm8f nnaBo9vhYx8tOPBOIwEA5zqHffCn5ipj+UMoE4dLivjgyGeY+ArbbkY09gitwAc= =C9FN -----END PGP SIGNATURE----- --=-3zL5+zD1FIgPWqUa30KQ--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 12 Jan 2022 11:07:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 12 06:07:07 2022 Received: from localhost ([127.0.0.1]:56314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n7bT9-0007zL-5J for submit <at> debbugs.gnu.org; Wed, 12 Jan 2022 06:07:07 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:34046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maximedevos@HIDDEN>) id 1n7bT5-0007yx-JT for 48463 <at> debbugs.gnu.org; Wed, 12 Jan 2022 06:07:05 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id hn712600K4UW6Th06n71dq; Wed, 12 Jan 2022 12:07:01 +0100 Message-ID: <54c61a15f0595473496d450b62e340c18ba9c840.camel@HIDDEN> Subject: Re: [bug#48463] gnu: Add j. From: Maxime Devos <maximedevos@HIDDEN> To: elaexuotee@HIDDEN, Liliana Marie Prikler <liliana.prikler@HIDDEN> Date: Wed, 12 Jan 2022 11:06:50 +0000 In-Reply-To: <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-GFkO/VgGkGfM2J4lzLAn" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1641985622; bh=6v+LIS0CmgHAiI5LrPGjbf8Ln+EpMtW0UxpYmEbfJK4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=LkX9XrwnN4EvxaiJ0gZoA6Hzb3dQi2Qb6ciuXnL0HqJIkx11d9mDc6rUC00UxXO3G 0a/fbuwYhUIBSJeT31/FS+Ir1ZVEuMqi1shYT3HRO0QPxElxLlBJxGTIiWBRWM7b2W jXa1lqUHCUWmv1pnXsdaKlHF5n2nxOnVkipDwLq6vAXUoe8XEhZssMCvhEq+LEv7XE i2oROCJvyVgX5628jZV/PHGk8tbh+GCgVlzw/YrahJkLsYYFJ7FCSnZcA6US+Cqpjb GnWvfmRlJP4nyZ7diIH8cF0CnvoIZCorUhlddJMBIkxpXCLO6uLKHR13HJfrYPa/jE UjEXlGC2FsJ+g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --=-GFkO/VgGkGfM2J4lzLAn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 ZWxhZXh1b3RlZS0tLSB2aWEgR3VpeC1wYXRjaGVzIHZpYSBzY2hyZWVmIG9wIHdvIDEyLTAxLTIw MjIgb20gMTg6NDcgWyswOTAwXToKK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAg KGlmICwodGFyZ2V0LTY0Yml0PykKK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgIChwYXJhbGxlbAorwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg IChpbnZva2UgImVudiIganBsYXQgamJpdC1hdnggIi4vYnVpbGRfbGliai5zaCIpCivCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKGludm9rZSAiZW52IiBqcGxhdCBq Yml0LWF2eDIKK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqAgIi4vYnVpbGRfbGliai5zaCIpKSkpKSkpKQoKSSBkb24ndCB0aGluayBhdngg YW5kIGF2eDIgYXJlIGF2YWlsYWJsZSBvbiBhYXJjaDY0LgpNYXliZSB5b3UgY2FuIHVzZSAsKHRh cmdldC14ODYtNjQ/KSBpbnN0ZWFkPwoKPiArICAgIGAoIzp0ZXN0cz8gI2YKPiAgICAgICAgICBb Li4uXQo+ICsgICAgICAgIChyZXBsYWNlICdjaGVjawo+ICsgICAgICAgICAgKGxhbWJkYSogKCM6 a2V5IHRlc3RzPyAjOmFsbG93LW90aGVyLWtleXMpCj4gKyAgICAgICAgICAgICh3aGVuIHRlc3Rz PyBbLi4uXSkpKSkKCkkgdGhpbmsgIzp0ZXN0cz8gI2ZhbHNlIHNob3VsZCBiZSByZW1vdmVkLCBv dGhlcndpc2UgdGhpcwpjaGVjayBwaGFzZSB3b3VsZCBuZXZlciBkbyBhbnl0aGluZy4KCkdyZWV0 aW5ncywKTWF4aW1lLgo= --=-GFkO/VgGkGfM2J4lzLAn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYd62ShccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lXXAQDJ0hnY4KkC+VSOpsmlLH7BvCYv vLZH6H0+lnp1f9I+dAEAnIAdCE/LkEFRh6KAiZed8pVI9yvWZXzCbisBN5mqkws= =+Nmf -----END PGP SIGNATURE----- --=-GFkO/VgGkGfM2J4lzLAn--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 12 Jan 2022 09:47:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 12 04:47:49 2022 Received: from localhost ([127.0.0.1]:56280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1n7aEG-0005Zz-Q8 for submit <at> debbugs.gnu.org; Wed, 12 Jan 2022 04:47:49 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:46643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1n7aEB-0005ZN-8R for 48463 <at> debbugs.gnu.org; Wed, 12 Jan 2022 04:47:39 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1641980855; h=Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=BbO0FvEw0Vnh/fvPzF01OOTdChhzCbaW+O6xQxKYL9k=; b=e5X1kcxIjFLtV/+s3PJ8C7Fsi3av88iHpWwdWWrZJFSQMk8i+C7jvOFHAIvLucI3m3mKfTOn uVDqQLDiOi6QjyNucv0AI32Z5y30NGfwix9DF1GwI3uPL0yxGwm1mNDdorkR9H04W4nwFNzh GJfjyHIL53Z8PAhOBxBl8+dHEQpDVt3sN4yyBTLlIoqjplVTNuChxXN83I2Pa7hVHThLCY8G RB70niwL1rMun+GI2lYfyqMT558QNqMw//XqFiLkGlvP7RJLOHHwJNzpv6ugBakUbMO7ZjHu mRCfrDDhteR+pVPZNQhsHRz11r2mUV2m/M6OCzbOjPPdjIfjeoI/2g== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 61dea3b12b595aa321bbe087 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Wed, 12 Jan 2022 09:47:29 GMT Received: from localhost (aj097104.dynamic.ppp.asahi-net.or.jp [220.150.97.104]) by wilsonb.com (Postfix) with ESMTPSA id 6C412A04C7; Wed, 12 Jan 2022 09:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1641980845; bh=BbO0FvEw0Vnh/fvPzF01OOTdChhzCbaW+O6xQxKYL9k=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=gr+en7htJbvbUoKQAWmtIcJ62z4QK5EIpeXxbAsTEympKXcn600w1PxB5vv5cscxu bCqz1rraVvC1LfgCKUY/bYDTWbrRsYL9V4ZVaGC4kMRtbq4po/GbnhfTCGFKHLsVz8 xTk6kuyl1/WbSYqvs5CVYIuQ1tNK1Za0WJilVTpekj20bVeqvVFwDs0E5Yv7JOCQEF FoBP06Qjj13gKl1RfWIQV45tP5DgoekO98nT7VzGdTBGBUHBDX/+vU15bbJrxYyYDr KUXv/bAYnGBUaHYRWDFTKxXW/3nbCdHRgoE/3SPj2PNVSBmOZGXYMghW+ZmX5tVKnt oxtsJNZbTTvxYsNb5CT9eGgKZ0K+s9zquVYFMnt+yPu6AYQxduBPvmSMFU4apksZN0 8dv3RHd1QJ2Zpm5QSr/hReo4LjYqBJrdhMphLKsp1NFjvU/GL2ahGe6otOe6GNOXef 5bvQLg0fUlaCk8szIK8hNdRcNppxwbBnptCv9lOBxmyy6EXmnM1W3eXDUKv1ulsmf3 1r1jGrWFl/HV1Zjz8joqcnOal5gaHeUnd4+HLKDsWRR6vfdqtizrT42AXv6EFzO/Yb ZdsQKWh7Ik55ezp65j148PYPBhtF3O8gqnNtQ9lg1elX/ETcrQVT53VySS9GnnmbHY ZS2afEmr+AkZdFEwbbFvAcKU= Date: Wed, 12 Jan 2022 18:47:52 +0900 To: Liliana Marie Prikler <liliana.prikler@HIDDEN> Subject: Re: gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> In-Reply-To: <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> Message-Id: <2JQJMV0O718S1.31FZE8GKCTLPF@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_29f98b096df47ba933a8a3a8_=_" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is a multipart message in MIME format. ------_=_29f98b096df47ba933a8a3a8_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here's a long-needed update. > > For now, instead of messing with the union, would it make sense to > > just create a (non-public?) jsoftware-addons package that contains > > all addons and point jlib at those? > > Are those addons data packages or can they be compiled without needing > jlib? If they're pure data, then you can pack them up and refer them > as you wanted to, if not, you first have to create jlib-minimal without > them, then package up everything and finally do jlib. They're pure data, which is nice. The J package manager also lets users install arbitrary addons from GitHub,= so packaging up the official addons would lock the `addons/' directory under t= he non-writable store, meaning that we probably also want an importer. I am working on that, but instead of keeping this package in lingo much lon= ger, maybe we can release sonner and consider the addon package code a separate issue? > Oh, and one thing that was previously ignored is that using XDG > standards for things we can't simply put in the store (like > configuration if it needs that) is preferable to having a ~/.j > directory. Excellent point. Fixed. > > > That's less than the number of Rust versions we need just for > > > bootstrap, but still a few too many in my opinion. Are all of > > > those still used in production or would it be wiser to to put some > > > of them into Guix-Past [1]? > > People are also still running ancient versions of Debian. Python 2 has > officially reached end of life, yet it is used as well. At some point > we do have to declare software that people are still using as old :) Sounds sane. I will probably eventually work on getting the j80x series in Guix and the really ancient ones in Guix Past. However, that will be a future task for myself. > > > Having keyword lists is also nice and declarative, but more > > > importantly, it lets you call the function as a normal function > > > without having to worry about constructing some record in a > > > particular way. The configuration you're using doesn't have a > > > specific setting? Just override it with your own. It's as simple > > > as calling (append old-config extra-config). > > ... > Yup. Now using keyword lists. > > > I find this way of mistreating the version field very > > > weird. You're not adding anything new by doing this and you're not > > > making anything more secure (I'd argue, that it's less secure, > > > because you could update the version and forget about the property > > > or vice versa). The code overall is a lot more straightforward now. How does the versioning= stuff look now? > > My thinking was that 4 means we want a separate *-beta package, > > meaning that the version field should probably just look like > > "<version>-<patch>". > > Additionally, relating back to the above discussion about multiple > > versions > Sounds good, though <version>.<patch> would be equally acceptable.=20 > Your call. > > > 5) It would be nice to be able to install the latest j901 without > > having to > > know that this corresponds to patch level f, i.e. currently=20 > > j@901-f. > I think `guix build j@901' ought to resolve this automatically. It turns out that the j@901 specification only gets recognized with version= s strings of the form <version>.<patch>, so going with that. > > > First of all, do you even need all this info? `j' is an > > > objectively bad name > > > for a package. `j-beta' is not better in any way, it only avoids > > > the user installing a potentially unstable "J" package. =20 > >=20 > > Yeah, "j" is pretty short but it does mirror "r". I'm agnostic about > > package name, though. Suggestions welcome. > Fair enough, though this remains a problem for single letter programs > in which others would likely want to claim the letter as well. R has > the benefit of being old and well-known enough, it would probably be > rlang otherwise (not to be confused with erlang). J has been around from the 1990's :D That said, I went ahead and named it `jsoftware-j', since despite age, J is= still pretty obscure, and there's not much of a good reason to monopolize a= single letter name. > > I see what you mean in a general sense but not quite how to apply it > > in this case. I am all ears if you have a simpler, cleaner solution > > that addresses the constraints listed above! > I think the cleaner solution here is to not store those properties in > the package, but still having them as parameters to the make-j function > call. Happily, the new package re-organization was able to get rid of these properties. > > > Next, should ijconsole not simply be a package like jlib (both > > > properly prefixed with jsoftware- of course)? > >=20 > > This is effectively what make-j does, no? ijconsole needs to know the > > path to jlib, so make-j points it at the correct one and wraps > > everything up into a package. > I don't really understand why those needs to be done in two steps > however. ijconsole could already contain the fully functioning j > program. Or partially functioning if we account for addons. As you can see, there's no need for a separate ijconsole package any more. Instead, `ijconsole' is just defined as a program-file that becomes an input to jsoftware-j. It is also worth pointing out the convenience procedure `jsoftware-ijconsole-symlink'. Basically, it p Anyway, let me know what you think! ------_=_29f98b096df47ba933a8a3a8_=_ Content-Disposition: attachment; filename=0001-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom 98be43134f62132a98a97f7601e97c3ae9ec63c6 Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Wed, 12 Jan 2022 18:44:36 +0900 =53ubject: [PATCH] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: Register it. =2D-- =20gnu/local.mk | 1 + =20gnu/packages/jsoftware.scm | 455 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 +++ =203 files changed, 536 insertions(+) =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex 1706663bde..0cbb8899ee 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -1290,6 +1290,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/irrlicht-use-system-libs.patch \ =20 %D%/packages/patches/isc-dhcp-gcc-compat.patch \ =20 %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ =20 %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ =20 %D%/packages/patches/jsoncpp-pkg-config-version.patch \ =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..472a6c30d4 =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,455 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2022 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module ((guix build utils)) =2B #:use-module ((guix build-system gnu)) =2B #:use-module ((guix build-system trivial)) =2B #:use-module ((guix git-download)) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module ((guix packages)) =2B #:use-module ((guix utils)) =2B #:use-module ((gnu packages)) =2B #:use-module ((gnu packages libedit)) =2B #:use-module ((gnu packages llvm)) =2B #:use-module ((gnu packages maths)) =2B #:use-module ((guix gexp)) =2B #:use-module ((ice-9 ftw)) =2B #:use-module ((ice-9 match)) =2B #:use-module ((ice-9 regex)) =2B #:use-module ((ice-9 rdelim)) =2B #:use-module ((srfi srfi-26))) =2B =2B =2B;;; TODO: Make importer and packages for J addons: =2B;;; http://www.jsoftware.com/jal/ =2B =2B;;; TODO: Package up j80x series =2B =2B =2B(define (jname prefix jtype) =2B "Return a package name for the given prefix and jtype, e.g. `jlib', =2B `jlib-beta', `j', and `j-beta'." =2B (let ((postfix (if (eq? jtype 'release) "" =2B (string-append "-" (symbol->string jtype))))) =2B (string-append prefix postfix))) =2B =2B(define (jversion->string version revision) =2B "Return a string representation of a J version and (optional) revision= =20pair." =2B (let ((postfix (if (not revision) "" =2B (string-append "." revision)))) =2B (string-append version postfix))) =2B =2B(define (jinfo->git-tag jversion jtype jrevision) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (let ((postfix (if (not jrevision) "" =2B (string-append "-" jrevision)))) =2B (string-append "j" jversion "-" (symbol->string jtype) postfix))) =2B =2B(define (ijconsole) =2B "Generate a G-exp script that detects AVX/AVX2 support at runtime and =2B executes jconsole with the appropriate libj.so and profile.ijs." =2B (program-file "ijconsole" =2B #~(begin =2B (use-modules ((ice-9 rdelim) #:select (read-line)) =2B ((ice-9 regex) #:select (regexp-match? string-match= =29)) =2B =2B ;; Assume that this script will be installed under bin/. =2B (define %basedir (dirname (dirname (current-filename)))) =2B =2B (define (cpu-feature-line? string) =2B (string-prefix? "flags" string)) =2B =2B (define (contains-word? word string) =2B (regexp-match? =2B (string-match (string-join `("\\<" ,word "\\>") "") =2B string))) =2B =2B (define (has-cpu-feature? feature) =2B (with-input-from-file "/proc/cpuinfo" =2B (lambda () =2B (catch 'found =2B (lambda () =2B (let loop ((line (read-line))) =2B (cond ((eof-object? line) #f) =2B ((and (cpu-feature-line? line) =2B (contains-word? feature line)) =2B (throw 'found)) =2B (else (loop (read-line)))))) =2B (const #t))))) =2B =2B (let* ((jconsole (string-append %basedir "/libexec/j/jconsole"))= =0A+ (libj (format #f "~a/lib/j/libj-~a.so" %basedir =2B (cond ((has-cpu-feature? "avx2") "avx2") =2B ((has-cpu-feature? "avx") "avx") =2B (else "")))) =2B (jprofile (string-append %basedir "/etc/j/profile.ijs")))= =0A+ (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jpr= =6Ffile =2B (cdr (command-line))))))) =2B =2B(define* (make-j #:key =2B (builder "guix.gnu.org") =2B vername =2B revision =2B hash =2B (type 'release) =2B commit =2B (patches '()) =2B (extra-inputs '()) =2B (extra-envars '())) =2B (package =2B (name (jname "jsoftware-j" type)) =2B (version (jversion->string vername revision)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (or commit (jinfo->git-tag vername type revision))))= =29 =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (build-system gnu-build-system) =2B (native-inputs `(("clang-toolchain" ,clang-toolchain))) =2B (inputs (cons* `("libedit" ,libedit) =2B `("libomp" ,libomp) =2B `("ijconsole" ,(ijconsole)) =2B extra-inputs)) =2B (arguments =2B `(#:tests? #f =2B #:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-match))= =0A+ ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that build b= =75ild up =2B ;; (very complicated) environment variables to pass to make. The = =62asic =2B ;; build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit values;= =0A+ ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the sour= =63e =2B ;; directory; they do not supply a make `install' target. Thus it= =20takes =2B ;; some massaging to install files in FHS-style directories. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable directori= =65s; =2B ;; 3) make2/build_*.sh to respect standard build conventions; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolchain")= =29 =2B (clang (string-append clang-toolchain "/bin/clang")) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" (symbol->string ',type)= =29) =2B (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Create profilex.ijs overrides to point to the correct s= =74ore =2B ;; items. Note that we set ~install and ~addons directori= =65s to =2B ;; reside under ~user to allow installing and loading addo= =6Es. =2B ;; TODO: Guix-ify J addons as well. =2B (call-with-output-file "jlibrary/bin/profilex.ijs" =2B (lambda (port) =2B (display =2B (string-join =2B (list =2B "share=3D. '/share/j',~ ({.~ _2 { I.@:=3D&'/') B= =49NPATH" =2B "system=3D. share,'/system'" =2B "tools=3D. share,'/tools'" =2B ;; Upstream defaults to spamming $HOME with unhi= =64den =2B ;; userdata directories. Set this to be =2B ;; $HOME/.j/<jtype>/<jversion> instead =2B "'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9!:14= =27'" =2B "jversion=3D. ({.~ i.&'-') jversion" =2B "jsuffix=3D. >@{&('';'-beta') jtype -: 'beta'" =2B "user=3D. home,'/.config/j/',jversion,jsuffix" =2B "addons=3D. user,'/addons'" =2B "break=3D. user,'/break'" =2B "config=3D. user,'/config'" =2B "install=3D. user,'/install'" =2B "snap=3D. user,'/snap'" =2B "temp=3D. user,'/temp'" =2B "\n") =2B "\n") =2B port))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the act= =75al =2B ;; compiler. It is just a switch to tell the build= =0A+ ;; scripts whether to use gcc- or clang-specific f= =6Cags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDFLAGS= =20")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest) =2B (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n"))))) =2B '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. The p= =61th =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-script =2B ;; definitions of new J engine functionality. Since we po= =69nt =2B ;; ~addons under the ~user directory, we move it under ~sy= =73tem =2B ;; instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"))) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))))) =2B ;; Implementation of 9!:14 records build time which breaks= =20build =2B ;; reproducibility. Note that upstream code depends on th= =65 exact =2B ;; format of these strings, so we need to mimic the standa= =72d. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support being= =0A+ ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B =2B ;; The build output depends primarily on the values of the `jpla= =74form' =2B ;; and `j64x' environment variables. If the target is ARM, then= =0A+ ;; `jplatform' is "raspberry", otherwise it is `linux'. In add= =69tion to =2B ;; 32- and 64- bit versions, `j64x' controlls whether AVX or AVX= =32 =2B ;; variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to disting= =75ish =2B ;; between CPU features. Thus we build and install all variants= =20of =2B ;; libj, expecting jconsole to be called with a wrapper script t= =68at =2B ;; detects AVX features and loads the appropriate libj at runtim= =65. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux")) =2B (jplat (string-append "jplatform=3D" platform)) =2B (target-bit ,(if (target-64bit?) "64" "32")) =2B (jbit (string-append "j64x=3D" "j" target-bit)) =2B (jbit-avx (string-append jbit "avx")) =2B (jbit-avx2 (string-append jbit "avx2"))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, we j= =75st =2B ;; build it once. =2B (invoke "env" jplat jbit "./build_jconsole.sh") =2B (invoke "env" jplat jbit "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (invoke "env" jplat jbit-avx "./build_libj.sh") =2B (invoke "env" jplat jbit-avx2 =2B "./build_libj.sh")))))))) =2B ;; The test suite is expected to be run as follows for each vari= =61nt of =2B ;; libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary fil= =65s. We =2B ;; simply place these all under test/bin. =2B (replace 'check =2B (lambda* (#:key tests? #:allow-other-keys) =2B (when tests? =2B (let ((jplatform ,(if (target-arm?) "raspberry" "linux")))= =0A+ (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, but= =20needs =2B ;; to be copied into the ~system directory when it does.= =0A+ (for-each =2B (lambda (dev-dir) =2B (if (access? dev-dir R_OK) =2B (copy-recursively dev-dir "test/bin/system/dev")))= =0A+ '("jlibrary/dev" "jlibrary/addons/dev")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((jbin (string-append "bin/" jplatform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append jbin "/" jbit =2B "/jconsole")) =2B (source (string-append jbin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest) =2B (install-file jconsole dest) =2B (let* ((jc (string-append dest "/jconsole")) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jc tests))) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed.")))))) =2B (scandir (string-append "bin/" jplatform) =2B (negate (cut member <> '("." ".."))))) =2B #t)))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only quirk i= =73 that =2B ;; we install jconsole under /libexec to make room for the wrapp= =65r =2B ;; replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((jplat ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (ijconsole (assoc-ref inputs "ijconsole")) =2B (interp (string-join `("bin" ,jplat ,jbit "jconsole")= =20"/")) =2B (out (assoc-ref outputs "out")) =2B (bin (string-append out "/bin")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec/j")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p bin) =2B (copy-file ijconsole (string-append bin "/ijconsole-" ,ver= =6Eame)) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,jplat ,jarch) "/"))= =0A+ (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep javx)= =29) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" jplat) =2B (negate (cut member <> '("." ".."))))) =2B (install-file interp libexec) =2B (copy-recursively "jlibrary/system" system) =2B (for-each =2B (lambda (source-dev) =2B (if (access? source-dev R_OK) =2B (copy-recursively source-dev dev))) =2B '("jlibrary/dev" "jlibrary/addons/dev")) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (install-file "jlibrary/bin/profilex.ijs" etc))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL family")= =0A+ (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring pro= =62lems =2Bthat are not already well understood.") =2B (license license:gpl3+))) =2B =2B =2B(define-public jsoftware-j-901 =2B (make-j =2B #:vername "901" =2B #:revision "f" =2B #:hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p" =2B #:patches (search-patches "jsoftware-j901-f-fixes.patch"))) =2B =2B =2B(define jlib-build-configuration-with-sleef =2B `(#:extra-inputs (("sleef" ,sleef)) =2B #:extra-envars (("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef")))) =2B =2B(define-public jsoftware-j-902 =2B (apply make-j =2B (append jlib-build-configuration-with-sleef =2B '(#:vername "902" =2B #:revision "b" =2B #:hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))= =29 =2B =2B =2B(define-public jsoftware-j-903 =2B (apply make-j =2B (append jlib-build-configuration-with-sleef =2B '(#:vername "903" =2B #:revision "a" =2B #:commit "903-release-a" =2B #:hash "1fcfl7q7c2vj4fmnqqc8c6hwgsjm20ff93v8xxfniasss1b2fmc4")))= =29 =2B =2B;; Keep until j904-beta is released. =2B(define-public jsoftware-j-903-beta =2B (apply make-j =2B (append jlib-build-configuration-with-sleef =2B `(#:vername "903" =2B #:revision "w" =2B #:type ,'beta =2B #:hash "0kd63mrkaq0bs42gw0wrlb14fymhigznx1lrb698dgv6fzlfglim")))= =29 =2B =2B =2B(define-public (jsoftware-ijconsole-symlink jpkg) =2B "Provide bin/ijconsole symlink that points to pkg's bin/ijconsole-<jve= =72sion>" =2B (package =2B (name "jsoftware-ijconsole") =2B (version (package-version jpkg)) =2B (source #f) =2B (build-system trivial-build-system) =2B (propagated-inputs `(("jpkg" ,jpkg))) =2B (arguments =2B `(#:modules ((guix build utils) =2B (srfi srfi-26)) =2B #:builder =2B (begin =2B (use-modules ((guix build utils) #:select (mkdir-p)) =2B ((ice-9 regex) #:select (string-match)) =2B ((ice-9 ftw) #:select (scandir)) =2B ((srfi srfi-26) #:select (cut))) =2B (let* ((out (assoc-ref %outputs "out")) =2B (jpkg (assoc-ref %build-inputs "jpkg")) =2B (interp (car (scandir (string-append jpkg "/bin") =2B (cut string-match "ijconsole-.*" = =3C>)))) =2B (source (string-append jpkg "/bin/" interp)) =2B (dest (string-append out "/bin/ijconsole"))) =2B (mkdir-p (dirname dest)) =2B (symlink source dest))))) =2B (home-page (package-home-page jpkg)) =2B (synopsis "Provide `ijconsole' symlink to default interpreter version"= =29 =2B (description =2B "The interpreter provided by the J package has a filename like =2Bijconsole-<version>, which provides support for having multiple, concurr= =65nt =2Bversions installed. This package provides a version-agnostic `ijconsole= =27 =2Bsymlink to interpreter version indicated and build time.") =2B (license license:gpl3+))) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.34.0 =0A= ------_=_29f98b096df47ba933a8a3a8_=_--
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 1 Oct 2021 15:31:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 01 11:31:23 2021 Received: from localhost ([127.0.0.1]:57146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mWKVO-0001I8-Ds for submit <at> debbugs.gnu.org; Fri, 01 Oct 2021 11:31:22 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:47067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <liliana.prikler@HIDDEN>) id 1mWKVL-0001Hl-IZ for 48463 <at> debbugs.gnu.org; Fri, 01 Oct 2021 11:31:20 -0400 Received: by mail-wr1-f67.google.com with SMTP id k7so15982161wrd.13 for <48463 <at> debbugs.gnu.org>; Fri, 01 Oct 2021 08:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=zB32dqjLJea/F6jn91kirfvJMpwkXj6tIui7Vbp54y4=; b=eO0EiPd3LFJJC31a39livAfIvsBye+1Pk9O17yFeFm5GYOt9vk25LyrLhdtNrhFKZr 41oLQI+YR/NR0CG6/73Nimhxf8W+ljxVK6rhn89bDG65eN51BTWgGrJRNEl3OpYbidHa qmRk9DL+MGiNifYZgd7cp58HI2KFTWVU9E+gEnK9ehuDlOZuUv7ZkJXrNdeP0j5CXvOi 1JBiX/goqZVajmxQzyAbIx29ImYIGyv/7bXvscynh7iG642iihyFA99dlQq9ZvxzuCt1 n4VP9WDZJQ8LIC59I5quLCiOrMooDBt82Pwu1kmMleE0d6pshHVxuj8c0GPzt8Y7WAdT WT7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=zB32dqjLJea/F6jn91kirfvJMpwkXj6tIui7Vbp54y4=; b=4ZJgd+330fBVjdxXx0vinFLv5DdG5VuHp38jC11L+/6stcJ8xTfi0ohP99gQvdDgjB qTFODC1XG2YVGztSydkWNrIoJWW1TV4R/ayEaUELz4sOvnCagxgg2/DgulXi69m3MYjB o3RSPXQ1yHOUOPXwalLbQrTRmzlRqzDvwPpMAyqqkKB3RYjERe/+0nEcVuuVewChsgFJ Bok9V7DpBUvwLYrSq3MeSDWX7j9OAQy2B+hiaeoscnPp3s+633A6cMqdisXScmXYe6C0 si4MUehPl6fTw4xZd8Opo62v7zUCh2CGuhixNJYdOFwguzSWe7wqCgtDV837Q6A5WHbo khCg== X-Gm-Message-State: AOAM532Jas766hkQvchpwVW8En2pQOaw/1CHtugopRbegGAbtMxl01sJ QLL+LpWL9E6mCp8qxJlGShU= X-Google-Smtp-Source: ABdhPJy434Cq4zKHuv8ru1sBD6di9H/CMoyhcRaYiyS7ZiUoN77GwkwHN77KpHxGjf7luq1X6QM19A== X-Received: by 2002:adf:97d4:: with SMTP id t20mr6590488wrb.34.1633102273590; Fri, 01 Oct 2021 08:31:13 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id g12sm8598669wmh.36.2021.10.01.08.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 08:31:13 -0700 (PDT) Message-ID: <94f4625dcb0479d873cf60449631527e841fd457.camel@HIDDEN> Subject: Re: gnu: Add j. From: Liliana Marie Prikler <liliana.prikler@HIDDEN> To: elaexuotee@HIDDEN Date: Fri, 01 Oct 2021 17:31:11 +0200 In-Reply-To: <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Am Dienstag, den 25.05.2021, 12:57 +0900 schrieb elaexuotee@HIDDEN: > As always, thanks for the quick turnaround. > > Leo Prikler <leo.prikler@HIDDEN> wrote: > > stuff-union usually implies, that stuff can't just be put into a > > profile and expected to work (like texlive), whereas in other cases > > (e.g. the gnome metapackage) people can use its parts on their own > > provided that they have the right combination (which typically > > implies having icons etc.) > > Oh, okay. For some reason, I was just imagining "metapackage" to > mean "all batteries included", but your description makes a lot more > sense. In this case, having addons without the J interpreter is > pretty useless, so IIUC a jsoftware-union makes more sense than a > metapackage in this case? > > Just to be clear, J looks for addons at a path burned into > $store/...-jlib-$version/etc/j/profilex.ijs. Currently, that points > to $HOME/.j/$jversion/addons, but we'll need to change that to a > single store output path that contains the union of all desired > addons, hence why I was thinking the *-union approach is needed. > > For now, instead of messing with the union, would it make sense to > just create a (non-public?) jsoftware-addons package that contains > all addons and point jlib at those? Are those addons data packages or can they be compiled without needing jlib? If they're pure data, then you can pack them up and refer them as you wanted to, if not, you first have to create jlib-minimal without them, then package up everything and finally do jlib. Oh, and one thing that was previously ignored is that using XDG standards for things we can't simply put in the store (like configuration if it needs that) is preferable to having a ~/.j directory. > > That's less than the number of Rust versions we need just for > > bootstrap, but still a few too many in my opinion. Are all of > > those still used in production or would it be wiser to to put some > > of them into Guix-Past [1]? > > Oh cool. Guix Past might be a better solution! Thanks for sharing. > > I don't have any solid data, since "in production" J is mostly > dominated by the financial sector from what I hear, but just going by > my impression from lurking on the J mailing list, the j80x series > (and even earlier non-free versions) does still have a user base. > > Personally, I just want to make these older versions available to the > community but am agnostic about the *how* so will defer to whatever > you (and others) think is best. People are also still running ancient versions of Debian. Python 2 has officially reached end of life, yet it is used as well. At some point we do have to declare software that people are still using as old :) > > Having keyword lists is also nice and declarative, but more > > importantly, it lets you call the function as a normal function > > without having to worry about constructing some record in a > > particular way. The configuration you're using doesn't have a > > specific setting? Just override it with your own. It's as simple > > as calling (append old-config extra-config). > > Oh! (append old-config extra-config) is exactly the kind of thing I > was trying > to achieve; however, I'm not sure I quite grok the usage you are > describing. > Something like this? > > (define* (proc #:key foo bar) ...) > (define old-config '(#:foo 0)) > (define extra-config '(#:bar 1)) > (apply proc (append old-config extra-config)) Yup. > > I find this way of mistreating the version field very > > weird. You're not adding anything new by doing this and you're not > > making anything more secure (I'd argue, that it's less secure, > > because you could update the version and forget about the property > > or vice versa). > > I agree the version stuff is a bit crappy. It's something that got > munged badly over time and deserves more thought. Here are the > issues I'm trying to solve: > > 1) The source URLs look like ../j<version>-<type>-<patch> or > ../j<version>-<type>, where <type> is either "beta" or > "release", and > depending on whether a patch-level exists; > 2) The type string ("release" or "beta") is a build setting; and > 3) ijconsole installs to something like ../bin/ijconsole-902, > without > including the patch-level, like ../bin/ijconsole-902-b. > 4) Users should probably be able to easily install the latest J > release as > well as J beta concurrently without caring about exactly which > version > these are. > > Those imply that <version>, <type>, and <patch> are indeed handled > separately, no matter concrete method utilized. Those four issues do call for separate keyword arguments, but they need not necessarily be reflected in the version string. You can have two packages with the same version, but different hashes in Guix. > My thinking was that 4 means we want a separate *-beta package, > meaning that the version field should probably just look like > "<version>-<patch>". > Additionally, relating back to the above discussion about multiple > versions Sounds good, though <version>.<patch> would be equally acceptable. Your call. > 5) It would be nice to be able to install the latest j901 without > having to > know that this corresponds to patch level f, i.e. currently > j@901-f. I think `guix build j@901' ought to resolve this automatically. > > First of all, do you even need all this info? `j' is an > > objectively bad name > > for a package. `j-beta' is not better in any way, it only avoids > > the user installing a potentially unstable "J" package. > > Yeah, "j" is pretty short but it does mirror "r". I'm agnostic about > package name, though. Suggestions welcome. Fair enough, though this remains a problem for single letter programs in which others would likely want to claim the letter as well. R has the benefit of being old and well-known enough, it would probably be rlang otherwise (not to be confused with erlang). > > (Note, that we typically use "-next" for that, however). > > Thanks for pointing out this convention. > > > However, this info is meaningless when hardcoded into a > > procedure. You can just inherit from the package that's generated > > and override the name as needed. > > I see what you mean in a general sense but not quite how to apply it > in this case. I am all ears if you have a simpler, cleaner solution > that addresses the constraints listed above! I think the cleaner solution here is to not store those properties in the package, but still having them as parameters to the make-j function call. > > Next, should ijconsole not simply be a package like jlib (both > > properly prefixed with jsoftware- of course)? > > This is effectively what make-j does, no? ijconsole needs to know the > path to jlib, so make-j points it at the correct one and wraps > everything up into a package. I don't really understand why those needs to be done in two steps however. ijconsole could already contain the fully functioning j program. Or partially functioning if we account for addons. Cheers!
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Liliana Marie Prikler <liliana.prikler@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 25 May 2021 03:56:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 23:56:17 2021 Received: from localhost ([127.0.0.1]:44314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1llOAy-0008B8-NE for submit <at> debbugs.gnu.org; Mon, 24 May 2021 23:56:17 -0400 Received: from m42-5.mailgun.net ([69.72.42.5]:43198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1llOAv-0008Aq-7k for 48463 <at> debbugs.gnu.org; Mon, 24 May 2021 23:56:16 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1621914973; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=y2vyrRi1hcS8zWjfTJqwwKaWSpRHQ1y7mTy3DuyUxks=; b=DfZ9V4J3mAL1Js55jZBqH9mzOKv/gUFIQHXhq6cmhPWjqWsqcQ1ak9B7Z8UvYaPdBvwe7AtY SbKoa5kkT5T70onfC5QE9VPj+CKsHwMRnFfihcb0w/e/fY/FznSMIfEOfrvndSjJn86AGVxm M4bvTkY+dpoyXfLiuem+QBAMsOMfaN841b9CWnqXimmWzwRmRMV+vSXsTgVHlVsCpiOpyH2s je7AW5UYVJ5EJ22iikX7ezlxHMzYxAiFplkzlj3GclWUpv/765J9SFse+mmKgCWZWgBJZz9B bCZMUFvCf3QULyzYCbX0I3gbjuNyc9ljc9tDWbsKDqNUeBIlpx7krw== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 60ac75578dd30e785fc2c759 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Tue, 25 May 2021 03:56:06 GMT Received: from localhost (ac134152.dynamic.ppp.asahi-net.or.jp [183.77.134.152]) by wilsonb.com (Postfix) with ESMTPSA id 5FF47A2F84; Tue, 25 May 2021 03:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1621914964; bh=y2vyrRi1hcS8zWjfTJqwwKaWSpRHQ1y7mTy3DuyUxks=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=za04dQm0Hmos1YDZhBGqhU88eCcnrojU5U6P3qjm6O23HqPlt78k04GJJ8pL49XCK CUOE36zC6PX58mfYEYw6IkVbEmUyu3L7zKCGh9w+0z9+jzccA6CH52HEXL3mx1EmAp 5BzCm8Hn0oZpMJ6/777l4qZn/SjF3jPxOEv9Ido6ZNoLrAWlABYEIH4sp6agEQalQp rKIELgXoggR9fJq2tuvjiOtYSAatiF3QkYbjCSSi4ImttrPCroYUc26lsNyoX3q/Zb BSo9slibTBOTGOpenQxJ5IpjCR9hzzISS+GVJ8VtbW3gjfUdLr8gW/MUh9rJG2ELN8 0ECqF2zWmdQdFOiceSKetZssAeRXRKrA9Ul80FDrbFzPyY3q4vlq5lY3Qba0hcmibA r6odIeV7E0lhgSF6rQLxsmAeRWxVkJNky6/P2O7SiVINXShyOSgNQZQVIFdlTlv3kO CguqQTCV7nBCLv2sLKp9DuulvLXcNKkFaNZS1dWj1cbSnWSe5XK/DBdSABq4bwTMJi 91YfpnVTykCAs+/96kAoWsGXVOyrUERKN+RasHaYT6jk6b6hdbTIfyGdQARMmHE9Lh OhDPmosgqGwFiCAPa5S87UwmsaQNpVZH7e2MHR7TXhNqj64R4lo3C6bVVJDiSR4NI6 EXw+n5PvcNEGmBvktgUuznKA= Date: Tue, 25 May 2021 12:57:36 +0900 To: Leo Prikler <leo.prikler@HIDDEN> Subject: Re: gnu: Add j. From: elaexuotee@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> In-Reply-To: <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> Message-Id: <27DCD25Y68ZWJ.2HRC4G65PWIA7@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) As always, thanks for the quick turnaround. Leo Prikler <leo.prikler@HIDDEN> wrote: > stuff-union usually implies, that stuff can't just be put into a > profile and expected to work (like texlive), whereas in other cases > (e.g. the gnome metapackage) people can use its parts on their own > provided that they have the right combination (which typically implies > having icons etc.) Oh, okay. For some reason, I was just imagining "metapackage" to mean "all= batteries included", but your description makes a lot more sense. In this case, having addons without the J interpreter is pretty useless, so IIUC a jsoftware-union makes more sense than a metapackage in this case? Just to be clear, J looks for addons at a path burned into $store/...-jlib-$version/etc/j/profilex.ijs. Currently, that points to $HOME/.j/$jversion/addons, but we'll need to change that to a single store output path that contains the union of all desired addons, hence why I was thinking the *-union approach is needed. For now, instead of messing with the union, would it make sense to just cre= ate a (non-public?) jsoftware-addons package that contains all addons and point= jlib at those? > That's less than the number of Rust versions we need just for > bootstrap, but still a few too many in my opinion. Are all of those > still used in production or would it be wiser to to put some of them > into Guix-Past [1]? Oh cool. Guix Past might be a better solution! Thanks for sharing. I don't have any solid data, since "in production" J is mostly dominated by= the financial sector from what I hear, but just going by my impression from lur= king on the J mailing list, the j80x series (and even earlier non-free versions)= does still have a user base. Personally, I just want to make these older versions available to the community but am agnostic about the *how* so will defer to whatever you (an= d others) think is best. > Having keyword lists is also nice and declarative, but more > importantly, it lets you call the function as a normal function without > having to worry about constructing some record in a particular way.=20 > The configuration you're using doesn't have a specific setting? Just > override it with your own. It's as simple as calling (append old- > config extra-config). Oh! (append old-config extra-config) is exactly the kind of thing I was try= ing to achieve; however, I'm not sure I quite grok the usage you are describing= =2E Something like this? (define* (proc #:key foo bar) ...) (define old-config '(#:foo 0)) (define extra-config '(#:bar 1)) (apply proc (append old-config extra-config)) > I find this way of mistreating the version field very weird. You're > not adding anything new by doing this and you're not making anything > more secure (I'd argue, that it's less secure, because you could update > the version and forget about the property or vice versa). I agree the version stuff is a bit crappy. It's something that got munged badly over time and deserves more thought. Here are the issues I'm trying = to solve: 1) The source URLs look like ../j<version>-<type>-<patch> or ../j<version>-<type>, where <type> is either "beta" or "release", and depending on whether a patch-level exists; 2) The type string ("release" or "beta") is a build setting; and 3) ijconsole installs to something like ../bin/ijconsole-902, without including the patch-level, like ../bin/ijconsole-902-b. 4) Users should probably be able to easily install the latest J release a= s well as J beta concurrently without caring about exactly which version= these are. Those imply that <version>, <type>, and <patch> are indeed handled separate= ly, no matter concrete method utilized. My thinking was that 4 means we want a separate *-beta package, meaning tha= t the version field should probably just look like "<version>-<patch>". Additionally, relating back to the above discussion about multiple versions= 5) It would be nice to be able to install the latest j901 without having= to know that this corresponds to patch level f, i.e. currently j@901-f. > First of all, do you even need all this info? `j' is an objectively bad = name > for a package. `j-beta' is not better in any way, it only avoids the use= r > installing a potentially unstable "J" package. =20 Yeah, "j" is pretty short but it does mirror "r". I'm agnostic about packa= ge name, though. Suggestions welcome. > (Note, that we typically use "-next" for that, however). Thanks for pointing out this convention. > However, this info is meaningless when hardcoded into a procedure. You c= an > just inherit from the package that's generated and override the name as > needed. I see what you mean in a general sense but not quite how to apply it in thi= s case. I am all ears if you have a simpler, cleaner solution that addresses = the constraints listed above! > Next, should ijconsole not simply be a package like jlib (both properly > prefixed with jsoftware- of course)? This is effectively what make-j does, no? ijconsole needs to know the path = to jlib, so make-j points it at the correct one and wraps everything up into a= package. Anyway, thanks again for taking a look!
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 24 May 2021 14:40:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 10:40:07 2021 Received: from localhost ([127.0.0.1]:43518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1llBkU-00054u-H1 for submit <at> debbugs.gnu.org; Mon, 24 May 2021 10:40:06 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:40905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <leo.prikler@HIDDEN>) id 1llBkQ-00054V-UT for 48463 <at> debbugs.gnu.org; Mon, 24 May 2021 10:40:05 -0400 Received: from nijino.local (91-114-247-246.adsl.highway.telekom.at [91.114.247.246]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Fpfxp64PRz3wbn; Mon, 24 May 2021 16:39:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1621867199; bh=ZeiL2Zl9xGRRJeo7WzBaEFm3I1WGK5U6Y1gMMJptCHY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=u4oOVhXCtVh+C2jmOg4NeFysobrk0OD5tFOrmRFSpMYJnC/K4h8vHCkvpK9dRadDu rsGg+DRlXedUiCtxrolzmFsGmgYbbTAa/nWNBy/078kpZALsIPPycODniuSfbaSOMK guCQp4XZHut453jAK5moGTMKdQWMirBncbqqbZWM= Message-ID: <5d30160bd2a4592459cd407f99cbd3edadb1db1b.camel@HIDDEN> Subject: Re: gnu: Add j. From: Leo Prikler <leo.prikler@HIDDEN> To: elaexuotee@HIDDEN, x@HIDDEN Date: Mon, 24 May 2021 16:39:57 +0200 In-Reply-To: <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Am Montag, den 24.05.2021, 22:37 +0900 schrieb elaexuotee@HIDDEN: > > Are fat binaries the accepted HPC way? I'm not up-to-date to this. > > I believe so? Don't quote me on that though. For this particular > package the > overhoad is just ~8MB, so I don't think it's much of an issue either > way. It > would probably be more of a hassle to split j into a package for each > variant. In that case it will probably be fine. > > Both sound like good ideas, although I'm a little less sure about > > the > > texlive one. Would a meta-package like gnome also be acceptable? > > A metapackage is certainly practical. The entire set of J addons > currently weighs in at a whopping 50MB. hehe. However, there are > about 125 addons in total, so it simply feels "more correct" to let > the user also choose just the addons they want, which I think would > require something like jsoftware-union. > > That said, either way, an "all batteries include" package would be > good to have, and since this is way easier than packaging the addons > separately, I'll definitely work on the metapackage first. stuff-union usually implies, that stuff can't just be put into a profile and expected to work (like texlive), whereas in other cases (e.g. the gnome metapackage) people can use its parts on their own provided that they have the right combination (which typically implies having icons etc.) > > As above, I'd prefer if it was one procedure and one package > > pointing to the latest j80x, assuming all of our added patches can > > also be applied to earlier versions. > > Yeah, that would definitely be ideal. > > Unfortunately, it's not so straigthforward. The the "major versions" > are the xxx part of jxxx-y, with large changes between each, e.g. > j902 introduced and non-compatible API change over j901. So, from a > pure J user perspective, having all jxxx versions available is ideal. > > However, each version seems to require its own set of build flags and > sometimes version-specific patches (like in the j901 case). We > probably don't want to push those settings out into user manifest > specs. > > On the other hand, there are already 10 versions from j801 to j903. That's less than the number of Rust versions we need just for bootstrap, but still a few too many in my opinion. Are all of those still used in production or would it be wiser to to put some of them into Guix-Past [1]? > > > +(define make-jlib > > > + (match-lambda > > > + (($ <jlib-build-configuration> > > > + builder jversion revision hash type patches extra-inputs > > > extra-envars) > > Please try to use keyword arguments. > > Actually, maybe these "build configuration" records could solve the > above "too many versions" problem. We could offer only the latest J > (and J beta?) packages in the repo, but let (gnu packages jsoftware) > export a set of "default configurations" for old versions to be used > with the make-j procedure. I don't think there's much to be gained if we provide packages without packages. > Any particular reason to avoid using records though? Currently, its > letting us share configuration options between j902 and j903 that > don't work in j901. > Personally, I thought this felt like a nice declarative, scheme-y way > to go, but my Scheme is still very amateurish. Definitely wanting to > rectify any strange ideas I may have. Having keyword lists is also nice and declarative, but more importantly, it lets you call the function as a normal function without having to worry about constructing some record in a particular way. The configuration you're using doesn't have a specific setting? Just override it with your own. It's as simple as calling (append old- config extra-config). > > > + (properties `((jversion . ,jversion) > > > + (jrevision . ,revision) > > > + (jtype . ,type))) > > Are those used anywhere? Can jversion and jrevision not be parsed > > from (package-version jlib)? > > The make-j procedure uses them. We'd have to parse out these from > both the version string and package name with a what's essentially > the inverse of the jname procedure. I found it a lot more readable > and less hassle to just propagate this data directly. > > However, if there's a particular reason why using properties is > problematic, I'll try to see what I can do. I find this way of mistreating the version field very weird. You're not adding anything new by doing this and you're not making anything more secure (I'd argue, that it's less secure, because you could update the version and forget about the property or vice versa). First of all, do you even need all this info? `j' is an objectively bad name for a package. `j-beta' is not better in any way, it only avoids the user installing a potentially unstable "J" package. (Note, that we typically use "-next" for that, however). However, this info is meaningless when hardcoded into a procedure. You can just inherit from the package that's generated and override the name as needed. Next, should ijconsole not simply be a package like jlib (both properly prefixed with jsoftware- of course)? Then you can take whatever version bits you need from the package version itself. Regards, Leo [1] https://gitlab.inria.fr/guix-hpc/guix-past
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 24 May 2021 13:38:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 09:38:17 2021 Received: from localhost ([127.0.0.1]:42585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1llAme-0003MA-QD for submit <at> debbugs.gnu.org; Mon, 24 May 2021 09:38:17 -0400 Received: from m42-5.mailgun.net ([69.72.42.5]:10908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+f90cca.08547a-48463=debbugs.gnu.org@HIDDEN>) id 1llAmZ-0003Lt-No for 48463 <at> debbugs.gnu.org; Mon, 24 May 2021 09:38:15 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1621863494; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=PzXlBkfxE7SBTd6LUovlC4UTxaWh4/CGNB8gMT3YtSs=; b=sQErGkZZJrn/lE+nUEe8sKjR60YcrWkWDiPqTiY5uN7f3QUHdRb1YErWP1bj8moNYGh+U7+h cRTs316u2owvOl/H+0OhxmvcJSkGFKG0GThyBk3OqVcsWO8jigMHPxc4QzV7Rr9EYjHw5jfc iU7h78X1KcVvpShlS0GTf8Eqg74YuPnf70a3htLD/vRWsgmy42NmxiPuUtlDXD99tTO9NUR6 LmfK/6W4VZMOzhPrjx6UnooAhsK5YZM+x289bxuLXkaEo3gEXoNEe9t17QcTPWB4JPqNa7GG YZXhlkBoPYVO/tSJDV3/WLpQvttKSB7p6obsxf9YqLuwq7krYNg3aA== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyJjZGI4NCIsICI0ODQ2M0BkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n03.prod.us-west-2.postgun.com with SMTP id 60abac2a67d156359ac485d4 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Mon, 24 May 2021 13:37:46 GMT Received: from localhost (ac134152.dynamic.ppp.asahi-net.or.jp [183.77.134.152]) by wilsonb.com (Postfix) with ESMTPSA id B5B4CA2FB1; Mon, 24 May 2021 13:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1621863464; bh=PzXlBkfxE7SBTd6LUovlC4UTxaWh4/CGNB8gMT3YtSs=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=mLT+qxXK20D8CnIlSbhbTVCDoktFyfaZBS2dmEbPduOVvo3aD3E0FkwnjcULw4xtX R9i+maj22INcmejlQXxxyEdIWPfOBC12w8QRFRiE12wFS8KvKSm61WLs2DNwGBHfFm 5vR1IDXTWtUm4JKr9mhD2a7TS8EuEz1NDISxSnG58VP/KrkW3rjzt2S+hUiDT51kfx SSfMJg6JV/4kLYNdYRWFdt9wLAQYsfbGeTlm/iUXiVVVc9aQWikqY1TgfBddH6ENsr wokDzvPdZ53U03wnUzBvJqd44LIpzUeb0TdSF+1G6MbtzYbIQMsTXAoRmCk2OYizz7 926Z2/JkFBCcp6KgcavKBAQMl5acbuAkuoe1IJagayXe3p4qAZGXjtg6vW7Xlc6bqF QTdNGsaIe7k0P77VoxrK+GqMvefXGCQj9acbtFlm11A6bvkmsbda2bpdF+d4DDHKRQ lJE2saaFxJK5ny4CN9glEKl9wr1hJn8r6feKYkPsEbRENeHDPCwa7ninnqyzOjGV4L mJVAfDK8+H+J7vyAayRBaS7cvd5mci3+LdgVfM+UZ24HsLv1cbKG+57+WYtSEJhVUy GQkFrnA7YCrn3Dxuxk95qC2O8oYfTkG3U5mwbfSGGOchAyxYznibp9+1R/MwfJkJlr rGlJl6jTuXVR4OQmmymqcwsg= Date: Mon, 24 May 2021 22:37:41 +0900 To: Leo Prikler <leo.prikler@HIDDEN> Subject: Re: gnu: Add j. From: elaexuotee@HIDDEN, x@HIDDEN References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> In-Reply-To: <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> Message-Id: <293L8YPQS4CLB.3VK1B1A36XNAY@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48463 Cc: 48463 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Thanks for taking a look! Leo Prikler <leo.prikler@HIDDEN> wrote: > That should be fine, we provide multiple versions for other packages > where applicable as well. Do note, that we should try to keep the > number limited, though. You may perhaps want to export make-jlib, so > that the user can build their own. Cool. I like the idea of exporting the build procedures. > Are fat binaries the accepted HPC way? I'm not up-to-date to this. I believe so? Don't quote me on that though. For this particular package th= e overhoad is just ~8MB, so I don't think it's much of an issue either way. I= t would probably be more of a hassle to split j into a package for each varia= nt. > Both sound like good ideas, although I'm a little less sure about the > texlive one. Would a meta-package like gnome also be acceptable? A metapackage is certainly practical. The entire set of J addons currently weighs in at a whopping 50MB. hehe. However, there are about 125 addons in total, so it simply feels "more correct" to let the user also choose just t= he addons they want, which I think would require something like jsoftware-unio= n. That said, either way, an "all batteries include" package would be good to have, and since this is way easier than packaging the addons separately, I'= ll definitely work on the metapackage first. > As above, I'd prefer if it was one procedure and one package pointing > to the latest j80x, assuming all of our added patches can also be > applied to earlier versions. Yeah, that would definitely be ideal. Unfortunately, it's not so straigthforward. The the "major versions" are th= e xxx part of jxxx-y, with large changes between each, e.g. j902 introduced a= nd non-compatible API change over j901. So, from a pure J user perspective, ha= ving all jxxx versions available is ideal. However, each version seems to require its own set of build flags and somet= imes version-specific patches (like in the j901 case). We probably don't want to= push those settings out into user manifest specs. On the other hand, there are already 10 versions from j801 to j903. > > +(define make-jlib > > + (match-lambda > > + (($ <jlib-build-configuration> > > + builder jversion revision hash type patches extra-inputs > > extra-envars) > Please try to use keyword arguments. Actually, maybe these "build configuration" records could solve the above "too many versions" problem. We could offer only the latest J (and J beta?)= packages in the repo, but let (gnu packages jsoftware) export a set of "def= ault configurations" for old versions to be used with the make-j procedure. Any particular reason to avoid using records though? Currently, its letting= us share configuration options between j902 and j903 that don't work in j901. Personally, I thought this felt like a nice declarative, scheme-y way to go= , but my Scheme is still very amateurish. Definitely wanting to rectify any strange ideas I may have. > > + (properties `((jversion . ,jversion) > > + (jrevision . ,revision) > > + (jtype . ,type))) > Are those used anywhere? Can jversion and jrevision not be parsed from > (package-version jlib)? The make-j procedure uses them. We'd have to parse out these from both the version string and package name with a what's essentially the inverse of th= e jname procedure. I found it a lot more readable and less hassle to just propagate this data directly. However, if there's a particular reason why using properties is problematic= , I'll try to see what I can do.
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at 48463) by debbugs.gnu.org; 16 May 2021 14:30:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 16 10:30:56 2021 Received: from localhost ([127.0.0.1]:51297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1liHnE-0005Bb-4I for submit <at> debbugs.gnu.org; Sun, 16 May 2021 10:30:56 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:50715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <leo.prikler@HIDDEN>) id 1liHnB-0005BR-BE for 48463 <at> debbugs.gnu.org; Sun, 16 May 2021 10:30:54 -0400 Received: from nijino.local (91-114-247-246.adsl.highway.telekom.at [91.114.247.246]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Fjl6x5GDdz3wWP; Sun, 16 May 2021 16:30:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1621175449; bh=pIgNQAAspZpyII6TZZzTCV8IKFtMhI4+SeW9AQz2ufk=; h=Subject:From:To:Date:In-Reply-To:References; b=KYW1C4IrChWHpjdC2YBwAqIODhhsfdoFhrmFWFrlVkpETpkGmFGdmlC9dLvOA6UQi AB+7aOwEWG2giZNsxXdo7Aauynx8+dVA1KFt2fcXR5WuSlZydhiUxUJZ7bniqAgUe4 ocA37aomvQeeiDyQa653wJrDMAblCfXcsR6eKPyw= Message-ID: <8b853d0585505ce29c9afc638b644fa34805e6c0.camel@HIDDEN> Subject: Re: gnu: Add j. From: Leo Prikler <leo.prikler@HIDDEN> To: elaexuotee@HIDDEN, 48463 <at> debbugs.gnu.org Date: Sun, 16 May 2021 16:30:48 +0200 In-Reply-To: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> References: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48463 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi elaexuotee, Am Sonntag, den 16.05.2021, 19:54 +0900 schrieb elaexuotee@HIDDEN: > Hey Guix, > > This packages up the J programming lanuage. The build scripts that > upstream provides are pretty hostile to package maintainers, so we > have to jump through quite a few hoops to get the build working. Yup, that much is visible from the package description. > I have had this in my personal, private channel for a while, tweaking > it over time, so I believe it works fairly well in practice. Here are > the high-level design decisions I have made: > > 1) Provide multiple J versions; > > It is extremely common for J users to have multiple versions > installed in parallel since there are often major, breaking changes > between (non-patch-level) releases. > > In addition, a very large fraction of J users keep the beta installed > as well, so I have elected to provide this too. That should be fine, we provide multiple versions for other packages where applicable as well. Do note, that we should try to keep the number limited, though. You may perhaps want to export make-jlib, so that the user can build their own. > 2) Bundle together all variants of the interpreter along with a > wrapper script that selects the most featureful one at runtime; > > There are 3 versions of the interpreter, supporting different CPU > feature-sets: vanilla, AVX, AVX2. This package elects to build all > these variants and provides a wrapper script that launches the "most > AVX-y" version possible at runtime. > > Essentially, this is trying to make up for upstream's lack of a fat > binary. Are fat binaries the accepted HPC way? I'm not up-to-date to this. > 3) Try to mirror the FHS standard for installation locations; > > For the most part, J uses idiosyncratic defaults for where it looks > for library files and the like. This package elects to configure > things so files sit in more standard locations---e.g. runtime scripts > sit under .../share/j; configuration files sit under .../etc/j; etc. > > 4) Point the J package manager to $HOME/.j/<version>. > > J maintains its own mini package repository for "addons", which are > simply officially-supported J scripts. This package sets things up so > that these packages get installed to .j/<version>/addons. In > addition, other related directories are gathered under .j/<version>. Those should be fine. > Items on the TODO list: > > 1) Write an importer and create packages for J addons; > > This is currently in progress. > > 2) Create a something like a jsoftware-union procedure to bundle up J > with user-selectable addons; > > This is necessary since the interpreter looks for addons at a > specified path. We probably want to mimick something like texlive and > provide both an "all batteries included" package along with one where > users can select which addons they want. Both sound like good ideas, although I'm a little less sure about the texlive one. Would a meta-package like gnome also be acceptable? > 3) Support more older versions of J. > > J is open source starting with j801, so it'd be nice to have packages > for the entire j80x series too. Unfortunately, those use an entirely > different set of build scripts from the current j90x series, so it > will require munging-work similar to what we already have. As above, I'd prefer if it was one procedure and one package pointing to the latest j80x, assuming all of our added patches can also be applied to earlier versions. > +(define-record-type* <jlib-build-configuration> > + jlib-build-configuration make-jlib-build-configuration > + jlib-build-configuration? > + (builder jlib-build-configuration-builder (default > "guix.gnu.org")) > + (version jlib-build-configuration-version (default #f)) > + (revision jlib-build-configuration-revision (default #f)) > + (hash jlib-build-configuration-hash (default #f)) > + (type jlib-build-configuration-type (default 'release)) > + (patches jlib-build-configuration-patches (default '())) > + (extra-inputs jlib-build-configuration-extra-inputs (default '())) > + (extra-envars jlib-build-configuration-extra-envars (default > '()))) > + > +(define make-jlib > + (match-lambda > + (($ <jlib-build-configuration> > + builder jversion revision hash type patches extra-inputs > extra-envars) Please try to use keyword arguments. > + (properties `((jversion . ,jversion) > + (jrevision . ,revision) > + (jtype . ,type))) Are those used anywhere? Can jversion and jrevision not be parsed from (package-version jlib)? Regards, Leo
guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 16 May 2021 10:53:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 16 06:53:15 2021 Received: from localhost ([127.0.0.1]:49747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1liEOS-0005HL-RX for submit <at> debbugs.gnu.org; Sun, 16 May 2021 06:53:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:36356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bounce+686de0.08547a-guix-patches=gnu.org@HIDDEN>) id 1liEOL-0005Gw-RG for submit <at> debbugs.gnu.org; Sun, 16 May 2021 06:53:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <bounce+686de0.08547a-guix-patches=gnu.org@HIDDEN>) id 1liEOL-0004ru-HQ for guix-patches@HIDDEN; Sun, 16 May 2021 06:53:01 -0400 Received: from m42-5.mailgun.net ([69.72.42.5]:35906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <bounce+686de0.08547a-guix-patches=gnu.org@HIDDEN>) id 1liEOG-00055n-Up for guix-patches@HIDDEN; Sun, 16 May 2021 06:53:01 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1621162377; h=Content-Type: MIME-Version: Message-Id: Subject: From: To: Date: Sender; bh=wp90HGR7czWGjUyhqykYSOCgr9nC17oHWfwfutUFgWw=; b=PnmksnhEI/x7fVV2o1IFgi+8KRf5HlhY2OVDwHVVazVV2mMjzlk4OXB5KTGmB5ukZsWs9Tlh ivqNu8afkLYPVLsomwpNh0OydTKwyD2LE5rqiVoKGOuR0IRV4i+H1N1JRKbgVwecEFaLbOxq ISokfj7E03bGQ3+hmMqq5agU8ypIJgSWekvuKkyC1hNgNmp/4tUAI7+qjDWrVy1dgbYmgvJd nKX86ZNiV0JgdMgG2n7phxLSiBEJxo0c+FkktlIrzXr7LarSRFHvwGK/hHGxe8Jq1gb6esbe FplVM4YrZYGhCfwBZa+6wvoDYnFa9FpTmyrvUI9rYnKsmkhfDG8EJA== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyI5MmEzMyIsICJndWl4LXBhdGNoZXNAZ251Lm9yZyIsICIwODU0N2EiXQ== Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 60a0f97760c53c8c9d798945 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Sun, 16 May 2021 10:52:39 GMT Received: from localhost (x111210.dynamic.ppp.asahi-net.or.jp [122.249.111.210]) by wilsonb.com (Postfix) with ESMTPSA id 2198EA2F83 for <guix-patches@HIDDEN>; Sun, 16 May 2021 10:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1621162356; bh=wp90HGR7czWGjUyhqykYSOCgr9nC17oHWfwfutUFgWw=; h=Date:To:From:Subject:From; b=3lUNOl3i4BESz6ToXLE5cj7comGwonpxU34R85spPd4fNPxIXxhdFddvO54tmb9ie 1NRZxXTdsIGPxq0RZBpmIwS0um370HbwyUi2EcNkku4GqkPm90cAuDuATtMmv5/ITM il/qPiMh5OC61h+3ECWG/p+pFQw48/28LdWeMuEybWb/IZ3FkFNso6o805QPFRe/kR W4KuAENuV1L7pnkhzghPxLG3AJZD4vAxJx4Ei/ogbyTKbmCL6Xgx8wGNOeI2WuptG4 619jVjOe5SltjhHUWJjiOpSfIjgO2dMYlUQIngh5rWuqLOa2AQF0wDyP9stYTcc+c4 jwd9enW1PzZ5d3I7N3ISTHOmcenBIGtPN46g5nzpWKujGFqbBQD0QZifi9B208Rjsd mzltWQszxwVQ1tkIHESolFrNHL8D8DSbPJLyZppf/evBYNmteBALR/1OyWYhMa8WqC 2x99mtApOPLVs1374YOZAyUfiLTdhishVbP1Th7oHSlZjDDqsCs60c6335p2QpPkoU V69Xv7Aag1LgqjXPvKfAd73+CBES1cppfVxhqiFG551voc4c4jLa+RJLebl27qsYRI qPSauJ48fU0uB2D/IC2OondTJa8v5F6ZuFJ+IDjXCfdXJrP9z9tWD9vzpxI0uhnIHB Fdu2NhvA3EkElxwUeeb2xSKc= Date: Sun, 16 May 2021 19:54:03 +0900 To: guix-patches@HIDDEN From: elaexuotee@HIDDEN Subject: gnu: Add j. Message-Id: <3LOAUDT0FLL4U.2SOD925YP915T@HIDDEN> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_7a8f3a2476501c02442e0b78_=_" Received-SPF: pass client-ip=69.72.42.5; envelope-from=bounce+686de0.08547a-guix-patches=gnu.org@HIDDEN; helo=m42-5.mailgun.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) This is a multipart message in MIME format. ------_=_7a8f3a2476501c02442e0b78_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Guix, This packages up the J programming lanuage. The build scripts that upstream= provides are pretty hostile to package maintainers, so we have to jump thro= ugh quite a few hoops to get the build working. I have had this in my personal, private channel for a while, tweaking it ov= er time, so I believe it works fairly well in practice. Here are the high-leve= l design decisions I have made: 1) Provide multiple J versions; It is extremely common for J users to have multiple versions installed in parallel since there are often major, breaking changes between (non-patch-level) releases. In addition, a very large fraction of J users keep the beta installed as we= ll, so I have elected to provide this too. 2) Bundle together all variants of the interpreter along with a wrapper script that selects the most featureful one at runtime; There are 3 versions of the interpreter, supporting different CPU feature-s= ets: vanilla, AVX, AVX2. This package elects to build all these variants and provides a wrapper script that launches the "most AVX-y" version possible a= t runtime. Essentially, this is trying to make up for upstream's lack of a fat binary.= 3) Try to mirror the FHS standard for installation locations; For the most part, J uses idiosyncratic defaults for where it looks for lib= rary files and the like. This package elects to configure things so files sit in= more standard locations---e.g. runtime scripts sit under .../share/j; configuration files sit under .../etc/j; etc. 4) Point the J package manager to $HOME/.j/<version>. J maintains its own mini package repository for "addons", which are simply officially-supported J scripts. This package sets things up so that these packages get installed to .j/<version>/addons. In addition, other related directories are gathered under .j/<version>. Items on the TODO list: 1) Write an importer and create packages for J addons; This is currently in progress. 2) Create a something like a jsoftware-union procedure to bundle up J with user-selectable addons; This is necessary since the interpreter looks for addons at a specified pat= h. We probably want to mimick something like texlive and provide both an "all batteries included" package along with one where users can select which add= ons they want. 3) Support more older versions of J. J is open source starting with j801, so it'd be nice to have packages for t= he entire j80x series too. Unfortunately, those use an entirely different set = of build scripts from the current j90x series, so it will require munging-work= similar to what we already have. Cheers! ------_=_7a8f3a2476501c02442e0b78_=_ Content-Disposition: attachment; filename=0001-gnu-Add-j.patch Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable =46rom c231924ab9a72979001640d866db1988f8fd3bde Mon Sep 17 00:00:00 2001 =46rom: "B. Wilson" <elaexuotee@HIDDEN> =44ate: Sun, 16 May 2021 19:02:29 +0900 =53ubject: [PATCH] gnu: Add j. =54o: guix-patches@HIDDEN =0A* gnu/packages/jsoftware.scm: New file. =2A gnu/packages/patches/jsoftware-j901-f-fixes.patch: New file. =2A gnu/local.mk: (GNU_SYSTEM_MODULES, dist_patch_DATA): Add them. =2D-- =20gnu/local.mk | 2 + =20gnu/packages/jsoftware.scm | 432 ++++++++++++++++++ =20.../patches/jsoftware-j901-f-fixes.patch | 80 ++++ =203 files changed, 514 insertions(+) =20create mode 100644 gnu/packages/jsoftware.scm =20create mode 100644 gnu/packages/patches/jsoftware-j901-f-fixes.patch =0Adiff --git a/gnu/local.mk b/gnu/local.mk =69ndex c3b0274945..b706ec4e86 100644 =2D-- a/gnu/local.mk =2B++ b/gnu/local.mk =40@ -305,6 +305,7 @@ GNU_SYSTEM_MODULES =3D \ =20 %D%/packages/javascript.scm \ =20 %D%/packages/jemalloc.scm \ =20 %D%/packages/jrnl.scm \ =2B %D%/packages/jsoftware.scm \ =20 %D%/packages/jose.scm \ =20 %D%/packages/julia.scm \ =20 %D%/packages/julia-xyz.scm \ =40@ -1270,6 +1271,7 @@ dist_patch_DATA =3D \ =20 %D%/packages/patches/jfsutils-add-sysmacros.patch \ =20 %D%/packages/patches/jfsutils-include-systypes.patch \ =20 %D%/packages/patches/jsoncpp-fix-inverted-case.patch \ =2B %D%/packages/patches/jsoftware-j901-f-fixes.patch \ =20 %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ =20 %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ =20 %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ =64iff --git a/gnu/packages/jsoftware.scm b/gnu/packages/jsoftware.scm =6Eew file mode 100644 =69ndex 0000000000..f6f6099e42 =2D-- /dev/null =2B++ b/gnu/packages/jsoftware.scm =40@ -0,0 +1,432 @@ =2B;;; GNU Guix --- Functional package management for GNU =2B;;; Copyright =C2=A9 2021 B. Wilson <elaexuotee@HIDDEN> =2B;;; =2B;;; This file is part of GNU Guix. =2B;;; =2B;;; GNU Guix is free software; you can redistribute it and/or modify it =2B;;; under the terms of the GNU General Public License as published by =2B;;; the Free Software Foundation; either version 3 of the License, or (a= =74 =2B;;; your option) any later version. =2B;;; =2B;;; GNU Guix is distributed in the hope that it will be useful, but =2B;;; WITHOUT ANY WARRANTY; without even the implied warranty of =2B;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the =2B;;; GNU General Public License for more details. =2B;;; =2B;;; You should have received a copy of the GNU General Public License =2B;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. =2B =2B(define-module (gnu packages jsoftware) =2B #:use-module (guix records) =2B #:use-module (guix packages) =2B #:use-module ((guix licenses) #:prefix license:) =2B #:use-module (guix git-download) =2B #:use-module (guix build-system gnu) =2B #:use-module (guix build-system trivial) =2B #:use-module (guix build utils) =2B #:use-module (guix utils) =2B #:use-module (gnu packages) =2B #:use-module (gnu packages libedit) =2B #:use-module (gnu packages llvm) =2B #:use-module (gnu packages maths) =2B #:use-module (guix gexp) =2B #:use-module (ice-9 match)) =2B =2B =2B(define (jname prefix jtype) =2B "Return a package name for the given prefix and jtype, e.g. `jlib', =2B `jlib-beta', `j', and `j-beta'." =2B (let ((postfix (if (eq? jtype 'release) "" =2B (string-append "-" (symbol->string jtype))))) =2B (string-append prefix postfix))) =2B =2B(define (jversion->string version revision) =2B "Return a string representation of a J version and (optional) revision= =20pair." =2B (let ((postfix (if (not revision) "" =2B (string-append "-" revision)))) =2B (string-append version postfix))) =2B =2B(define (jinfo->git-tag jversion jtype jrevision) =2B "Given version parameters, construct a git tag for upstream releases."= =0A+ (let ((postfix (if (not jrevision) "" =2B (string-append "-" jrevision)))) =2B (string-append "j" jversion "-" (symbol->string jtype) postfix))) =2B =2B(define-record-type* <jlib-build-configuration> =2B jlib-build-configuration make-jlib-build-configuration =2B jlib-build-configuration? =2B (builder jlib-build-configuration-builder (default "guix.gnu.org"= =29) =2B (version jlib-build-configuration-version (default #f)) =2B (revision jlib-build-configuration-revision (default #f)) =2B (hash jlib-build-configuration-hash (default #f)) =2B (type jlib-build-configuration-type (default 'release)) =2B (patches jlib-build-configuration-patches (default '())) =2B (extra-inputs jlib-build-configuration-extra-inputs (default '())) =2B (extra-envars jlib-build-configuration-extra-envars (default '()))) =2B =2B(define make-jlib =2B (match-lambda =2B (($ <jlib-build-configuration> =2B builder jversion revision hash type patches extra-inputs extra-e= =6Evars) =2B (package =2B (name (jname "jlib" type)) =2B (version (jversion->string jversion revision)) =2B (source =2B (origin =2B (method git-fetch) =2B (uri (git-reference =2B (url "https://github.com/jsoftware/jsource") =2B (commit (jinfo->git-tag jversion type revision)))) =2B (sha256 (base32 hash)) =2B (file-name (git-file-name name version)) =2B (patches patches))) =2B (properties `((jversion . ,jversion) =2B (jrevision . ,revision) =2B (jtype . ,type))) =2B (build-system gnu-build-system) =2B (native-inputs `(("clang-toolchain" ,clang-toolchain))) =2B (inputs (cons* `("libedit" ,libedit) =2B `("libomp" ,libomp) =2B extra-inputs)) =2B (arguments =2B `(#:modules (((ice-9 ftw) #:select (scandir)) =2B ((ice-9 popen) #:select (open-pipe* close-pipe)) =2B ((ice-9 regex) #:select (match:substring string-mat= =63h)) =2B ((ice-9 threads) #:select (parallel par-for-each)) =2B ((srfi srfi-26) #:select (cut)) =2B ((srfi srfi-1) #:select (fold)) =2B ,@%gnu-build-system-modules) =2B #:phases =2B ;; Upstream's build system consists of ad-hoc scripts that bui= =6Cd =2B ;; build up (very complicated) environment variables to pass t= =6F make. =2B ;; The basic build process looks like this: =2B ;; =2B ;; 1) Copy jsrc/jversion-x.h to jsrc/jversion.h and edit val= =75es; =2B ;; 2) Set jplatform and j64x environment variables; =2B ;; 3) Run make2/build_jconsole.sh and make2/build_libj.sh; =2B ;; =2B ;; However, upstream expects users to run J directly from the = =73ource =2B ;; directory; they do not supply a make `install' target. Thu= =73 it =2B ;; takes some massaging to install files in FHS-style director= =69es. =2B (modify-phases %standard-phases =2B ;; In particular, we have to set up =2B ;; =2B ;; 1) jsrc/jversion.h as in a typical build; =2B ;; 2) jlibrary/bin/profilex.ijs to point to writable direc= =74ories; =2B ;; 3) make2/build_*.sh to respect standard build conventio= =6Es; =2B ;; 4) jsrc/jconsole.c to fix libedit dlopen; and =2B ;; 5) Hard coded references to addons directory. =2B (replace 'configure =2B (lambda* (#:key target inputs outputs #:allow-other-keys) =2B (let* ((clang-toolchain (assoc-ref inputs "clang-toolcha= =69n")) =2B (clang (string-append clang-toolchain "/bin/clang= =22)) =2B (libedit (assoc-ref inputs "libedit")) =2B (out (assoc-ref outputs "out")) =2B (share (string-append out "/share/j"))) =2B ;; Set up build constants =2B (copy-file "jsrc/jversion-x.h" "jsrc/jversion.h") =2B (substitute* "jsrc/jversion.h" =2B (("^#define jversion.*$") =2B (format #f "#define jversion ~s\n" ,version)) =2B (("^#define jtype.*$") =2B (format #f "#define jtype ~s\n" (symbol->string ',t= =79pe))) =2B (("^#define jbuilder.*$") =2B (format #f "#define jbuilder ~s\n" ,builder))) =2B ;; Create profilex.ijs overrides to point to the corre= =63t =2B ;; store items. Note that we set ~install and ~addons= =0A+ ;; directories to reside under ~user to allow install= =69ng =2B ;; and loading addons. TODO: Guix-ify J addons as wel= =6C. =2B (call-with-output-file "jlibrary/bin/profilex.ijs" =2B (lambda (port) =2B (display =2B (string-join =2B (list =2B (format #f "system=3D. '~a/system'" share) =2B (format #f "tools=3D. '~a/tools'" share) =2B ;; Upstream defaults to spamming $HOME with =2B ;; unhidden userdata directories. Set this = =74o be =2B ;; $HOME/.j/<jtype>/<jversion> instead =2B "'jtype jversion'=3D. (3&{,{.) <;._2 ,&'/' 9= =21:14''" =2B "jversion=3D. ({.~ i.&'-') jversion" =2B "jsuffix=3D. >@{&('';'-beta') jtype -: 'beta= =27" =2B "user=3D. home,'/.j/',jversion,jsuffix" =2B "addons=3D. user,'/addons'" =2B "break=3D. user,'/break'" =2B "config=3D. user,'/config'" =2B "install=3D. user,'/install'" =2B "snap=3D. user,'/snap'" =2B "temp=3D. user,'/temp'" =2B "\n") =2B "\n") =2B port))) =2B ;; Munge the build scripts into reason: =2B ;; 1. Short-circuit the fragile compiler detection; =2B ;; 2. Make sure to include our CFLAGS and LFLAGS; and =2B ;; 3. Propagate script errors to top level. =2B (for-each =2B (lambda (file) =2B (with-directory-excursion "make2" =2B (substitute* file =2B ;; The `compiler' variable doesn't point to the= =20actual =2B ;; compiler. It is just a switch to tell the b= =75ild =2B ;; scripts whether to use gcc- or clang-specifi= =63 =2B ;; flags. =2B (("^compiler=3D.*$") "compiler=3Dclang\n") =2B (("^LDFLAGS=3D\"" def) (string-append def "$LDF= =4CAGS ")) =2B (("^(common=3D\")(\\$USETHREAD.*)$" _ def rest)= =0A+ (string-append def "$CFLAGS " rest)) =2B (("^#!.*" shebang) =2B (string-append shebang "set -o errexit\n")))))= =0A+ '("build_jconsole.sh" "build_libj.sh")) =2B ;; The jconsole manually loads libedit with dlopen. T= =68e path =2B ;; must be absolute to correctly point to our input. =2B (substitute* "jsrc/jconsole.c" =2B (("libedit\\.so\\.[0-9]" so-file) =2B (format #f "~a/lib/~a" libedit so-file))) =2B ;; The ~addons/dev directory supplies tentative J-scri= =70t =2B ;; definitions of new J engine functionality. Since w= =65 point =2B ;; ~addons under the ~user directory, we move it under= =0A+ ;; ~system instead, which sits as-is in the output. =2B (with-directory-excursion "jsrc" =2B (for-each =2B (lambda (file) =2B (substitute* file (("~addons/dev") "~system/dev"= =29)) =2B (scandir "." =2B (lambda (f) (eq? (stat:type (stat f)) 'regular))= =29)) =2B ;; Implementation of 9!:14 records build time which br= =65aks =2B ;; build reproducibility. Note that upstream code dep= =65nds on =2B ;; the exact format of these strings, so we need to mi= =6Dic the =2B ;; standard. =2B (substitute* "jsrc/j.c" =2B (("__DATE__") "\"Jan 01 1970\"") =2B (("__TIME__") "\"00:00:00\"")) =2B ;; Upstream recommends using clang, with GCC support b= =65ing =2B ;; second-class, often resulting in build failures. =2B (setenv "CC" clang)))) =2B ;; The build output depends primarily on the values of the =2B ;; `jplatform' and `j64x' environment variables. If the tar= =67et is =2B ;; ARM, then `jplatform' is "raspberry", otherwise it is `li= =6Eux'. =2B ;; In addition to 32- and 64- bit versions, `j64x' controlls= =0A+ ;; whether AVX or AVX2 variants of libj are built. =2B ;; =2B ;; However, build targets are not fine-grained enough to =2B ;; distinguish between CPU features. Thus we build and inst= =61ll all =2B ;; variants of libj, expecting jconsole to be called with a = =77rapper =2B ;; script that detects AVX features and loads the appropriat= =65 libj =2B ;; at runtime. =2B (replace 'build =2B (lambda _ =2B (setenv "USE_OPENMP" "1") =2B (setenv "USE_THREAD" "1") =2B (for-each (lambda (var-val) (apply setenv var-val)) =2B (quote ,extra-envars)) =2B ;; The build scripts assume that PWD is make2. =2B (with-directory-excursion "make2" =2B (let* ((platform ,(if (target-arm?) "raspberry" "linux= =22)) =2B (jplat (string-append "jplatform=3D" platform))= =0A+ (target-bit ,(if (target-64bit?) "64" "32")) =2B (jbit (string-append "j64x=3D" "j" target-bit))= =0A+ (jbit-avx (string-append jbit "avx")) =2B (jbit-avx2 (string-append jbit "avx2"))) =2B (parallel =2B ;; Since jconsole doesn't depend on AVX features, = =77e just =2B ;; build it once. =2B (invoke "env" jplat jbit "./build_jconsole.sh") =2B (invoke "env" jplat jbit "./build_libj.sh") =2B (if ,(target-64bit?) =2B (parallel =2B (invoke "env" jplat jbit-avx "./build_libj.sh"= =29 =2B (invoke "env" jplat jbit-avx2 =2B "./build_libj.sh")))))))) =2B ;; The test suite is expected to be run as follows for each = =76ariant =2B ;; of libj that we build: =2B ;; =2B ;; $ echo 'RUN ddall' | jconsole test/tsu.ijs =2B ;; =2B ;; This requires a working jconsole with accessible jlibrary= =20files. =2B ;; We simply place these all under test/bin. =2B (replace 'check =2B (lambda _ =2B (let ((jplatform ,(if (target-arm?) "raspberry" "linux"= =29)) =2B (mkdir-p "test/bin") =2B (for-each =2B (lambda (dir) =2B (let ((source (string-append "jlibrary/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest)))) =2B '("system" "tools" "addons")) =2B ;; The jlibrary/dev directory only sometimes exists, = =62ut =2B ;; needs to be copied into the ~system directory when= =20it =2B ;; does. =2B (if (access? "jlibrary/dev" R_OK) =2B (copy-recursively "jlibrary/dev" "test/bin/system/d= =65v")) =2B (par-for-each =2B (lambda (dir) =2B (let* ((jbin (string-append "bin/" jplatform)) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-append jbin "/" jbit =2B "/jconsole")) =2B (source (string-append jbin "/" dir)) =2B (dest (string-append "test/bin/" dir))) =2B (begin =2B (mkdir-p dest) =2B (copy-recursively source dest) =2B (install-file "jlibrary/bin/profile.ijs" dest= =29 =2B (install-file jconsole dest) =2B (let* ((jc (string-append dest "/jconsole")) =2B (tests "test/tsu.ijs") =2B (port (open-pipe* OPEN_WRITE jc tests)= =29) =2B (display "RUN ddall\n" port) =2B (when (not (zero? (status:exit-val =2B (close-pipe port)))) =2B (error "Some J build tests failed."))))))= =0A+ (scandir (string-append "bin/" jplatform) =2B (negate (cut member <> '("." ".."))))) =2B #t))) =2B ;; Now that everything is built, installation is fairly =2B ;; straightforward, following FHS conventions. The only qui= =72k is =2B ;; that we install jconsole under /libexec to make room for = =74he =2B ;; wrapper replacement under /bin. =2B (replace 'install =2B (lambda* (#:key outputs inputs #:allow-other-keys) =2B (let* ((jplat ,(if (target-arm?) "raspberry" "linux")) =2B (jbit ,(if (target-64bit?) "j64" "j32")) =2B (jconsole (string-join =2B `("bin" ,jplat ,jbit "jconsole") "/")= =29 =2B (out (assoc-ref outputs "out")) =2B (etc (string-append out "/etc/j")) =2B (lib (string-append out "/lib/j")) =2B (libexec (string-append out "/libexec")) =2B (share (string-append out "/share/j")) =2B (system (string-append share "/system")) =2B (dev (string-append system "/dev"))) =2B (mkdir-p lib) =2B (for-each =2B (lambda (jarch) =2B (let* ((jbin (string-join `("bin" ,jplat ,jarch) "= =2F")) =2B (javx-match (string-match "avx.*" jarch)) =2B (javx (if (not javx-match) "" =2B (match:substring javx-match))) =2B (sep (if javx-match "-" "")) =2B (source (string-append jbin "/libj.so")) =2B (dest (format #f "~a/libj~a~a.so" lib sep j= =61vx))) =2B (copy-file source dest))) =2B (scandir (string-append "bin/" jplat) =2B (negate (cut member <> '("." ".."))))) =2B (install-file jconsole libexec) =2B (copy-recursively "jlibrary/system" system) =2B (if (access? "jlibrary/dev" R_OK) =2B (copy-recursively "jlibrary/dev" dev)) =2B (install-file "jlibrary/bin/profile.ijs" etc) =2B (install-file "jlibrary/bin/profilex.ijs" etc))))))) =2B (home-page "https://www.jsoftware.com/") =2B (synopsis "Ascii-only, array programming language in the APL fami= =6Cy") =2B (description =2B "J is a high-level, general-purpose programming language that is =2Bparticularly suited to the mathematical, statistical, and logical analys= =69s of =2Bdata. It is a powerful tool for developing algorithms and exploring prob= =6Cems =2Bthat are not already well understood.") =2B (license license:gpl3+))))) =2B =2B =2B(define jlib-901 =2B (make-jlib =2B (jlib-build-configuration =2B (version "901") =2B (revision "f") =2B (hash "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p") =2B (patches (search-patches "jsoftware-j901-f-fixes.patch"))))) =2B =2B =2B(define jlib-build-configuration-with-sleef =2B (jlib-build-configuration =2B (extra-inputs `(("sleef" ,sleef))) =2B (extra-envars `(("USE_SLEEF_SRC" "0") =2B ("LDFLAGS" "-lsleef"))))) =2B =2B(define jlib-902 =2B (make-jlib =2B (jlib-build-configuration =2B (inherit jlib-build-configuration-with-sleef) =2B (version "902") =2B (revision "b") =2B (hash "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0")))) =2B =2B(define jlib-903-beta =2B (make-jlib =2B (jlib-build-configuration =2B (inherit jlib-build-configuration-with-sleef) =2B (version "903") =2B (revision "h") =2B (type 'beta) =2B (hash "13sw2ffgx6pm699qfi50drlp8y1vmzj4swzx82g6vhyjpjci1w4h")))) =2B =2B =2B(define (make-ijconsole jlib) =2B "Generate a G-exp wrapper script that detects AVX/AVX2 support at runt= =69me and =2B executes jconsole with the appropriate libj.so and profile.ijs." =2B (program-file (string-append "ijconsole-" (package-version jlib)) =2B #~(begin =2B (use-modules ((ice-9 rdelim) #:select (read-line)) =2B ((ice-9 regex) #:select (regexp-match? string-match= =29)) =2B =2B (define (cpu-feature-line? string) =2B (string-prefix? "flags" string)) =2B =2B (define (contains-word? word string) =2B (regexp-match? =2B (string-match (string-join `("\\<" ,word "\\>") "") =2B string))) =2B =2B (define (has-cpu-feature? feature) =2B (with-input-from-file "/proc/cpuinfo" =2B (lambda () =2B (catch 'found =2B (lambda () =2B (let loop ((line (read-line))) =2B (cond ((eof-object? line) #f) =2B ((and (cpu-feature-line? line) =2B (contains-word? feature line)) =2B (throw 'found)) =2B (else (loop (read-line)))))) =2B (const #t))))) =2B =2B (let* ((jconsole (string-append #$jlib "/libexec/jconsole")) =2B (libj (format #f "~a/lib/j/libj-~a.so" #$jlib =2B (cond ((has-cpu-feature? "avx2") "avx2") =2B ((has-cpu-feature? "avx") "avx") =2B (else "")))) =2B (jprofile (string-append #$jlib "/etc/j/profile.ijs"))) =2B (apply execl jconsole "ijconsole" "-lib" libj "-jprofile" jpro= =66ile =2B (cdr (command-line))))))) =2B =2B(define (make-j jlib) =2B "Generate a J package containing /bin/ijconsole-<jversion> linked agai= =6Est the =2B given jlib library package. Note that the ijconsole executable is ver= =73ioned =2B since it is typical for J users to have multiple versions installed on= =20the =2B same system." =2B (let ((jversion (assq-ref (package-properties jlib) 'jversion)) =2B (jtype (assq-ref (package-properties jlib) 'jtype))) =2B (package (inherit jlib) =2B (name (jname "j" jtype)) =2B (source #f) =2B (inputs `(("jlib" ,jlib) =2B ("ijconsole" ,(make-ijconsole jlib)))) =2B (build-system trivial-build-system) =2B (arguments =2B `(#:modules ((guix build utils)) =2B #:builder =2B (begin =2B (use-modules (guix build utils)) =2B (let* ((ijconsole (assoc-ref %build-inputs "ijconsole")) =2B (out (assoc-ref %outputs "out")) =2B (bin (string-append out "/bin"))) =2B (mkdir-p bin) =2B (symlink ijconsole =2B (string-append bin "/ijconsole-" ,jversion))))))))= =29 =2B =2B(define-public j-901 (make-j jlib-901)) =2B(define-public j-902 (make-j jlib-902)) =2B(define-public j-903-beta (make-j jlib-903-beta)) =64iff --git a/gnu/packages/patches/jsoftware-j901-f-fixes.patch b/gnu/pack= =61ges/patches/jsoftware-j901-f-fixes.patch =6Eew file mode 100644 =69ndex 0000000000..0ac7e94de4 =2D-- /dev/null =2B++ b/gnu/packages/patches/jsoftware-j901-f-fixes.patch =40@ -0,0 +1,80 @@ =2BThis patch fixes two separate issues with ustream sources: =2B =2B* Normalize import paths in jsrc/cip.c =2B =2BUpstream claims to have some build requirements that force them to use s= =74range =2Bimport paths. However, these paths do not exist inside our build chroot.= =0A+ =2B* Fix unititialized variable warning =2B =2BClang 9 issues some warnings which cause the build to fail since upstrea= =6D =2Bcompiles with -Werror. =2B =2B =2Bdiff --git a/jsrc/cip.c b/jsrc/cip.c =2Bindex 61da4088..fb3c03b6 100644 =2B--- a/jsrc/cip.c =2B+++ b/jsrc/cip.c =2B@@ -3,9 +3,9 @@ =2B /* = =20 */ =2B /* Conjunctions: Inner Product = =20 */ =2B=20 =2B-#include "../../jsource/jsrc/j.h" =2B-#include "../../jsource/jsrc/vasm.h" =2B-#include "../../jsource/jsrc/gemm.h" =2B+#include "j.h" =2B+#include "vasm.h" =2B+#include "gemm.h" =2B=20 =2B #define MAXAROWS 384 // max rows of a that we can process to stay in L= =32 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wir= =65d to 128*3 - check if you chage =2B=20 =2B@@ -1057,15 +1057,15 @@ static A jtipbx(J jt,A a,A w,C c,C d){A g=3D0,x0= =2Cx1,z;B*av,*av0,b,*v0,*v1,*zv;C c0 =2B switch(c){ =2B case CPLUSDOT: =2B #define F |=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CSTARDOT: =2B #define F &=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B case CNE: =2B #define F ^=3D =2B-#include "../../jsource/jsrc/cip_t.h" =2B+#include "cip_t.h" =2B break; =2B } =2B R z; =2Bdiff --git a/jsrc/gemm.c b/jsrc/gemm.c =2Bindex 51fe306e..b105dfc1 100644 =2B--- a/jsrc/gemm.c =2B+++ b/jsrc/gemm.c =2B@@ -318,7 +318,7 @@ dgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -501,7 +501,7 @@ igemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2B@@ -831,7 +831,7 @@ zgemm_nn (I m, =2B _B); =2B=20 =2B // loop 3 =2B- I i; =2B+ I i=3D0; =2B #pragma omp parallel for default(none),private(i),shared(j,l,A,C,mb,nc,= =6Bc,alpha,_beta,_mc,_B,rs_a,cs_a,rs_c,cs_c) =2B for (i=3D0; i<mb; ++i) { =2B I mc; =2D-=20 =32.31.1 =0A= ------_=_7a8f3a2476501c02442e0b78_=_--
elaexuotee@HIDDEN
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#48463
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.