Re: U-Boot for Raspberry Pi

2022-02-21 Thread Reza Alizadeh Majd
On Mon, 21 Feb 2022 12:14:50 +0100
Ricardo Wurmus  wrote:


>
>mmc-block or mmc_block?

based on the following thread I thought that it might be the issue with
module name, so I tested with both mmc_block an mmc-block.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34902

unfortunately neither of those worked for me and I received the error
message I mentioned before. 

>
>What does the directory contain?  If the module doesn’t exist you’ll
>have to build a kernel with a configuration that enables this module.
>


--8<---cut here---start->8---
$ find /gnu/store/*-linux-libre-arm64-generic-5.14.15/lib/modules -name '*mmc*'
/gnu/store/gjm8fcl4z9zl7qql5d3cvpbrdlkfjx27-linux-libre-arm64-generic-5.14.15/lib/modules/5.14.15-gnu-v7l/kernel/drivers/mmc
/gnu/store/gjm8fcl4z9zl7qql5d3cvpbrdlkfjx27-linux-libre-arm64-generic-5.14.15/lib/modules/5.14.15-gnu-v7l/kernel/drivers/mmc/host/mmc_spi.ko
/gnu/store/gjm8fcl4z9zl7qql5d3cvpbrdlkfjx27-linux-libre-arm64-generic-5.14.15/lib/modules/5.14.15-gnu-v7l/kernel/drivers/mmc/host/of_mmc_spi.ko
--8<---cut here---end--->8---

so it seems that the module is actually not available. is that because
of the the libre kernel restrictions?



-- 
Reza Alizadeh Majd
PantherX Team
https://pantherx.org



Re: U-Boot for Raspberry Pi

2022-02-21 Thread Reza Alizadeh Majd
On Sat, 19 Feb 2022 00:12:37 +0100
Ricardo Wurmus  wrote:

>
>Are you using qemu-binfmt-service-type?
>

Thank you, adding the service to the host machine, resolves the build
issue. 


however the previously mentioned issue in this thread about
the `mmc_block` kernel module still persists during the build:

adding the following kernel modules: 

--8<---cut here---start->8---
(initrd-modules (append (list "mmc_block" "rtsx_pci_sdmmc" "rtsx_pci")
%base-initrd-modules))
--8<---cut here---end--->8---

I receive following error: 

--8<---cut here---start->8---
Backtrace:
   5 (primitive-load "/gnu/store/gdz17k41dvf1b38y9wzs8assi9n?")
In ice-9/eval.scm:
619:8  4 (_ #f)
   626:19  3 (_ #)
   293:34  2 (_ #(# #))
In srfi/srfi-1.scm:
   586:17  1 (map1 ("mmc-block" "rtsx_pci_sdmmc" "rtsx_pci" "ahci" ?))
In gnu/build/linux-modules.scm:
257:5  0 (find-module-file _ _)

gnu/build/linux-modules.scm:257:5: In procedure find-module-file:
kernel module not found "mmc-block" 
"/gnu/store/8pms0r4zvqxx6bqaz8rw2h3ynjfynqdx-linux-libre-arm64-generic-5.14.15/lib/modules"
--8<---cut here---end--->8---


Regards, 
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://pantherx.org



Re: U-Boot for Raspberry Pi

2022-02-16 Thread Reza Alizadeh Majd
Hi Stefan, 

First of all, thanks for your great work to bring the Guix for RPi. 


>Your troubles might indicate that you didn’t properly mount the ext4
>and FAT file systems below /mnt. You should follow the manual
>regarding an EFI system¹: Mount the ext4 partition of the microSD card
>at /mnt and the FAT partition of the microSD card at /mnt/boot/efi –
>you will have to call ‘mkdir -p /mnt/boot/efi’ after mounting the ext4
>partition and before mounting the FAT partition.
>
>> Do you have different suggestion on how to invoke the guix system
>> init command?  
>
>Please separate build and installation. First build guix as described
>in the manual² without any sudo but inside its build environment with
>the amount of cores you like to use:
>
>$ guix environment --pure guix
>$ ./bootstrap
>$ ./configure --localstatedir=/var
>$ make -j 4
>$ exit
>
>Then use the new guix outside its build environment to initialize the
>system with sudo:
>
>$ sudo -E ./pre-inst-env guix system init --system=aarch64-linux
>gnu/system/examples/raspberry-pi-64.tmpl /mnt


I just followed your instructions from Guix host machine, but I faced
following error during the `guix system init process: 

--8<---cut here---start->8---
@ unsupported-platform 
/gnu/store/4dc56sq286h0pdvs0s6917vvzlr9xsrg-module-import-compiled.drv 
aarch64-linux
while setting up the build environment: a `aarch64-linux' is required to build 
`/gnu/store/4dc56sq286h0pdvs0s6917vvzlr9xsrg-module-import-compiled.drv', but I 
am a `x86_64-linux'
--8<---cut here---end--->8---

it seems that the `--system=aarch64-linux` doesn't work as expected to
cross-compile the image for RPi. 

here is more details about my build process: 
- I tried to build the Guix for RPi compute module 4 with embedded 32GB
  emmc. 
- identified the `rootfs` and `boot` partitions using usbboot [1].
- mounted the `rootfs` to the `/mnt`
- created the `/mnt/boot/efi` prior to mounting the `boot` partition
  there. 
- added following required initrd modules to the system configuration.

--8<---cut here---start->8---
 (initrd-modules (append (list "uas" "usb_storage")
%base-initrd-modules))
  (initrd-modules (append (list "uas" "usb_storage")
  %base-initrd-modules))
--8<---cut here---end--->8---


1. https://github.com/raspberrypi/usbboot


Best, 
Reza


-- 
Reza Alizadeh Majd
PantherX Team
https://pantherx.org



Re: Problem on packaging qt-light extension for Chicken

2021-01-07 Thread Reza Alizadeh Majd
Hi, 

> When I saw the message I was puzzled and tried to work around your
> issues with no success. I talked with who started the chicken
> buildsystem, and I was told the error is related with some
> dependencies missing. The error message should be clearer on this but
> it makes sense, the non-cached extension is not qt-light but its deps.
> 
> The egg says:
> 
> --8<---cut here---start->8---
>  (dependencies bind protobj matchable miscmacros shell)
> --8<---cut here---end--->8---
> 
> So you probably need to package that first.
> 
> Hope this helps. Good luck!

yes the error message wasn't so clear to find if the issue is related
to which part of build process.

I'll try to resolve the dependency issues and see if I can finally 
prepare the package or not. 

Thanks for your feedback!  

Regards, 
Reza


-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Problem on packaging qt-light extension for Chicken

2021-01-05 Thread Reza Alizadeh Majd
Hi Guix,

trying to prepare package for qt-light[1] extension for chicken-scheme,
I faced an issue about finding the extension in cache. 

my package definition:

--8<---cut here---start->8---
(use-modules (gnu)
 (guix build-system chicken)
 (guix svn-download)
 (guix packages)
 (gnu packages chicken)
 (gnu packages qt)
 ((guix licenses) #:prefix license:))
(package
  (name "chicken-qt-light")
  (version "1.0")
  (source
   (origin
 (method svn-fetch)
 (uri (svn-reference
   (url (string-append
 "https://code.call-cc.org/svn/chicken-eggs/;
 "release/5/qt-light/tags/" version))
   (revision 39484)
   (user-name "anonymous")
   (password "")))
 (file-name (string-append "chicken-qt-light-" version "-checkout"))
 (sha256
  (base32
   "09mhv6d4zfc0n2vxaw1d8s3hr9bdh19iq389ajzsm2947988rs58"
  (build-system chicken-build-system)
  (arguments
   '(#:egg-name "qt-light"
 #:phases
 (modify-phases %standard-phases
   (add-before 'build 'setup-environment
 (lambda* (#:key inputs #:allow-other-keys)
   (setenv "QTDIR" (assoc-ref inputs "qt"))
   #t)))
 ))
  (inputs `(("qt" ,qtbase)))
  (home-page "https://wiki.call-cc.org/eggref/5/qt-light;)
  (synopsis "A lightweight Qt 5 interface")
  (description
   "This extension provides a lightweight and relatively easy to use
interface to Trolltech's Qt GUI toolkit.")
  (license license:bsd-3))
--8<---cut here---end--->8---

trying to install this pacakge, I receive following error:

--8<---cut here---start->8---
phase `unpack' succeeded after 0.0 seconds
starting phase `patch-usr-bin-file'
phase `patch-usr-bin-file' succeeded after 0.0 seconds
starting phase `patch-source-shebangs'
patch-shebang: ./qt-light/chicken-compile-qt-extension.scm: changing `/bin/sh' 
to `/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh'
phase `patch-source-shebangs' succeeded after 0.0 seconds
starting phase `setup-environment'
phase `setup-environment' succeeded after 0.0 seconds
starting phase `build'

Error: extension not cached
command "chicken-install" "-cached" "-no-install" "qt-light" failed with status 
70
--8<---cut here---end--->8---

could anyone help me about this issue? 


[1]: https://wiki.call-cc.org/eggref/5/qt-light

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: Problem on setting up the Cuirass as substitute server

2020-11-27 Thread Reza Alizadeh Majd
On Thu, 26 Nov 2020 18:56:50 +0330
Reza Alizadeh Majd  wrote:

> --8<---cut here---start->8---
> (define %cuirass-specs
>   #~(list
>  '((#:name . "my-manifest")
>(#:load-path-inputs . ("guix"))
>(#:package-path-inputs . ())
>(#:proc-input . "guix")
>(#:proc-file . "build-aux/cuirass/gnu-system.scm")
>(#:proc . cuirass-jobs)
>(#:proc-args . ((subset . "manifests")
>(systems . ("x86_64-linux"))
>(manifests . (("config" . "manifest.scm")
>(#:inputs . (((#:name . "guix")
>  (#:url . "git://git.savannah.gnu.org/guix.git")
>  (#:load-path . ".")
>  (#:branch . "master")
>  (#:no-compile? . #t))
> ((#:name . "config")
>  (#:url .
> "https://github.com/ramajd/guix-manifest.git;) (#:load-path . ".")
>  (#:branch . "master")
>  (#:no-compile? . #t)))
> --8<---cut here---end--->8---

add the `(#:build-outputs . ())` to my specification definition, cuirass
added my specification to the list of it's build specs. 

my current problem is that status of added jobs are `scheduled` and I
receive following message on cuirass logs:

--8<---cut here---start->8---
2020-11-27T15:14:19 evaluation 1 for 'my-manifest' completed
2020-11-27T15:14:19 building 2 jobs for 'my-manifest'
2020-11-27T15:14:19 Registering builds for evaluation 1.
2020-11-27T15:14:19 evaluation 1 registration took 0.001742 seconds
2020-11-27T15:14:19 evaluation 1 registered 2 new derivations
2020-11-27T15:14:19 building 2 derivations in batches of 200
2020-11-27T15:14:19 building batch of 200 derivations (0/2)
2020-11-27T15:14:20 done with 2 derivations
2020-11-27T15:14:20 outputs:
/gnu/store/220zbr30p8yj6yg9ndkk7a537x6f4vir-ungoogled-chromium-87.0.4280.66-0.1f7cdef
/gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10
2020-11-27T15:14:20 success: 0, fail: 2
--8<---cut here---end--->8---

I assume this happened because that my server used available substitutes
from Guix substitute server, instead of building them by itself. is
that right?  

if not, is there any further thing that I need to apply on my spec
definition? 

Regards, 
Reza


-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Problem on setting up the Cuirass as substitute server

2020-11-26 Thread Reza Alizadeh Majd
Hi Guix, 

Trying to setup Cuirass to build a series of packages, I followed the
instructions provided in following link: 

https://guix.gnu.org/manual/en/html_node/Continuous-Integration.html

starting cuirass service on my machine, service starts with no error,
but when I check the web interface, list of specifications is empty.

--8<---cut here---start->8---
(define %cuirass-specs
  #~(list
 '((#:name . "my-manifest")
   (#:load-path-inputs . ("guix"))
   (#:package-path-inputs . ())
   (#:proc-input . "guix")
   (#:proc-file . "build-aux/cuirass/gnu-system.scm")
   (#:proc . cuirass-jobs)
   (#:proc-args . ((subset . "manifests")
   (systems . ("x86_64-linux"))
   (manifests . (("config" . "manifest.scm")
   (#:inputs . (((#:name . "guix")
 (#:url . "git://git.savannah.gnu.org/guix.git")
 (#:load-path . ".")
 (#:branch . "master")
 (#:no-compile? . #t))
((#:name . "config")
 (#:url . "https://github.com/ramajd/guix-manifest.git;)
 (#:load-path . ".")
 (#:branch . "master")
 (#:no-compile? . #t)))
--8<---cut here---end--->8---

the manifest.scm file that I added for list of package for build:

--8<---cut here---start->8---
(specifications->manifest
 '("hello"))
--8<---cut here---end--->8---

I also don't receive any errors in cuirass logs: 

--8<---cut here---start->8---
WARNING: (guile-user): imported module (fibers) overrides core binding `sleep'
2020-11-26T18:52:10 performing database optimizations
2020-11-26T18:52:11 running Fibers on 4 kernel threads
2020-11-26T18:52:11 Enable SQL query logging.
2020-11-26T18:52:11 marking stale builds as "scheduled"...
WARNING: (cuirass watchdog): imported module (fibers) overrides core binding 
`sleep'
2020-11-26T18:52:11 retrieving list of pending builds...
2020-11-26T18:52:11 Updating metric builds-per-day (1606262400) to 0.
2020-11-26T18:52:11 heap: 11.93 MiB; threads: 16; file descriptors: 66
2020-11-26T18:52:11 Updating metric new-derivations-per-day (1606262400) to 0.
2020-11-26T18:52:11 canceling 0 stale builds
2020-11-26T18:52:11 restarting 0 pending builds
2020-11-26T18:52:11 building 0 derivations in batches of 200
2020-11-26T18:52:11 done with 0 derivations
2020-11-26T18:52:11 done with restarted builds
2020-11-26T18:52:11 Updating metric pending-builds (1606348800) to 0.
2020-11-26T18:52:11 next evaluation in 60 seconds
2020-11-26T18:52:11 Metrics update took 0.006027 seconds
2020-11-26T18:53:11 next evaluation in 60 seconds
--8<---cut here---end--->8---

can anyone help me on above configuration? did I miss anything about
specification definition? 

Regards, 
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: Easy DigitalOcean setup?

2020-11-09 Thread Reza Alizadeh Majd
On Mon, 9 Nov 2020 23:28:02 +0100
raingloom  wrote:

> I've been stuck on trying to "infect" an Ubuntu VPS with Guix for a
> while. It keeps failing on the bootloader setup step and it does so in
> a way that somehow nukes the `guix` command, but the store remains.
> 
> At press time, my config was the one attached.
> 
> As I'm a caveperson who never owned a single UEFI machine, I'm a bit
> stumped as to what the absolute heck the nature of the error might be:
> ```
> # guix system init /etc/config.scm /
> ...bunch of build stuff, and then:
> guix system: error:
> '/gnu/store/0az53wrhxvhpkm80pmfyzw607y0qas9n-grub-efi-2.04/sbin/grub-install
> --boot-directory //boot --bootloader-id=Guix --efi-directory
> //boot/efi' exited with status 1; output follows:
> 
>   /gnu/store/0az53wrhxvhpkm80pmfyzw607y0qas9n-grub-efi-2.04/sbin/grub-install:
>   error:
>   
> /gnu/store/0az53wrhxvhpkm80pmfyzw607y0qas9n-grub-efi-2.04/lib/grub/i386-pc/modinfo.sh
>   doesn't exist. Please specify --target or --directory.
> ```
> 
> I found two existing guides, but one requires adding an extra block
> device and other shenanigans, and the other mentions some alarmingly
> outdated version numbers, so I don't trust either of them.

Hi, 

Having a similar experience about transforming a Debian droplet to Guix
on digitalocean, we provided a document for that. maybe that would also
helps you

https://wiki.pantherx.org/Installation-digital-ocean/

Regards
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: guix environment ad-hoc manifests

2020-10-24 Thread Reza Alizadeh Majd
Dear Simon, 

On Thu, 22 Oct 2020 18:22:46 +0200
zimoun  wrote:

> From my understanding, as Ricardo said, the command:
> 
>guix environment -m my-manifest.scm
> 
> is equivalent to:
> 
>   guix environment --ad-hoc pkg1 pkg2 pkg3
> 

Thanks for your response. yes this is exactly what I was looking for.

just from the "Guix Environment" document:

> Create an environment for the packages contained in the manifest
> object returned by the Scheme code in file.

I assumed that manifest packages, would be acted like:

  guix environment pkg1 pkg2

which it seems that I was wrong.


Thanks
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: guix environment ad-hoc manifests

2020-10-24 Thread Reza Alizadeh Majd
On Thu, 22 Oct 2020 17:16:21 +0200
Ricardo Wurmus  wrote:

> > yes, a possible use-case would be to provide a development
> > environment for a software which is not packaged yet. during
> > development phase, we could easily update this manifest file and
> > include third-parties we need to use.  
> 
> But isn’t this exactly what you can use a manifest file for already?
> “guix environment” not only accepts a file that describes a package,
> but also a manifest.
> 

Thank you for your response, there is just a point that I don't
understand.

- when we add a package to environment, all of package inputs will be
added to the environment.
- using --ad-hoc switch, package itself will be present in environment.

now I want to know add a series of packages using --manifest, add them
directly to the environment (like --ad-hoc), or add inputs for each
package to environment?  


Thanks
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: guix environment ad-hoc manifests

2020-10-22 Thread Reza Alizadeh Majd
On Thu, 22 Oct 2020 13:53:10 +0200
Ricardo Wurmus  wrote:

> Reza Alizadeh Majd  writes:
> 
> > it would also be great to be able to pass list of ad-hoc packages,
> > using a manifest file, something like --ad-hoc-manifest switch. or
> > maybe there is such option already available that I missed.   
> 
> What would that look like?  Just a file containing package names?
> 

yes, a possible use-case would be to provide a development
environment for a software which is not packaged yet. during
development phase, we could easily update this manifest file and
include third-parties we need to use.

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



guix environment ad-hoc manifests

2020-10-22 Thread Reza Alizadeh Majd
Hi Guix, 

working with guix environments, we can pass list of packages, using a
manifest file. we also can use --ad-hoc switch for additional packages
we need to add to the prepared environment.

it would also be great to be able to pass list of ad-hoc packages,
using a manifest file, something like --ad-hoc-manifest switch. or
maybe there is such option already available that I missed. 

Regards, 
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



writable skeleton files in sub-directories

2020-10-14 Thread Reza Alizadeh Majd
Hi Guix,

working on a new service for `lxqt-desktop`, I need to provide a series
of predefined configurations for that. so I defined a series of
skeleton files and add them to the service using `account-service-type`
extension.

the problem is that when the location of a skeleton file is a path other
than user's home directory, it will be created in read-only mode.

I also tried  to use `computed-file` and `chmod` the created file. but
the permission still didn't apply.

I also provided a test configuration to reproduce this issue:

--8<---cut here---start->8---
(use-modules (gnu) (guix records))

;;
;; Test service definition
;;
(define-record-type*  test-config
  make-test-config test-config?)

(define (test-skeletons)
  `((".config/test"
 ,(computed-file "test-config-dir"
 (with-imported-modules
  '((guix build utils))
  #~(begin
  (use-modules (guix build utils))
  (mkdir-p #$output)
(".config/test/foo.conf" ,(plain-file "foo.conf" "this is readonly"))
(".config/test/bar.conf"
 ,(computed-file "bar.conf"
 (with-imported-modules
  '((guix build utils))
  #~(begin
  (use-modules (guix build utils))
  (call-with-output-file #$output
(lambda (port)
  (display "this is also readonly" port)))
  (chmod #$output #o644)
("baz.txt" ,(plain-file "baz.txt" "this is writable"

(define test-service-type
  (service-type
   (name 'test-service)
   (extensions
(list (service-extension account-service-type
 (const (test-skeletons)
   (default-value (test-config))
   (description "test service for skeleton files issue")))

;;
;; Operating system definition
;;
(operating-system
  (host-name "guix.local")
  (timezone "Asia/Tehran")
  (locale "en_US.utf8")

  (bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))
  (file-systems (cons (file-system
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4"))
  %base-file-systems))

  (services (cons* (service test-service-type)
   %base-services)))
--8<---cut here---end--->8---


running the above configuration, `~/baz.txt` is writable, but
`foo.conf` and `bar.conf` files which are located in `~/.config/test/`
are both read-only:

--8<---cut here---start->8---
root@guix ~# ll
...
-rw-r--r-- 1 root root 29 Oct 14 21:18 baz.txt
...

root@guix ~# ll .config/test/
...
-r--r--r-- 1 root root   20 Oct 14 21:18 foo.conf
-r--r--r-- 1 root root   40 Oct 14 21:18 bar.conf
...
--8<---cut here---end--->8---

is there anything that I might be missed in definition of skeleton
files? or it might be a bug in creation of skeleton files.


Regards, 
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: how to define inputs for python packages

2020-09-29 Thread Reza Alizadeh Majd
On Mon, 28 Sep 2020 20:27:57 +0200
Hartmut Goebel  wrote:

> Am 28.09.20 um 08:05 schrieb Reza Alizadeh Majd:
> > is there any rule that I missed to choose a dependency as an
> > `input` or as a `propageted-input` one?  
> 
> This is described in the manual:
> 
> https://guix.gnu.org/manual/en/html_node/Python-Modules.html#Specifying-Dependencies
> 

Thanks, that was so helpful.

Regards,
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



how to define inputs for python packages

2020-09-28 Thread Reza Alizadeh Majd
Hi Guix,

I'm a little confused about definition of inputs for a python based
package.

I had defined a package for a python library that I wrote, defining the
dependencies as `inputs`, package builds successfully, and all my tests
will be passed.

but when I try to import this library to another program, I receive
various errors about missing dependencies of the library. (the ones
that I defined as `inputs` for the library).

is there any rule that I missed to choose a dependency as an `input` or
as a `propageted-input` one?

Regards, 
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: Hide boot process logs

2020-08-18 Thread Reza Alizadeh Majd
Hi John,

On Tue, 18 Aug 2020 09:54:00 -0700
John Soo  wrote:

> Hey Reza and Guix,
> 
> I should add that even if it is not supported now, hacking on the
> grub configuration is not too difficult and is located in
> gnu/bootloader/grub.scm. You should be able to specify parameters
> there.

Thanks, I had a quick look over `gnu/bootloader/grub.scm`. 

so as I understand, I need to inherit from `grub-bootloader` and replace
`configuration-file-generator` parameter with my own custom procedure
that returns a `computed-file` containing final `grub.cfg` with my
desired custom configuration parameters.

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: Hide boot process logs

2020-08-18 Thread Reza Alizadeh Majd
Hi Tobias!

Thanks for your response. 

On Tue, 18 Aug 2020 18:04:05 +0200
Tobias Geerinckx-Rice  wrote:
> Hi Reza!
> 
> Reza Alizadeh Majd 写道:
> > I want to hide the boot process logs in Guix, having a quick 
> > search I
> > found that I can use following options in grub configuration 
> > file:
> >
> >
> > GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"  
> 
> Forget this line.  No part of it makes sense on Guix (except 
> ‘quiet’, which is handled by the kernel itself, and see below for 
> that).
> 

> GRUB_CMDLINE_LINUX_DEFAULT (and similar-looking variables) is used 
> only by the ‘update-grub’ utility on some distributions that uses 
> a bash configuration file to configure a bash script that creates 
> the final (bash-like) grub.cfg.

so as I understand, `update-grub` utility generate entries in a way to
perform a quiet boot using `GRUB_CMDLINE_LINUX_DEFAULT` parameter.
do you think if it's possible to perform these changes manually to menu
entries? 

I also find that we can redirect kernel logs to a separated TTY using 
`GRUB_CMDLINE_LINUX="console=tty...`. I assume this parameter is also
processed by `update-grub` utility. is it possible to perform same
action using `kernel-arguments` or some other modification in menu
entries? 


-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Hide boot process logs

2020-08-18 Thread Reza Alizadeh Majd
Hi, 

I want to hide the boot process logs in Guix, having a quick search I
found that I can use following options in grub configuration file:


GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 


the problem is that based on current bootloader definition, there is no
option exposed for additional grub configurations (or I might missed
the proper option for this).

does anyone knows, any workaround for this issue? 

Regards, 
Reza


-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: set permission/ownership for files generated by service

2020-07-14 Thread Reza Alizadeh Majd
On Tue, 14 Jul 2020 15:36:41 +0300
Efraim Flashner  wrote:

> On Tue, Jul 14, 2020 at 04:46:31PM +0430, Reza Alizadeh Majd wrote:
> > 
> > I assume that I find the issue source: 
> >   
> > > > > >
> > > > > >--8<---cut
> > > > > >here---start->8---
> > > > > >
> > > > > >(define %kyc-accounts
> > > > > >  (list (user-group (name "kyc-service"))
> > > > > >(user-group (name "kyc-rpc"))
> > > > > >(user-account
> > > > > >  (name "kyc-service")
> > > > > >  (group "kyc-service")
> > > > > >  (system? #f)
> > > > > >  (supplementary-groups '("wheel" "kyc-rpc" "video"))
> > > > > >  (comment "KYC service user"
> > > > > >
> > > > > >--8<---cut
> > > > > >here---end--->8---
> > > > > >  
> > 
> > I modified the service definition to open an empty 'screen', so I
> > can access shell through service, when I connect to the screen and
> > check user groups, it seems that the 'supplementary-groups' didn't
> > apply to the user:
> > 
> > --8<---cut here---start->8---
> > sh-5.0$ whoami 
> > kyc-service
> > sh-5.0$ groups
> > kyc-service
> > sh-5.0$ 
> > --8<---cut here---end--->8---
> > 
> > so, is there any thing that I missed?
> >   
> 
> The only other thing I can think of right now is that you're creating
> the kyc-service and kyc-rpc groups AND also using them for the first
> time here. It could be that the kyc-service group is created with the
> kyc-service user and the kyc-rpc group is 'too slow'. Try your code
> again but without the kyc-rpc group.
> 

I don't think, since the issue still persists after restarting the
services, or even by rebooting the machine. I also checked the
`/etc/group` and `kyc-service` user exists in all of the supplementary
groups. but the `groups` command shows only the primary group. 

--8<---cut here---start->8---
sh-5.0$ cat /etc/group  | grep "kyc"
kyc-user:x:30002:
kyc-rpc:x:30001:kyc-user,kyc-service
kyc-service:x:980:
wheel:x:999:kyc-user,kyc-service
video:x:992:kyc-user,kyc-service
--8<---cut here---end--->8---

is it possible that I missed to set any environment variable, so the
permissions wouldn't be loaded correctly?

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: set permission/ownership for files generated by service

2020-07-14 Thread Reza Alizadeh Majd


I assume that I find the issue source: 

> > > >
> > > >--8<---cut here---start->8---
> > > >
> > > >(define %kyc-accounts
> > > >  (list (user-group (name "kyc-service"))
> > > >(user-group (name "kyc-rpc"))
> > > >(user-account
> > > >  (name "kyc-service")
> > > >  (group "kyc-service")
> > > >  (system? #f)
> > > >  (supplementary-groups '("wheel" "kyc-rpc" "video"))
> > > >  (comment "KYC service user"
> > > >
> > > >--8<---cut here---end--->8---
> > > >

I modified the service definition to open an empty 'screen', so I can
access shell through service, when I connect to the screen and check
user groups, it seems that the 'supplementary-groups' didn't apply to
the user:

--8<---cut here---start->8---
sh-5.0$ whoami 
kyc-service
sh-5.0$ groups
kyc-service
sh-5.0$ 
--8<---cut here---end--->8---

so, is there any thing that I missed?

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: set permission/ownership for files generated by service

2020-07-14 Thread Reza Alizadeh Majd
On Tue, 14 Jul 2020 12:10:29 +0300
Efraim Flashner  wrote:

> On Tue, Jul 14, 2020 at 12:54:56PM +0430, Reza Alizadeh Majd wrote:
> > On Mon, 13 Jul 2020 22:01:47 -0400
> > Julien Lepiller  wrote:
> >   
> > > Le 13 juillet 2020 20:18:09 GMT-04:00, Reza Alizadeh Majd
> > >  a écrit :  
> > > >
> > > >my service definition is as follows:
> > > >
> > > >
> > > >--8<---cut here---start->8---
> > > >(define-record-type* 
> > > >  kyc-configuration make-kyc-configuration
> > > >  kyc-configuration?
> > > >  (package kyc-configuration-package
> > > >   (default kyc))
> > > >  (user kyc-configuration-user
> > > >(default "kyc-service"))
> > > >  (group kyc-configuration-group
> > > > (default "kyc-service")))
> > > >
> > > >(define %kyc-accounts
> > > >  (list (user-group (name "kyc-service"))
> > > >(user-group (name "kyc-rpc"))
> > > >(user-account
> > > >  (name "kyc-service")
> > > >  (group "kyc-service")
> > > >  (system? #f)
> > > >  (supplementary-groups '("wheel" "kyc-rpc" "video"))
> > > >  (comment "KYC service user"
> > > >
> > > >(define kyc-shepherd-service
> > > >  (match-lambda
> > > >(($  package user group)
> > > >  (list (shepherd-service
> > > >  (provision '(kyc))
> > > >  (documentation "Run KYC as a daemon.")
> > > >  (requirement '(networking user-processes))
> > > >  (modules `((srfi srfi-1)
> > > >(srfi srfi-26)
> > > >,@%default-modules))
> > > >  (start #~(make-forkexec-constructor
> > > >(list
> > > >   (string-append #$package "/bin/kyc"))
> > > >#:user #$user
> > > >#:group #$group
> > > >#:environment-variables
> > > > (list  (string-append "PATH=" #$coreutils "/bin:" (getenv
> > > > "PATH")) (string-append "HOME=" "/home/" #$user
> > > >  (stop #~(make-kill-destructor)))
> > > >
> > > >(define kyc-service-type
> > > >  (service-type
> > > >(name 'kyc)
> > > >(extensions (list (service-extension
> > > > shepherd-root-service-type kyc-shepherd-service)
> > > > (service-extension
> > > > account-service-type (const
> > > > %kyc-accounts (default-value (kyc-configuration
> > > >
> > > >--8<---cut here---end--->8---
> > > >
> > > >is there anything that I missed for this service definition? 
> > > 
> > > I don't see in your snippet where you create the socket or where
> > > you change ownership of it, so I don't really understand what is
> > > going wrong.
> > > 
> > > Maybe the service itself is responsible for creating the socket
> > > and changing ownership? In that case, I wouldn't use #:uses or
> > > #:group, as these will run the service as the unpriviledged user
> > > from the start, instead of running it as root and letting it
> > > change user after it's set up things.
> > > 
> > > If you want to create the socket yourself, why not use an
> > > activation-service-type?  
> > 
> > Thanks for your response, 
> > 
> > the application itself is responsible for creation of socket, and
> > the socket is created without problem, but when I try to change the
> > ownership for socket file, I receive "operation not permitted"
> > error. 
> > 
> > I also logged in to the user responsible for running the service and
> > run the application manually, socket creation and permission set
> > operations were succeed. 
> > 
> > referring to above snippet, when I perform all these operations
> > manually, everything works without problem:
> > 
> > --8<---cut here---start---

Re: set permission/ownership for files generated by service

2020-07-14 Thread Reza Alizadeh Majd
On Mon, 13 Jul 2020 22:01:47 -0400
Julien Lepiller  wrote:

> Le 13 juillet 2020 20:18:09 GMT-04:00, Reza Alizadeh Majd
>  a écrit :
> >
> >my service definition is as follows:
> >
> >
> >--8<---cut here---start->8---
> >(define-record-type* 
> >  kyc-configuration make-kyc-configuration
> >  kyc-configuration?
> >  (package kyc-configuration-package
> >   (default kyc))
> >  (user kyc-configuration-user
> >(default "kyc-service"))
> >  (group kyc-configuration-group
> > (default "kyc-service")))
> >
> >(define %kyc-accounts
> >  (list (user-group (name "kyc-service"))
> >(user-group (name "kyc-rpc"))
> >(user-account
> >  (name "kyc-service")
> >  (group "kyc-service")
> >  (system? #f)
> >  (supplementary-groups '("wheel" "kyc-rpc" "video"))
> >  (comment "KYC service user"
> >
> >(define kyc-shepherd-service
> >  (match-lambda
> >(($  package user group)
> >  (list (shepherd-service
> >  (provision '(kyc))
> >  (documentation "Run KYC as a daemon.")
> >  (requirement '(networking user-processes))
> >  (modules `((srfi srfi-1)
> >(srfi srfi-26)
> >,@%default-modules))
> >  (start #~(make-forkexec-constructor
> >(list
> >   (string-append #$package "/bin/kyc"))
> >#:user #$user
> >#:group #$group
> >#:environment-variables
> > (list  (string-append "PATH=" #$coreutils "/bin:" (getenv
> > "PATH")) (string-append "HOME=" "/home/" #$user
> >  (stop #~(make-kill-destructor)))
> >
> >(define kyc-service-type
> >  (service-type
> >(name 'kyc)
> >(extensions (list (service-extension shepherd-root-service-type
> >  kyc-shepherd-service)
> > (service-extension account-service-type
> >   (const
> > %kyc-accounts (default-value (kyc-configuration
> >
> >--8<---cut here---end--->8---
> >
> >is there anything that I missed for this service definition?   
> 
> I don't see in your snippet where you create the socket or where you
> change ownership of it, so I don't really understand what is going
> wrong.
> 
> Maybe the service itself is responsible for creating the socket and
> changing ownership? In that case, I wouldn't use #:uses or #:group,
> as these will run the service as the unpriviledged user from the
> start, instead of running it as root and letting it change user after
> it's set up things.
> 
> If you want to create the socket yourself, why not use an
> activation-service-type?

Thanks for your response, 

the application itself is responsible for creation of socket, and the
socket is created without problem, but when I try to change the
ownership for socket file, I receive "operation not permitted" error. 

I also logged in to the user responsible for running the service and
run the application manually, socket creation and permission set
operations were succeed. 

referring to above snippet, when I perform all these operations
manually, everything works without problem:

--8<---cut here---start->8---
kyc-service@kyc-station /tmp/rpc$ whoami 
kyc-service
kyc-service@kyc-station /tmp/rpc$ groups 
kyc-service wheel kyc-rpc
kyc-service@kyc-station /tmp/rpc$ ll
total 0
srwxr-xr-x 1 kyc-service kyc-service 0 Jul 14 04:22 kyc
kyc-service@kyc-station /tmp/rpc$ chown kyc-service:kyc-rpc kyc 
kyc-service@kyc-station /tmp/rpc$ ll
total 0
srwxr-xr-x 1 kyc-service kyc-rpc 0 Jul 14 04:22 kyc
--8<---cut here---end--->8---


-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



set permission/ownership for files generated by service

2020-07-13 Thread Reza Alizadeh Majd
Hi Guix, 

I'm working on a custom service for an application, this application
use a unix socket for communication, and for security purpose I change
the owner group for this socket file and only applications that run by
members of this specific group can access to this socket file.

running the application manually, everything is OK and socket file is
created with desired permissions, but when I try to run this
application as a service, I receive permission error during ownership
modification.

my service definition is as follows:


--8<---cut here---start->8---
(define-record-type* 
  kyc-configuration make-kyc-configuration
  kyc-configuration?
  (package kyc-configuration-package
   (default kyc))
  (user kyc-configuration-user
(default "kyc-service"))
  (group kyc-configuration-group
 (default "kyc-service")))

(define %kyc-accounts
  (list (user-group (name "kyc-service"))
(user-group (name "kyc-rpc"))
(user-account
  (name "kyc-service")
  (group "kyc-service")
  (system? #f)
  (supplementary-groups '("wheel" "kyc-rpc" "video"))
  (comment "KYC service user"

(define kyc-shepherd-service
  (match-lambda
(($  package user group)
  (list (shepherd-service
  (provision '(kyc))
  (documentation "Run KYC as a daemon.")
  (requirement '(networking user-processes))
  (modules `((srfi srfi-1)
(srfi srfi-26)
,@%default-modules))
  (start #~(make-forkexec-constructor
(list
   (string-append #$package "/bin/kyc"))
#:user #$user
#:group #$group
#:environment-variables
  (list  (string-append "PATH=" #$coreutils "/bin:" 
(getenv "PATH"))
  (string-append "HOME=" "/home/" #$user
  (stop #~(make-kill-destructor)))

(define kyc-service-type
  (service-type
(name 'kyc)
(extensions (list (service-extension shepherd-root-service-type
  kyc-shepherd-service)
 (service-extension account-service-type
  (const 
%kyc-accounts
    (default-value (kyc-configuration

--8<---cut here---end--->8---

is there anything that I missed for this service definition? 

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: guix completion in zsh

2020-05-30 Thread Reza Alizadeh Majd
On Tue, 26 May 2020 23:14:01 +0200
Ludovic Courtès  wrote:

> I think you need to make sure the Zsh completion file for Guix is
> sourced.
> 

Thanks for you response, what is the right location to find this "Zsh
completion file"? is it installed during installation of `zsh` package?


-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



guix completion in zsh

2020-05-24 Thread Reza Alizadeh Majd
Hi, 

after replacing the default shell with `zsh`, I lost the tab completion
feature for Guix commands. do I need to perform any specific configuration
to enable this feature?

--
Reza Alizadeh Majd
PantherX Team
https://pantherx.org



Re: Access custom images inside disk image

2020-05-20 Thread Reza Alizadeh Majd
Just as a ping, does any one has any experience about embedding custom
channel stuff (packages, services) by default inside installation disk
image? 

regards, 


On Tue, 19 May 2020 18:25:47 +0430
"Reza Alizadeh Majd"  wrote:

> Hello, 
> 
> I built a modified version of Guix to have a series of custom Channels
> by default. using this modified version, everything is OK, and I have
> access to these custom channels by default.
> 
> The problem is that when I create a disk image using this custom build
> of Guix, only default Guix channel  details is available during
> build, and I need to perform a `guix pull` to make the profile cache
> updated and install packages located in custom channels.
> 
> is there any way that allow me to have these custom channels available
> by default in disk image?
> 
> I had seen that `gc-root-service-type` is responsible for preparing
> the profile for disk image, but I don't know how can I configure it
> to have additional data during disk image creation.
> 
> --
> Reza Alizadeh Majd
> PantherX Team
> https://pantherx.org
> 



-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Access custom images inside disk image

2020-05-19 Thread Reza Alizadeh Majd
Hello, 

I built a modified version of Guix to have a series of custom Channels
by default. using this modified version, everything is OK, and I have
access to these custom channels by default.

The problem is that when I create a disk image using this custom build
of Guix, only default Guix channel  details is available during build, 
and I need to perform a `guix pull` to make the profile cache updated 
and install packages located in custom channels.

is there any way that allow me to have these custom channels available
by default in disk image?

I had seen that `gc-root-service-type` is responsible for preparing the
profile for disk image, but I don't know how can I configure it to have
additional data during disk image creation.

--
Reza Alizadeh Majd
PantherX Team
https://pantherx.org



Re: Wifi setup issue during Graphical install

2020-05-17 Thread Reza Alizadeh Majd
On Sun, 17 May 2020 22:08:19 +0300
Efraim Flashner  wrote:

> On Sun, May 17, 2020 at 09:02:04PM +0200, raingloom wrote:
> > On Sun, 17 May 2020 17:47:43 +0430
> > 
> > Have you tried running nmtui directly?

since network-manager is not available in installation image, I tried
to connect with connman instead. and succeeded to connect manually
using  `connmanctl` using following commands:

# rfkill unblock wifi
# connamnctl
(connmanctl) scan wifi
(connmanctl) services
(connmanctl) agent on
(connmanctl) connect wifi.

but the graphical installer have this issue.

 
> I'm pretty sure the graphical installer uses connman. I'm pretty sure
> that this is one of the issues that's supposed to be fixed in an
> upcoming 1.1.1 release. Until then I'd suggest building an install
> image from master.
> 

thanks for your response. so, I can both wait for upcoming release or
use the master branch to create disk image.

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/



Re: sha256 base32 value of a git checkout

2020-05-17 Thread Reza Alizadeh Majd
On Sun, 17 May 2020 12:00:38 +
"Pierre-Henry F."  wrote:

> Hello,
> 
> I'm trying my hand on defining a package.
> I have a source defined as in:
> 
> (origin
> 
>   (method git-fetch)
> 
>   (uri "some/git/dir")
> 
>   (commit "acommit")
> 
>   (file-name "a_filename")
> 
>   (sha256 (base32 "XXX")))
> 
> when origin resolves to an archive, guix download $url gives the
> value of "XXX" but when using git-fetch... how to get the value of
> "XXX" ?
> 
> Thanks,
> phf

Hi, 

you can calculate directory hash recusrsively using guix with this
command: 

`guix hash -rx /path/to/directory`



-- 
Reza Alizadeh Majd
PantherX Team



Re: query for package updates

2020-03-14 Thread Reza Alizadeh Majd
Just wanted to ping this up/

does anyone have any suggestion about following script, that I wrote
to check about available package updates for a profile? 


On Thu, Mar 12, 2020, at 1:00 AM, Reza Alizadeh Majd wrote:
> playing with the Guix sources, I wrote following Guile script in order to
> check available updates for a profile.
> 
> Is it suitable for this purpose or I need to include additional checks
> on my script? 
> 
> 
> (define-module (px tools updater)
>   #:use-module (guix profiles)
>   #:use-module (guix utils)
>   #:use-module (srfi srfi-1)
>   #:export (check-entry
> check-manifest
> check-profile))
> 
> (define (check-entry entry manifest)
>   "Recursive update check for a manifest entry"
>   (let* ((pattern (manifest-pattern
> (name (manifest-entry-name entry))
> (output (manifest-entry-output entry
>  (previous (manifest-lookup manifest pattern))
>  (newer? (and previous
>   (version>? (manifest-entry-version entry)
>  (manifest-entry-version previous)
> (fold (lambda (child-entry result)
> (or result
> (check-entry child-entry manifest)))
>   newer? (manifest-entry-dependencies entry
> 
> 
> (define (check-manifest manifest)
>   "Check if any update available for a manifest"
>   (fold (lambda (entry previous)
>   (or previous (check-entry entry manifest)))
> #f (manifest-entries manifest)))
> 
> 
> (define* (check-profile #:optional (profile %current-profile))
>   "Check if any update is available for a profile"
>   (let ((manifest (profile-manifest profile)))
> (check-manifest manifest)))
> 
> 
> -- 
> Regards
> Reza Alizadeh Majd
> PantherX Team
> 
>

-- 
Regards
Reza Alizadeh Majd
PantherX Team



Re: query for package updates

2020-03-11 Thread Reza Alizadeh Majd
playing with the Guix sources, I wrote following Guile script in order to
check available updates for a profile.

Is it suitable for this purpose or I need to include additional checks
on my script? 


(define-module (px tools updater)
  #:use-module (guix profiles)
  #:use-module (guix utils)
  #:use-module (srfi srfi-1)
  #:export (check-entry
check-manifest
check-profile))

(define (check-entry entry manifest)
  "Recursive update check for a manifest entry"
  (let* ((pattern (manifest-pattern
(name (manifest-entry-name entry))
(output (manifest-entry-output entry
 (previous (manifest-lookup manifest pattern))
 (newer? (and previous
  (version>? (manifest-entry-version entry)
 (manifest-entry-version previous)
(fold (lambda (child-entry result)
(or result
(check-entry child-entry manifest)))
  newer? (manifest-entry-dependencies entry


(define (check-manifest manifest)
  "Check if any update available for a manifest"
  (fold (lambda (entry previous)
  (or previous (check-entry entry manifest)))
#f (manifest-entries manifest)))


(define* (check-profile #:optional (profile %current-profile))
  "Check if any update is available for a profile"
  (let ((manifest (profile-manifest profile)))
(check-manifest manifest)))


-- 
Regards
Reza Alizadeh Majd
PantherX Team



Re: query for package updates

2020-03-07 Thread Reza Alizadeh Majd
Hi, 

> `guix package -u` will keep updating ad-hoc profiles (those that where
> not generated exclusively with a manifest) if they contain packages with
> propagated inputs, even if the profile is already up-to-date.
> 

so you mean that I can't rely on `guix package -u -n` command results to
determine if any new update is available for current user's profile? 


> This has been discussed in the past, but for now it's not clear if this
> issue will be resolved.
> 

is there any public reference available about this discussion? 


-- 
Regards
Reza Alizadeh Majd
PantherX Team



query for package updates

2020-03-06 Thread Reza Alizadeh Majd
Hi, 

I'm working on a cron job to perform `guix pull` periodically and inform users
about available updates. previously it was suggested to use `guix package -u -n`
to find if any update is available.

the problem is that also when I run the `guix package -u` to update the profile
my cron job still informs me about existence of new updates and the result of
`guix package -u -n` doesn't change. 

could anyone help me on this matter, or an alternate solution to check if any
update is available ( and get the list if it's possible )?

--
Regards
Reza Alizadeh Majd
PantherX Team



problem on running shepherd by unpriviledged user

2020-01-15 Thread Reza Alizadeh Majd
Hi Guix, 

I'm running a series of services by shepherd in user space after user login.
the problem is that this shepherd instance keeps running after user logout.

one other problem is that the communication socket of this shepherd instance 
which was created during login in `$XDG_RUNTIME_DIR/shepherd` destroys during 
logout and I can't access to this instance using `herd`. 

is there any way that I force shepherd to quit on user logout, or alternatively
keep the keep the `$XDG_RUNTIME_DIR/shepherd/socket` after logout to allow 
`herd` to communicate with this instance after re-login?

--
Regards
Reza Alizadeh Majd
PantherX Team



Re: Cuirass Error while evaluating the specification

2019-12-14 Thread Reza Alizadeh Majd


On Mon, Dec 9, 2019, at 11:27 AM, Reza Alizadeh Majd wrote:
> Hi Guix, 
> 
> I want to build a series of packages using cuirass, I defined following 
> sample definition as cuirass specification:
> 
> ```
> (list
>   '((#:name . "pantherx-packages")
> (#:load-path-inputs . ("guix"))
> (#:package-path-inputs . ("guix"))
> (#:proc-input . "guix")
> (#:proc-file . "build-aux/cuirass/gnu-system.scm")
> (#:proc . cuirass-jobs)
> (#:proc-args . ((subset . "hello")))
> (#:inputs . (((#:name . "guix")
>   (#:url . "git://git.savannah.gnu.org/guix.git")
>   (#:load-path . ".")
>   (#:branch . "master")
>   (#:no-compile? . #t))
>  
> ``` 
> 
> but when I execute cuirass, I receive following error: 
> 
> ```
> $ cuirass -S spec.scm -D test.db
> 2019-12-09T11:17:53 running Fibers on 4 kernel threads
> 2019-12-09T11:17:53 marking stale builds as "scheduled"...
> 2019-12-09T11:17:53 retrieving list of pending builds...
> 2019-12-09T11:17:53 heap: 11.00 MiB; threads: 10; file descriptors: 42
> 2019-12-09T11:17:53 canceling 0 stale builds
> 2019-12-09T11:17:53 restarting 0 pending builds
> 2019-12-09T11:17:53 building 0 derivations in batches of 200
> 2019-12-09T11:17:53 done with 0 derivations
> 2019-12-09T11:17:53 done with restarted builds
> 2019-12-09T11:17:53 fetching input 'guix' of spec 'pantherx-packages'
> 2019-12-09T11:17:54 fetched input 'guix' of spec 'pantherx-packages' 
> (commit "a7a492899adac5047e4b11c77edd881ac1276c37")
> 2019-12-09T11:17:54 next evaluation in 300 seconds
> 2019-12-09T11:17:54 evaluating spec 'pantherx-packages'
> 2019-12-09T11:17:55 failed to evaluate spec 'pantherx-packages'; see 
> /var/log/cuirass/evaluations/1.gz
> ```
> 
> and the contents of `/var/log/cuirass/evaluations/1.gz` is as follows: 
> 
> ```
> $ cat /var/log/cuirass/evaluations/1
> Backtrace:
> In ice-9/boot-9.scm:
>   2887:24 19 (_)
>222:29 18 (map1 (((guix licenses) #:select (lgpl2.0+)) ((# #)) # …))
>222:29 17 (map1 (((guix packages)) ((guix download)) ((guix …)) …))
>222:29 16 (map1 (((guix download)) ((guix build-system cmake)) # …))
>222:29 15 (map1 (((guix build-system cmake)) ((guix # gnu)) (#) …))
>222:29 14 (map1 (((guix build-system gnu)) ((gnu packages)) (#) …))
>222:29 13 (map1 (((gnu packages)) ((gnu packages freedesktop)) # …))
>222:29 12 (map1 (((gnu packages freedesktop)) ((gnu packages …)) …))
>222:29 11 (map1 (((gnu packages glib)) ((gnu packages gtk)) (#) …))
>222:29 10 (map1 (((gnu packages gtk)) ((gnu packages gnuzilla)) …))
>222:17  9 (map1 (((gnu packages gnuzilla)) ((gnu packages #)) # …))
>   2800:17  8 (resolve-interface (gnu packages gnuzilla) #:select _ # …)
> In ice-9/threads.scm:
> 390:8  7 (_ _)
> In ice-9/boot-9.scm:
>   2726:13  6 (_)
> In ice-9/threads.scm:
> 390:8  5 (_ _)
> In ice-9/boot-9.scm:
>   2994:20  4 (_)
>2312:4  3 (save-module-excursion #)
>   3014:26  2 (_)
> In unknown file:
>1 (primitive-load-path "gnu/packages/gnuzilla" #)
> In gnu/packages/gnuzilla.scm:
>595:22  0 (_)
> 
> gnu/packages/gnuzilla.scm:595:22: Throw to key `srfi-34' with args 
> `(# not found"] 7f414927e6c0>)'.
> 
> Some deprecated features have been used.  Set the environment
> variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
> program to get more information.  Set it to "no" to suppress
> this message.
> ```
> 
> it seems that `icecat-gnuzilla-fixes.patch` file is removed from 
> repository, but cuirass still looks for it during spec evaluation. and 
> this issue shows itself from this commit in guix repository:
> 
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=34369f310319b040d18864ff7435b8ee5f9a26a6
> 
> could any one help about this issue?
> 
> 
> --
> Regards
> Reza Alizadeh Majd
> PantherX Team
> 
>

just wanted to ping this up, to gather more interest. 

-- 
Regards
Reza Alizadeh Majd
PantherX Team



Cuirass Error while evaluating the specification

2019-12-08 Thread Reza Alizadeh Majd
Hi Guix, 

I want to build a series of packages using cuirass, I defined following sample 
definition as cuirass specification:

```
(list
  '((#:name . "pantherx-packages")
(#:load-path-inputs . ("guix"))
(#:package-path-inputs . ("guix"))
(#:proc-input . "guix")
(#:proc-file . "build-aux/cuirass/gnu-system.scm")
(#:proc . cuirass-jobs)
(#:proc-args . ((subset . "hello")))
(#:inputs . (((#:name . "guix")
  (#:url . "git://git.savannah.gnu.org/guix.git")
  (#:load-path . ".")
  (#:branch . "master")
  (#:no-compile? . #t))
 
``` 

but when I execute cuirass, I receive following error: 

```
$ cuirass -S spec.scm -D test.db
2019-12-09T11:17:53 running Fibers on 4 kernel threads
2019-12-09T11:17:53 marking stale builds as "scheduled"...
2019-12-09T11:17:53 retrieving list of pending builds...
2019-12-09T11:17:53 heap: 11.00 MiB; threads: 10; file descriptors: 42
2019-12-09T11:17:53 canceling 0 stale builds
2019-12-09T11:17:53 restarting 0 pending builds
2019-12-09T11:17:53 building 0 derivations in batches of 200
2019-12-09T11:17:53 done with 0 derivations
2019-12-09T11:17:53 done with restarted builds
2019-12-09T11:17:53 fetching input 'guix' of spec 'pantherx-packages'
2019-12-09T11:17:54 fetched input 'guix' of spec 'pantherx-packages' (commit 
"a7a492899adac5047e4b11c77edd881ac1276c37")
2019-12-09T11:17:54 next evaluation in 300 seconds
2019-12-09T11:17:54 evaluating spec 'pantherx-packages'
2019-12-09T11:17:55 failed to evaluate spec 'pantherx-packages'; see 
/var/log/cuirass/evaluations/1.gz
```

and the contents of `/var/log/cuirass/evaluations/1.gz` is as follows: 

```
$ cat /var/log/cuirass/evaluations/1
Backtrace:
In ice-9/boot-9.scm:
  2887:24 19 (_)
   222:29 18 (map1 (((guix licenses) #:select (lgpl2.0+)) ((# #)) # …))
   222:29 17 (map1 (((guix packages)) ((guix download)) ((guix …)) …))
   222:29 16 (map1 (((guix download)) ((guix build-system cmake)) # …))
   222:29 15 (map1 (((guix build-system cmake)) ((guix # gnu)) (#) …))
   222:29 14 (map1 (((guix build-system gnu)) ((gnu packages)) (#) …))
   222:29 13 (map1 (((gnu packages)) ((gnu packages freedesktop)) # …))
   222:29 12 (map1 (((gnu packages freedesktop)) ((gnu packages …)) …))
   222:29 11 (map1 (((gnu packages glib)) ((gnu packages gtk)) (#) …))
   222:29 10 (map1 (((gnu packages gtk)) ((gnu packages gnuzilla)) …))
   222:17  9 (map1 (((gnu packages gnuzilla)) ((gnu packages #)) # …))
  2800:17  8 (resolve-interface (gnu packages gnuzilla) #:select _ # …)
In ice-9/threads.scm:
390:8  7 (_ _)
In ice-9/boot-9.scm:
  2726:13  6 (_)
In ice-9/threads.scm:
390:8  5 (_ _)
In ice-9/boot-9.scm:
  2994:20  4 (_)
   2312:4  3 (save-module-excursion #)
  3014:26  2 (_)
In unknown file:
   1 (primitive-load-path "gnu/packages/gnuzilla" #)
In gnu/packages/gnuzilla.scm:
   595:22  0 (_)

gnu/packages/gnuzilla.scm:595:22: Throw to key `srfi-34' with args 
`(#)'.

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.
```

it seems that `icecat-gnuzilla-fixes.patch` file is removed from repository, 
but cuirass still looks for it during spec evaluation. and this issue shows 
itself from this commit in guix repository:

https://git.savannah.gnu.org/cgit/guix.git/commit/?id=34369f310319b040d18864ff7435b8ee5f9a26a6

could any one help about this issue?


--
Regards
Reza Alizadeh Majd
PantherX Team



Re: list of available updates for globally installed packages

2019-12-07 Thread Reza Alizadeh Majd
just wanted to ping this, to gather some interest. 

-- 
Regards
Reza Alizadeh Majd
PantherX Team



list of available updates for globally installed packages

2019-12-02 Thread Reza Alizadeh Majd
Hi Guix, 

I asked before about a way to check if any update is available for
_Globally Installed Packages_ in `/run/current-system/profile` in this thread: 

https://lists.gnu.org/archive/html/help-guix/2019-10/msg00167.html

as suggested in above thread, I was pointing the target profile to achieve 
desired results: 

```
guix package -p /run/current-system/profile -n -u
```

but recently after updating the guix, I receive following error when I run 
above command. it seems that there is a permission issue occurs when guix tries 
to access to the system profile. 

```
panther@panther ~$ guix package -p /run/current-system/profile -n -u
Backtrace:
   8 (primitive-load "/home/panther/.config/guix/current/bin…")
In guix/ui.scm:
  1774:12  7 (run-guix-command _ . _)
In ice-9/boot-9.scm:
829:9  6 (catch _ _ # …)
829:9  5 (catch _ _ # …)
In guix/scripts/package.scm:
   945:10  4 (_)
In guix/status.scm:
768:4  3 (call-with-status-report _ _)
In guix/scripts/package.scm:
   953:14  2 (_)
In guix/build/syscalls.scm:
  1124:14  1 (call-with-file-lock/no-wait _ # …)
In ice-9/boot-9.scm:
777:6  0 (throw "open-file" "~A: ~S" ("Read-only file system" #) #)

ice-9/boot-9.scm:777:6: In procedure throw:
In procedure throw: Wrong type argument in position 1: open-file
```

could anyone help me on this, or alternatively suggest a working solution to 
check for list of available updates for packages that globally installed using 
`guix system reconfigure` ? 


--
Regards
Reza Alizadeh Majd
PantherX Team



Re: Cuirass Web interface issue

2019-11-27 Thread Reza Alizadeh Majd
Hi Clément, 

On Wed, Nov 27, 2019, at 2:14 PM, Clément Lassieur wrote:
> I'm glad your issue was resolved!
> 
> This is weird though, Cuirass database shouldn't be incompatible accross
> Cuirass versions.  There are SQL scripts[1] that should update it when a
> new Cuirass version requires so.  Do you know exactly how to reproduce
> the issue?  Or do you know what was missing in the SQL schema?
> 
> Thanks,
> Clément
> 
> [1]: https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git/tree/src/sql
>

Unfortunately I don't know about how can we reproduce this issue, but I have 
backup of database that this issue was occurred on. maybe having a comparison 
between to database versions help us to find the issue source. 

-- 
Regards
Reza Alizadeh Majd
PantherX Team

cuirass_20191126.tar.gz
Description: GNU Zip compressed data


Re: Cuirass Web interface issue

2019-11-26 Thread Reza Alizadeh Majd
just to have an update on this thread: 

it seems that database in new version of cuirass wasn't compatible with 
previous versions. so after I removed previous database and let the service to 
re-create it, this issue was resoled. 

-- 
Regards
Reza Alizadeh Majd
PantherX Team



Re: Cuirass Web interface issue

2019-11-21 Thread Reza Alizadeh Majd
On Sun, Nov 17, 2019, at 9:13 PM, Christopher Baines wrote:
> 
> Hi Reza,
> 
> The first thing to check is the log file, which by default is probably
> at /var/log/cuirass-web.log. Can you see anything in there that looks
> like it could relate to the problem with the evaluation page?
> 
> Chris
> 
> Attachments:
> * signature.asc

Hi Chris, 

Sorry for late response, we are facing a total internet shutdown in our country 
(Iran) since last week. 

here is the `cuirass-web.log` file which I received when a request to an 
evaluation fails: 

```
2019-11-21T13:04:51 GET /eval/152
2019-11-21T13:04:51 builds request took 0.001591 seconds
In cuirass/http.scm:
   416:28  3 (url-handler _ _)
In cuirass/templates.scm:
   398:22  2 (build-eval-table _ #() (#f #f) (#f #f) #f)
In srfi/srfi-1.scm:
589:5  1 (map # #())
In unknown file:
   0 (scm-error wrong-type-arg "map" "Wrong type argument: ?" ?)
In procedure map: Wrong type argument: #()
```

could you help us on this failure? 

-- 
Regards
Reza Alizadeh Majd
PantherX Team



Cuirass Web interface issue

2019-11-16 Thread Reza Alizadeh Majd
Hi Guix, 

We in PantherX team, has been setup an instance of Cuirass CI to build a series 
our of custom applications based on configurations provided in `maintenance` 
repository: 

https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/berlin.scm
https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/nginx/berlin.scm

but during recent updates, cuirass web interface is not working as properly as 
before, and evaluation details page returns with HTTP status code 500:

https://build.pantherx.org/eval/152

could anyone help us about this issue? 

--
Regards
Reza Alizadeh Majd
PantherX Team



Re: Check for system-wide installed package update

2019-10-16 Thread Reza Alizadeh Majd
Just wanted to close this thread, since the issue was resolved on 
following message: 

https://lists.gnu.org/archive/html/help-guix/2019-10/msg00167.html



On Tue, Oct 15, 2019, at 8:57 PM, Reza Alizadeh Majd wrote:
> Hi Guix, 
> 
> adding the package names to package list in system configuration file, 
> we could install these packages system wide and they will be available 
> for all users. 
> 
> for packages that are located in user profile, we could check for available
> updates using `guix pull`. 
> 
> but I didn't find any similar concept for system wide installed packages. 
> 
> is it possible to check for system wide installed packages without 
> reconfiguring the system? 
> 
> 
> 
> PS: I need to apologies about my previous message in mailing list that
> was totally a mess, and  my recently using mail client broke the message
> format. 
> 
> --
> Regards
> Reza Alizadeh Majd
> PantherX Team
> 
>

-- 
Regards
Reza Alizadeh Majd
PantherX Team



Re: Hi Guix, adding the package names to package list in system configuration file, we could install these packages system wide and they will be available for all users. for packages that are lo

2019-10-15 Thread Reza Alizadeh Majd
> I'm not sure I understand your question, so let me rephrase and please tell 
> me 
> if it's not what you wanted to ask. When you upgrade the distribution with 
> guix 
> pull, you can get a list of what could be upgraded using, say, guix package 
> -n 
> -u. Your question was, I think, how to do that for globally available 
> packages.
>
> If that is your question, the answer is quite simple. The set of globally 
> installed packages is installed in a separate profile from the user profile. 
> You can use the same command as before, specifying that other profile, to get 
> the same result, with globally installed packages:
> 
> guix package -p /run/current-system/profile -n -u


Hi Julien, 

Sorry if I couldn't describe my issue well. yes thats exactly what I meant to 
say.
so as I understand: 

1.  we can get list of upgradable packages using:   `guix package -n -u`

2. globally available packages are located in system profile located 
in `/run/current-system/profile` and we can't check for upgrades just by
pointing the profile location. 

Thanks again for your response. 

-- 
Regards
Reza Alizadeh Majd
PantherX Team



Check for system-wide installed package update

2019-10-15 Thread Reza Alizadeh Majd
Hi Guix, 

adding the package names to package list in system configuration file, 
we could install these packages system wide and they will be available 
for all users. 

for packages that are located in user profile, we could check for available
updates using `guix pull`. 

but I didn't find any similar concept for system wide installed packages. 

is it possible to check for system wide installed packages without 
reconfiguring the system? 



PS: I need to apologies about my previous message in mailing list that
was totally a mess, and  my recently using mail client broke the message
format. 

--
Regards
Reza Alizadeh Majd
PantherX Team



Re: Hi Guix, adding the package names to package list in system configuration file, we could install these packages system wide and they will be available for all users. for packages that are loc

2019-10-15 Thread Reza Alizadeh Majd
by the way I need to apologies for this bad title. 
my mistake on pasting the message body in to the title field !!!


-- 
Regards
Reza Alizadeh Majd
PantherX Team



Hi Guix, adding the package names to package list in system configuration file, we could install these packages system wide and they will be available for all users. for packages that are located

2019-10-15 Thread Reza Alizadeh Majd
Hi Guix, 

adding the package names to package list in system configuration file, we 
could 
install these packages system wide and they will be available for all 
users. 

for packages that are located in user profile, we could check for available 
updates 
using `guix pull`.  but I didn't find any similar concept for system wide 
installed 
packages. 

is it possible to check for system wide installed packages without 
reconfiguring the 
system? 



--
Regards
Reza Alizadeh Majd
PantherX Team



Re: Reviewing KDE Plasma state on Guix System

2019-09-26 Thread Reza Alizadeh Majd
Hi Guix, 

On behalf of PantherX team just wanted to mention that our bounty program is
still active for whom interested to work on `kwin` package.

Anyone interested to work on `kwin` package and provide a working version could
reach us both here on this thread or by contacting bou...@pantherx.org. 

The bounty results will be published to the community and whoever does that
gets the full credit. 

At the end just wanted to mention The bounty is really just a motivation that 
hopefully benefits the whole community.

---
Regards
Reza Alizadeh Majd
PantherX Team




Re: extending a service to create an extra directory

2019-07-20 Thread Reza Alizadeh Majd
Hi, 

On Thu, Jul 18, 2019, at 6:30 PM, Robert Vollmert wrote:
> Hi,
> 
> I’m trying to set up nginx properly, and my config involves a
> cache directory, say /var/nginx/cache. To encode this properly,
> I’d like to to make my nginx service create that directory
> with appropriate user and rights on service activation. I can’t
> figure out how to do that without assembling a whole new service
> out of the parts of the existing nginx-service. There must be a
> more reasonable way?
> 
> Cheers
> Robert
> 

It seems that proper way to do this is to define a new service for
activating cache directory. since it was defined previously on Guix
CI server: 

https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/modules/sysadmin/services.scm#n221

Best, 
Reza



Re: Installing Guix from source

2019-07-15 Thread Reza Alizadeh Majd
Hi Marius, 

> If you have made git commits out of your changes, you can do `guix pull
>  --url=/your/guix/checkout`.  Otherwise you can use the './pre-inst-env'
>  script, as described in the link above.
> 
> "./pre-inst-env guix system reconfigure my-config.scm" will create a new
> system generation using only code from the git repository.

Thanks for your reply. I performed both of these suggestions, but 
unfortunately nor the `guix pull ...` or using `./pre-inst-env ...` script
won't  helped me on creating a new generation with customized version 
of  configurations. 

Best, 
Reza




Re: Installing Guix from source

2019-07-14 Thread Reza Alizadeh Majd
Hi Ricardo, 

> What do you mean by “detected”?  On any GNU system shell commands are
> mapped to executables by looking for matching executables in any of the
> directories listed in the PATH environment variable.  If there are more
> than one executable of a name, the order of directories on PATH
> determines which of them is returned.
> 

I know that I can set PATH in order to load my preferred version of guix 
instead of 
previously installed one. what I mean is that I want to replace whole previous
installation, with this new one. 

for example since I modified default channels for guix, there are various 
versions
of `channels.scm` exists on my machine, I want that guix uses my provided
configurations instead of the version originally existed in store. 


Regards,
Reza



Installing Guix from source

2019-07-13 Thread Reza Alizadeh Majd
Hi Guix, 

I tried to build Guix from source on an existing version of GuixSD.  so I 
followed 
the instructions provided in official documents: 

https://guix.info/manual/en/html_node/Requirements.html
https://www.gnu.org/software/guix/manual/en/html_node/Building-from-Git.html

after build finished, I had two versions of Guix on my machine, the old one 
which
is located in store, and the new one  which is installed in `/usr/local/bin`. 

the problem is that the old instance of guix is detected as default on my 
machine. 
since I performed a series of  modifications on this new version, like changing 
the 
default channels and substitute servers, I need to replace old instance of Guix 
completely with this new one. 

Does anyone knows how can I perform this replacement? 


Best, 
Reza



Re: mount store in a separated partition

2019-07-10 Thread Reza Alizadeh Majd
Hi, 

> So you mean that both vda and sda are on Digital Ocean's servers or that
> vda is on Digital Ocean and that sda is on you own local machine?
> 

Both were on DigitalOcean. Main SSD was accessible but the Block Storage 
(known as sda) wasn't accessible form GRUB command line interface. 

Best, 
Reza



Re: mount store in a separated partition

2019-07-08 Thread Reza Alizadeh Majd
Thanks for you reply.  I tried to install GuixSD on a DigitalOcean 
droplet and wanted to use a "Block Storage" as my store 
location. 

I contact their support, and it seems that they don't support 
this,  and Block Storages are only accessible after boot. 

Best, 
Reza



mount store in a separated partition

2019-07-04 Thread Reza Alizadeh Majd
Hi Guix, 

I want to try `/gnu/store` to a separated partition, which has more capacity 
for packages, for this I use following configuration:

--8<---cut here---start->8---
(operating-system
  ...
  (bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/vda")))
  (file-systems (cons* (file-system
(device "/dev/vda1")
(mount-point "/")
(type "ext4"))
   (file-system
(device "/dev/sda1")
(mount-point "/gnu/store")
(needed-for-boot? #t)
(type "ext4")
(create-mount-point? #t))
  %base-file-systems))
  ...
--8<---cut here---end--->8---

but using this configuration, GRUB theme wont boot correctly and I receive 
following error during boot: 

--8<---cut here---start->8---
error: no such device:
/gnu/store/...-linux-libre-5.1.16/bzImage.
error: file
`/gnu/store/...-linux-libre-5.1.16/bzImage` not found.
error: you need to load the kernel first.

Press any key to continue...
--8<---cut here---end--->8---

could anyone help me on this matter? 

Thanks,
Reza



Re: Problem on installing GuixSD on a remote server using iPXE

2019-07-02 Thread Reza Alizadeh Majd
Thanks for your response.  You mean that the only way to use GuixSD 
on a cloud server is to install it manually on some other existing Linux 
Distribution? 


Best, 
Reza


On Tue, Jul 2, 2019, at 11:29 AM, Ricardo Wurmus wrote:
> 
> Hi Reza,
> 
> last time I tried installing Guix System with iPXE it also wouldn’t
> work.  AFAICS this is an unimplemented feature.
> 
> IIRC it hung trying to find the root file system because of the peculiar
> way Guix System boots.
> 
> I’d be very happy to see this implemented.
> 
> -- 
> Ricardo
> 
>



Problem on installing GuixSD on a remote server using iPXE

2019-07-01 Thread Reza Alizadeh Majd
HI, 

I want to install GuixSD using iPXE on a remote server, unfortunately I didn't 
find any useful starting point. 

I had a review over iPXE documents and tried to mount installation iso using 
sanboot, but installation process hangs during boot process while it tries to 
load GRUB. 

is there anyone have a previous experience about this, and guide me on this 
matter? 

Thanks
Reza



Re: Bluetooth Service missing in Desktop Services

2019-06-22 Thread Reza Alizadeh Majd
Hi, 

as mentioned in the docs, `bluetooth-service` is part of `gnu services desktop` 
module. but it is a separated service and is not added to `%desktop-services` 
list. maybe it's because bluetooth is not a mandatory service for that. 

Best, 
Reza
 

On Sun, Jun 23, 2019, at 9:51 AM, Raghav Gururajan wrote:
> Hello Guix!
> 
> Guix Manual lists "bluetooth-service" as a part of "%desktop-services"
> (http://guix.gnu.org/manual/en/html_node/Desktop-Services.html#Desktop-
> Services).
> 
> But the Guix Repository doesn't list "bluetooth-service" in "define
> %desktop-services" section (very bottom) of "desktop.scm" (http://guix.
> gnu.org/manual/en/html_node/Desktop-Services.html#Desktop-Services).
> 
> Is this a bug or am I over-looking something?
> 
> Regards,
> RG.
> 
>



Guix Cuirass won't start build

2019-06-22 Thread Reza Alizadeh Majd
Hi Guix, 

I wanted to run Guix Cuirass manually using following demo specification:

root@panther ~/ci# cat spec.scm 

(define hello-spec
  '((#:name . "hello-spec")
(#:load-path-inputs . ("guix"))
(#:package-path-inputs . ("guix"))
(#:proc-input ."guix")
(#:proc-file . "build-aux/cuirass/gnu-system.scm")
(#:proc . cuirass-jobs)
(#:proc-args . ((subset . "hello")))
(#:inputs . (((#:name . "guix")
  (#:url . "git://git.savannah.gnu.org/guix.git")
  (#:load-path . ".")
  (#:branch . "master")
  (#:no-compile? . #t))

(list hello-spec)

but when I run cuirass, I receive following warnings and build wont start: 

root@panther ~/ci# cuirass --one-shot -S spec.scm -D test.db 
2019-06-22T15:31:57 running Fibers on 4 kernel threads
2019-06-22T15:31:57 fetching input 'guix' of spec 'hello-spec'
2019-06-22T15:31:58 fetched input 'guix' of spec 'hello-spec' (commit 
"545946f6571c3dd01a450de738e2b37bdf148061")
2019-06-22T15:31:58 evaluating spec 'hello-spec'
root@panther ~/ci# warning: failed to load '(build-aux build-self)':
no code for module (build-aux build-self)
warning: failed to load '(build-aux build-self)':
no code for module (build-aux build-self)
warning: failed to load '(build-aux check-available-binaries)':
no code for module (build-aux check-available-binaries)
checking final inputs for 'x86_64-linux'...
checking final inputs for 'i686-linux'...
checking final inputs for 'armhf-linux'...
warning: failed to load '(build-aux check-final-inputs-self-contained)':
no code for module (build-aux check-final-inputs-self-contained)


could anyone help me on fixing this issue?


Thanks, 
Reza



Re: Guix Cuirass - Continuous Integration - Crash Error

2019-06-16 Thread Reza Alizadeh Majd
Do I need to post a new email for this later problem? 

maybe it receives a better feedback, plus a better reference for others in the 
future with same issue? 

Best, 
Reza


On Wed, Jun 12, 2019, at 7:25 PM, Reza Alizadeh Majd wrote:
> Hi Ricardo, 
> 
> Sorry I thought it might be helpful. 
> 
> lastly I think I find this issue's source, it seems that there was an 
> issue about definition and usage of inputs. 
> 
> I tried to define spec from scratch and run cuirass manually. here is 
> my new sample spec definition: 
> 
> ```
> (define my-spec
>  '((#:name . "my-manifest")
>(#:load-path-inputs . ("guix"))
>(#:package-path-inputs . ("guix"))
>(#:proc-input . "guix")
>(#:proc-file . "build-aux/cuirass/gnu-system.scm")
>(#:proc . cuirass-jobs)
>(#:proc-args . ((subset . "hello")
> (systems . ("x86_64-linux"
>(#:inputs . (((#:name . "guix")
> (#:url . 
> "git://git.savannah.gnu.org/guix.git")
> (#:load-path . ".")
> (#:branch . "master")
> (#:no-compile? . #t))
> 
> (list my-spec)
>  ```
> 
> and I run cuirass manually using following command:
> 
> ```
> $ cuirass --databas=mytest.db --specifications=my-spec.scm
> ```
> 
> now I receive following warnings when running above command: 
> 
> ```
> 2019-06-12T19:06:03 running Fibers on 4 kernel threads
> 2019-06-12T19:06:03 marking stale builds as "scheduled"...
> 2019-06-12T19:06:03 listening on 0.0.0.0:8082
> 2019-06-12T19:06:03 retrieving list of pending builds...
> 2019-06-12T19:06:03 heap: 11.00 MiB; threads: 10; file descriptors: 49
> 2019-06-12T19:06:03 canceling 0 stale builds
> 2019-06-12T19:06:03 restarting 0 pending builds
> 2019-06-12T19:06:03 building 0 derivations in batches of 200
> 2019-06-12T19:06:03 done with 0 derivations
> 2019-06-12T19:06:03 done with restarted builds
> 2019-06-12T19:06:03 fetching input 'guix' of spec 'my-manifest'
> 2019-06-12T19:06:04 fetched input 'guix' of spec 'my-manifest' (commit 
> "798b80cea2ebf4a2303cef94468803cd50a51f7d")
> 2019-06-12T19:06:04 next evaluation in 30 seconds
> 2019-06-12T19:06:04 evaluating spec 'my-manifest'
> `_IOLBF' is deprecated.  Use the symbol 'line instead.
> warning: failed to load '(build-aux build-self)':
> no code for module (build-aux build-self)
> warning: failed to load '(build-aux build-self)':
> no code for module (build-aux build-self)
> warning: failed to load '(build-aux check-available-binaries)':
> no code for module (build-aux check-available-binaries)
> checking final inputs for 'x86_64-linux'...
> checking final inputs for 'i686-linux'...
> checking final inputs for 'armhf-linux'...
> warning: failed to load '(build-aux check-final-inputs-self-contained)':
> no code for module (build-aux check-final-inputs-self-contained)
> ```
> 
> is it possible that I missed something? 
> 
> 
> Thanks, 
> Reza
> 
> 
>



Re: Guix Cuirass - Continuous Integration - Crash Error

2019-06-12 Thread Reza Alizadeh Majd
Hi Ricardo, 

Sorry I thought it might be helpful. 

lastly I think I find this issue's source, it seems that there was an issue 
about definition and usage of inputs. 

I tried to define spec from scratch and run cuirass manually. here is my new 
sample spec definition: 

```
(define my-spec
 '((#:name . "my-manifest")
   (#:load-path-inputs . ("guix"))
   (#:package-path-inputs . ("guix"))
   (#:proc-input . "guix")
   (#:proc-file . "build-aux/cuirass/gnu-system.scm")
   (#:proc . cuirass-jobs)
   (#:proc-args . ((subset . "hello")
(systems . ("x86_64-linux"
   (#:inputs . (((#:name . "guix")
(#:url . "git://git.savannah.gnu.org/guix.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))

(list my-spec)
 ```

and I run cuirass manually using following command:

```
$ cuirass --databas=mytest.db --specifications=my-spec.scm
```

now I receive following warnings when running above command: 

```
2019-06-12T19:06:03 running Fibers on 4 kernel threads
2019-06-12T19:06:03 marking stale builds as "scheduled"...
2019-06-12T19:06:03 listening on 0.0.0.0:8082
2019-06-12T19:06:03 retrieving list of pending builds...
2019-06-12T19:06:03 heap: 11.00 MiB; threads: 10; file descriptors: 49
2019-06-12T19:06:03 canceling 0 stale builds
2019-06-12T19:06:03 restarting 0 pending builds
2019-06-12T19:06:03 building 0 derivations in batches of 200
2019-06-12T19:06:03 done with 0 derivations
2019-06-12T19:06:03 done with restarted builds
2019-06-12T19:06:03 fetching input 'guix' of spec 'my-manifest'
2019-06-12T19:06:04 fetched input 'guix' of spec 'my-manifest' (commit 
"798b80cea2ebf4a2303cef94468803cd50a51f7d")
2019-06-12T19:06:04 next evaluation in 30 seconds
2019-06-12T19:06:04 evaluating spec 'my-manifest'
`_IOLBF' is deprecated.  Use the symbol 'line instead.
warning: failed to load '(build-aux build-self)':
no code for module (build-aux build-self)
warning: failed to load '(build-aux build-self)':
no code for module (build-aux build-self)
warning: failed to load '(build-aux check-available-binaries)':
no code for module (build-aux check-available-binaries)
checking final inputs for 'x86_64-linux'...
checking final inputs for 'i686-linux'...
checking final inputs for 'armhf-linux'...
warning: failed to load '(build-aux check-final-inputs-self-contained)':
no code for module (build-aux check-final-inputs-self-contained)
```

is it possible that I missed something? 


Thanks, 
Reza




Re: Guix Cuirass - Continuous Integration - Crash Error

2019-06-12 Thread Reza Alizadeh Majd
Hi Ludo, 

If you had time, could you please have a look at this issue? maybe you have an 
idea about this that. 

I really need to setup a custom build server for Guix, since our custom package 
definitions are increasing, and it's not efficient to build every package from 
source for each user. 

Thanks, 
Reza



On Mon, Jun 3, 2019, at 7:23 PM, Reza Alizadeh Majd wrote:
> Hi Guix, 
> 
> I want to setup a CI build server using _Cuirass_ to build a series of custom 
> packages for Guix. but I receive following error and cuirass-service crashes, 
> could anyone help me on this? 
> 
> ```
> 2019-06-03T18:50:59 fatal: uncaught exception 'git-error' in 'build' 
> fiber!
> 2019-06-03T18:50:59 exception arguments: (#< code: -14 
> message: "the index is locked; this might be due to a concurrent or 
> crashed process" class: 10>)
> In ice-9/boot-9.scm:
> 829:9  9 (catch _ _ # ?)
> 705:2  8 (call-with-prompt _ _ #)
> 705:2  7 (call-with-prompt _ _ #)
> In ice-9/eval.scm:
> 619:8  6 (_ #(#(# # ?)))
> In srfi/srfi-1.scm:
> 640:9  5 (for-each # (((#:name . #) ?)))
> In ice-9/boot-9.scm:
>751:25  4 (dispatch-exception 0 git-error (#< code: -?>))
> In cuirass/utils.scm:
> 181:8  3 (_ _ #< code: -14 message: "the index is loc?>)
> In ice-9/boot-9.scm:
> 829:9  2 (catch #t # ?)
> In cuirass/utils.scm:
>182:22  1 (_)
> In unknown file:
>0 (make-stack #t)
> ERROR: In procedure make-stack:
> Git error: the index is locked; this might be due to a concurrent or 
> crashed process
> ```
> 
> 
> In case that it might be helpful, here is my `%cuirass-specs` 
> definition: 
> ```
> (define %cuirass-specs
>#~(list '((#:name . "my-manifest")
>  (#:load-path-inputs . ("guix"))
>  (#:package-path-inputs . ("custom-packages"))
>  (#:proc-input . "guix")
>  (#:proc-file . "build-aux/cuirass/gnu-system.scm")
>  (#:proc . cuirass-jobs)
>  (#:proc-args . ((subset . "manifests")
>  (systems . "x86_64-linux")
>  (manifests . (("config" . 
> "manifest.scm")
>  (#:inputs . (((#:name . "pantherx")
>(#:url . 
> "https://user:p...@git.pantherx.org/development/guix-pantherx.git;)
>(#:load-path . ".")
>(#:branch . "master")
>(#:no-compile? #t)))
> . . .
> 
> (service cuirass-service-type
>   (cuirass-configuration
> (interval 10)
> (use-substitutes? #t)
> (port 8082)
> (host "0.0.0.0")
> (specifications %cuirass-specs)))
> ```
> 
> 
> I also added `manifest.scm` file beside my system configuration file 
> with following
> content:
> ```
> (use-modules (px packages accounts))
> (packages->manifest
>(list px-accounts))
> ```
> 
> 
> ---
> Best, 
> Reza
> 
> 
>



Re: package definition: unbound variable ungexp

2019-06-09 Thread Reza Alizadeh Majd
Hi, 

> can do is add an input with that code:
> 
> (inputs `(("test-plugin.yaml" ,(plain-file …
> 
> Then inside your build phase, simply install this input with:
> 
> (install-file (assoc-ref inputs "test-plugin.yaml") regpath)
> 
> Alternatively, you can write to the file directly in the phase:
> 
> (with-output-to-file (string-append regpath "/test-plugin.yaml")
>   (lambda _
> (format #t "…")))
>

Thanks, adding the file as an input solved the issue. 

Regards, 
Reza



Re: package definition: unbound variable ungexp

2019-06-09 Thread Reza Alizadeh Majd
Hi, 

> I believe you are looking for (guix gexp) module.

I already added `(guix gexp)` to  #:use-module part of my module definition, 
but this problem was not fixed. 

Regards, 
Reza



package definition: unbound variable ungexp

2019-06-09 Thread Reza Alizadeh Majd
Hello Guix, 

I want to create a plain file during package build and copy it to output. 
but using following definition, I receive error on during package installation:

--- CODE: 
-
(add-after 'install 'register-plugin
   (lambda* (#:key outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
 (regpath (string-append out 
"/etc/px/accounts/plugins"))
 (plugin-data (string-append "plugin:\n"

"   name: " ,name "\n"

"   version: " ,version "\n"

"   type: python\n")))

 (install-file #$(plain-file "test-plugin.yaml" 
plugin-data) regpath
--

and error that I received during package build: 

--- ERROR: 

starting phase `register-plugin'
Backtrace:
   8 (primitive-load "/gnu/store/fpj6577yfiiz40ci39bw8zzycsy…")
In ice-9/eval.scm:
   191:35  7 (_ #f)
In srfi/srfi-1.scm:
   863:16  6 (every1 # …)
In 
/gnu/store/4r04fsfcryy5h4v2h3g6lzlibafmmdjm-module-import/guix/build/gnu-build-system.scm:
   799:28  5 (_ _)
In ice-9/eval.scm:
619:8  4 (_ #(#(#(#(#(#(#(#) …) …) …) …) …) …))
159:9  3 (_ #(#(#(#(#(#(#(#) …) …) …) …) …) …))
   182:19  2 (proc #(#(#(#(#(#(#(#) …) …) …) …) …) …))
   142:16  1 (compile-top-call _ (7 . ungexp) ((10 (13 15 7 . #) # …)))
In unknown file:
   0 (%resolve-variable (7 . ungexp) #)

ERROR: In procedure %resolve-variable:
Unbound variable: ungexp
--

does any one knows which package do I have to add in order to solve this issue? 


Best, 
Reza



Re: Guix Cuirass - Continuous Integration - Crash Error

2019-06-08 Thread Reza Alizadeh Majd
Hi, 

> The cache directories are not affected by “guix gc”.  The default cache
> directory when using the cuirass service on Guix System is

Unfortunately clearing the cache wouldn't help. maybe I had a mistake on
definition of  `$cuirass-spec` or manifest file. 


Best, 
Reza



Re: Guix Cuirass - Continuous Integration - Crash Error

2019-06-07 Thread Reza Alizadeh Majd
Hi Ricardo, 

Thanks for your response. 
 
> Try erasing the cache directories containing the git repositories.

unfortunately using `guix gc -C` wouldn't  be helpful, and cuirass service 
still 
fails with same error. 

Best, 
Reza



Guix Cuirass - Continuous Integration - Crash Error

2019-06-03 Thread Reza Alizadeh Majd
Hi Guix, 

I want to setup a CI build server using _Cuirass_ to build a series of custom 
packages for Guix. but I receive following error and cuirass-service crashes, 
could anyone help me on this? 

```
2019-06-03T18:50:59 fatal: uncaught exception 'git-error' in 'build' fiber!
2019-06-03T18:50:59 exception arguments: (#< code: -14 message: "the 
index is locked; this might be due to a concurrent or crashed process" class: 
10>)
In ice-9/boot-9.scm:
829:9  9 (catch _ _ # ?)
705:2  8 (call-with-prompt _ _ #)
705:2  7 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8  6 (_ #(#(# # ?)))
In srfi/srfi-1.scm:
640:9  5 (for-each # (((#:name . #) ?)))
In ice-9/boot-9.scm:
   751:25  4 (dispatch-exception 0 git-error (#< code: -?>))
In cuirass/utils.scm:
181:8  3 (_ _ #< code: -14 message: "the index is loc?>)
In ice-9/boot-9.scm:
829:9  2 (catch #t # ?)
In cuirass/utils.scm:
   182:22  1 (_)
In unknown file:
   0 (make-stack #t)
ERROR: In procedure make-stack:
Git error: the index is locked; this might be due to a concurrent or crashed 
process
```


In case that it might be helpful, here is my `%cuirass-specs` definition: 
```
(define %cuirass-specs
   #~(list '((#:name . "my-manifest")
 (#:load-path-inputs . ("guix"))
 (#:package-path-inputs . ("custom-packages"))
 (#:proc-input . "guix")
 (#:proc-file . "build-aux/cuirass/gnu-system.scm")
 (#:proc . cuirass-jobs)
 (#:proc-args . ((subset . "manifests")
 (systems . "x86_64-linux")
 (manifests . (("config" . "manifest.scm")
 (#:inputs . (((#:name . "pantherx")
   (#:url . 
"https://user:p...@git.pantherx.org/development/guix-pantherx.git;)
   (#:load-path . ".")
   (#:branch . "master")
   (#:no-compile? #t)))
. . .

(service cuirass-service-type
(cuirass-configuration
  (interval 10)
  (use-substitutes? #t)
  (port 8082)
  (host "0.0.0.0")
  (specifications %cuirass-specs)))
```


I also added `manifest.scm` file beside my system configuration file with 
following
content:
```
(use-modules (px packages accounts))
(packages->manifest
   (list px-accounts))
```


---
Best, 
Reza




Re: skeleton files in sub-directories

2019-05-27 Thread Reza Alizadeh Majd
Hi, 

using `computed-file` to create the parent directories for config files, fixed 
the issue. 

Thanks, 
Reza


On Mon, May 27, 2019, at 12:16 AM, Ludovic Courtès wrote:
> Hi,
> 
> "Reza Alizadeh Majd"  skribis:
> 
> > the problem is that some of these skeletons are located in sub-directories, 
> > for 
> > example `~/.local/share/foo/bar.cfg`. and when I run `guix system 
> > reconfigure`
> > I receive errors about missing parent directory (`~/.local/share/foo` in 
> > this example).
> >
> > is there any way to create parent directories before copying the skeleton 
> > files? 
> 
> I think you can do something like:
> 
>   (define dot-config
> (compute-file "dot-config-skeleton"
>   #~(begin
>   (mkdir #$output)
>   (mkdir (string-append #$output "/guix"))
>   …)))
> 
> and then add it in the list of skeletons like so:
> 
>   `(…
> (".config" ,dot-config))
> 
> Does that make sense?
> 
> Ludo’.
>



Re: Modify Channels for all users

2019-05-26 Thread Reza Alizadeh Majd
I just aware about that copying the skeleton files is a one time operation, we 
can't modify 
skeleton files later with a new system configuration file for existing users. 
do we have any 
solution to copy skeleton files to existing users home directories   on each 
execution of 
guix system reconfigure ?

Thanks ,
Reza


On Mon, May 27, 2019, at 12:06 AM, Ludovic Courtès wrote:
> Hi,
> 
> "Reza Alizadeh Majd"  skribis:
> 
> > I want to add a custom channel for all users, one way would be using the 
> > skeleton files 
> > to add `channel.scm` to each user's home directory. Just wanted to know if 
> > there is 
> > any other solution to do this or not? 
> 
> I think a skeleton for ~/.config/guix/channels.scm is a good way to
> achieve this.
> 
> Ludo’.
>



skeleton files in sub-directories

2019-05-26 Thread Reza Alizadeh Majd
Hi Guix, 

I want to add a series of configuration files to each user's home directory. 
for this 
I could use skeletons in operating system definitions. 

the problem is that some of these skeletons are located in sub-directories, for 
example `~/.local/share/foo/bar.cfg`. and when I run `guix system reconfigure`
I receive errors about missing parent directory (`~/.local/share/foo` in this 
example).

is there any way to create parent directories before copying the skeleton 
files? 


Thanks,
Reza



Re: Modify Channels for all users

2019-05-25 Thread Reza Alizadeh Majd
modifying %default-channels variable, needs guix image to be rebuilt. 

it might be helpful if we had a reference about channels in system 
configuration file. maybe guix development list would be a better place 
about this matter to discuss. 

Thanks,
Reza


On Sat, May 25, 2019, at 12:56 AM, Oleg Pykhalov wrote:
> Hi Reza,
> 
> "Reza Alizadeh Majd"  writes:
> 
> > Hi Guix, 
> >
> > I want to add a custom channel for all users, one way would be using
> > the skeleton files to add `channel.scm` to each user's home
> > directory. Just wanted to know if there is any other solution to do
> > this or not?
> 
> You could try to modify a %default-channels variable in
> guix/channels.scm file.  See how to build Guix from Git in
> https://www.gnu.org/software/guix/manual/html_node/Building-from-Git.html
> 
> Oleg.
> 
> Attachments:
> * signature.asc



Modify Channels for all users

2019-05-22 Thread Reza Alizadeh Majd
Hi Guix, 

I want to add a custom channel for all users, one way would be using the 
skeleton files 
to add `channel.scm` to each user's home directory. Just wanted to know if 
there is 
any other solution to do this or not? 

Thanks
Reza



lxqt-session permission issue

2019-05-18 Thread Reza Alizadeh Majd
Hi Guix, 

It's a while I'm working on LXQt on Guix to improve and fix issues that 
might occur during it's usage. 

one of these issues is that when LXQt copies default openbox related 
configuration file (lxqt-rc.xml) it doesn't set proper permissions for it. 

I assumed that it might because of readonly nature of files inside store, 
for this I propose following patch for `lxqt-session` package: 

(add-after 'unpack 'patch-openbox-permission
   (lambda _
 (substitute* "startlxqt.in"
   (("cp \"\\$LXQT_DEFAULT_OPENBOX_CONFIG\" 
\"\\$XDG_CONFIG_HOME/openbox\"") 
(string-append 
   "cp \"$LXQT_DEFAULT_OPENBOX_CONFIG\" 
\"$XDG_CONFIG_HOME/openbox\"\n"
   "# GUIX permission modification\n"
   "chmod -R 755 
\"$XDG_CONFIG_HOME/openbox\"")))
 #t))

now, I want to know if this could be an acceptable patch to submit to 
guix package repository or not ?

Thanks, 
Reza



Re: Problem on LXQt service definition

2019-05-15 Thread Reza Alizadeh Majd
Hi, 

Thanks for your response. 

based on my researches about using LXQt as a service on guix (like other 
desktop services previously defined), I found following comment on LXQt's 
Github: https://github.com/lxqt/lxqt/issues/1521#issuecomment-405097453

It seems that I need to customize `$XDG_CONFIG_DIRS` in order to be able to 
load  session files from `prefix/etc/share` instead of `prefix/etc/xdg` but I 
couldn't find a proper way to do this, and  hoped that defining a shepherd 
service with modified environment variables in it's start script could help. 

do we have any reference about modification of environment variables during 
service start? 

Thanks,
Reza



On Wed, May 15, 2019, at 7:58 AM, Meiyo Peng wrote:
> Hi,
> 
> Reza Alizadeh Majd writes:
> 
> > I'll try to create a service for `lxqt-desktop` based on same definition on 
> > [nixos](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/desktop-managers/lxqt.nix).
> > but my service definition won't start and  here is my proposed definition 
> > for this service:
> 
> Thank you for your work on LXQt.
> 
> > ;;;
> > ;;; LXQt desktop service.
> > ;;;
> >
> > (define-record-type*  lxqt-desktop-configuration
> >   make-lxqt-desktop-configuration
> >   lxqt-desktop-configuration
> >   (lxqt-package lxqt-package (default lxqt)))
> >
> > (define (lxqt-shepherd-service config)
> >   "Return a shepherd service for @command{lxqt-session}"
> >   (let ((lxqt-session ((package-direct-input-selector "lxqt-session")
> >(lxqt-package config
> > (list (shepherd-service
> > (provision '(lxqt))
> > ; (requirement '())
> > (documentation "Run the lxqt session")
> > (start #~(make-forkexec-constructor
> >   (list(string-append #$lxqt-session "/bin/startlxqt"))
> >   #:environment-variables
> >   (list (string-append "XDG_CONFIG_DIRS="
> >
> > "$XDG_CONFIG_DIRS;/run/current-system/profile/etc/xdg")
> > (string-append "XDG_DATA_DIRS="
> >
> > "$XDG_DATA_DIRS;/run/current-system/profile/share"))
> > (stop #~(make-kill-destructor))
> 
> I don't think we should start the LXQt session from a shepherd service.
> A desktop session should be started by a display manager like GDM or
> SDDM.  A display manager can find these desktop sessions and provides
> choices on login screen if a desktop package provides correct session
> files in prefix/share/xsessions (or prefix/share/wayland-sessions for
> wayland sessions).  I am not a nix expert but I think the nix file you
> referred to tries to define a desktop session file for LXQt rather than
> automatically start it upon system startup.
> 
> > (define lxqt-desktop-service-type
> >   (service-type
> > (name 'lxqt-desktop)
> > (extensions
> >   (list
> > (service-extension shepherd-root-service-type
> >lxqt-shepherd-service)
> > (service-extension profile-service-type
> >(compose list
> > lxqt-package
> > (default-value (lxqt-desktop-configuration))
> > (description "Run the LXQt desktop environment.")))
> >
> > (define-deprecated (lxqt-desktop-service #:key
> >  (config
> >   (lxqt-desktop-configuration)))
> >   lxqt-desktop-service-type
> >   "Return a service that adds the @code{lxqt} package to the system 
> > profile, and
> > extends polkit with the actions from @code{lxqt-policykit}."
> >   (service lxqt-desktop-service-type config))
> 
> Apparently we should not use (define-deprecated ...) to define new variables.
> 
> > could anyone help on this matter ?
> 
> What are you trying to achieve by adding the lxqt-desktop-service-type?
> 
> 
> --
> Meiyo Peng
> https://www.pengmeiyu.com/
>



Problem on LXQt service definition

2019-05-13 Thread Reza Alizadeh Majd
Hi, 

I'll try to create a service for `lxqt-desktop` based on same definition on 
[nixos](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/desktop-managers/lxqt.nix).
 
but my service definition won't start and  here is my proposed definition for 
this service:


;;;
;;; LXQt desktop service.
;;;

(define-record-type*  lxqt-desktop-configuration
  make-lxqt-desktop-configuration
  lxqt-desktop-configuration
  (lxqt-package lxqt-package (default lxqt)))

(define (lxqt-shepherd-service config)
  "Return a shepherd service for @command{lxqt-session}"
  (let ((lxqt-session ((package-direct-input-selector "lxqt-session") 
   (lxqt-package config
(list (shepherd-service
(provision '(lxqt))
; (requirement '())
(documentation "Run the lxqt session")
(start #~(make-forkexec-constructor
  (list(string-append #$lxqt-session "/bin/startlxqt"))
  #:environment-variables
  (list (string-append "XDG_CONFIG_DIRS=" 
   
"$XDG_CONFIG_DIRS;/run/current-system/profile/etc/xdg")
(string-append "XDG_DATA_DIRS="
   
"$XDG_DATA_DIRS;/run/current-system/profile/share"))
(stop #~(make-kill-destructor))

(define lxqt-desktop-service-type
  (service-type
(name 'lxqt-desktop)
(extensions
  (list
(service-extension shepherd-root-service-type
   lxqt-shepherd-service)
(service-extension profile-service-type
   (compose list 
lxqt-package
(default-value (lxqt-desktop-configuration))
(description "Run the LXQt desktop environment.")))

(define-deprecated (lxqt-desktop-service #:key 
 (config 
  (lxqt-desktop-configuration)))
  lxqt-desktop-service-type
  "Return a service that adds the @code{lxqt} package to the system profile, 
and 
extends polkit with the actions from @code{lxqt-policykit}."
  (service lxqt-desktop-service-type config))


could anyone help on this matter ? 



Installing a package using guile script

2019-05-06 Thread Reza Alizadeh Majd
Hi, 

Just wanted to now if there is any programming interface available for Guix in 
order to
install a packages with a Guile script ? 

I actually want to install packages for a specific user, after `guix system 
reconfigure ... ` 
command. my plan was to add a simple Guile script after `operating-system` 
definition 
in my system configuration file, to add packages to user's profile.

the easiest way is to just run a shell script for to do that for me, but I'm 
curious that if there 
is any more programmatic solution for that?


Regards, 
Reza



Re: custom service definition files location

2019-02-18 Thread Reza Alizadeh Majd
Thanks, adding service definition path to `GUILE_LOAD_PATH` fixed the issue. 

Best, 
Reza


On Mon, Feb 18, 2019, at 3:04 PM, Ricardo Wurmus wrote:
> 
> Reza Alizadeh Majd  writes:
> 
> > Thanks for your response.
> > sure I will pass my system config file as an argument to guix:
> >
> > $ guix system reconfigure /etc/confg.scm
> >
> > but my question is about to detect my custom service definition files ( 
> > myservice.scm ) in order that I could use them inside my config.scm . for 
> > existing services, their definition files are located in store, in 
> > `/gnu/store/.../gnu/service/` path.
> 
> There are two ways to do this:
> 
> 1. place your service definitions in a Guile module and put the
> directory containing the module files onto GUILE_LOAD_PATH.  Refer to
> the module with a “use-modules” clause in your operating system
> configuration.
> 
> 2. Include the file with “(include "/path/to/file-name")”.  You can use
> a relative file name here.
> 
> --
> Ricardo
> 



Re: custom service definition files location

2019-02-18 Thread Reza Alizadeh Majd
Thanks for your response. 
sure I will pass my system config file as an argument to guix: 

$ guix system reconfigure /etc/confg.scm

but my question is about to detect my custom service definition files ( 
myservice.scm ) in order that I could use them inside my config.scm . for 
existing services, their definition files are located in store, in 
`/gnu/store/.../gnu/service/` path.

Best, 
Reza


On Mon, Feb 18, 2019, at 2:22 AM, nly wrote:
> Guix system is declared in 1 file. The file may be 'config.scm',or 
> 'xyz.scm', or even 'foo.bar'.
> 
> It is not automatically detected by 'guix system' commands(you might be 
> thinking of nix).
> 
> It is supplied as a command-line argument with the 'guix system' 
> commands. Check 'guix system --help'.
> 
> On February 17, 2019 5:09:26 PM UTC, Reza Alizadeh Majd 
>  wrote:
> >Hi, 
> >
> >does anyone know where do I have to place my custom service definition
> >`.scm` files,
> >in order to automatically be identified by `guix system reconfigure`
> >command? 
> >
> >Thanks,
> >Reza
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.



custom service definition files location

2019-02-17 Thread Reza Alizadeh Majd
Hi, 

does anyone know where do I have to place my custom service definition `.scm` 
files,
in order to automatically be identified by `guix system reconfigure` command? 

Thanks,
Reza



User-Level services

2019-02-03 Thread Reza Alizadeh Majd
Hi everyone, 

Is it possible to define a shepherd service based on user login sessions in 
Guix? 
I want to run an application as a daemon that is responsible for serving its 
services, separately for each user. 

Thanks, 
Reza



Re: Guix packaging copy file to current users profile

2019-01-09 Thread Reza Alizadeh Majd


Thanks fo your help,  

my package needs to install some `.scm` scripts beside  original package files. 
I just install them in wrong path, then I couldn't to import them inside guile
interpreter. 

after fixing the scheme files installation paths to `share/guile/site/2.2/` 
symlinks
built successfully in `~/.guix-profile/share/guile/site/2.2./`. 

---
Best
Reza

On Wed, Jan 9, 2019, at 11:02 PM, Leo Famulari wrote:
> On Wed, Jan 09, 2019 at 05:53:00PM +0330, Reza Alizadeh Majd wrote:
> > Hi Everyone, 
> > 
> > How can I copy some configuration files, from my package archive to 
> > current users profile?  I need to copy some additional files from package 
> > archive to `~/.guix-profile/` path.
> 
> Can you clarify what you mean by 'package archive'?
> 
> The files in ~/.guix-profile are a union of symbolic links to the
> store directories of the packages in your profile.
> 
> So, if your package definition installs a file like this:
> 
> /gnu/store/...-reza-package/share/foo.txt
> 
> and you add 'reza-package' to your profile, then you will find the
> file symlinked like this:
> 
> ~/.guix-profile/share/foo.txt
> 
> I hope that helps!
> Email had 1 attachment:
> + signature.asc
>   1k (application/pgp-signature)



Guix packaging copy file to current users profile

2019-01-09 Thread Reza Alizadeh Majd
Hi Everyone, 

How can I copy some configuration files, from my package archive to 
current users profile?  I need to copy some additional files from package 
archive to `~/.guix-profile/` path.

Thanks, 
Reza



Multiple build-systems in a guix package

2019-01-08 Thread Reza Alizadeh Majd
Hi, 

I'm working on a Guix package based on cmake-build-system. this package needs 
to copy 
some .scm files in GUILE_LOAD_PATH, compiled .go file is also need to be added 
inside  
GUILE_LOAD_COMPILED_PATH, does anyone know how could I reach these variables 
relating
to current profile? 

currently I used following script inside my CMakeLists.txt: 

execute_process(
COMMAND guile -c "(display (car %load-path))"
OUTPUT_VARIABLE SCRIPT_PATH
)
install(FILES scripts/packageutils.scm DESTINATION ${SCRIPT_PATH})


but it seems that my ${SCRIPT_PATH} points to an invalid path.



Regards, 
Reza



Re: Guix Packages - unpack issue

2019-01-08 Thread Reza Alizadeh Majd
Thanks, 
using (method url-fetch/tarbomb) fixed my issue, later I need to fix package 
definition 
to prevent occurrence of tarbomb. 

--
Reza


On Mon, Jan 7, 2019, at 11:08 PM, Ricardo Wurmus wrote:
> 
> Hi Reza,
> 
> please always send replies to all recipents, including the list.
> 
> > (source (origin
> > (method url-fetch)
> > (uri (string-append 
> > 
> > "https://s3.eu-central-1.amazonaws.com/source-git-pantherx-org/guix-tools_;
> > version ".tgz"))
> > (sha256 
> > (base32 "125h6h1b2i2q9vwlsi1y1yzqcn27vziqmg0w0cyaigkj9q0mc09q"
> 
> This is a tarbomb.  Its contents are directly unpacked to the current
> directory.  A well-behaved tarball should unpack into a directory.
> 
> You can use (method url-fetch/tarbomb) in this case.
> 
> -- 
> Ricardo
> 



Guix Packages - unpack issue

2019-01-06 Thread Reza Alizadeh Majd
Hi, 

I'm trying to create package of my application for GuixSD. during unpack phase 
I receive following Error. could anyone help me to fix this error? 

...
starting phase `install-locale'
using 'en_US.utf8' locale for category "LC_ALL"
phase `install-locale' succeeded after 0.0 seconds
starting phase `unpack'
...
./README.md
./exec_tests.sh
tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
tar: Exiting with failure status due to previous errors
Backtrace:
   5 (primitive-load "/gnu/store/n73lb40f47mqcyvg85df7v92277…")
In ice-9/eval.scm:
   191:35  4 (_ #f)
In srfi/srfi-1.scm:
   863:16  3 (every1 # …)
In 
/gnu/store/6bwkbm3a80v0xab5qsicij7bjvmn5yna-module-import/guix/build/gnu-build-system.scm:
   799:28  2 (_ _)
   166:12  1 (unpack #:source _)
In 
/gnu/store/6bwkbm3a80v0xab5qsicij7bjvmn5yna-module-import/guix/build/utils.scm:
616:6  0 (invoke _ . _)

/gnu/store/6bwkbm3a80v0xab5qsicij7bjvmn5yna-module-import/guix/build/utils.scm:616:6:
 In procedure invoke:
Throw to key `srfi-34' with args `(#)'.
builder for `/gnu/store/r8wls692iqlqqnv75k1g7w7a40wag0nw-guix-tools-0.1.1.drv' 
failed with exit code 1
build of /gnu/store/r8wls692iqlqqnv75k1g7w7a40wag0nw-guix-tools-0.1.1.drv failed
View build log at 
'/var/log/guix/drvs/r8/wls692iqlqqnv75k1g7w7a40wag0nw-guix-tools-0.1.1.drv.bz2'.
guix build: error: build failed: build of 
`/gnu/store/r8wls692iqlqqnv75k1g7w7a40wag0nw-guix-tools-0.1.1.drv' failed




GuixSD Service Implementation Problem

2018-12-28 Thread Reza Alizadeh Majd
Hi, 

I'm working on an application which should be run as a service on GuixSD. 
I followed other service definitions and add my service definition file inside 
`GUIX_PACKAGE_PATH` path. but when I add this service to my system 
configuration file, and perform `guix system reconfigure /etc/config.scm`, 
receive following Error: 

```
ice-9/eval.scm:142:16: In procedure compile-top-call:
error: foo-service: unbound variable
hint: Did you forget `(use-modules (px services foo))'?
```

could anyone help me on this issue?


my system configuration file: 

```
(use-modules (gnu)
 (px services foo))
...

(operating-system
  ...
  
  (services (cons* 
   (foo-service)
   (dhcp-client-service)
   ...
   %base-services))

  (name-service-switch %mdns-host-lookup-nss))
  ```
  
my service definition:

```
(define-module (px services foo)
   #:use-module (gnu services)
   #:use-module (gnu services shepherd)
   #:use-module (px packages foo)
   #:use-module (guix qexp)
   #:use-module (guix records)
   #:use-module (ice-9 match)
   #:export (foo-service))

(define-record-type* 
 foo-configuration  make-foo-configuration
 foo-configuration?
 (package foo-configuration-package
  (default foo-app)))

(define foo-shepherd-service
  (match-lambda
(($  package)
 (list (shepherd-service
 (provision '(foo-service))
 (documentation "foo service")
 (requirement '(user-processes))
 (start #~((make-forkexec-constructor
 (list
   (string-append #$package "/bin/foo_app")
 (stop #~((make-kill-destructor


(define foo-service-type
  (service-type (name 'fooservice)
(extensions
  (list (service-extensions shepherd-root-service-type
foo-shepherd-service)

(define* (foo-service #:key (package foo-app))
 "Foo Service"
 (service foo-service-type
  (foo-configuration
(package package
```