<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/gnu/build/install.scm, branch version-1.4.0</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>install: 'umount-cow-store' retries upon EBUSY.</title>
<updated>2022-12-10T13:34:35+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2022-12-10T13:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=61b7e9687757aff013b99e4ab15669a950c8b222'/>
<id>61b7e9687757aff013b99e4ab15669a950c8b222</id>
<content type='text'>
Possibly fixes &lt;https://issues.guix.gnu.org/59884&gt;.

* gnu/build/install.scm (umount*): New procedure.
(unmount-cow-store): Use it instead of 'umount'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Possibly fixes &lt;https://issues.guix.gnu.org/59884&gt;.

* gnu/build/install.scm (umount*): New procedure.
(unmount-cow-store): Use it instead of 'umount'.
</pre>
</div>
</content>
</entry>
<entry>
<title>install: Validate symlink target in evaluate-populate-directive.</title>
<updated>2022-11-15T19:15:11+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2022-10-26T03:17:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=0bb872b379a98e4523c8f8d946e581bad1c4c323'/>
<id>0bb872b379a98e4523c8f8d946e581bad1c4c323</id>
<content type='text'>
* gnu/build/install.scm (evaluate-populate-directive): By default, error when
the target of a symlink doesn't exist.  Always ensure TARGET ends with "/".
(populate-root-file-system): Call evaluate-populate-directive with
 #:error-on-dangling-symlink #t and add comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/build/install.scm (evaluate-populate-directive): By default, error when
the target of a symlink doesn't exist.  Always ensure TARGET ends with "/".
(populate-root-file-system): Call evaluate-populate-directive with
 #:error-on-dangling-symlink #t and add comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>store-copy: 'populate-store' can optionally deduplicate files.</title>
<updated>2020-12-15T16:32:10+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-12-10T14:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=6a060ff27ff68384d7c90076baa36c349fff689d'/>
<id>6a060ff27ff68384d7c90076baa36c349fff689d</id>
<content type='text'>
Until now deduplication was performed as an additional pass after
copying files, which involve re-traversing all the files that had just
been copied.

* guix/store/deduplication.scm (copy-file/deduplicate): New procedure.
* tests/store-deduplication.scm ("copy-file/deduplicate"): New test.
* guix/build/store-copy.scm (populate-store): Add #:deduplicate?
parameter and honor it.
* tests/gexp.scm ("gexp-&gt;derivation, store copy"): Pass #:deduplicate? #f
to 'populate-store'.
* gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate?
to 'populate-store'.  Pass #:deduplicate? #f to 'register-closure'.
* gnu/build/vm.scm (root-partition-initializer): Likewise.
* gnu/build/install.scm (populate-single-profile-directory): Pass
 #:deduplicate? #f to 'populate-store'.
* gnu/build/linux-initrd.scm (build-initrd): Likewise.
* guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New
procedure.
[build]: Pass it as an argument to 'source-module-closure'.
* guix/scripts/pack.scm (squashfs-image)[build]: Wrap in
'with-extensions'.
* gnu/system/linux-initrd.scm (expression-&gt;initrd)[import-module?]: New
procedure.
[builder]: Pass it to 'source-module-closure'.
* gnu/system/install.scm (cow-store-service-type)[import-module?]: New
procedure.  Pass it to 'source-module-closure'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until now deduplication was performed as an additional pass after
copying files, which involve re-traversing all the files that had just
been copied.

* guix/store/deduplication.scm (copy-file/deduplicate): New procedure.
* tests/store-deduplication.scm ("copy-file/deduplicate"): New test.
* guix/build/store-copy.scm (populate-store): Add #:deduplicate?
parameter and honor it.
* tests/gexp.scm ("gexp-&gt;derivation, store copy"): Pass #:deduplicate? #f
to 'populate-store'.
* gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate?
to 'populate-store'.  Pass #:deduplicate? #f to 'register-closure'.
* gnu/build/vm.scm (root-partition-initializer): Likewise.
* gnu/build/install.scm (populate-single-profile-directory): Pass
 #:deduplicate? #f to 'populate-store'.
* gnu/build/linux-initrd.scm (build-initrd): Likewise.
* guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New
procedure.
[build]: Pass it as an argument to 'source-module-closure'.
* guix/scripts/pack.scm (squashfs-image)[build]: Wrap in
'with-extensions'.
* gnu/system/linux-initrd.scm (expression-&gt;initrd)[import-module?]: New
procedure.
[builder]: Pass it to 'source-module-closure'.
* gnu/system/install.scm (cow-store-service-type)[import-module?]: New
procedure.  Pass it to 'source-module-closure'.
</pre>
</div>
</content>
</entry>
<entry>
<title>install: Factorize cow-store procedure.</title>
<updated>2020-09-02T15:05:22+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2020-08-12T10:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=22827396baea149f193f6e9558b522e6d9c89a44'/>
<id>22827396baea149f193f6e9558b522e6d9c89a44</id>
<content type='text'>
Move the cow-store procedure from the service declaration in (gnu system
install) to (gnu build install), so that it can be called from within a
different context than Shepherd.

* gnu/build/install.scm (mount-cow-store, unmount-cow-store): New procedures.
* gnu/system/install.scm (make-cow-store): Remove it,
(cow-store-service-type): adapt it accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the cow-store procedure from the service declaration in (gnu system
install) to (gnu build install), so that it can be called from within a
different context than Shepherd.

