X-Loop: help-debbugs@HIDDEN Subject: [bug#36382] A service for adding support for running portable binaries built for most linux distributions that use the filesystem hierarchy standard Resent-From: <pkill9@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Tue, 25 Jun 2019 23:01:02 +0000 Resent-Message-ID: <handler.36382.B.15615036524078 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 36382 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36382 <at> debbugs.gnu.org X-Debbugs-Original-To: "guix-patches" <guix-patches@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.15615036524078 (code B ref -1); Tue, 25 Jun 2019 23:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jun 2019 23:00:52 +0000 Received: from localhost ([127.0.0.1]:33821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hfuQl-00013F-Ue for submit <at> debbugs.gnu.org; Tue, 25 Jun 2019 19:00:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:53532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pkill9@HIDDEN>) id 1hfuQi-00010D-IQ for submit <at> debbugs.gnu.org; Tue, 25 Jun 2019 19:00:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55255) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <pkill9@HIDDEN>) id 1hfuQg-0005B8-Ly for guix-patches@HIDDEN; Tue, 25 Jun 2019 19:00:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pkill9@HIDDEN>) id 1hfuQe-0007Nw-MB for guix-patches@HIDDEN; Tue, 25 Jun 2019 19:00:46 -0400 Received: from aibo.runbox.com ([91.220.196.211]:57044) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <pkill9@HIDDEN>) id 1hfuQd-0007Gt-Tl for guix-patches@HIDDEN; Tue, 25 Jun 2019 19:00:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Message-Id:Content-Type:Date:Subject:To:From:MIME-Version; bh=FgUPxMnTy/PfLWtQaaHYWRAlsteGZhz9Kx70gohXupM=; b=o54uezfFXbJ79gBU9bjNIL9NC Oc5Li4iKMwvMYCQJLZZteEM7x1K1gc+6Ib9yxejBYGo1QqnLq02LVhSGgXhrP3r+URyX/9WoDx1mY aOvx8ySqDttXgcXc99TtqwVBShqwbXoVmLfUDj8w7/VR9mdi2x14rJMs2IzQR4i6NGuBixS2mZzVP a6nOPX2Yy4k017EiNTYXXXypCcLhTcvdO57K97xXTPIBc1vBf4kJfPCbhTLpj26T7SywrTpRWzBCq IRfvNSrEuIeTgnmdAC+LnwzNJLPSsSX/yOQiuydxGAP0J1yk3Q9pK+Zy7ReBXi3N53qaUs1GP+eku KapkzU37w==; Received: from [10.9.9.128] (helo=rmmprod06.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from <pkill9@HIDDEN>) id 1hfuQY-0007Z7-8L for guix-patches@HIDDEN; Wed, 26 Jun 2019 01:00:38 +0200 Received: from mail by rmmprod06.runbox with local (Exim 4.86_2) (envelope-from <pkill9@HIDDEN>) id 1hfuQY-00072D-74 for guix-patches@HIDDEN; Wed, 26 Jun 2019 01:00:38 +0200 MIME-Version: 1.0 Received: from [Authenticated alias (780724)] by runbox.com with http (RMM6); for <guix-patches@HIDDEN>; Tue, 25 Jun 2019 23:00:38 GMT From: <pkill9@HIDDEN> Date: Wed, 26 Jun 2019 00:00:38 +0100 (BST) X-Mailer: RMM6 Content-Type: multipart/mixed; boundary="----------=_1561503638-25784-1" Message-Id: <E1hfuQY-00072D-74@HIDDEN> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 91.220.196.211 X-Spam-Score: -1.1 (-) 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: -2.1 (--) This is a multi-part message in MIME format... ------------=_1561503638-25784-1 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Guix, for a while now I have been using a service I wrote that allows yo= u to run portable binaries, such as AppImages, which expect to be run on di= stros that respect the filesystem hierarchy standard i.e store required lib= raries in /usr, /lib, etc, which is most distros. I think it could be a valuable tool to have in Guix, as it allows you to ru= n software that hasn't yet been packaged in Guix that is distributed as bin= aries by the author. Also, if builds are failing in Guix, it's useful to ha= ve the alternative - for example, calibre currently can't be built due to b= uild failure of a dependency (qtwebkit), so I use the Calibre tar bundle di= stributed by the website for now. This still requires some work before it's ready for inclusion in Guix - dec= isions on how it's implemented need to be made, and the code needs cleanup.= But if I don't submit it in it's imperfect state, i won't get anything don= e on it. I've done a little writeup on how it works here: http://miha.info/2019/June= /24/guix-fhs-service I've attached a patch for it. To build a guix system with it, add to the gu= ix system services: (service fhs-binaries-compatibility-service-type (fhs-configuration (lib-packages <list of package objects to provide libraries for the bin= aries>) (additional-special-files <more special files to add>) (additional-profile-packages <packages to add to system profile>))) The additional-special-files and additional-profile-packages are functional= ly exactly the same as using special-files-service-type and profile-service= -type separately, it's purely for organising the config so the admin knows = why those special files and profile packages were added. ------------=_1561503638-25784-1 Content-Type: text/x-patch; name="=?UTF-8?Q?fhs-service.patch?=" Content-Disposition: attachment; filename="=?UTF-8?Q?fhs-service.patch?=" Content-Transfer-Encoding: base64 Content-ID: <35d1f655e255816e8faed4f6ec033b82> ZGlmZiAtLWdpdCBhL2dudS9zZXJ2aWNlcy9maHMuc2NtIGIvZ251L3NlcnZp Y2VzL2Zocy5zY20KbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAw MC4uOWNhNmFiOQotLS0gL2Rldi9udWxsCisrKyBiL2dudS9zZXJ2aWNlcy9m aHMuc2NtCkBAIC0wLDAgKzEsMTQwIEBACisoZGVmaW5lLW1vZHVsZSAoZ251 IHNlcnZpY2VzIGZocykKKyAgIzp1c2UtbW9kdWxlIChpY2UtOSBmdHcpIDs7 IGZvciBjcmVhdGluZyByZWN1cnNpdmUgbGlzdCBvZiBkaXJlY3RvcmllcyBv ZiBsaWJzIGZvciBGSFMgICM6dXNlLW1vZHVsZSAoZ3VpeCBkb3dubG9hZCkK KyAgIzp1c2UtbW9kdWxlIChzcmZpIHNyZmktMSkgOzsgRm9yIGZpbHRlci1t YXAKKyAgIzp1c2UtbW9kdWxlIChndWl4IHJlY29yZHMpIDs7IEZvciBkZWZp bmluZyByZWNvcmQgdHlwZXMKKyAgIzp1c2UtbW9kdWxlIChndWl4IHByb2Zp bGVzKSA7OyBmb3IgIG1hbmlmZXN0LWVudHJpZXMKKyAgIzp1c2UtbW9kdWxl IChnbnUgc2VydmljZXMpIDs7IEZvciBkZWZpbmluZyBzZXJ2aWNlcworICAj OnVzZS1tb2R1bGUgKGd1aXggZ2V4cCkgOzsgRm9yIGNvbXB1dGVkLWZpbGUg YW5kIG90aGVyIHRoaW5ncworICAjOnVzZS1tb2R1bGUgKGd1aXggcGFja2Fn ZXMpIDs7IEZvciBwYWNrYWdlCisgICM6dXNlLW1vZHVsZSAoZ251IHBhY2th Z2VzKSA7OyBGb3Igc3BlY2lmaWNhdGlvbnMtPm1hbmlmZXN0CisgICM6dXNl LW1vZHVsZSAoZ251IHBhY2thZ2VzIGJhc2UpIDs7IEZvciBnbGliYworCisg ICM6ZXhwb3J0IChmaHMtYmluYXJpZXMtY29tcGF0aWJpbGl0eS1zZXJ2aWNl LXR5cGUKKyAgICAgICAgICAgIGZocy1iaW5hcmllcy1jb21wYXRpYmlsaXR5 LXNlcnZpY2UKKyAgICAgICAgICAgIGZocy1jb25maWd1cmF0aW9uKSkKKwor KGRlZmluZSAoMzJiaXQtcGFja2FnZSBwa2cpCisgIChwYWNrYWdlIChpbmhl cml0IHBrZykKKyAgICAgICAgICAgKG5hbWUgKHN0cmluZy1hcHBlbmQgKHBh Y2thZ2UtbmFtZSBwa2cpICItaTY4Ni1saW51eCIpKQorCSAgIChhcmd1bWVu dHMKKwkgICAgYCgjOnN5c3RlbSAiaTY4Ni1saW51eCIKKwkgICAgICAsQChw YWNrYWdlLWFyZ3VtZW50cyBwa2cpKSkpKQorCisoZGVmaW5lIGdsaWJjLWZv ci1maHMKKyAgKHBhY2thZ2UgKGluaGVyaXQgZ2xpYmMpCisgICAgICAgICAg IChuYW1lICJnbGliYy1mb3ItZmhzIikgOzsgTWF5YmUgcmVuYW1lIHRoaXMg dG8gImdsaWJjLXdpdGgtbGRjb25maWctZm9yLWZocyIKKyAgICAgICAgICAg KHNvdXJjZSAob3JpZ2luCisgICAgICAgICAgICAgICAgICAgIChpbmhlcml0 IChwYWNrYWdlLXNvdXJjZSBnbGliYykpCisgICAgICAgICAgICAgICAgICAg IChzbmlwcGV0ICNmKSkpKSkgOzsgUmUtZW5hYmxlIGxkY29uZmlnCisKKwor KGRlZmluZSAocGFja2FnZXMtPmxkLnNvLmNvbmYgcGFja2FnZXMpCisgIChj b21wdXRlZC1maWxlCisgICAibGQuc28uY29uZiIKKyAgICh3aXRoLWltcG9y dGVkLW1vZHVsZXMKKyAgICBgKChndWl4IGJ1aWxkIHVuaW9uKQorICAgICAg KGd1aXggYnVpbGQgdXRpbHMpKQorICAgICN+KGJlZ2luCisgICAgICAgICh1 c2UtbW9kdWxlcyAoZ3VpeCBidWlsZCB1bmlvbikKKyAgICAgICAgICAgICAg ICAgICAgIChndWl4IGJ1aWxkIHV0aWxzKSkKKyAgICAgICAgKGxldCogKChw YWNrYWdlcyAnIyRwYWNrYWdlcykgOzsgTmVlZCB0byBxdW90ZSAiIyRwYWNr YWdlcyIgYXMgIyRwYWNrYWdlcyB0cmllcyB0byAiYXBwbHkiIHRoZSBmaXJz dCBpdGVtIHRvIHRoZSByZXN0LCBsaWtlIGEgcHJvY2VkdXJlLgorICAgICAg ICAgICAgICAgKGZpbmQtbGliLWRpcmVjdG9yaWVzLWluLXNpbmdsZS1wYWNr YWdlCisgICAgICAgICAgICAgICAgKGxhbWJkYSAocGFja2FnZSkKKyAgICAg ICAgICAgICAgICAgIChmaW5kLWZpbGVzIChzdHJpbmctYXBwZW5kIHBhY2th Z2UgIi9saWIiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxh bWJkYSAoZmlsZSBzdGF0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA7OyBzZXR0aW5nIGtleXdvcmQgInN0YXQiIHRvICJzdGF0IiBtZWFu cyBpdCB3aWxsIGZvbGxvdworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA7OyBzeW1saW5rcywgdW5saWtlIHdoYXQgaXQncyBzZXQgdG8gYnkg ZGVmYXVsdCAoImxzdGF0IikuCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChlcT8gJ2RpcmVjdG9yeSAoc3RhdDp0eXBlIHN0YXQpKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICM6c3RhdCBzdGF0CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAjOmRpcmVjdG9yaWVzPyAjdCkp KQorICAgICAgICAgICAgICAgKGZpbmQtbGliLWRpcmVjdG9yaWVzLWluLWFs bC1wYWNrYWdlcworICAgICAgICAgICAgICAgIChsYW1iZGEgKHBhY2thZ2Vz KQorICAgICAgICAgICAgICAgICAgKGFwcGx5IGFwcGVuZCA7OyBDb25jYXRl bmF0ZSB0aGUgZGlyZWN0b3J5IGxpc3RzIGZyb20gIm1hcCIgaW50byBvbmUg bGlzdAorICAgICAgICAgICAgICAgICAgICAgICAgIChtYXAgKGxhbWJkYSAo cGFja2FnZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZp bmQtbGliLWRpcmVjdG9yaWVzLWluLXNpbmdsZS1wYWNrYWdlIHBhY2thZ2Up KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFja2FnZXMpKSkp CisgICAgICAgICAgICAgICAoZmhzLWxpYi1kaXJzCisgICAgICAgICAgICAg ICAgIChmaW5kLWxpYi1kaXJlY3Rvcmllcy1pbi1hbGwtcGFja2FnZXMgcGFj a2FnZXMpKSkKKyAgICAgICAgICAgICAgICh3aXRoLW91dHB1dC10by1maWxl CisgICAgICAgICAgICAgICAgICAgIyRvdXRwdXQKKyAgICAgICAgICAgICAg ICAgKGxhbWJkYSBfCisgICAgICAgICAgICAgICAgICAgKGZvcm1hdCAjdAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1qb2luIGZocy1s aWItZGlycyAiXG4iKSkKKyAgICAgICAgICAgICAgICAgICAjJG91dHB1dCkp KSkpKSkKKworKGRlZmluZSAobGQuc28uY29uZi0+bGQuc28uY2FjaGUgbGQt Y29uZikKKyAgKGNvbXB1dGVkLWZpbGUgImxkLnNvLmNhY2hlIgorICAgICAg ICAgICAgICAgICAod2l0aC1pbXBvcnRlZC1tb2R1bGVzIGAoKGd1aXggYnVp bGQgdXRpbHMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICN+KGJlZ2luCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICh1c2UtbW9kdWxlcyAoZ3VpeCBidWlsZCB1dGls cykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChsZXQqICgobGRjb25maWcgKHN0cmluZy1hcHBlbmQgIyRnbGliYy1m b3ItZmhzICIvc2Jpbi9sZGNvbmZpZyIpKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW52b2tlIGxkY29uZmln CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAiLVgiIDs7IERvbid0IHVwZGF0ZSBzeW1ib2xpYyBsaW5r cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIi1mIiAjJGxkLWNvbmYgOzsgVXNlICMkY29uZmlndXJh dGlvbiBhcyBjb25maWd1cmF0aW9uIGZpbGUKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICItQyIgIyRv dXRwdXQpKSkpKSkgOzsgVXNlICMkb3V0cHV0IGFzIGNhY2hlIGZpbGUKKwor KGRlZmluZSAocGFja2FnZXMtPmxkLnNvLmNhY2hlIHBhY2thZ2VzKQorICAo bGQuc28uY29uZi0+bGQuc28uY2FjaGUgKHBhY2thZ2VzLT5sZC5zby5jb25m IHBhY2thZ2VzKSkpCisKKyhkZWZpbmUtcmVjb3JkLXR5cGUqIDxmaHMtY29u ZmlndXJhdGlvbj4KKyAgZmhzLWNvbmZpZ3VyYXRpb24KKyAgbWFrZS1maHMt Y29uZmlndXJhdGlvbgorICBmaHMtY29uZmlndXJhdGlvbj8KKyAgKGxpYi1w YWNrYWdlcyAgICAgICAgICAgICAgICAgICBmaHMtY29uZmlndXJhdGlvbi1s aWItcGFja2FnZXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoZGVmYXVsdCAnKCkpKQorICAoYWRkaXRpb25hbC1wcm9maWxlLXBhY2th Z2VzICAgIGZocy1jb25maWd1cmF0aW9uLWFkZGl0aW9uYWwtcHJvZmlsZS1w YWNrYWdlcyA7OyBGb3IgcHV0dGluZyBwcm9ncmFtcyBpbiAkUEFUSCBhbmQg Zm9yIHNoYXJlIGRhdGEKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoZGVmYXVsdCAnKCkpKQorICAoYWRkaXRpb25hbC1zcGVjaWFsLWZp bGVzICAgICAgIGZocy1jb25maWd1cmF0aW9uLWFkZGl0aW9uYWwtc3BlY2lh bC1maWxlcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChk ZWZhdWx0ICcoKSkpKQorCisoZGVmaW5lKiAodW5pb24gbmFtZSBwYWNrYWdl cyAjOmtleSBvcHRpb25zKQorICAoY29tcHV0ZWQtZmlsZSBuYW1lCisgICAg ICAgICAgICAgICAgICh3aXRoLWltcG9ydGVkLW1vZHVsZXMgYCgoZ3VpeCBi dWlsZCB1bmlvbikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgI34oYmVnaW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHVzZS1tb2R1bGVzIChndWl4IGJ1aWxkIHVu aW9uKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHVuaW9uLWJ1aWxkICMkb3V0cHV0ICcjJHBhY2thZ2VzKSkpCisg ICAgICAgICAgICAgICAgICM6b3B0aW9ucyBvcHRpb25zKSkKKworKGRlZmlu ZSogKGZocy1saWJzLXVuaW9uIHBhY2thZ2VzICM6a2V5IHN5c3RlbSkKKyAg KGxldCogKChuYW1lIChpZiBzeXN0ZW0KKyAgICAgICAgICAgICAgICAgICAo c3RyaW5nLWFwcGVuZCAiZmhzLWxpYnMtIiBzeXN0ZW0pCisgICAgICAgICAg ICAgICAgICAgImZocy1saWJzIikpKQorICAgICh1bmlvbiBuYW1lCisgICAg ICAgICAgIHBhY2thZ2VzCisgICAgICAgICAgICM6b3B0aW9ucyBgKCM6c3lz dGVtICxzeXN0ZW0pKSkpCisKKyhkZWZpbmUgKGZocy1zcGVjaWFsLWZpbGVz LXNlcnZpY2UgY29uZmlnKQorICAiUmV0dXJuIHRoZSBsaXN0IG9mIHNwZWNp YWwgZmlsZXMgZm9yIHRoZSBmaHMgc2VydmljZSIKKyAgKGxldCogKChmaHMt bGliLXBhY2thZ2VzIChmaHMtY29uZmlndXJhdGlvbi1saWItcGFja2FnZXMg Y29uZmlnKSkKKyAgICAgICAgIChmaHMtbGliLXBhY2thZ2UtdW5pb25zIChh cHBlbmQgZmhzLWxpYi1wYWNrYWdlcworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBgKCwoZmhzLWxpYnMtdW5pb24gZmhzLWxp Yi1wYWNrYWdlcyAjOnN5c3RlbSAiaTY4Ni1saW51eCIpKSkpCisgICAgICAg ICAoZmhzLWdsaWJjLXNwZWNpYWwtZmlsZXMKKyAgICAgICAgICBgKCgiL2V0 Yy9sZC5zby5jYWNoZSIgLChwYWNrYWdlcy0+bGQuc28uY2FjaGUgZmhzLWxp Yi1wYWNrYWdlLXVuaW9ucykpCisgICAgICAgICAgICAoIi9ldGMvbGQuc28u Y29uZiIgLChwYWNrYWdlcy0+bGQuc28uY29uZiBmaHMtbGliLXBhY2thZ2Ut dW5pb25zKSkgOztOb3QgbmVlZGVkIHRvIGZ1bmN0aW9uLCBidXQgcHV0IGl0 IGhlcmUgYW55d2F5IGZvciBkZWJ1Z2dpbmcgcHVycG9zZXMKKyAgICAgICAg ICAgICgiL2xpYjY0L2xkLWxpbnV4LXg4Ni02NC5zby4yIiAsKGZpbGUtYXBw ZW5kIChjYW5vbmljYWwtcGFja2FnZSBnbGliYy1mb3ItZmhzKSAiL2xpYi9s ZC1saW51eC14ODYtNjQuc28uMiIpKQorICAgICAgICAgICAgKCIvbGliL2xk LWxpbnV4LnNvLjIiICwoZmlsZS1hcHBlbmQgKGNhbm9uaWNhbC1wYWNrYWdl ICgzMmJpdC1wYWNrYWdlIGdsaWJjLWZvci1maHMpKSAiL2xpYi9sZC1saW51 eC5zby4yIikpKSkKKyAgICAgICAgIDs7ICAgICAgICAgICAgICgiL2Zocy9s aWJzIiAsKGZpbGUtYXBwZW5kIChjYW5vbmljYWwtcGFja2FnZSBmaHMtbGli cy02NCkgIi9saWIiKSkKKyAgICAgICAgIChmaHMtYWRkaXRpb25hbC1zcGVj aWFsLWZpbGVzIChmaHMtY29uZmlndXJhdGlvbi1hZGRpdGlvbmFsLXNwZWNp YWwtZmlsZXMgY29uZmlnKSkpCisgICAgKGFwcGVuZCBmaHMtZ2xpYmMtc3Bl Y2lhbC1maWxlcworICAgICAgICAgICAgZmhzLWFkZGl0aW9uYWwtc3BlY2lh bC1maWxlcykpKQorCisoZGVmaW5lIChmaHMtcHJvZmlsZS1zZXJ2aWNlIGNv bmZpZykKKyAgIlJldHVybiB0aGUgbGlzdCBvZiBwYWNrYWdlcyB0byBhZGQg dG8gdGhlIHN5c3RlbSBwcm9maWxlIgorICA7OyBHZXQgbGlzdCBvZiBwYWNr YWdlcyBmcm9tIGNvbmZpZyB0byBhZGQgdG8gc3lzdGVtIHByb2ZpbGUgYW5k IHJldHVybiB0aGVtCisgIChmaHMtY29uZmlndXJhdGlvbi1hZGRpdGlvbmFs LXByb2ZpbGUtcGFja2FnZXMgY29uZmlnKSkKKworCisoZGVmaW5lIGZocy1i aW5hcmllcy1jb21wYXRpYmlsaXR5LXNlcnZpY2UtdHlwZQorICAoc2Vydmlj ZS10eXBlIChuYW1lICdmaHMtY29tcGF0aWJpbGl0eS1zZXJ2aWNlKQorICAg ICAgICAgICAgICAgIChleHRlbnNpb25zCisgICAgICAgICAgICAgICAgIChs aXN0IChzZXJ2aWNlLWV4dGVuc2lvbiBzcGVjaWFsLWZpbGVzLXNlcnZpY2Ut dHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgZmhzLXNwZWNpYWwtZmlsZXMtc2VydmljZSkKKyAgICAgICAgICAgICAg ICAgICAgICAgKHNlcnZpY2UtZXh0ZW5zaW9uIHByb2ZpbGUtc2VydmljZS10 eXBlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBmaHMtcHJvZmlsZS1zZXJ2aWNlKQorICAgICAgICAgICAgICAgICAgICAg ICApKQorICAgICAgICAgICAgICAgIChkZXNjcmlwdGlvbgorICAgICAgICAg ICAgICAgICAiU3VwcG9ydCBiaW5hcmllcyBjb21waWxlZCBmb3IgdGhlIGZp bGVzeXN0ZW0gaGllcmFyY2h5IHN0YW5kYXJkLiIpCisgICAgICAgICAgICAg ICAgKGRlZmF1bHQtdmFsdWUgKGZocy1jb25maWd1cmF0aW9uKSkpKQorCiso ZGVmaW5lIGZocy1iaW5hcmllcy1jb21wYXRpYmlsaXR5LXNlcnZpY2UKKyAg KHNlcnZpY2UgZmhzLWJpbmFyaWVzLWNvbXBhdGliaWxpdHktc2VydmljZS10 eXBlKSkK ------------=_1561503638-25784-1--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: <pkill9@HIDDEN> Subject: bug#36382: Acknowledgement (A service for adding support for running portable binaries built for most linux distributions that use the filesystem hierarchy standard) Message-ID: <handler.36382.B.15615036524078.ack <at> debbugs.gnu.org> References: <E1hfuQY-00072D-74@HIDDEN> X-Gnu-PR-Message: ack 36382 X-Gnu-PR-Package: guix-patches Reply-To: 36382 <at> debbugs.gnu.org Date: Tue, 25 Jun 2019 23:01:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 36382 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 36382: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36382 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#36382] A service for adding support for running portable binaries built for most linux distributions that use the filesystem hierarchy standard Resent-From: Efraim Flashner <efraim@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Thu, 04 Jul 2019 07:17:02 +0000 Resent-Message-ID: <handler.36382.B36382.15622245993592 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 36382 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: pkill9@HIDDEN Cc: 36382 <at> debbugs.gnu.org Received: via spool by 36382-submit <at> debbugs.gnu.org id=B36382.15622245993592 (code B ref 36382); Thu, 04 Jul 2019 07:17:02 +0000 Received: (at 36382) by debbugs.gnu.org; 4 Jul 2019 07:16:39 +0000 Received: from localhost ([127.0.0.1]:50275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hivyw-0000vr-18 for submit <at> debbugs.gnu.org; Thu, 04 Jul 2019 03:16:39 -0400 Received: from flashner.co.il ([178.62.234.194]:37288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <efraim@HIDDEN>) id 1hivys-0000vb-Jq for 36382 <at> debbugs.gnu.org; Thu, 04 Jul 2019 03:16:35 -0400 Received: from localhost (unknown [94.230.83.247]) by flashner.co.il (Postfix) with ESMTPSA id BD7D24024D; Thu, 4 Jul 2019 07:16:27 +0000 (UTC) Date: Thu, 4 Jul 2019 10:16:26 +0300 From: Efraim Flashner <efraim@HIDDEN> Message-ID: <20190704071626.GC1085@macbook41> References: <E1hfuQY-00072D-74@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tqI+Z3u+9OQ7kwn0" Content-Disposition: inline In-Reply-To: <E1hfuQY-00072D-74@HIDDEN> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Score: -0.0 (/) 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 (-) --tqI+Z3u+9OQ7kwn0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've added some inline notes. My computer isn't powerful enough to really test it out, but I've heard that you've had success with it as it currently is. On Wed, Jun 26, 2019 at 12:00:38AM +0100, pkill9@HIDDEN wrote: > Hi Guix, for a while now I have been using a service I wrote that allows = you to run portable binaries, such as AppImages, which expect to be run on = distros that respect the filesystem hierarchy standard i.e store required l= ibraries in /usr, /lib, etc, which is most distros. >=20 > I think it could be a valuable tool to have in Guix, as it allows you to = run software that hasn't yet been packaged in Guix that is distributed as b= inaries by the author. Also, if builds are failing in Guix, it's useful to = have the alternative - for example, calibre currently can't be built due to= build failure of a dependency (qtwebkit), so I use the Calibre tar bundle = distributed by the website for now. >=20 > This still requires some work before it's ready for inclusion in Guix - d= ecisions on how it's implemented need to be made, and the code needs cleanu= p. But if I don't submit it in it's imperfect state, i won't get anything d= one on it. >=20 > I've done a little writeup on how it works here: http://miha.info/2019/Ju= ne/24/guix-fhs-service >=20 > I've attached a patch for it. To build a guix system with it, add to the = guix system services: >=20 > (service fhs-binaries-compatibility-service-type > (fhs-configuration > (lib-packages <list of package objects to provide libraries for the b= inaries>) > (additional-special-files <more special files to add>) > (additional-profile-packages <packages to add to system profile>))) >=20 > The additional-special-files and additional-profile-packages are function= ally exactly the same as using special-files-service-type and profile-servi= ce-type separately, it's purely for organising the config so the admin know= s why those special files and profile packages were added. >=20 >=20 >=20 >=20 >=20 > diff --git a/gnu/services/fhs.scm b/gnu/services/fhs.scm > new file mode 100644 > index 0000000..9ca6ab9 > --- /dev/null > +++ b/gnu/services/fhs.scm > @@ -0,0 +1,140 @@ > +(define-module (gnu services fhs) > + #:use-module (ice-9 ftw) ;; for creating recursive list of directories= of libs for FHS #:use-module (guix download) > + #:use-module (srfi srfi-1) ;; For filter-map > + #:use-module (guix records) ;; For defining record types > + #:use-module (guix profiles) ;; for manifest-entries > + #:use-module (gnu services) ;; For defining services > + #:use-module (guix gexp) ;; For computed-file and other things > + #:use-module (guix packages) ;; For package > + #:use-module (gnu packages) ;; For specifications->manifest > + #:use-module (gnu packages base) ;; For glibc > + > + #:export (fhs-binaries-compatibility-service-type > + fhs-binaries-compatibility-service > + fhs-configuration)) > + > +(define (32bit-package pkg) > + (package (inherit pkg) > + (name (string-append (package-name pkg) "-i686-linux")) > + (arguments > + `(#:system "i686-linux" > + ,@(package-arguments pkg))))) This one should probably be parameterized so x86_64 -> i686 and aarch64 -> armhf. Duplicating it and making one i686-package and the second armhf-package would be easier though. > + > +(define glibc-for-fhs > + (package (inherit glibc) > + (name "glibc-for-fhs") ;; Maybe rename this to "glibc-with-ld= config-for-fhs" > + (source (origin > + (inherit (package-source glibc)) > + (snippet #f))))) ;; Re-enable ldconfig > + > + > +(define (packages->ld.so.conf packages) > + (computed-file > + "ld.so.conf" > + (with-imported-modules > + `((guix build union) > + (guix build utils)) > + #~(begin > + (use-modules (guix build union) > + (guix build utils)) > + (let* ((packages '#$packages) ;; Need to quote "#$packages" as #= $packages tries to "apply" the first item to the rest, like a procedure. > + (find-lib-directories-in-single-package > + (lambda (package) > + (find-files (string-append package "/lib") > + (lambda (file stat) > + ;; setting keyword "stat" to "stat" mean= s it will follow > + ;; symlinks, unlike what it's set to by = default ("lstat"). > + (eq? 'directory (stat:type stat))) > + #:stat stat > + #:directories? #t))) > + (find-lib-directories-in-all-packages > + (lambda (packages) > + (apply append ;; Concatenate the directory lists from = "map" into one list > + (map (lambda (package) > + (find-lib-directories-in-single-package = package)) > + packages)))) > + (fhs-lib-dirs > + (find-lib-directories-in-all-packages packages))) > + (with-output-to-file > + #$output > + (lambda _ > + (format #t > + (string-join fhs-lib-dirs "\n")) > + #$output))))))) > + > +(define (ld.so.conf->ld.so.cache ld-conf) > + (computed-file "ld.so.cache" > + (with-imported-modules `((guix build utils)) > + #~(begin > + (use-modules (guix build uti= ls)) > + (let* ((ldconfig (string-app= end #$glibc-for-fhs "/sbin/ldconfig"))) > + (invoke ldconfig > + "-X" ;; Don't upda= te symbolic links > + "-f" #$ld-conf ;; = Use #$configuration as configuration file > + "-C" #$output)))))= ) ;; Use #$output as cache file > + > +(define (packages->ld.so.cache packages) > + (ld.so.conf->ld.so.cache (packages->ld.so.conf packages))) > + > +(define-record-type* <fhs-configuration> > + fhs-configuration > + make-fhs-configuration > + fhs-configuration? > + (lib-packages fhs-configuration-lib-packages > + (default '())) > + (additional-profile-packages fhs-configuration-additional-profile-p= ackages ;; For putting programs in $PATH and for share data > + (default '())) > + (additional-special-files fhs-configuration-additional-special-f= iles > + (default '()))) > + > +(define* (union name packages #:key options) > + (computed-file name > + (with-imported-modules `((guix build union)) > + #~(begin > + (use-modules (guix build uni= on)) > + (union-build #$output '#$pac= kages))) > + #:options options)) > + > +(define* (fhs-libs-union packages #:key system) > + (let* ((name (if system > + (string-append "fhs-libs-" system) > + "fhs-libs"))) > + (union name > + packages > + #:options `(#:system ,system)))) > + > +(define (fhs-special-files-service config) > + "Return the list of special files for the fhs service" > + (let* ((fhs-lib-packages (fhs-configuration-lib-packages config)) > + (fhs-lib-package-unions (append fhs-lib-packages > + `(,(fhs-libs-union fhs-lib-pack= ages #:system "i686-linux")))) The following might work, but likely needs tweaking ,(match %current-system ("x86_64-linux" (fhs-libs-union fhs-lib-packages #:system "i686-linux")) ("aarch64-linux" (fhs-libs-union fhs-lib-packages #:system "armhf-linux")) (_ '())) > + (fhs-glibc-special-files > + `(("/etc/ld.so.cache" ,(packages->ld.so.cache fhs-lib-package-= unions)) > + ("/etc/ld.so.conf" ,(packages->ld.so.conf fhs-lib-package-un= ions)) ;;Not needed to function, but put it here anyway for debugging purpo= ses Can the two above be rewritten as etc-service-type configs? (simple-service 'ld.so.cache etc-service-type `(("ld.so.cache" ,(package->ld.so.cache fhs-= lib-package-unions)))) (simple-service 'ld.so.conf etc-service-type `(("ld.so.conf" ,(package->ld.so.conf fhs-li= b-package-unions)))) > + ("/lib64/ld-linux-x86-64.so.2" ,(file-append (canonical-pack= age glibc-for-fhs) "/lib/ld-linux-x86-64.so.2")) > + ("/lib/ld-linux.so.2" ,(file-append (canonical-package (32bi= t-package glibc-for-fhs)) "/lib/ld-linux.so.2")))) This I'd probably go with match also and point you at (gnu packages bootstrap) for the other ones. > + ;; ("/fhs/libs" ,(file-append (canonical-package fh= s-libs-64) "/lib")) > + (fhs-additional-special-files (fhs-configuration-additional-spe= cial-files config))) > + (append fhs-glibc-special-files > + fhs-additional-special-files))) > + > +(define (fhs-profile-service config) > + "Return the list of packages to add to the system profile" > + ;; Get list of packages from config to add to system profile and retur= n them > + (fhs-configuration-additional-profile-packages config)) > + > + > +(define fhs-binaries-compatibility-service-type > + (service-type (name 'fhs-compatibility-service) > + (extensions > + (list (service-extension special-files-service-type > + fhs-special-files-service) > + (service-extension profile-service-type > + fhs-profile-service) > + )) > + (description > + "Support binaries compiled for the filesystem hierarchy= standard.") > + (default-value (fhs-configuration)))) > + This one you probably don't need since we want all the services to be foo-bar-service-type. > +(define fhs-binaries-compatibility-service > + (service fhs-binaries-compatibility-service-type)) One last note, since I don't want to go back and re-edit all my previous notes: I would change the service to take an architecture keyword, so that this can be combined with the qemu-binfmt service without having to do fancy footwork to see which architectures are supported and which ones aren't at any given time on a machine. Then someone could put: (service fhs-binaries-compatibility-service-type config =3D> (fhs-configuration (inherit config) (architectures '("x86_64-linux" "i686-linux" "armhf-linux")))) I don't think I'd go so far as to extend the binfmt service though, but that's just me. I'm not sure how that'd work with someone explicitly adding some other architectures and marking 'with-guix-support #t' --=20 Efraim Flashner <efraim@HIDDEN> =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --tqI+Z3u+9OQ7kwn0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl0dp8YACgkQQarn3Mo9 g1EWsBAAgMtEjuQQ9jh9OaI46B3g6wlHeMOSjlRD5wzFRNSMt2Z3F0c2p+fp6b0F NHbj8bMxrAY2yki6ME8FnP/T2I15IBOLhrj8+lZohTY62P0wuTPEuxkrdn1WHW7e oUH3rRrUNXBg10qnu2lrrdVYujEDFBiiFzC6P2tbaT7MynM+nhToZMqwz4FaVs2Y 5i4b16rN4OrtKD9Lr1PNYURh8Y4SR9S0/0/+3Nk8TVgRt3SrqvpHv7xem2lX93AL OpJ8sH20GK0DqmQwGnnjD4jWUFAXdpOIGGjdjx8hQ++L17brXx7MMGxlnL3wty1p CdpAEaMV59hrLdDXXFLhV4x+gIE99yIsL8CsMS16cJRD8amWNwJZS0LAO7UR6Puj GySKeB3v53j3NgnREh7it+Aii/pEF7hQgUhgo1a7FjStL20NeRLlweO84f75ENFM akpFOGXIutnADzBujmRLnu+xq5SHswjhPRd5TRKfDniqBx67OR40JSWCVoxrNKgv 7y81Iqc87uFjOUtWYr/uFBMe0VwM24LVsiktfbHvyqy5ZgvkgFVnPK1e+9J4Mksy g6pwzhFBwFY0YU3AskkoacpHtYzxGajdyC+WGVqKH57QE8o7MLtUYDQx0NQ41huX ChWffxNjCmfa4LCl2b5QcKln3qc1jAXckAbJGwQkLjDDXajO4VA= =yUmw -----END PGP SIGNATURE----- --tqI+Z3u+9OQ7kwn0--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.