all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: myglc2 <myglc2@gmail.com>
To: help-guix@gnu.org
Subject: How do I control which guix 'system vm-image' puts into the image?
Date: Thu, 21 Jul 2016 15:45:50 -0400	[thread overview]
Message-ID: <cu760ryepw1.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

Running GuixSD I am using git checkout 'b006ba5 [behind 15] pull: Update
the version string.' with ‘/home/g1/.config/guix/latest’ ->
‘../../src/guix’

When I do 'guix system vm-image'; run the image; and do 'M-x
guix-installed-system-packages' I see a bunch of packages with a "-"
showing in the Synopsis column and "(This package is obsolete)" shows
in the "Outputs" field.

In an earlier exchange, Alex explained that this means that the version
of the package found in the store _does not match_ the package version
specified by the version of guix in use by emacs. I hope I got that
right :-0

'guix system reconfigure system.scm' seems to be using my git checkout
just fine because with ...

(with-eval-after-load 'geiser-guile
  (add-to-list 'geiser-guile-load-path "~/src/guix"))

... in my emacs init file, I don't see any "obsolete" packages when I do
'M-x guix-installed-system-packages'.

So... I developed the theory that 'guix system vm-image' was using a
obsolete version of guix from the store instead of the version in my my
git checkout (confused yet?).

So I add guix to 'system.scm' to put it in the store in hopes that 'guix
system vm_image' would pick it up from there. I still have "obsolete"
packages showing in my vm-image.

So... heeeeeere is the question:

How do I control which version of guix is built into an image?

TIA - George

Attached: script (img) used to make and run the vm-image and referenced configs.


[-- Attachment #2: img --]
[-- Type: application/octet-stream, Size: 1153 bytes --]

#!/run/current-system/profile/bin/bash
set -xe

# guix vm examples

# usage
# $ <scriptname> mk  [vm#] - mak image
# $ <scriptname> run [vm#] - run image

CMD=`basename "$0"`
VMNUM=${2:-""}
TMPDIR=$PWD/tmp/$CMD$VMNUM
mkdir -p $TMPDIR
cp $CMD $TMPDIR/$CMD

case $1 in
    mk)
	# save the vm config
	cp v1.scm $TMPDIR
	# save guix version 
	(stat $HOME/.config/guix/latest | grep File:) > $TMPDIR/guix-version
	# save guix config
	git -C ~/.config/guix/latest branch -av | grep '* master' >> $TMPDIR/guix-version
	# be sure the version of guix we have checked out is the one we are using
	make -C $HOME/.config/guix/latest -s > $TMPDIR/guix-make.log
	# make vm & copy image from of store
	cp -n $(guix system vm-image $TMPDIR/v1.scm --image-size=4GB) $TMPDIR/vm.img
	# make writeable
	chmod u+w $TMPDIR/vm.img
	;;

    run)
	# run the image
	# Note: '-k en-us' is a hack to get Mac XQuartz keys to "sort of work"
	qemu-system-x86_64 \
	    -net user \
	    -net nic,model=virtio \
	    -enable-kvm \
	    -m 4096 \
	    -k en-us \
	    $TMPDIR/vm.img
	;;

    *)

	echo ERROR: you typed: \"$CMD $*\" which has missing arguments or invalid arguments

esac

[-- Attachment #3: g1.scm --]
[-- Type: application/octet-stream, Size: 269 bytes --]

(use-package-modules
 base
 aspell ; aspell-dict-en
 emacs  ; geiser-next
 scheme ; sicp
 )
(packages->manifest
 (list
  aspell-dict-en ; because emacs doesn't find system install
  geiser-next    ; temporary for 'C-c C-d C-d' to work
  sicp           ; SICP Info
  ))

[-- Attachment #4: system.scm --]
[-- Type: application/octet-stream, Size: 1659 bytes --]

;;; g1 system config
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules
 base
 admin
 disk
 linux                 ; mdadm
 package-management    ; guix
 screen
 ghostscript           ; gs-fonts
 fonts                 ; font-dejavu font-gnu-freefont-ttf
 curl                  ;lpaste
 ssh
 rsync
 wget
 version-control       ; git
 aspell
 emacs
 autotools             ; automake
 texinfo
 gettext
 xorg certs
 graphviz
 qemu
 )
(operating-system
  (host-name "g1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
			(device "g1sd")
			(title 'label)
			(mount-point "/")
			(type "ext4"))
		      %base-file-systems))
  (users (cons* (user-account
		 (name "glc")
		 (group "users")
		 (supplementary-groups '("wheel"))
		 (home-directory "/home/glc"))
		(user-account
		 (name "g1")
		 (group "users")
		 (supplementary-groups '("wheel" "kvm"))
		 (home-directory "/home/g1"))
		(user-account
		 (name "g1x")
		 (group "users")
		 (supplementary-groups '("wheel" "kvm"))
		 (home-directory "/home/g1x"))
		%base-user-accounts))
  (packages
   (cons*
    glibc-utf8-locales
    parted
    mdadm
    qemu
    guix
    screen
    openssh nss-certs xauth
    rsync wget
    curl ;lpaste
    git git-manpages
    gs-fonts font-dejavu font-gnu-freefont-ttf
    aspell
    emacs
    flycheck paredit magit
    emacs-zenburn-theme emacs-markdown-mode emacs-web-mode 
    gnu-make
    texinfo
    automake
    graphviz
    %base-packages))
  (services (cons* (dhcp-client-service)
		   (lsh-service #:port-number 22)
		   %base-services)))

[-- Attachment #5: v1.scm --]
[-- Type: application/octet-stream, Size: 1659 bytes --]

;;; v1 system config
(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules
 base
 admin
 disk
 linux                 ; mdadm
 package-management    ; guix
 screen
 ghostscript           ; gs-fonts
 fonts                 ; font-dejavu font-gnu-freefont-ttf
 curl                  ;lpaste
 ssh
 rsync
 wget
 version-control       ; git
 aspell
 emacs
 autotools             ; automake
 texinfo
 gettext
 xorg certs
 graphviz
 qemu
 )
(operating-system
  (host-name "g1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
			(device "g1sd")
			(title 'label)
			(mount-point "/")
			(type "ext4"))
		      %base-file-systems))
  (users (cons* (user-account
		 (name "glc")
		 (group "users")
		 (supplementary-groups '("wheel"))
		 (home-directory "/home/glc"))
		(user-account
		 (name "g1")
		 (group "users")
		 (supplementary-groups '("wheel" "kvm"))
		 (home-directory "/home/g1"))
		(user-account
		 (name "g1x")
		 (group "users")
		 (supplementary-groups '("wheel" "kvm"))
		 (home-directory "/home/g1x"))
		%base-user-accounts))
  (packages
   (cons*
    glibc-utf8-locales
    parted
    mdadm
    qemu
    guix
    screen
    openssh nss-certs xauth
    rsync wget
    curl ;lpaste
    git git-manpages
    gs-fonts font-dejavu font-gnu-freefont-ttf
    aspell
    emacs
    flycheck paredit magit
    emacs-zenburn-theme emacs-markdown-mode emacs-web-mode 
    gnu-make
    texinfo
    automake
    graphviz
    %base-packages))
  (services (cons* (dhcp-client-service)
		   (lsh-service #:root-login? #t)
		   %base-services)))

             reply	other threads:[~2016-07-21 19:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 19:45 myglc2 [this message]
2016-07-21 20:32 ` How do I control which guix 'system vm-image' puts into the image? myglc2
2016-07-22 12:47 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cu760ryepw1.fsf@gmail.com \
    --to=myglc2@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.