* gnu/build/install.scm (mount-cow-store, unmount-cow-store): New procedures.
* gnu/system/install.scm (make-cow-store): Remove it,
(cow-store-service-type): adapt it accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into core-updates</title>
<updated>2020-05-05T18:43:21+00:00</updated>
<author>
<name>Marius Bakke</name>
<email>mbakke@fastmail.com</email>
</author>
<published>2020-05-05T18:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=87a40d7203a813921b3ef0805c2b46c0026d6c31'/>
<id>87a40d7203a813921b3ef0805c2b46c0026d6c31</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>image: Add a new API.</title>
<updated>2020-05-05T14:13:53+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>m.othacehe@gmail.com</email>
</author>
<published>2020-04-28T12:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=f19cf27c2b9ff92e2c0fd931ef7fde39c376adaa'/>
<id>f19cf27c2b9ff92e2c0fd931ef7fde39c376adaa</id>
<content type='text'>
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This
is quite fragile, very slow, and almost unusable without KVM.

For all these reasons, add support for host image generation. This implies the
use new image generation mechanisms.

- Raw disk images: images of partitions are created using tools such as mke2fs
  and mkdosfs depending on the partition file-system type. The partition
  images are then assembled into a final image using genimage.

- ISO9660 images: the ISO root directory is populated within the store. GNU
  xorriso is then called on that directory, in the exact same way as this is
  done in (gnu build vm) module.

Those mechanisms are built upon the new (gnu image) module.

* gnu/image.scm: New file.
* gnu/system/image.scm: New file.
* gnu/build/image: New file.
* gnu/local.mk: Add them.
* gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm.
* gnu/ci.scm (qemu-jobs): Adapt to new API.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This
is quite fragile, very slow, and almost unusable without KVM.

For all these reasons, add support for host image generation. This implies the
use new image generation mechanisms.

- Raw disk images: images of partitions are created using tools such as mke2fs
  and mkdosfs depending on the partition file-system type. The partition
  images are then assembled into a final image using genimage.

- ISO9660 images: the ISO root directory is populated within the store. GNU
  xorriso is then called on that directory, in the exact same way as this is
  done in (gnu build vm) module.

Those mechanisms are built upon the new (gnu image) module.

* gnu/image.scm: New file.
* gnu/system/image.scm: New file.
* gnu/build/image: New file.
* gnu/local.mk: Add them.
* gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm.
* gnu/ci.scm (qemu-jobs): Adapt to new API.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>build: install: Do not set store GID.</title>
<updated>2020-05-05T14:08:33+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>m.othacehe@gmail.com</email>
</author>
<published>2020-05-05T12:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=892bbea750e5733979ee0423cbdfcea222b07925'/>
<id>892bbea750e5733979ee0423cbdfcea222b07925</id>
<content type='text'>
There's no need to set the store GID as is will be done by the guix-daemon,
with the following snippet:

  if (chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1)
        throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir);

* gnu/build/install.scm (directives): Do not set store GID.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no need to set the store GID as is will be done by the guix-daemon,
with the following snippet:

  if (chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1)
        throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir);

* gnu/build/install.scm (directives): Do not set store GID.
</pre>
</div>
</content>
</entry>
<entry>
<title>build: install: Ignore chown exceptions.</title>
<updated>2020-05-05T14:08:32+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>m.othacehe@gmail.com</email>
</author>
<published>2020-04-28T12:16:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=5990e95b607b888edd862a2ccb5ca69dcd17d801'/>
<id>5990e95b607b888edd862a2ccb5ca69dcd17d801</id>
<content type='text'>
Changing ownership may require root permissions. As image can now be generated
without root permissions (no VM involved), ignore those exceptions.

* gnu/build/install.scm (evaluate-populate-directive): Ignore chown
exceptions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changing ownership may require root permissions. As image can now be generated
without root permissions (no VM involved), ignore those exceptions.

* gnu/build/install.scm (evaluate-populate-directive): Ignore chown
exceptions.
</pre>
</div>
</content>
</entry>
<entry>
<title>install: 'populate-root-file-system' can be passed extra directives.</title>
<updated>2020-04-11T17:22:25+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-04-01T12:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=87241947aa2c0148a6f06989057a113c57ea9208'/>
<id>87241947aa2c0148a6f06989057a113c57ea9208</id>
<content type='text'>
* gnu/build/install.scm (evaluate-populate-directive): Handle 'file'
directives.
(populate-root-file-system): Add #:extras parameter and honor it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/build/install.scm (evaluate-populate-directive): Handle 'file'
directives.
(populate-root-file-system): Add #:extras parameter and honor it.
</pre>
</div>
</content>
</entry>
<entry>
<title>activation: Build account databases with (gnu build accounts).</title>
<updated>2019-03-07T19:05:09+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-03-03T22:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=0ae735bcc8ff7fdc89d67b492bdee9091ee19e86'/>
<id>0ae735bcc8ff7fdc89d67b492bdee9091ee19e86</id>
<content type='text'>
* gnu/build/activation.scm (enumerate, current-users, current-groups)
(add-group, add-user, modify-user, ensure-user): Remove.
(activate-users+groups)[touch, activate-user]: Remove.
[make-home-directory]: New procedure.
Rewrite in terms of 'user+group-databases', 'write-group', etc.
* gnu/build/install.scm (directives): Remove "/root".
* gnu/system/shadow.scm (account-activation): Remove (setenv "PATH" ...)
expression, which is now unneeded.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/build/activation.scm (enumerate, current-users, current-groups)
(add-group, add-user, modify-user, ensure-user): Remove.
(activate-users+groups)[touch, activate-user]: Remove.
[make-home-directory]: New procedure.
Rewrite in terms of 'user+group-databases', 'write-group', etc.
* gnu/build/install.scm (directives): Remove "/root".
* gnu/system/shadow.scm (account-activation): Remove (setenv "PATH" ...)
expression, which is now unneeded.
</pre>
</div>
</content>
</entry>
</feed>
