[PATCH] Sddm pam authentication failure.

2016-08-27 Thread David Craven
So I got sddm to start an xfce session when I build sddm with -DENABLE_PAM=OFF.

Any ideas what the problem might be? I tried all kinds of stuff to get PAM to
give me some more information than authentication failure. The /etc/pam_debug
file didn't work. Compiling PAM with --enable-debug didn't work. I enabled *.*
to /var/log/messages in syslog.conf and finally I tried inserting pam_debug.so
rules.

I'm also having trouble starting weston from sddm. I think it's because
XDG_RUNTIME_DIR isn't set. Who is responsible for setting it?

sddm or elogind are plausible options. I looked at the XDG Directory
Specification but couldn't find a straight answer.

David Craven (1):
  services: Add sddm service.

 gnu/local.mk  |   1 +
 gnu/services/sddm.scm | 312 ++
 2 files changed, 313 insertions(+)
 create mode 100644 gnu/services/sddm.scm

-- 
2.9.0



[PATCH] services: Add sddm service.

2016-08-27 Thread David Craven
* gnu/services/sddm.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk  |   1 +
 gnu/services/sddm.scm | 312 ++
 2 files changed, 313 insertions(+)
 create mode 100644 gnu/services/sddm.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 8c2f6b4..89a4783 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -390,6 +390,7 @@ GNU_SYSTEM_MODULES =\
   %D%/services/networking.scm  \
   %D%/services/shepherd.scm\
   %D%/services/herd.scm\
+  %D%/services/sddm.scm\
   %D%/services/spice.scm   \
   %D%/services/ssh.scm \
   %D%/services/web.scm \
diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
new file mode 100644
index 000..e6e2828
--- /dev/null
+++ b/gnu/services/sddm.scm
@@ -0,0 +1,312 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 services sddm)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages hawaii)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu services)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu services xorg)
+  #:use-module (gnu system pam)
+  #:use-module (gnu system shadow)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:export (sddm-configuration
+sddm-confiugration?
+sddm-service-type
+sddm-service))
+
+(define-record-type* 
+  sddm-configuration  make-sddm-configuration
+  sddm-configuration?
+  (sddm   sddm-configuration-sddm
+  (default sddm))
+  (allow-empty-passwords? sddm-configuration-allow-empty-passwords?
+  (default #t))
+
+  ;; [General]
+  ;; valid values are x11 and wayland
+  ;; currently doesn't do anything is enabled by wayland greeter PR
+  (display-server sddm-configuration-display-server
+  (default "x11"))
+  ;; valid values are on, off or none
+  (numlocksddm-configuration-numlock
+  (default "on"))
+  (halt-command   sddm-configuration-halt-command
+  (default #~(string-append #$shepherd "/sbin/halt")))
+  (reboot-command sddm-configuration-reboot-command
+  (default #~(string-append #$shepherd 
"/sbin/reboot")))
+
+  ;; [Theme]
+  ;; valid values are elarun or maldives
+  (theme  sddm-configuration-theme
+  (default "maldives"))
+  (themes-directory   sddm-configuration-themes-directory
+  (default #~(string-append #$sddm 
"/share/sddm/themes")))
+  (faces-directorysddm-configuration-faces-directory
+  (default #~(string-append #$sddm 
"/share/sddm/faces")))
+
+  ;; [Users]
+  (default-path   sddm-configuration-default-path
+  (default "/run/current-system/profile/bin"))
+  (minimum-uidsddm-configuration-minimum-uid
+  (default 1000))
+  (maximum-uidsddm-configuration-maximum-uid
+  (default 2000))
+  (remember-last-user?sddm-configuration-remember-last-user?
+  (default #t))
+  (remember-last-session? sddm-configuration-remember-last-session?
+  (default #t))
+  (hide-users sddm-configuration-hide-users
+  (default ""))
+  (hide-shellssddm-configuration-hide-shells
+  (default #~(string-append #$shadow "/sbin/nologin")))
+
+  ;; [Wayland]
+  (session-commandsddm-configuration-session-command
+  (default #~(string-append #$sddm 
"/share/sddm/scripts/wayland-session")))
+  (sessions-directory sddm-configuration-sessions-directory
+  (default 
"/r

[PATCH] gnu: Add sddm.

2016-08-27 Thread David Craven
* gnu/packages/hawaii.scm (sddm): New variable.
---
 gnu/packages/hawaii.scm | 65 +
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/hawaii.scm b/gnu/packages/hawaii.scm
index fbf642b..8c99e5f 100644
--- a/gnu/packages/hawaii.scm
+++ b/gnu/packages/hawaii.scm
@@ -17,6 +17,7 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages hawaii)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gl)
@@ -34,6 +35,7 @@
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module ((guix licenses) #:prefix license:))
 
@@ -382,3 +384,66 @@ It contains a Qt platform theme plugin, session manager, 
QML plugins and a
 convergent shell for multiple form factors such as desktops, netbooks, phones
 and tablets.")
 (license (list license:gpl2+ license:lgpl2.1+
+
+(define-public sddm
+  (package
+(name "sddm")
+(version "0.13.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/sddm/sddm";
+"/releases/download/v" version "/"
+"sddm-" version ".tar.xz"))
+  (sha256
+   (base32
+"0z9lvlb01np9ygdwhy0v4m3cpbfm8bj7jfwzg6nkwy7prjm8r1nx"
+(build-system cmake-build-system)
+(native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)
+   ("pkg-config" ,pkg-config)
+   ("qttools" ,qttools)))
+(inputs
+ `(("glib" ,glib)
+   ("greenisland" ,greenisland)
+   ("libxcb" ,libxcb)
+   ("libxkbcommon" ,libxkbcommon)
+   ("linux-pam" ,linux-pam)
+   ("qtbase" ,qtbase)
+   ("qtdeclarative" ,qtdeclarative)
+   ("shadow" ,shadow)
+   ("wayland" ,wayland)))
+(arguments
+ `(#:configure-flags
+   (list
+;; Currently doesn't do anything
+;; Option added by enable wayland greeters PR
+"-DENABLE_WAYLAND=ON"
+"-DENABLE_PAM=OFF"
+"-DCONFIG_FILE=/etc/sddm.conf"
+;; Set path to /etc/login.defs
+;; Alternatively use -DUID_MIN and -DUID_MAX
+(string-append "-DLOGIN_DEFS_PATH="
+   (assoc-ref %build-inputs "shadow")
+   "/etc/login.defs")
+(string-append "-DQT_IMPORTS_DIR="
+   (assoc-ref %outputs "out") "/qml")
+(string-append "-DCMAKE_INSTALL_SYSCONFDIR="
+   (assoc-ref %outputs "out") "/etc"))
+   #:modules ((guix build cmake-build-system)
+  (guix build qt-utils)
+  (guix build utils))
+   #:imported-modules (,@%cmake-build-system-modules
+   (guix build qt-utils))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'install 'wrap-programs
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (wrap-qt-program out "sddm")
+   (wrap-qt-program out "sddm-greeter")
+   #t))
+(synopsis "QML based X11 and Wayland display manager")
+(description "QML based X11 and Wayland display manager.")
+(home-page "https://github.com/sddm/sddm";)
+(license license:gpl2)))
-- 
2.9.0



Re: [PATCH] Sddm pam authentication failure.

2016-08-27 Thread David Craven
So it looks like elogind sets XDG_RUNTIME_DIR. Need to fix the pam
issue and then the weston session will hopefully just work (just
kidding, like that ever happens =P)



Re: [PATCH 05/31] gnu: Add kactivities.

2016-08-28 Thread David Craven
> I didn't look at the list too much, but it looks like it depends on a
> lot of the packages that are also part of this patch set. IMO it should
> be moved to the end of the patch set, but in any case make sure not to
> push this one before all of the packages it depends on are pushed.

There are a lot of package interdependencies in this patchset. The
packages are sorted alphabetically within their tiers. Reordering the
commits to build individually is a lot of work, I think it's best to
commit them all at once... The packages are already getting stale
(since 5.25.0 is out). I think it would be good to consider this an
initial import and fix issues as we go. (I'll fix the things already
mentioned of course)



Re: [PATCH 06/11] gnu: Add python-sh.

2016-08-28 Thread David Craven
Thanks for your suggestions. I pushed the packages.

Is there a git repo somewhere I can pull your uboot stuff from? I'd
like to test it =)

I'm interested in starting a riscv port of guixsd at some point. I've
identified some blocking issues I think need to be addressed first to
make it feasible:

1. getting guix system vm running on arm/mips (requires uboot working)
2. offloading builds to a vm (since riscv won't have (commercially)
available soc's till next year)
3. updating the default gcc to a recent version (preferably gcc 6)

So I'm willing to invest some quality time with these issues...



Re: [PATCH 1/2] gnu: Add libtsm.

2016-08-28 Thread David Craven
I updated the license information for the packages. It's an
improvement over what was already commited. I called it a isc derived
license. If someone wants me to take further steps I need clear
instructions on how to proceed. =)



Re: [PATCH 01/31] gnu: qtbase: Add native search paths.

2016-08-28 Thread David Craven
> Will this result in mass rebuilds?  If so this should be pushed to
> core-updates.

I too think that it's below the core updates threshold...



Re: Offloading to a VM

2016-08-28 Thread David Craven
> --8<---cut here---start->8---
> $ qemu-arm $(guix build coreutils -s armhf-linux |grep -v debug)/bin/uname -a
> Linux pluto 4.7.0-gnu #1 SMP 1 armv7l GNU/Linux
> $ uname -a
> Linux pluto 4.7.0-gnu #1 SMP 1 x86_64 GNU/Linux
> --8<---cut here---end--->8---

If I understand correctly this only works when there is a substitute
already. If it's a new package for example that would fail with "not
an armhf system" right?



Re: 02/02: gnu: linux-pam: Add cracklib to inputs.

2016-08-28 Thread David Craven
Nope, thanks for keeping such a tight eye on security! =) I just
checked the arch linux package and saw that they are using it so I
thought it would probably be a good idea to add...



Re: [PATCH] gnu: linux-pam: Update to 1.3.0.

2016-08-28 Thread David Craven
> “XXX” is fine here, because it may be impossible for us to fix it.

Ah ok.

> I think this part should indeed be a separate patch.  Also, Flex should
> be ‘native-inputs’ presumably, whereas Cracklib should be in ‘inputs’.

Already realized it, and pushed to core-updates as
7483230f17880c1cd50d1de53496dc1ececebbb8
25d1b3107fc7ebdc155649722fc257f4dbc4b04a

and Leo already commented on a related security issue and is reverting
the second commit:

> For CVE-2016-6318, the disclosure message pointed out that if
> cracklib is compiled without the FORTIFY_SOURCE compiler flag, the bug
> can result in code execution and privilege escalation.



Re: [PATCH 04/31] gnu: Add baloo.

2016-08-29 Thread David Craven
If the project is dual licensed or tripple licensed do I have to add a
comment to each package? Or can we assume that that's the default?



Re: Guix with U-Boot

2016-08-29 Thread David Craven
> If merging is deemed too risky, would it be possible to create a
> "wip-u-boot" branch on Savannah instead? - it seems that is
> how these bigger changes are handled. Then I could push the
> U-Boot parts there.

I'll collect your patches and do that. That should make it easier
to test. (I'm not qualified to merge your patches ;-)



Re: GHM debriefing

2016-08-29 Thread David Craven
> Slides online, and hopefully videos will follow:
>
>   https://www.gnu.org/software/guix/help/#talks

Nice slides!

> On that topic, I had an interesting discussion with Nicolas Petton of
> Emacs about patch tracking.  Nicolas explained that Gitlab (free
> software) doesn’t have some of the technical defects that GitHub has; in
> particular it can rebase instead of merging, thereby helping preserve a
> linear history, and it can be dealt with “mostly” by email.  Perhaps we
> could try running an instance and see what it’s like.

Calling it a technical defect is a little harsh... ;-) Gitlab is going to be an
improvement over the existing state of affairs. Just spent an hour fixing
the u-boot [0] patch manually to apply to a fresh tree. (Line wrapping mostly,
removing some hunks and adding a newline at the end)

[0] http://lists.gnu.org/archive/html/guix-devel/2016-07/msg01414.html



Re: Offloading to a VM

2016-08-29 Thread David Craven
Yep, thanks! =)



Re: Guix with U-Boot

2016-08-29 Thread David Craven
Mhmm so I'm trying your patches and I get a no code for gnu system
u-boot. The file seems to be missing from the patches?



[PATCH] gnu: Add dtc.

2016-08-29 Thread David Craven
From: Danny Milosavljevic 

* gnu/packages/u-boot.scm (dtc): New variable.

Co-authored-by: David Craven 
---
 gnu/packages/u-boot.scm | 60 +
 1 file changed, 60 insertions(+)
 create mode 100644 gnu/packages/u-boot.scm

diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm
new file mode 100644
index 000..e9376a4
--- /dev/null
+++ b/gnu/packages/u-boot.scm
@@ -0,0 +1,60 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Danny Milosavljevic 
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 u-boot)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages flex))
+
+(define-public dtc
+  (package
+(name "dtc")
+(version "1.4.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://www.kernel.org/pub/software/utils/dtc/";
+"dtc-" version ".tar.xz"))
+  (sha256
+   (base32
+"155v52palf5fwfcnq696s41whjk0a5dqx98b7maqzdn7xbc2m6bp"
+(build-system gnu-build-system)
+(native-inputs
+ `(("bison" ,bison)
+   ("flex" ,flex)))
+(arguments
+ `(#:make-flags
+   (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+   (lambda _
+ (substitute* "Makefile"
+   (("/usr/bin/install") "install"))
+ (substitute* "Makefile"
+   (("PREFIX = \\$\\(HOME\\)") ""
+ (delete 'configure
+(home-page "https://www.devicetree.org";)
+(synopsis "Compiles Device Tree Source Files (.dts)")
+(description "dtc compiles Device Tree Source Files to Device Tree Binary 
Files.
+These are hardware (board) description files (used by Linux and BSD).")
+(license license:gpl2+)))
-- 
2.9.0



Re: [PATCH] gnu: Add dtc.

2016-08-29 Thread David Craven
I made some stylistic changes, updated the license, updated to 1.4.1,
removed the patches (checked the arch package and the nixos package,
both don't patch dtc)

I forgot to add u-boot.scm to local.mk...

Danny, WDYT? Is it an improvement?



[PATCH] gnu: Add u-boot.

2016-08-29 Thread David Craven
From: Danny Milosavljevic 

* gnu/packages/u-boot.scm (u-boot, make-u-boot-package,
  u-boot-vexpress_ca9x4, u-boot-malta armhf-linux-uboot,
  mips64el-linux-uboot): New variables.

Co-authored-by: David Craven 
---
 gnu/packages/u-boot.scm | 83 -
 1 file changed, 82 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm
index e9376a4..fd69bc1 100644
--- a/gnu/packages/u-boot.scm
+++ b/gnu/packages/u-boot.scm
@@ -22,8 +22,12 @@
   #:use-module (guix download)
   #:use-module (guix packages)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module ((gnu packages algebra) #:select (bc))
   #:use-module (gnu packages bison)
-  #:use-module (gnu packages flex))
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages python))
 
 (define-public dtc
   (package
@@ -58,3 +62,80 @@
 (description "dtc compiles Device Tree Source Files to Device Tree Binary 
Files.
 These are hardware (board) description files (used by Linux and BSD).")
 (license license:gpl2+)))
+
+(define u-boot
+  (package
+(name "u-boot")
+(version "2016.07")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"ftp://ftp.denx.de/pub/u-boot/";
+"u-boot-" version ".tar.bz2"))
+  (sha256
+   (base32
+"0lqj4ckmfqiap8mc6z2d5albs3g2h5mzccbn60hsgxhabhibfkwp"
+(native-inputs
+ `(("bc" ,bc)
+   ("dtc" ,dtc)
+   ("python-2" ,python-2)))
+(build-system  gnu-build-system)
+(home-page "http://www.denx.de/wiki/U-Boot/";)
+(synopsis "ARM Universal Bootloader")
+(description "U-Boot is an universal bootloader mostly used for ARM boards.
+It also initializes the boards (RAM etc).")
+(license license:gpl2+)))
+
+(define (make-u-boot-package board triplet xgcc)
+  (package
+(inherit u-boot)
+(name (string-append "u-boot-" (string-downcase board)))
+(native-inputs
+ `(("cross-gcc" ,xgcc)
+   ("cross-binutils" ,(cross-binutils triplet))
+   ,@(package-native-inputs u-boot)))
+(arguments
+ `(#:test-target "test"
+   #:make-flags
+   (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-"))
+   #:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+   (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((configname (string-append ,board "_defconfig")))
+   (if (file-exists? (string-append "configs/" configname))
+   (zero? (apply system* "make" `(,@make-flags ,configname)))
+   (begin
+ (display "Invalid boardname. Valid boardnames would have 
been:")
+ (newline)
+ (system* "ls" "-1" "configs")
+ #f)
+ (replace 'install
+   (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(libexec (string-append out "/libexec"))
+(uboot-files (find-files "." ".*\\.(bin|efi)$")))
+   (mkdir-p libexec)
+   (for-each
+(lambda (file-path)
+  (let ((target-file-path (string-append libexec "/" 
file-path)))
+(mkdir-p (dirname target-file-path))
+(copy-file file-path target-file-path)))
+uboot-files)
+
+(define-public u-boot-vexpress_ca9x4
+  (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf" xgcc-armhf))
+
+(define-public u-boot-malta
+  (make-u-boot-package "malta" "mips64el-linux-gnuabi64" xgcc-mips64el))
+
+(define-public armhf-linux-uboot
+  u-boot-vexpress_ca9x4)
+
+(define-public mips64el-linux-uboot
+  u-boot-malta)
+
+;; Something should:
+;; - create extlinux.conf and put it on the first bootable partition
+;;   (the one with the Active flag)
+;; - install the u-boot bootloader
-- 
2.9.0



Re: Guix with U-Boot

2016-08-29 Thread David Craven
So I think that dtc and uboot are good now, I'll give it a few days
before merging...

I'm getting an Unbound variable:  error :/

Here's my bootloader configuration. Any suggestions? =)

  (bootloader (u-boot-configuration
   (board "vexpress_ca9x4")
   (device "/dev/sdX")
   (u-boot armhf-linux-uboot)))

Thank you,
David



Re: Guix with U-Boot

2016-08-29 Thread David Craven
> Note: It should infer the correct u-boot to use on its own - at least that's 
> the intention with the whole make-u-boot-package thing.

Did you see the updated u-boot patch? It includes support for
cross-compilation, so make-u-boot-package takes a xgcc package and a
target triplet as arguments. So it probably broke the inference.



Re: Guix with U-Boot

2016-08-29 Thread David Craven
FYI your editor is using dos style /n/r newlines. Don't know if that
is your intention. Are you on windows? O.O xD

On Mon, Aug 29, 2016 at 8:20 PM, David Craven  wrote:
>> Note: It should infer the correct u-boot to use on its own - at least that's 
>> the intention with the whole make-u-boot-package thing.
>
> Did you see the updated u-boot patch? It includes support for
> cross-compilation, so make-u-boot-package takes a xgcc package and a
> target triplet as arguments. So it probably broke the inference.



Re: How does install-grub work?

2016-08-29 Thread David Craven
I have some questions too... So for booting a vm we don't actually
need a boot loader, since it passes the kernel image through the
-kernel flag. I don't think it's relevant that grub is installed in
the MBR. So getting guix system vm --system=armhf-linux to boot
doesn't actually require uboot... It just needs to make sure that grub
isn't pulled in as a dependency (since there isn't a substitute for
grub on arm/mips).

@Danny: Did you write install-uboot.c? I don't have a clue what it's
doing =P I don't really know anything about filesystems or
bootloaders...



Re: How does install-grub work?

2016-08-29 Thread David Craven
>>So for booting a vm we don't actually need a boot loader, since it passes the 
>>kernel image through the -kernel flag.
>
> Huh, that appears to be the case. Back when I used VMs the first time they 
> simulated the entire PC, BIOS and all and there you would need the partition 
> table, bootloader etc just as you would on a real PC. But it seems to have 
> changed now...

Does the u-boot bootloader routine have to do anything other than
generating the extlinux.conf file? That would be enough so that there
is an alternative to grub-install for the qemu use case and for actual
boards, isn't uboot usually written to flash instead of to a MBR?

> Yes, I wrote it. It makes sure it's safe to write to an unclaimed 
> fixed-position section of a drive and then writes to it.
>
> Essentially it does
>
> $ dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
> ^^^^^^
> depends on board   depends on board
>
> but only after making sure that this doesn't clobber anything (payload data 
> on parititons, the partition table etcetc).
>
> It's supposed to be analogous to grub-install, just for u-boot.

Nice!



Re: How does install-grub work?

2016-08-29 Thread David Craven
> Does the u-boot bootloader routine have to do anything other than
> generating the extlinux.conf file? That would be enough so that there
> is an alternative to grub-install for the qemu use case and for actual
> boards, isn't uboot usually written to flash instead of to a MBR?

So I'd say the next steps are:

1. Pick out your changes that are related to renaming grub to
bootloader and add a shim for the uboot parts. That should be enough
to get vm's booting.

2. Add your extlinux.conf generation/install code.

3. We can still add an install uboot to MBR procedure if it's necessary.

This would break the changes down into easy to review patches and subgoals...



Re: How does install-grub work?

2016-08-29 Thread David Craven
>> 1. Pick out your changes that are related to renaming grub to
>> bootloader and add a shim for the uboot parts. That should be enough
>> to get vm's booting.

> Yes. Note that Ludo said that it might make sense to separate the build side 
> (gnu/build/install.scm and gnu/build/vm.sc) from the host side (other stuff) 
> also for the patches.

So do you want me to take a stab at it or do you want to do it? =)

For parts two and three I'd have to rely on you, since I don't have
access to hardware to actually test it...



Re: How does install-grub work?

2016-08-30 Thread David Craven
I'm making some progress. The culprit for the grub error was:

(let ((inputs
-'#$(append (list qemu parted grub e2fsprogs)
+'#$(append (list qemu parted e2fsprogs)

There is more work involved than I thought. Support for
cross-compiling stuff like
/gnu/store/2z7jlxzhyll5i9imiizsyvfygsa88k55-activate-service.drv needs
to work somehow. That gets us at least guix system build working.



gexps

2016-08-30 Thread David Craven
Hi, I have a couple of questions:

How do gexps relate to packages? Are they used in the
package->bag->derivation process or is it just for writing services?

gexp->script and gexp->file only dump text into the store. How can I
make them ignore the system/target architectures?



Re: [PATCH 04/31] gnu: Add baloo.

2016-08-30 Thread David Craven
Thanks! Added the comments and pushed.



[PATCH] gnu: sqlite: Update to 3.14.1.

2016-08-30 Thread David Craven
* gnu/packages/databases.scm (sqlite): Update to 3.14.1.
---
 gnu/packages/databases.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 3d2d130..a04c375 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -484,7 +484,7 @@ for example from a shell script.")
 (define-public sqlite
   (package
(name "sqlite")
-   (version "3.13.0")
+   (version "3.14.1")
(source (origin
 (method url-fetch)
 ;; TODO: Download from sqlite.org once this bug :
@@ -515,7 +515,7 @@ for example from a shell script.")
))
 (sha256
  (base32
-  "0sq88jbwsk48i41f7m7rkw9xvijq011nsbs7pl49s31inck70yg2"
+  "19j73j44akqgc6m82wm98yvnmm3mfzmfqr8mp3n7n080d53q4wdw"
(build-system gnu-build-system)
(inputs `(("readline" ,readline)))
(arguments
-- 
2.9.0



[PATCH] gnu: sqlite: Enable DBSTAT_VTAB.

2016-08-30 Thread David Craven
* gnu/packages/databases.scm (sqlite)[arguments]: Enable configure-flag
  -DSQLITE_ENABLE_DBSTAT_VTAB.
---
 gnu/packages/databases.scm | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index a04c375..ce51d28 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -520,10 +520,12 @@ for example from a shell script.")
(inputs `(("readline" ,readline)))
(arguments
 `(#:configure-flags
-  ;; Add -DSQLITE_SECURE_DELETE and -DSQLITE_ENABLE_UNLOCK_NOTIFY to
-  ;; CFLAGS.  GNU Icecat will refuse to use the system SQLite unless these
-  ;; options are enabled.
-  '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY")))
+  ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
+  ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS.  GNU Icecat will refuse
+  ;; to use the system SQLite unless these options are enabled.
+  (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
+   "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
+   "-DSQLITE_ENABLE_DBSTAT_VTAB"
(home-page "http://www.sqlite.org/";)
(synopsis "The SQLite database management system")
(description
-- 
2.9.0



Re: [PATCH] gnu: slim: Move to display-managers.scm.

2016-08-31 Thread David Craven
LGTM.

Are you packaging lightdm? I started packaging lightdm before sddm.
But then I realized that it doesn't support (and probably never will)
wayland sessions. Looks to me like another we are ubuntu and we are
doing our own thing kind of project... ;-)



Re: GHM debriefing

2016-08-31 Thread David Craven
> Also: someone should package gitlab for Guix ;)
> Btw: I had a short view into the local doctors/hospital IT suppliers a
> couple of years ago, and the solutions were 99% Windows based. I like
> GNU/health (http://health.gnu.org/), having this as a package and
> service could be another big selling point for Guix.

The problem there is that guix is free. Doctors don't know about technical
stuff so they hire an IT company. IT companies like windows crap because
it increases their billables without any actual work.



Re: [PATCH] gnu: Add sddm.

2016-08-31 Thread David Craven
Hi Marius,

Thanks!

I got the pam issue resolved. hawaii sessions start now (still look
ugly, need to patch some paths so that it finds themes etc.). weston
still has a problem - can't open drm device. Seems to be elogind
related.



Re: new package build error: archiver requires 'AM_PROG_AR' in 'configure.ac'

2016-08-31 Thread David Craven
> I have never seen this before.  Have you tried patching “configure.ac”
> as it says, adding “AM_PROG_AR” somewhere?

You could also try adding gettext and pkg-config to native-inputs.
Some autotools errors magically disappear sometimes...



Re: [PATCH] gnu: Add u-boot.

2016-08-31 Thread David Craven
> I'm not totally against naming filenames "file" - or "f" for that matter - 
> but I distinguish for good reason.

I believe I renamed your variables... xD

(replace 'install
+   (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((out (string-append (assoc-ref outputs "out") "/libexec")))
+   (mkdir-p out)
+   (for-each (lambda (name)
+   (let ((outname (string-append out "/" name)))
+ (mkdir-p (dirname outname))
+ (copy-file name outname)))
+ (find-files "." ".*\\.(bin|efi)$"))



Re: Lowercase user names

2016-08-31 Thread David Craven
According to [0] there is. But I think sticking to lowercase usernames
isn't such a big restriction. I think adding a check that the username
is lowercase and notifying the user on guix system reconfigure is just
as good a solution IMO.

[0] 
http://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6



Re: [PATCH] Clean all .go in clean-go

2016-09-01 Thread David Craven
> Using wildcards can be tempting in such cases but it can lead to accidental 
> file deletions which is worse IMO.

If you name what ever file *.go inside of your guix source tree, it's
kind of your on fault.

> Thinking this might be because of an ABI break I ran `make clean-go && make` 
> before trying again, with the same result.

mmh, I usually just do make clean && make, do you save that much time
using make clean-go?



Re: gexps

2016-09-01 Thread David Craven
> If we force use of the host system type (say x86_64-linux), independent
> of (%current-system) (say mips64el-linux), we approach what you want.
> However, that would give us different derivations depending on the host
> system type.  That is, ‘guix system build -s mips64el-linux -d’ on
> x86_64 would return something different from ‘guix system build -d’ on
> mips64.  This is not desirable.

Maybe an option would be if %current-system != host-system run guile
using qemu-arm?

> An option would to have ‘gexp->file’ produce a fixed-output derivation
> (it can compute the hash of the output on the host side).
>
> Or maybe we need another mechanism similar to fixed-output derivations
> to define equivalence classes of derivations.

I'll have to read up on fixed-output derivations. Can you give me an
example of where they are used currently?



Re: [PATCH] gnu: slim: Move to display-managers.scm.

2016-09-01 Thread David Craven
Pushed as 5fd66a37d58aa13091134d5e6e5f8c62f404ebfe

I thought I forgot something. I didn't add a signed-of-by line, but
it's signed with my gpg key, so that will have to do for this one...



Re: [PATCH v2 1/2] gnu: Add dtc.

2016-09-01 Thread David Craven
So I'm ready to push dtc and u-boot. I'm still not sure about the
patches. If you want me to add them I think you should send a new
patch.

I see you dropped the uboot prefix from the patch names. The patch
names also need to be updated in local.mk.

I think that the 01 23 and 24 should be dropped, probably the libfdt
too. The patch names we have so far stick to lowercase patch names, so
we should too. And use - everywhere.

So that would be dtc-build-doc.patch,
dtc-add-missing-function-to-shared-library.patch and
dtc-add-some-missing-symbols-to-lds.patch.

If you make the changes I'll push your patch.

Thank you for your contribution!

David



[PATCH 2/9] activation: Allow /var/lib to be a home directory.

2016-09-01 Thread David Craven
* gnu/build/activation.scm (activate-user): Make sure /var/lib exists.
---
 gnu/build/activation.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 10aa58d..3abfdd6 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -233,6 +233,9 @@ numeric gid or #f."
   ;; 'groupadd' aborts if the file doesn't already exist.
   (touch "/etc/group")
 
+  ;; allow /var/lib/application to be a home directory
+  (mkdir-p "/var/lib")
+
   ;; Create the root account so we can use 'useradd' and 'groupadd'.
   (activate-user (find (match-lambda
 ((name (? zero?) _ ...) #t)
-- 
2.9.0



[PATCH 9/9] gnu: Add weston.

2016-09-01 Thread David Craven
* gnu/packages/wayland.scm (weston): New file.
* gnu/local.mk (GNU_PACKAGE_MODULES): Add it.
---
 gnu/local.mk |   1 +
 gnu/packages/wayland.scm | 130 +++
 2 files changed, 131 insertions(+)
 create mode 100644 gnu/packages/wayland.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 61287fd..898b2d7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -356,6 +356,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/vpn.scm \
   %D%/packages/vtk.scm \
   %D%/packages/w3m.scm \
+  %D%/packages/wayland.scm \
   %D%/packages/wdiff.scm   \
   %D%/packages/web.scm \
   %D%/packages/webkit.scm  \
diff --git a/gnu/packages/wayland.scm b/gnu/packages/wayland.scm
new file mode 100644
index 000..0124d1b
--- /dev/null
+++ b/gnu/packages/wayland.scm
@@ -0,0 +1,130 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 wayland)
+  #:use-module (gnu packages freedesktop) ; xwayland
+  #:use-module (gnu packages gl) ; cairo-xcb
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk) ; cairo-xcb
+  #:use-module (gnu packages libunwind)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg) ; xwayland
+  #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix utils))
+
+(define-public cairo-xcb
+  (package
+(inherit cairo)
+(name "cairo-xcb")
+(inputs
+ `(("mesa" ,mesa)
+   ,@(package-inputs cairo)))
+(arguments
+ `(#:tests? #f
+   #:configure-flags
+   '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")
+
+(define-public xwayland
+  (package
+(inherit xorg-server)
+(name "xwayland")
+(inputs
+ `(("libepoxy" ,libepoxy)
+   ("wayland" ,wayland)
+   ,@(package-inputs xorg-server)))
+(arguments
+  (substitute-keyword-arguments (package-arguments xorg-server)
+((#:configure-flags flags)
+ `(cons* "--enable-xwayland" "--disable-xorg"
+ "--disable-docs""--disable-devel-docs"
+ "--disable-xvfb""--disable-xnest"
+ "--disable-xquartz" "--disable-xwin"
+ ,flags))
+
+(define-public weston
+  (package
+(name "weston")
+(version "1.11.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://wayland.freedesktop.org/releases/";
+"weston-" version ".tar.xz"))
+  (sha256
+   (base32
+"09biddxw3ar797kxf9mywjkb2iwky6my39gpp51ni846y7lqdq05"
+(build-system gnu-build-system)
+(native-inputs
+ `(("pkg-config" ,pkg-config)
+   ("xorg-server" ,xorg-server)))
+(inputs
+ `(("cairo" ,cairo-xcb)
+   ("dbus" ,dbus)
+   ("elogind" ,elogind)
+   ("libinput" ,libinput-minimal)
+   ("libunwind" ,libunwind)
+   ("libxcursor" ,libxcursor)
+   ("libxkbcommon" ,libxkbcommon)
+   ("mesa" ,mesa)
+   ("mtdev" ,mtdev)
+   ("linux-pam" ,linux-pam)
+   ("wayland" ,wayland)
+   ("wayland-protocols" ,wayland-protocols)
+   ("xwayland" ,xwayland)))
+(arguments
+ `(#:configure-flags
+   (list "--disable-setuid-install"
+ "--enable-systemd-login"
+ (string-append "--with-xserver-path="
+(assoc-ref %build-inputs "xwayland") 
"/bin/Xwayland"))
+   #:ph

[PATCH 7/9] gnu: Add sddm.

2016-09-01 Thread David Craven
* gnu/packages/display-managers.scm (sddm): New variable.
---
 gnu/packages/display-managers.scm | 65 +++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/display-managers.scm 
b/gnu/packages/display-managers.scm
index d84dbc3..335a7b5 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -25,6 +25,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix packages)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gl)
@@ -117,6 +118,70 @@ Qt-style API for Wayland clients.")
 (home-page "http://hawaiios.org";)
 (license (list license:gpl2 license:gpl3 license:lgpl2.1 license:lgpl3
 
+(define-public sddm
+  (package
+(name "sddm")
+(version "0.14.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/sddm/sddm";
+"/releases/download/v" version "/"
+"sddm-" version ".tar.xz"))
+  (sha256
+   (base32
+"0y3pn8g2qj7q20zkmbasrfsj925lfzizk63sfrvzf84bc5c84d3y"
+(build-system cmake-build-system)
+(native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)
+   ("pkg-config" ,pkg-config)
+   ("qttools" ,qttools)))
+(inputs
+ `(("glib" ,glib)
+   ("greenisland" ,greenisland)
+   ("libxcb" ,libxcb)
+   ("libxkbcommon" ,libxkbcommon)
+   ("linux-pam" ,linux-pam)
+   ("qtbase" ,qtbase)
+   ("qtdeclarative" ,qtdeclarative)
+   ("shadow" ,shadow)
+   ("wayland" ,wayland)))
+(arguments
+ `(#:configure-flags
+   (list
+;; Currently doesn't do anything
+;; Option added by enable wayland greeters PR
+"-DENABLE_WAYLAND=ON"
+"-DENABLE_PAM=ON"
+"-DCONFIG_FILE=/etc/sddm.conf"
+;; Set path to /etc/login.defs
+;; Alternatively use -DUID_MIN and -DUID_MAX
+(string-append "-DLOGIN_DEFS_PATH="
+   (assoc-ref %build-inputs "shadow")
+   "/etc/login.defs")
+(string-append "-DQT_IMPORTS_DIR="
+   (assoc-ref %outputs "out") "/qml")
+(string-append "-DCMAKE_INSTALL_SYSCONFDIR="
+   (assoc-ref %outputs "out") "/etc"))
+   #:modules ((guix build cmake-build-system)
+  (guix build qt-utils)
+  (guix build utils))
+   #:imported-modules (,@%cmake-build-system-modules
+   (guix build qt-utils))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'install 'wrap-programs
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (wrap-qt-program out "sddm")
+   (wrap-qt-program out "sddm-greeter")
+   #t))
+(synopsis "QML based X11 and Wayland display manager")
+(description "QML based X11 and Wayland display manager.")
+(home-page "https://github.com/sddm/sddm";)
+;; QML files are MIT licensed and images are CC BY 3.0.
+(license (list license:gpl2+ license:expat license:cc-by3.0
+
 (define-public slim
   (package
 (name "slim")
-- 
2.9.0



[PATCH 5/9] gnu: Add prefix to license imports in (gnu packages display-managers).

2016-09-01 Thread David Craven
* gnu/packages/display-managers.scm: Import (guix licenses) with prefix
  "license:".
---
 gnu/packages/display-managers.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/display-managers.scm 
b/gnu/packages/display-managers.scm
index 579b149..3f3c6db 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -19,7 +19,7 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages display-managers)
-  #:use-module ((guix licenses) #:prefix l:)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
@@ -92,4 +92,4 @@ fonts, External themes support, Configurable runtime options: 
X server --
 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
 input control, Can load predefined user at startup, Configurable welcome /
 shutdown messages, Random theme selection.")
-(license l:gpl2)))
+(license license:gpl2)))
-- 
2.9.0



[PATCH 8/9] services: Add sddm service.

2016-09-01 Thread David Craven
* gnu/services/sddm.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk  |   1 +
 gnu/services/sddm.scm | 316 ++
 2 files changed, 317 insertions(+)
 create mode 100644 gnu/services/sddm.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 8179920..61287fd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -390,6 +390,7 @@ GNU_SYSTEM_MODULES =\
   %D%/services/networking.scm  \
   %D%/services/shepherd.scm\
   %D%/services/herd.scm\
+  %D%/services/sddm.scm\
   %D%/services/spice.scm   \
   %D%/services/ssh.scm \
   %D%/services/web.scm \
diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
new file mode 100644
index 000..79620b0
--- /dev/null
+++ b/gnu/services/sddm.scm
@@ -0,0 +1,316 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven 
+;;;
+;;; 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 services sddm)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages display-managers)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu services)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu services xorg)
+  #:use-module (gnu system pam)
+  #:use-module (gnu system shadow)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:export (sddm-configuration
+sddm-confiugration?
+sddm-service-type
+sddm-service))
+
+(define-record-type* 
+  sddm-configuration  make-sddm-configuration
+  sddm-configuration?
+  (sddm   sddm-configuration-sddm
+  (default sddm))
+  (allow-empty-passwords? sddm-configuration-allow-empty-passwords?
+  (default #t))
+
+  ;; [General]
+  ;; valid values are x11 and wayland
+  ;; currently doesn't do anything is enabled by wayland greeter PR
+  (display-server sddm-configuration-display-server
+  (default "x11"))
+  ;; valid values are on, off or none
+  (numlocksddm-configuration-numlock
+  (default "on"))
+  (halt-command   sddm-configuration-halt-command
+  (default #~(string-append #$shepherd "/sbin/halt")))
+  (reboot-command sddm-configuration-reboot-command
+  (default #~(string-append #$shepherd 
"/sbin/reboot")))
+
+  ;; [Theme]
+  ;; valid values are elarun or maldives
+  (theme  sddm-configuration-theme
+  (default "maldives"))
+  (themes-directory   sddm-configuration-themes-directory
+  (default #~(string-append #$sddm 
"/share/sddm/themes")))
+  (faces-directorysddm-configuration-faces-directory
+  (default #~(string-append #$sddm 
"/share/sddm/faces")))
+
+  ;; [Users]
+  (default-path   sddm-configuration-default-path
+  (default "/run/current-system/profile/bin"))
+  (minimum-uidsddm-configuration-minimum-uid
+  (default 1000))
+  (maximum-uidsddm-configuration-maximum-uid
+  (default 2000))
+  (remember-last-user?sddm-configuration-remember-last-user?
+  (default #t))
+  (remember-last-session? sddm-configuration-remember-last-session?
+  (default #t))
+  (hide-users sddm-configuration-hide-users
+  (default ""))
+  (hide-shellssddm-configuration-hide-shells
+  (default #~(string-append #$shadow "/sbin/nologin")))
+
+  ;; [Wayland]
+  (session-commandsddm-configuration-session-command
+  (default #~(string-append #$sddm 
"/share/sddm/scripts/wayland-session")))
+  (sessions-directory sddm-configuration-sessions-directory
+  (default 
"/r

[PATCH 3/9] services: Export initrc.

2016-09-01 Thread David Craven
* gnu/services/xorg.scm (define-module): Export initrc.
---
 gnu/services/xorg.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 4e311de..87c4487 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -42,6 +42,8 @@
   #:export (xorg-configuration-file
 %default-xorg-modules
 xorg-start-command
+xinitrc
+
 %default-slim-theme
 %default-slim-theme-name
 slim-configuration
-- 
2.9.0



[PATCH 1/9] system: vm: Remove -net user flag.

2016-09-01 Thread David Craven
* gnu/system/vm.scm (common-qemu-options): Remove -net user flag.
---
 gnu/system/vm.scm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index c31e3a8..551c3ca 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -462,7 +462,6 @@ with '-virtfs' options for the host file systems listed in 
SHARED-FS."
"")
  " -no-reboot -net nic,model=virtio \
   " #$@(map virtfs-option shared-fs) " \
-  -net user \
   -vga std \
   -drive file=" #$image
   ",if=virtio,cache=writeback,werror=report,readonly \
-- 
2.9.0



[PATCH 6/9] gnu: Add greenisland.

2016-09-01 Thread David Craven
* gnu/packages/display-managers.scm (greenisland): New variable.
---
 gnu/packages/display-managers.scm | 91 +--
 1 file changed, 88 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/display-managers.scm 
b/gnu/packages/display-managers.scm
index 3f3c6db..d84dbc3 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -25,12 +25,97 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix packages)
   #:use-module (gnu packages)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gl)
-  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages linux))
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg))
+
+(define-public greenisland
+  (package
+(name "greenisland")
+(version "0.8.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/greenisland/greenisland";
+"/releases/download/v" version "/"
+"greenisland-" version ".tar.xz"))
+  (sha256
+   (base32
+"1c9rlq7fqrsd5nb37anjvnp9xspqjz1kc0fvydv5xdy3abg8mw40"
+(build-system cmake-build-system)
+(native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)
+   ("dbus" ,dbus)
+   ("glib:bin" ,glib "bin")
+   ("pkg-config" ,pkg-config)
+   ("xorg-server" ,xorg-server)))
+(inputs
+ `(("elogind" ,elogind)
+   ("eudev" ,eudev)
+   ("fontconfig" ,fontconfig)
+   ("freetype" ,freetype)
+   ("glib" ,glib)
+   ("libdrm" ,libdrm)
+   ("libinput" ,libinput-minimal)
+   ("libxcursor" ,libxcursor)
+   ("libxkbcommon" ,libxkbcommon)
+   ("libx11" ,libx11)
+   ("mesa" ,mesa)
+   ("qtbase" ,qtbase)
+   ("qtdeclarative" ,qtdeclarative)
+   ("wayland" ,wayland)
+   ("wayland-protocols" ,wayland-protocols)
+   ("xcb-util-cursor" ,xcb-util-cursor)))
+(arguments
+ `(#:configure-flags
+   (list (string-append "-DPLUGIN_INSTALL_DIR="
+(assoc-ref %outputs "out") "/plugins")
+ (string-append "-DQML_INSTALL_DIR="
+(assoc-ref %outputs "out") "/qml"))
+   #:modules ((guix build cmake-build-system)
+  (guix build qt-utils)
+  (guix build utils))
+   #:imported-modules (,@%cmake-build-system-modules
+   (guix build qt-utils))
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'disable-udev-tests
+   (lambda _ ; FIXME: Build env doesn't contain /dev/sda
+ (substitute* "tests/auto/platform/tst_udev.cpp"
+   (("QVERIFY") "// QVERIFY")
+   (("QCOMPARE") "// QCOMPARE"
+ (replace 'check
+   (lambda _
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ (zero? (system* "dbus-launch" "ctest" "."
+ (add-before 'check 'check-setup
+   (lambda _
+ (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ #t))
+ (add-after 'install 'wrap-programs
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (wrap-qt-program out "greenisland")
+   (wrap-qt-program out "greenisland-launcher")
+   (wrap-qt-program out "greenisland-screencaster")
+   (wrap-qt-program out "greenisland-wayland-scanner")
+   #t))
+(synopsis "QtQuick Wayland compositor and shell for desktop and mobile")
+(description "Green Island provides a full blown Wayland compositor for
+QtQuick as well as pluggable hardware abstraction, extensions, tools and a
+Qt-style API for Wayland clients.")
+(home-page "http://hawaiios.org";)
+(license (list license:gpl2 license:gpl3 license:lgpl2.1 license:lgpl3
 
 (define-public slim
   (package
-- 
2.9.0



[PATCH 4/9] services: syslog: Use syslog-configuration.

2016-09-01 Thread David Craven
* gnu/services/base.scm (): New variable.
(syslog-service-type): Use .
(syslog-service): Use .
---
 gnu/services/base.scm | 28 
 gnu/tests/base.scm|  9 ++---
 2 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f3f6408..76e974c 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -73,15 +73,15 @@
 
 %nscd-default-caches
 %nscd-default-configuration
-
 nscd-configuration
 nscd-configuration?
-
 nscd-cache
 nscd-cache?
-
 nscd-service-type
 nscd-service
+
+syslog-configuration
+syslog-configuration?
 syslog-service
 syslog-service-type
 %default-syslog.conf
@@ -108,6 +108,7 @@
 rngd-configuration?
 rngd-service-type
 rngd-service
+
 pam-limits-service-type
 pam-limits-service
 
@@ -885,17 +886,27 @@ given @var{config}---an @code{} 
object.  @xref{Name
 Service Switch}, for an example."
   (service nscd-service-type config))
 
+
+(define-record-type* 
+  syslog-configuration  make-syslog-configuration
+  syslog-configuration?
+  (syslogd  syslog-configuration-syslogd
+(default #~(string-append #$inetutils 
"/libexec/syslogd")))
+  (config-file  syslog-configuration-config-file
+(default %default-syslog.conf)))
+
 (define syslog-service-type
   (shepherd-service-type
'syslog
-   (lambda (config-file)
+   (lambda (config)
  (shepherd-service
   (documentation "Run the syslog daemon (syslogd).")
   (provision '(syslogd))
   (requirement '(user-processes))
   (start #~(make-forkexec-constructor
-(list (string-append #$inetutils "/libexec/syslogd")
-  "--no-detach" "--rcfile" #$config-file)))
+(list #$(syslog-configuration-syslogd config)
+  "--no-detach"
+  "--rcfile" #$(syslog-configuration-config-file config
   (stop #~(make-kill-destructor))
 
 ;; Snippet adapted from the GNU inetutils manual.
@@ -921,14 +932,15 @@ Service Switch}, for an example."
  mail.*  /var/log/maillog
 "))
 
-(define* (syslog-service #:key (config-file %default-syslog.conf))
+(define* (syslog-service #:optional (config (syslog-configuration)))
   "Return a service that runs @command{syslogd}.  If configuration file
 name @var{config-file} is not specified, use some reasonable default
 settings.
 
 @xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more
 information on the configuration file syntax."
-  (service syslog-service-type config-file))
+  (service syslog-service-type config))
+
 
 (define pam-limits-service-type
   (let ((security-limits
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 41f50c0..5c2af5b 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -384,9 +384,12 @@ functionality tests.")
   (log-file "/dev/console")))
(syslog-service-type config
 =>
-(plain-file
- "syslog.conf"
- "*.* /dev/console\n")))
+(syslog-configuration
+ (inherit config)
+ (config-file
+  (plain-file
+   "syslog.conf"
+   "*.* /dev/console\n")
 
 (define (run-nss-mdns-test)
   ;; Test resolution of '.local' names via libc.  Start the marionette service
-- 
2.9.0



Re: [PATCH 9/9] gnu: Add weston.

2016-09-01 Thread David Craven
Should maybe go in a different file, created wayland.scm for now



Re: [PATCH] gnu: sqlite: Enable DBSTAT_VTAB.

2016-09-01 Thread David Craven
Pushed as 73dc727ec8d2994aed2f011f89dbd89591ff35a8.



Re: [PATCH v2 1/2] gnu: Add dtc.

2016-09-01 Thread David Craven
Pushed as f63e5eaaeb2671ec550b0c21f4afe5b277de6a5d.

Thanks!



Re: [PATCH 1/9] system: vm: Remove -net user flag.

2016-09-02 Thread David Craven
You can add custom qemu flags by running $(guix system vm *.scm) -net
user. As it is now there is no way to remove it, and I've said
multiple times that it causes networking difficulties. Adding it isn't
a problem. I think that the default qemu flags should be the minimum
common denominator, and not include anything that could cause problems
in a different setup.

Your suggestions for new guix system vm flags are additional code that
has to be maintained. I don't think we need them. Besides are you
offering to implement them? Because I'm not ;-)



Linux kernel config maintainablility

2016-09-02 Thread David Craven
Hi,

So I'm trying to get a linux-libre-kernel for arm going. For arm there
is a multi_v7_defconfig we can use. I looked at the existing kernel
configs we have and can't make heads or tails of them. My question is
are any kernel options needed specifically for guixsd? And can we make
it more readable/explicit by using a defconfig + adding the guixsd
specific configs separately? This would allow people like me to
understand what's actually needed to get guixsd working ;-)



Re: [PATCH 1/9] system: vm: Remove -net user flag.

2016-09-02 Thread David Craven
> I agree, if it is a problem it should be removed.
> Okay, is this documented that one can add qemu options after the
> file.scm? `guix system vm --help' doesn't show it, I haven't looked at
> documentation.

It's not a feature of guix system vm but of the qemu script.

$(guix system vm) evaluates to the qemu-run script then we are passing
the additional qemu flag to the script.



[PATCH 3/5] gnu: linux-libre: Use system->architecture.

2016-09-02 Thread David Craven
* gnu/packages/linux.scm (linux-libre): Use system->architecture.
---
 gnu/packages/linux.scm | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dc7ea78..19851d2 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -286,7 +286,7 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
(modify-phases %standard-phases
  (delete 'configure)
  (replace 'build
-   (lambda* (#:key system inputs #:allow-other-keys #:rest args)
+   (lambda* (#:key inputs #:allow-other-keys #:rest args)
  ;; Avoid introducing timestamps
  (setenv "KCONFIG_NOTIMESTAMP" "1")
  (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
@@ -295,12 +295,12 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
  (system* "patch" "-p1" "--force"
   "-i" (assoc-ref inputs "patch/freedo+gnu"))
 
- (let ((arch (car (string-split system #\-
-   (setenv "ARCH"
-   (cond ((string=? arch "i686") "i386")
- ((string=? arch "mips64el") "mips")
- (else arch)))
-   (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
+ (let ((arch ,(system->linux-architecture
+   (or (%current-target-system)
+   (%current-system)
+   (setenv "ARCH" arch))
+
+ (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
 
  (let ((build  (assoc-ref %standard-phases 'build))
(config (assoc-ref inputs "kconfig")))
-- 
2.9.0



[PATCH 1/5] gnu: module-init-tools: Prevent line wrapping.

2016-09-02 Thread David Craven
* gnu/packages/linux.scm (module-init-tools): Break line.
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index aac2cd1..be28a1b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -174,8 +174,8 @@
 (source (origin
  (method url-fetch)
  (uri (string-append
-   
"mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
-   version ".tar.bz2"))
+   "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
+   "module-init-tools-" version ".tar.bz2"))
  (sha256
   (base32
"0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
-- 
2.9.0



[PATCH] gnu: linux-libre-headers: Use modify-phases.

2016-09-02 Thread David Craven
* gnu/packages/linux.scm (linux-libre-headers): Use modify phases.
---
 gnu/packages/linux.scm | 58 --
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index aac2cd1..adfa027 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -109,17 +109,36 @@
  version "-gnu.tar.xz")))
 
 (define-public linux-libre-headers
-  (let* ((version "4.1.18")
- (build-phase
-  (lambda (arch)
-`(lambda _
-   (setenv "ARCH" ,(system->linux-architecture arch))
+  (package
+(name "linux-libre-headers")
+(version "4.1.18")
+(source (origin
+ (method url-fetch)
+ (uri (linux-libre-urls version))
+ (sha256
+  (base32
+   "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"
+(build-system gnu-build-system)
+(native-inputs `(("perl" ,perl)))
+(arguments
+ `(#:modules ((guix build gnu-build-system)
+  (guix build utils)
+  (srfi srfi-1))
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+   (lambda _
+ (let ((arch ,(system->linux-architecture
+  (or (%current-target-system)
+  (%current-system)
+   (setenv "ARCH" arch)
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
 
(and (zero? (system* "make" "defconfig"))
 (zero? (system* "make" "mrproper" "headers_check"))
- (install-phase
-  `(lambda* (#:key outputs #:allow-other-keys)
+ (replace 'install
+   (lambda* (#:key outputs #:allow-other-keys)
  (let ((out (assoc-ref outputs "out")))
(and (zero? (system* "make"
 (string-append "INSTALL_HDR_PATH=" out)
@@ -139,33 +158,12 @@
   (for-each delete-file (find-files out "\\.install"))
 
   #t))
-   (package
-(name "linux-libre-headers")
-(version version)
-(source (origin
- (method url-fetch)
- (uri (linux-libre-urls version))
- (sha256
-  (base32
-   "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"
-(build-system gnu-build-system)
-(native-inputs `(("perl" ,perl)))
-(arguments
- `(#:modules ((guix build gnu-build-system)
-  (guix build utils)
-  (srfi srfi-1))
-   #:phases (alist-replace
- 'build ,(build-phase (or (%current-target-system)
-  (%current-system)))
- (alist-replace
-  'install ,install-phase
-  (alist-delete 'configure %standard-phases)))
#:allowed-references ()
#:tests? #f))
+(home-page "http://www.gnu.org/software/linux-libre";)
 (synopsis "GNU Linux-Libre kernel headers")
 (description "Headers of the Linux-Libre kernel.")
-(license license:gpl2)
-(home-page "http://www.gnu.org/software/linux-libre/";
+(license license:gpl2)))
 
 (define-public module-init-tools
   (package
-- 
2.9.0



[PATCH 2/5] gnu: linux-libre: Use modify-phases.

2016-09-02 Thread David Craven
* gnu/packages/linux.scm (linux-libre): Use modify-phases.
---
 gnu/packages/linux.scm | 79 --
 1 file changed, 38 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index be28a1b..dc7ea78 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -253,9 +253,40 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
 (search-path %load-path file)))
 
 (define-public linux-libre
-  (let* ((version "4.7.2")
- (build-phase
-  '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
+  (package
+(name "linux-libre")
+(version "4.7.2")
+(source (origin
+  (method url-fetch)
+  (uri (linux-libre-urls version))
+  (sha256
+   (base32
+"1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85"
+(build-system gnu-build-system)
+(supported-systems '("x86_64-linux" "i686-linux"))
+(native-inputs `(("perl" ,perl)
+ ("bc" ,bc)
+ ("openssl" ,openssl)
+ ("module-init-tools" ,module-init-tools)
+ ("patch/freedo+gnu" ,%boot-logo-patch)
+
+ ,@(let ((conf (kernel-config
+(or (%current-target-system)
+(%current-system))
+#:variant (version-major+minor version
+ (if conf
+ `(("kconfig" ,conf))
+ '()
+(arguments
+ `(#:modules ((guix build gnu-build-system)
+  (guix build utils)
+  (srfi srfi-1)
+  (ice-9 match))
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+   (lambda* (#:key system inputs #:allow-other-keys #:rest args)
  ;; Avoid introducing timestamps
  (setenv "KCONFIG_NOTIMESTAMP" "1")
  (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
@@ -305,8 +336,8 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
;; Call the default `build' phase so `-j' is correctly
;; passed.
(apply build #:make-flags "all" args
- (install-phase
-  `(lambda* (#:key inputs outputs #:allow-other-keys)
+ (replace 'install
+   (lambda* (#:key inputs outputs #:allow-other-keys)
  (let* ((out(assoc-ref outputs "out"))
 (moddir (string-append out "/lib/modules"))
 (mit(assoc-ref inputs "module-init-tools")))
@@ -323,47 +354,13 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
(string-append "INSTALL_MOD_PATH=" out)
"INSTALL_MOD_STRIP=1"
"modules_install"))
-   (package
-(name "linux-libre")
-(version version)
-(source (origin
- (method url-fetch)
- (uri (linux-libre-urls version))
- (sha256
-  (base32
-   "1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85"
-(build-system gnu-build-system)
-(supported-systems '("x86_64-linux" "i686-linux"))
-(native-inputs `(("perl" ,perl)
- ("bc" ,bc)
- ("openssl" ,openssl)
- ("module-init-tools" ,module-init-tools)
- ("patch/freedo+gnu" ,%boot-logo-patch)
-
- ,@(let ((conf (kernel-config
-(or (%current-target-system)
-(%current-system))
-#:variant (version-major+minor version
- (if conf
- `(("kconfig" ,conf))
- '()
-(arguments
- `(#:modules ((guix build gnu-build-system)
-  (guix build utils)
-  (srfi srfi-1)
-  (ice-9 match))
-   #:phases (alist-replace
- 'build ,build-phase
- (alist-replace
-  'install ,install-phase
-  (alist-delete 'configure %standard-phases)))
#:tests? #f))
+(home-page "http://www.gnu.org/software/linux-libre/";)
 (synopsis "100% free redistribution of a cleaned Linux kernel")
 (description
  "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
 It has been modified to remove all non-free binary blobs.")
-(license license:gpl2)
-(home-page "http://www.gnu.org/software/linux-libre/";
+(license license:gpl2)))
 
 (define-public linux-libre-4.4
   (package
-- 
2.9.0



[PATCH 5/5] gnu: linux-libre: Add support for cross-compilation.

2016-09-02 Thread David Craven
* gnu/packages/linux.scm (linux-libre): Add support for
  cross-compilation.
---
 gnu/packages/linux.scm | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index bb8eb88..7e3b762 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -288,7 +288,7 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
(modify-phases %standard-phases
  (delete 'configure)
  (replace 'build
-   (lambda* (#:key inputs #:allow-other-keys #:rest args)
+   (lambda* (#:key inputs target #:allow-other-keys #:rest args)
  ;; Avoid introducing timestamps
  (setenv "KCONFIG_NOTIMESTAMP" "1")
  (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
@@ -297,12 +297,15 @@ for SYSTEM and optionally VARIANT, or #f if there is no 
such configuration."
  (system* "patch" "-p1" "--force"
   "-i" (assoc-ref inputs "patch/freedo+gnu"))
 
+ ;; Set ARCH and CROSS_COMPILE
  (let ((arch ,(system->linux-architecture
(or (%current-target-system)
(%current-system)
-   (setenv "ARCH" arch))
+   (setenv "ARCH" arch)
+   (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
 
- (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
+   (setenv "CROSS_COMPILE" (string-append target "-"))
+   (format #t "`CROSS_COMPILE' set to `~a'~%" (getenv 
"CROSS_COMPILE")))
 
  (let ((build  (assoc-ref %standard-phases 'build))
(config (assoc-ref inputs "kconfig")))
-- 
2.9.0



Re: [PATCH 5/5] gnu: linux-libre: Add support for cross-compilation.

2016-09-02 Thread David Craven
Sorry about this. I hadn't checked that cross compilation doesn't
break native compiles. It should be (unless target (setenv ...

Also the patch with the arm config should also add armhf-linux to
supported-systems



Re: [PATCH 2/9] activation: Allow /var/lib to be a home directory.

2016-09-02 Thread David Craven
> And instead of handing this particular case,
> how about create any parent directory
> of HOME?

I briefly thought about it and thought that we should discourage users
to pick *any* home directory. This will prevent them from doing so.
But it's just an artificial restriction. In that case it's a bug fix
instead of a feature ;-)



Re: [PATCH 8/9] services: Add sddm service.

2016-09-03 Thread David Craven
> Could you instead pass the configuration file via a command-line option
> or environment variable?

I already opened a bug report - no it's not currently possible...



Re: [PATCH 3/9] services: Export initrc.

2016-09-03 Thread David Craven
Yes, the sddm service uses it.



Re: [PATCH 8/9] services: Add sddm service.

2016-09-03 Thread David Craven
> +  (sddm   sddm-configuration-sddm
> +  (default sddm))

> +  (faces-directorysddm-configuration-faces-directory
> +  (default #~(string-append #$sddm 
> "/share/sddm/faces")))

Is sddm bound to the above sddm?



Re: [PATCH 1/9] system: vm: Remove -net user flag.

2016-09-03 Thread David Craven
> I sympathize with this; what problems are you referring to?
>
> The reason for “-net user” is that it allows me to run “dhclient -v
> eth0” in the VM and get access to the network, which is often what I
> want.

I usually have the need to add my own flags most of the time anyway.

This is the script I usually use - the line marked > doesn't take
effect when a -net user flag was already provided:

$($HOME/guix/pre-inst-env guix system vm server-configuration.scm) \
>-net user,hostfwd=tcp::10022-:22 \
-vga virtio \
-device virtio-rng-pci,bus=pci.0,addr=0x10 \
-spice port=5930,disable-ticketing \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5
\
-chardev spicevmc,name=vdagent,id=vdagent \
-device 
virtserialport,nr=1,bus=virtio-serial0.0,chardev=vdagent,name=com.redhat.spice.0>



Graph an operating-system derivation

2016-09-03 Thread David Craven
Hi,

I'm trying to view the graph of an entire operating-system. I don't
know yet if it's too complicated to actually produce something useful
:)

This is what I tried:

guix graph -e '((@ (gnu system) operating-system-derivation) ((@ (guix
scripts system) read-operating-system)
"gnu/system/examples/bare-bones.tmpl"))'

But it fails with "doesn't evaluate to a package". Is there a simple
way to do this / a feature that's generally useful?

Thanks,
David



Re: Offloading to a VM

2016-09-03 Thread David Craven
> The “build hook” is the mechanism by which the daemon asks an external
> program whether it can build a derivation for some system.

> Our (guix scripts offload) is such a program; it replies positively if
> there’s a machine that matches the target system.

> What I was suggesting is to have another build hook that would reply
> positively as long as the target system can be emulated by QEMU.

So I thought about this some more. guix offload uses guix build to
build a derivation which again uses a different nix-daemon to build
it. I'm not sure that guix offload can help us here. If it is possible
to build a derivation using only qemu-arm instead of qemu-system-arm -
which I'm still not convinced - I think it's the nix-daemon that would
have to support this. In build.cc it sets up a chroot and then
executes the builder. I think it's that builder that needs to be run
with qemu-arm. But I don't think it's going to be as easy as that =)

Does this make sense?



Re: Offloading to a VM

2016-09-03 Thread David Craven
The other problem I forgot to mention is that many architectures that
qemu supports don't support a "kernel emulation" but only a "system
emulation". In practice the system emulation isn't that much slower
than kernel emulation, because emulating instructions is a lot easier
than emulating syscalls... [needs quote]



Re: Graph an operating-system derivation

2016-09-03 Thread David Craven
>  guix graph -t derivation $(guix system build -d config.scm)

Thanks!

> ‘dot’ takes ages to process it and the result is too big to be of any
> use (it might be less bad with use an interactive graph navigation tool
> like Tulip).

Yes, guix graph produces the output for 24032 boxes...

> What info would you like to see on the graph?

Just trying to better understand how guix works. I wanted to find out
where the locale-2.24.drv comes from, but I found it (it's in
gnu/system/locale.scm obviously :)

Maybe guix edit could also work for derivations? It's nice to be able
to find the source that created/caused the derivation.



Re: [PATCH] gnu: vlc: Add inputs.

2016-09-03 Thread David Craven
Hi Alex,

I'm not sure we need all those dependencies =) Can you explain what
they are for? If you are adding dependencies to vlc why did you leave
libinput-minimal off the list? ;)

> 3. Our vlc was built with fast-math disabled as explained in the
> comment. However, this is actually not necessary, vlc would built with
> '-ffast-math -fno-finite-math-only'.

This should probably be a separate patch, and will probably have a
easier path to master...

Thanks!



Re: Feedback, ideas, discussion: tracking patches, discussions, bugs.

2016-09-03 Thread David Craven
> Today was pretty much an E-mail overload on the ML. In itself amazing :)

I agree. If you aren't a full time guix developer it's hard to keep
up. The only way I can keep up is by marking the emails I'm not
interested in quickly as read =P Just reading all emails is a time
commitment in itself...



Re: [PATCH 6/9] gnu: Add greenisland.

2016-09-03 Thread David Craven
It says:

GNU General Public License version 2.0 or (at your option) version 3.0
or any later version approved by the KDE Free Qt Foundation.

This means that it's only gpl3+ if the KDE free qt foundation approve it.



Re: [PATCH 3/9] services: Export initrc.

2016-09-03 Thread David Craven
Do I have your blessing on this (and the -net user) patch? :)



Re: Using a function as build-step?

2016-09-03 Thread David Craven
I think the problem is that the build steps are executed inside a
chroot created by the nix-daemon. So you'll have to do  (add-after
'install 'install-javadocs ,install-javadocs) to make it available.

If this is used in more than just this file, you'll have to add the
routine in a file inside guix/build/java-utils.scm and use #:modules
and #:import-modules. See the qt-utils.scm file for a simple example
and the greenisland or sddm packages that are on the mailinglist for
how to use it.

HTH!



Re: [PATCH v2 1/2] gnu: Add dtc.

2016-09-03 Thread David Craven
> Hi,
>
> they've integrated these patches into their new dtc release 1.4.2 :)

Awesome! I think it's a problem if we patch every package with 10
patches that's all. But this is great! Can you send a patch to update
dtc to 1.4.2?



Re: Feedback, ideas, discussion: tracking patches, discussions, bugs.

2016-09-03 Thread David Craven
> I was going to post a patch over several files removing redundant
> mkdir-p expressions,

> but decided against it! If you run something like  `ack '\(install-file'
> -B 7| ack  'mkdir-p' -A 7'

> You can see them, since install-file already contains a mkdir-p.

I think this is going a little off-topic.

> Also It seems like

> (let ((out  (assoc-ref outputs "out")))...) is set in almost every
> package definition,

> as if having some symbol for the outputs already might be more efficient??

If we start special-casing stuff, in no time we'll have a dozen
special cases. I think that that makes package definitions harder to
read. As it is currently there are a couple of primitives that do a
good job for defining packages without obfuscating stuff. I think
Ricardo already replied to this on IRC ;)



Re: [PATCH] gnu: dtc: Update to 1.4.2. Remove patches since they are integrated upstream now.

2016-09-04 Thread David Craven
Thanks! Pushed as 8cfdd64c3797bd014ad742bd4bd994d647ced985.

P.S. Can you create your patches with git format-patch in the future?
That saves reviewers some time, so that they don't have to retype the
commit message and find your author line and change the author of the
commit ;)



Re: [PATCH] gnu: Add libicns

2016-09-04 Thread David Craven
Thanks Marius and Brendan!

I removed the autotools inputs and build-phase, since the release
tarball already contains a configure script and fixed some
indentation.

Pushed as f5e4229a075e7aca255ab54d4e98526409520c62.



Re: [PATCH] gnu: gzochi: Update to 0.10.

2016-09-04 Thread David Craven
Thanks! Pushed as 7b39b7eb91112616a26a7b5de1d0d4782c83add9.



Shepherd redirect stdout/stderr to syslog

2016-09-04 Thread David Craven
Hi,

I'm having difficulties debugging a service that logs it's output to
tty1. I can't scroll the output - so the debug messages aren't very
useful. Is redirecting stdout/stderr to syslog something that
make-forkexec-constructor could/should do? Or is there already a way
to get the output I'm not aware of?

Thanks!
David



Re: Using a function as build-step?

2016-09-04 Thread David Craven
> I have tried this already. For some reason this did not work for me. :-(

Mmh. Maybe you could post a patch so that we can test it? Or maybe
someone more knowledgeable has an answer...



Re: [PATCH 9/9] gnu: Add weston.

2016-09-04 Thread David Craven
Is this ok as a description? I don't think the term display server is
commonly used for wayland compositors, so I left the synopsis.

(description "Weston is the reference implementation of a Wayland
compositor, and a useful compositor in its own right.

A Wayland compositor allows applications to render to a shared offscreen
buffer using opengles.  The compositor then culls the hidden parts and
composes the final output.  A Wayland compositor is essentially a
multiplexer to the KMS/DRM kernel devices.")

I renamed xwayland to xorg-server-xwayland and added cairo-xcb to
gtk.scm, xorg-server-xwayland to xorg.scm and weston to
freedesktop.scm.



Re: Rust

2016-09-04 Thread David Craven
> IIUC, to provide a Guix package for Cargo, the following should be done:

> 1. write a crate importer.
> 2. list all the crates needed by Cargo to build itself.
> 3. package each crate with the importer.
> 4. add a Cargo package which depends on the newly-imported crates and
> uses a binary version of Cargo to bootstrap itself (though this is not
> the best option in terms of auditing/reproducibility).

Have you made any progress on this? =)

FYI I also think that that's the best course of action. I remember
dealing with non gnu-build-system packages in nixos was a bit of a
pain, so I was biased against the importer thing. I think guix does a
better job at it...

To build the crates needed to build cargo a good idea is probably to
have rust-build-system take a #:cargo and a #:rustc package. Then you
can pass the binary versions for bootstrapping cargo.



Re: Using a function as build-step? (w/ attachement)

2016-09-04 Thread David Craven
I'd put those functions in guix build java-utils.scm, that will work,
and you'll have to do that anyway...



Re: Tracking package submissions with Debbugs

2016-09-04 Thread David Craven
Why is the gitlab not including the rebase feature a deal breaker?
It's open source, so disabling the merge button in the ui isn't a big
deal. We can continue using git push like we've been doing so far...

Also I've mentioned previously - why not gogs - but I'm ok with either.



Re: [PATCH 6/9] gnu: Add greenisland.

2016-09-05 Thread David Craven
Done. FYI, it also contains lgpl licenses, it just wasn't relevant to
the gpl vs gpl+ thing...



Re: Linux kernel config maintainablility

2016-09-05 Thread David Craven
Hi Ludo,

> I was hoping we could come up with a way to generate a kernel config,
> either based on ‘allmodconfig’ or something like what NixOS does [0],
> but I’ve become pretty convinced that this would be difficult at best.

What difficulties did you encounter with using allmodconfig as a basis?

> NixOS has a nicer way to express this, but long ago people thought it might 
> be fragile.

I agree that how nixos does it seems a little fragile. From what I've
heard the kernel settings and their defaults change frequently with
each release. This is why I think relying on the kernel devs to
provide reasonable defaults makes more sense IMO.

I'd like to make it easy to build custom kernels, I remember using an
auto detect config feature a while back when using arch. But before
working on that I need to actually transition to guixsd...



Re: Shepherd redirect stdout/stderr to syslog

2016-09-05 Thread David Craven
> Is redirecting stdout/stderr to syslog something that
> make-forkexec-constructor could/should do?

I looked into what would be involved. I included a diff that I didn't
test and don't expect to work.

The reason why I don't expect this to work is that running echo
"hello" > /dev/log errors. stracing logger "hello" shows that it makes
use of the socket and sendmsg syscalls instead of the usual open and
write syscalls. I don't understand why though, since what's the point
of everything being a file if they don't share the same interface?

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 49f6e8b..69c1cc2 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -712,12 +712,18 @@ false."

  ;; Close all the file descriptors except stdout and stderr.
  (let ((max-fd (max-file-descriptors)))
+   ;; Redirect stdin to use /dev/null
(catch-system-error (close-fdes 0))
-
;; Make sure file descriptor zero is used, so we don't end up reusing
;; it for something unrelated, which can confuse some packages.
(dup2 (open-fdes "/dev/null" O_RDONLY) 0)

+   ;; Redirect stout and stderr to use /dev/log
+   (catch-system-error (close-fdes 1))
+   (catch-system-error (close-fdes 2))
+   (dup2 (open-fdes "/dev/log" O_WRONLY) 1)
+   (dup2 (open-fdes "/dev/log" O_WRONLY) 2)
+
(let loop ((i 3))
  (when (< i max-fd)
(catch-system-error (close-fdes i))



Re: [PATCH 4/5] gnu: kernel-config: Add armhf kernel config.

2016-09-05 Thread David Craven
Nixos uses multi_v7_defconfig as a default. It should work at least on
the beaglebone black and raspberry pi 2 - which are probably the most
common boards?

[0] https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/platforms.nix



Re: Tracking package submissions with Debbugs

2016-09-05 Thread David Craven
> 1. Our commit history is not full of merges of tiny branches, which is
> what GitHub (and I thought Gitlab) encourages.

Yes, that is right. But as I mentioned in a different thread, there
are many projects where the maintainers agree to not use the merge
button because of this. Since we are using gitlab we can actually go
further than an agreement and disable the merge button entirely.

>   2. Contributors can revise their patch series (by rewriting history of
>  that series), and committers can incorporate the final patch set,
>  rather than the whole sequence of iterations.  This is what we
>  currently do; Gitlab should be able to recognize such patterns and
>  notice that the “merge request” can be closed, for instance.

It depends on how much modification the maintainers make before
pushing. It's git that has to recognize the commits as being the same.
If a contributor can rebase his branch after the PR was merged without
getting any conflicts, gitlab will also recognize that the PR was
merged. Since it's a lot easier to iterate without spamming the
mailing list we can in practice ask contributors to fix issues like
indentation themselves, and if the worst case happens, PR can be
closed manually (in the web interface).

>   3. People (especially, ahem, me!) can work from the comfort of their
>  favorite editor/terminal, or at least without having to run lots of
>  JS code and clicking around all day long.

That's what we all want. The only time it's required to use the web
interface is when creating a new issue or a new PR. After that you can
reply via email, rebase and push via git.

> I haven’t used Gitlab so I don’t know whether these requirements are
> satisfied.  If you set up an instance of Gitlab-free-software-edition
> and we do not have these problems, I’m happy!  :-)

Some adjustments to the workflow might have to be made, but I think we
have to give it a test run of at least a week or two before throwing
the towel ;-)

Who wants to take on this? Any volunteers?



Re: Offloading to a VM

2016-09-05 Thread David Craven
> I think we can leave this concern aside as a first approximation:

Ah interesting. The only architecture other than arm I'm interested in
is riscv. The riscv qemu port doesn't include a syscall emulation. But
I guess the riscv ecosystem still has a long way to go...

> A derivation is essentially the file name of a “builder” along with its
> argv and the needed dependencies.  For a given derivation, the hook
> would roughly run:

>   qemu-arm /gnu/store/…-builder arg1 arg2 …

> Hope this clarifies things!

Yes this does clarify things. Thanks!



Re: Tracking package submissions with Debbugs

2016-09-05 Thread David Craven
> How would we proceed with this?

I think that someone needs to write a service for gitlab first, since
we probably want to deploy it using guixsd ;) Then probably Ludo will
take over this. To give this a fair shot it has to be at least as much
effort to revert to the old way of things as to continue with the new
system.



Re: [PATCH] gnu: vlc: Add inputs.

2016-09-06 Thread David Craven
> Sorry, I don't understand what do you mean by libinput-minimal? I didn't
> add any packages with a "-minial" suffice. As for the necessities of
> those dependencies, those dependencies are added one by one. The
> procedure is as followed:
> 1. I build from source and check for something like "WARNING: XXX not found"
> 2. Add dependency(s) to silent the warning
> 3. Repeat

You should get the same warning for libinput too...



Re: Tracking package submissions with Debbugs

2016-09-06 Thread David Craven
> Also Kallithea does have an issues tracker on their roadmap, but it is
> not being worked on at the moment (I asked in their irc channel).
>
> At the same time I'm working on darcs, gogs and a go build-system and
> all kinds of other things. From packaging I don't know what gitlab
> wants as I have not looked at it. But gogs and kallithea both look
> easy to handle... gogs just needs a go build-system to make it easier to
> package the dependencies.

I guess whoever writes the service has some say in which one to use...
Everyone else is just talking not doing =P



[PATCH] service: Honor #:log-file in make-forkexec-constructor.

2016-09-06 Thread David Craven
* modules/shepherd/service.scm (exec-command): Redirect stdout and
  stderr to log-file.
  (fork+exec-command): Pass log-file to exec-command.
  (make-forkexec-constructor): Cleanup log-file. Pass log-file to
  fork+exec-command.
* doc/shepherd.texi (@deffn): Update documentation.
---
 doc/shepherd.texi|  5 +
 modules/shepherd/service.scm | 43 ++-
 2 files changed, 39 insertions(+), 9 deletions(-)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index edb2039..d7ce3fe 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -835,6 +835,7 @@ execution of the @var{command} was successful, @code{#t} if 
not.
   [#:user #f] @
   [#:group #f] @
   [#:pid-file #f] @
+  [#:log-file #f] @
   [#:directory (default-service-directory)] @
   [#:environment-variables (default-environment-variables)]
 Return a procedure that forks a child process, closes all file
@@ -848,6 +849,10 @@ the procedure will be the PID of the child process.
 When @var{pid-file} is true, it must be the name of a PID file
 associated with the process being launched; the return value is the PID
 read from that file, once that file has been created.
+
+When @var{log-file} is true, it must be the name of a file. The file will
+be removed if it exists and the services stdout and stderr will be
+redirected to it.
 @end deffn
 
 @deffn {procedure} make-kill-destructor [@var{signal}]
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 49f6e8b..d3fb348 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -687,6 +687,7 @@ number that was read (a PID)."
#:key
(user #f)
(group #f)
+   (log-file #f)
(directory (default-service-directory))
(environment-variables (default-environment-variables)))
   "Run COMMAND as the current process from DIRECTORY, and with
@@ -712,12 +713,27 @@ false."
 
  ;; Close all the file descriptors except stdout and stderr.
  (let ((max-fd (max-file-descriptors)))
-   (catch-system-error (close-fdes 0))
 
+   ;; Redirect stdin to use /dev/null
+   (catch-system-error (close-fdes 0))
;; Make sure file descriptor zero is used, so we don't end up reusing
;; it for something unrelated, which can confuse some packages.
(dup2 (open-fdes "/dev/null" O_RDONLY) 0)
 
+   (when log-file
+ (catch #t
+   (lambda ()
+ ;; Redirect stout and stderr to use LOG-FILE.
+ (catch-system-error (close-fdes 1))
+ (catch-system-error (close-fdes 2))
+ (dup2 (open-fdes log-file (logior O_CREAT O_WRONLY)) 1)
+ (dup2 (open-fdes log-file (logior O_CREAT O_WRONLY)) 2))
+   (lambda (key . args)
+ (format (current-error-port)
+ "failed to open log-file ~s:~%" log-file)
+ (print-exception (current-error-port) #f key args)
+ (primitive-exit 1
+
(let loop ((i 3))
  (when (< i max-fd)
(catch-system-error (close-fdes i))
@@ -760,6 +776,7 @@ false."
 #:key
 (user #f)
 (group #f)
+(log-file #f)
 (directory (default-service-directory))
 (environment-variables
  (default-environment-variables)))
@@ -770,6 +787,7 @@ its PID."
 (exec-command command
   #:user user
   #:group group
+  #:log-file log-file
   #:directory directory
   #:environment-variables environment-variables)
 pid)))
@@ -798,24 +816,31 @@ once that file has been created."
(group #f)
(directory (default-service-directory))
(environment-variables (default-environment-variables))
-   (pid-file #f))
+   (pid-file #f)
+   (log-file #f))
   (let ((command (if (string? command)
  (begin
(warn-deprecated-form)
(list command))
  command)))
 (lambda args
-  (when pid-file
-(catch 'system-error
-  (lambda ()
-(delete-file pid-file))
-  (lambda args
-(unless (= ENOENT (system-error-errno args))
-  (apply throw args)
+  (define (clean-up file)
+(when file
+  (catch 'system-error
+(lambda ()
+  (delete-file file))
+(lambda args
+  (unless (= ENOENT (system-error-errno args))
+(apply throw args))
+
+  (clean-up pid-file)
+  (c

Re: [PATCH] service: Honor #:log-file in make-forkexec-constructor.

2016-09-06 Thread David Craven
Not syslog, but helps with debugging...



[PATCH] services: Add login-service.

2016-09-06 Thread David Craven
* gnu/services/base.scm (%default-motd, ,
  login-pam-service, login-serivce-type, login-service): New variables.
  (, mingetty-shepherd-service,
  mingetty-serivce-type): Remove motd. Remove allow-empty-passwords?.
  Remove mingetty-pam-service.
  (%base-services): Add login-service. Remove motd.
---
 gnu/services/base.scm | 131 --
 1 file changed, 74 insertions(+), 57 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 2c2962c..99a6759 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -66,6 +66,11 @@
 udev-service
 udev-rule
 
+login-configuration
+login-configuration?
+login-service-type
+login-service
+
 mingetty-configuration
 mingetty-configuration?
 mingetty-service
@@ -656,41 +661,55 @@ strings or string-valued gexps."
   ;; codepoints notably found in the UTF-8 manual.
   (service console-font-service-type (list tty font)))
 
+(define %default-motd
+  (plain-file "motd" "This is the GNU operating system, welcome!\n\n"))
+
+(define-record-type* 
+  login-configuration make-login-configuration
+  login-configuration?
+  (motd   login-configuration-motd ;file-like
+  (default %default-motd))
+  ;; Allow empty passwords by default so that first-time users can log in when
+  ;; the 'root' account has just been created.
+  (allow-empty-passwords? login-configuration-allow-empty-passwords?
+  (default #t)))   ;Boolean
+
+(define (login-pam-service config)
+  "Return the list of PAM service needed for CONF."
+  ;; Let 'login' be known to PAM.
+  (list (unix-pam-service "login"
+  #:allow-empty-passwords?
+  (login-configuration-allow-empty-passwords? config)
+  #:motd
+  (login-configuration-motd config
+
+(define login-service-type
+  (service-type (name 'login)
+(extensions (list (service-extension pam-root-service-type
+ login-pam-service)
+
+(define* (login-service #:optional (config (login-configuration)))
+  "Return a service configure login according to @var{config}, which specifies
+the message of the day, among other things."
+  (service login-service-type config))
+
 (define-record-type* 
   mingetty-configuration make-mingetty-configuration
   mingetty-configuration?
   (mingetty   mingetty-configuration-mingetty ;
   (default mingetty))
   (ttymingetty-configuration-tty) ;string
-  (motd   mingetty-configuration-motd ;file-like
-  (default (plain-file "motd" "Welcome.\n")))
   (auto-login mingetty-auto-login ;string | #f
   (default #f))
   (login-program  mingetty-login-program  ;gexp
   (default #f))
   (login-pause?   mingetty-login-pause?   ;Boolean
-  (default #f))
-
-  ;; Allow empty passwords by default so that first-time users can log in when
-  ;; the 'root' account has just been created.
-  (allow-empty-passwords? mingetty-configuration-allow-empty-passwords?
-  (default #t)))  ;Boolean
-
-(define (mingetty-pam-service conf)
-  "Return the list of PAM service needed for CONF."
-  ;; Let 'login' be known to PAM.  All the mingetty services will have that
-  ;; PAM service, but that's fine because they're all identical and duplicates
-  ;; are removed.
-  (list (unix-pam-service "login"
-  #:allow-empty-passwords?
-  (mingetty-configuration-allow-empty-passwords? conf)
-  #:motd
-  (mingetty-configuration-motd conf
+  (default #f)))
 
 (define mingetty-shepherd-service
   (match-lambda
-(($  mingetty tty motd auto-login login-program
- login-pause? allow-empty-passwords?)
+(($  mingetty tty auto-login login-program
+ login-pause?)
  (list
   (shepherd-service
(documentation "Run mingetty on an tty.")
@@ -718,9 +737,7 @@ strings or string-valued gexps."
 (define mingetty-service-type
   (service-type (name 'mingetty)
 (extensions (list (service-extension shepherd-root-service-type
- mingetty-shepherd-service)
-  (service-extension pam-root-service-type
- mingetty-pam-service)
+ 
mingetty-shepherd-service)
 
 (define* (mingetty-service config)
   "Return a service to run mingetty according to @var{config}, which specifies
@@ -1435,38 +1452,38 @@ This service is not 

[PATCH] services: Add kmscon service.

2016-09-06 Thread David Craven
* gnu/services/base.scm (,
  kmscon-shepherd-service, kmscon-service-type, kmscon-service): New
  variables.
---
 gnu/services/base.scm | 53 +++
 1 file changed, 53 insertions(+)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 99a6759..efd72c7 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages lsof)
+  #:use-module (gnu packages terminals)
   #:use-module ((gnu build file-systems)
 #:select (mount-flags->bit-mask))
   #:use-module (guix gexp)
@@ -116,6 +117,12 @@
 rngd-configuration?
 rngd-service-type
 rngd-service
+
+kmscon-configuration
+kmscon-configuration?
+kmscon-service-type
+kmscon-service
+
 pam-limits-service-type
 pam-limits-service
 
@@ -1449,6 +1456,52 @@ This service is not part of @var{%base-services}."
   (service gpm-service-type
(gpm-configuration (gpm gpm) (options options
 
+(define-record-type* 
+  kmscon-configuration   make-kmscon-configuration
+  kmscon-configuration?
+  (kmsconkmscon-configuration-kmscon
+ (default kmscon))
+  (vtkmscon-configuration-vt)
+  (login-program kmscon-configuration-login-program
+ (default #~(string-append #$shadow "/bin/login")))
+  (login-arguments   kmscon-configuration-login-arguments
+ (default '("-p")))
+  (hwaccel?  kmscon-configuration-hwaccel?
+ (default #f))) ; #t causes failure
+
+(define (kmscon-shepherd-service config)
+  "Return a  for kmscon with CONFIG."
+  (let ((kmscon (kmscon-configuration-kmscon config))
+(vt (kmscon-configuration-vt config))
+(login-program (kmscon-configuration-login-program config))
+(login-arguments (kmscon-configuration-login-arguments config))
+(hwaccel? (kmscon-configuration-hwaccel? config)))
+
+(define kmscon-command
+  #~(list
+ (string-append #$kmscon "/bin/kmscon") "--login"
+ "--vt" #$vt
+ #$@(if hwaccel? '("--hwaccel") '())
+ "--" #$login-program #$@login-arguments))
+
+  (list (shepherd-service
+(documentation "kmscon virtual terminal")
+(requirement '(user-processes udev))
+(provision (list (symbol-append 'term- (string->symbol vt
+(start #~(make-forkexec-constructor #$kmscon-command))
+(stop #~(make-kill-destructor))
+
+(define kmscon-service-type
+  (service-type (name 'kmscon)
+(extensions
+  (list (service-extension shepherd-root-service-type
+   kmscon-shepherd-service)
+
+(define* (kmscon-service config)
+  "Run the @command{kmscon} daemon from @var{kmscon} to start a virtual
+terminal."
+  (service kmscon-service-type config))
+
 
 (define %base-services
   ;; Convenience variable holding the basic services.
-- 
2.9.0



  1   2   3   4   5   6   7   8   9   10   >