From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Blog: Guix packaging tutorial Date: Mon, 08 Oct 2018 20:41:51 +0200 Message-ID: <87sh1g9t74.fsf@ambrevar.xyz> References: <87in397jsd.fsf@ambrevar.xyz> <20180913191151.GA1865@jurong> <87woro5ocf.fsf@ambrevar.xyz> <20180914113302.elqrk3tvdkln2cde@thebird.nl> <87o9cmj0fc.fsf@ambrevar.xyz> <87mus6iypf.fsf@ambrevar.xyz> <87zhw02ea9.fsf@mdc-berlin.de> <87o9cex112.fsf@ambrevar.xyz> <87efdau5x2.fsf@gnu.org> <87murywuvn.fsf@ambrevar.xyz> <87lg7go8cv.fsf@gnu.org> <87va6kuyk4.fsf@ambrevar.xyz> <87sh1ot9m5.fsf@elephly.net> <87bm8bv4ao.fsf@ambrevar.xyz> <874le2j3ox.fsf@ambrevar.xyz> <87o9c4qxek.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9aTi-000394-7k for guix-devel@gnu.org; Mon, 08 Oct 2018 14:42:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9aTh-0005yk-57 for guix-devel@gnu.org; Mon, 08 Oct 2018 14:42:02 -0400 In-reply-to: <87o9c4qxek.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel , guix-blog@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Usually files resulting from a checkout are read-only, so perhaps you > need to make a bunch of files writable before the =E2=80=98check=E2=80=99= phase. For a > start you could do: > > (for-each make-file-writable (find-files "tests")) Damn, bitten by this again! It's not the first time and it seems that I fa= il to learn from my mistakes :p I've modified the 'unpack phase instead to avoid changing directory: =2D-8<---------------cut here---------------start------------->8--- (add-after 'unpack 'make-files-writable-for-tests (lambda _ (for-each make-file-writable (find-files "." ".*"))))))) =2D-8<---------------cut here---------------end--------------->8--- It works now, thanks! Ricardo Wurmus writes: > * I wonder if maybe we should avoid using =E2=80=9Cguix package=E2=80=9D = for the first > example and use =E2=80=9Cguix build=E2=80=9D instead. The reason is th= at =E2=80=9Cguix > package=E2=80=9D might cause additional builds to be performed dependen= t on > the state of the user=E2=80=99s default profile (because of profile hoo= ks). > Using =E2=80=9Cguix build=E2=80=9D bypasses this issue completely. Wha= t do you think? Hmm... Installing a package is something more familiar than just "building". Besides, with the new "cleaner" output, it's only a few lines which the use= r is going to see all the time, so I don't think there is much complexity we can trim here. If we first build, then package, it makes the "easy" example an extra step = more complicated. > * =E2=80=9CCreate a folder=E2=80=9D =E2=80=93> =E2=80=9CCreate a director= y=E2=80=9D; =E2=80=9Cfolder=E2=80=9D is a GUI metaphor, > but that=E2=80=99s nitpicking to be fair. I prefer =E2=80=9Cdirectory= =E2=80=9D, but use > =E2=80=9Cfolder=E2=80=9D if you find it better :) Funny, I did not know that :p What is the GUI metaphor precisely? I person= ally prefer "folder" for the simple reason that it's shorter, but I don't mind changing ;) > This is usually true, but the meaning of =E2=80=9Cnative-inputs=E2=80= =9D is primarily > important for cross-building packages. A native input will be used on > the build machine and should thus be available for the build machine=E2= =80=99s > architecture, not for the target machine. Since Guix scans for > references, packages that are only needed at build time will not be > installed even when they are among the plain =E2=80=9Cinputs=E2=80=9D. = Likewise, > packages that are in the =E2=80=9Cnative-inputs=E2=80=9D may end up lea= ving a > reference behind, which will cause them to be downloaded. (This is > often a bug, such as in the icedtea packages, which keep unwanted > references.) > > Not sure if we should change this in the tutorial, because it=E2=80=99s= a > finer point. The distinction between inputs and propagated-inputs is > more important and I think it=E2=80=99s done well in your draft. Indeed, I think it's too complicated at this stage. Case in point, your paragraph is quite long ;) I'd rather skip this. > * I don=E2=80=99t know if there should be a section =E2=80=9CCommon pitfa= lls and best > practices=E2=80=9D other than to point to the checklist in the manual. = If the > list in the manual misses one of the points I=E2=80=99d rather add them= there > and only link to the list. I agree. I'll merge this list with the manual then. > * The section on =E2=80=9CRecursive importers=E2=80=9D does not mention a= ny recursive > importers :) How about using the CRAN importer here, which supports > recursive importing with the =E2=80=9C-r=E2=80=9D option? Hmm... I can't get this to work. =2D-8<---------------cut here---------------start------------->8--- guix import cran --recursive lubridate =2D-8<---------------cut here---------------end--------------->8--- returns only one package. In fact, the "-r,--recursive" flag is missing fr= om the `guix import cran -h` documentation (while it's there for pipy). I can= not get it to work for pipy either. Do you have a working example? I've applied all you other suggestions. Thank you Ricardo for this second thorough review! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlu7pO8ACgkQm9z0l6S7 zH+GlAgAkBUyHi6lentwwUbIZ3EL5MA8+TkEXNMhn7Goi064Z3EfZCgIQviyfMa5 4vXwL+y6DXy2AsirjJ2mmo8EzSAvcibrr2sn681D+jHdkzcKciOFhNndslK7PVg9 LCiJ03i7P1fSZlJmttAL2u4DdPJK+uthhRhF0Xyu1Y79yA6JxytEo0T8k47ae1g+ RH1/DwgAt/g/K81w5hdvbCaL8Fbbd2vO8ZaOoddVIMOVU1lZsI9B+rL00Jd3UsnG G7nBt58yH6X9z7gYaQFItaPyOzlGKucFNeXApvrslwzeS+lyRTBs+Jaus5d7lHkW ajutjw4lalANYub/Fa0sm5wkr/DRvw== =LQgH -----END PGP SIGNATURE----- --=-=-=--