GNU bug report logs - #29468
[PATCH 0/2] Fix some functionality in gnome-disks.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 27 Nov 2017 08:40:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29468 in the body.
You can then email your comments to 29468 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29468; Package guix-patches. (Mon, 27 Nov 2017 08:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 27 Nov 2017 08:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] Fix some functionality in gnome-disks.
Date: Mon, 27 Nov 2017 08:38:53 +0000
[Message part 1 (text/plain, inline)]
These patches fix the ability to remove partitions using gnome-disks,
and the ability to create encrypted volumes.

Christopher Baines (2):
  services: desktop: Create /var/run/udisks2 for the udisks service.
  gnu: Patch udisks to directly reference cryptsetup and parted.

 gnu/packages/freedesktop.scm | 14 +++++++++++---
 gnu/services/desktop.scm     | 11 +++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29468; Package guix-patches. (Mon, 27 Nov 2017 08:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 29468 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 29468 <at> debbugs.gnu.org
Subject: [PATCH 1/2] services: desktop: Create /var/run/udisks2 for the udisks
 service.
Date: Mon, 27 Nov 2017 08:48:14 +0000
* gnu/services/desktop.scm (%udisks-activation): New variable.
  (udisks-service-type)[extensions]: Extend the activation service type with
  %udisks-activation.
---
 gnu/services/desktop.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 4b5100c27..ec33e1d5e 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -507,6 +507,15 @@ site} for more information."
   (udisks   udisks-configuration-udisks
             (default udisks)))
 
+(define %udisks-activation
+  (with-imported-modules '((guix build utils))
+    #~(begin
+        (use-modules (guix build utils))
+
+        (let ((run-dir "/var/run/udisks2"))
+          (mkdir-p run-dir)
+          (chmod run-dir #o700)))))
+
 (define udisks-service-type
   (let ((udisks-package (lambda (config)
                           (list (udisks-configuration-udisks config)))))
@@ -518,6 +527,8 @@ site} for more information."
                                             udisks-package)
                          (service-extension udev-service-type
                                             udisks-package)
+                         (service-extension activation-service-type
+                                            (const %udisks-activation))
 
                          ;; Profile 'udisksctl' & co. in the system profile.
                          (service-extension profile-service-type
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#29468; Package guix-patches. (Mon, 27 Nov 2017 08:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 29468 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 29468 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Patch udisks to directly reference cryptsetup and
 parted.
Date: Mon, 27 Nov 2017 08:48:15 +0000
This fixes some functionality in gnome-disks, which uses udisks. Adding
cryptsetup enables creating partitions using LUKS, and adding parted enables
editing the partition tables through the disks application.

* gnu/packages/freedesktop.scm (udisks)[inputs]: Add cryptsetup and parted.
  (arguments): Rename set-mount-file-name phase, and add cryptsetup and
  parted.
---
 gnu/packages/freedesktop.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index cac1f67c5..b0f711440 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -40,7 +40,9 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gettext)
@@ -613,7 +615,9 @@ Analysis and Reporting Technology) functionality.")
        ("libatasmart" ,libatasmart)
        ("libgudev" ,libgudev)
        ("polkit" ,polkit)
-       ("util-linux" ,util-linux)))
+       ("util-linux" ,util-linux)
+       ("cryptsetup" ,cryptsetup)
+       ("parted" ,parted)))
     (outputs '("out"
                "doc"))                            ;5 MiB of gtk-doc HTML
     (arguments
@@ -653,14 +657,18 @@ Analysis and Reporting Technology) functionality.")
                "girdir = $(datadir)/gir-1.0\n")
               (("typelibsdir = .*")
                "typelibsdir = $(libdir)/girepository-1.0\n"))))
-         (add-after 'install 'set-mount-file-name
+         (add-after 'install 'wrap-udisksd
            (lambda* (#:key outputs inputs #:allow-other-keys)
              ;; Tell 'udisksd' where to find the 'mount' command.
              (let ((out   (assoc-ref outputs "out"))
-                   (utils (assoc-ref inputs "util-linux")))
+                   (utils (assoc-ref inputs "util-linux"))
+                   (cryptsetup (assoc-ref inputs "cryptsetup"))
+                   (parted (assoc-ref inputs "parted")))
                (wrap-program (string-append out "/libexec/udisks2/udisksd")
                  `("PATH" ":" prefix
                    (,(string-append utils "/bin") ;for 'mount'
+                    ,(string-append cryptsetup "/sbin")
+                    ,(string-append parted "/sbin")
                     "/run/current-system/profile/bin"
                     "/run/current-system/profile/sbin")))
                #t))))))
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#29468; Package guix-patches. (Mon, 27 Nov 2017 14:10:01 GMT) Full text and rfc822 format available.

Message #14 received at 29468 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 29468 <at> debbugs.gnu.org
Subject: Re: [bug#29468] [PATCH 1/2] services: desktop: Create
 /var/run/udisks2 for the udisks service.
Date: Mon, 27 Nov 2017 15:08:55 +0100
Christopher Baines <mail <at> cbaines.net> skribis:

> * gnu/services/desktop.scm (%udisks-activation): New variable.
>   (udisks-service-type)[extensions]: Extend the activation service type with
>   %udisks-activation.

What was the effect of lacking /var/run/udisks2?  Perhaps add a comment
explaining what it’s used for.

If it fixes something, fine with me!  :-)

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#29468; Package guix-patches. (Mon, 27 Nov 2017 14:10:02 GMT) Full text and rfc822 format available.

Message #17 received at 29468 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 29468 <at> debbugs.gnu.org
Subject: Re: [bug#29468] [PATCH 2/2] gnu: Patch udisks to directly reference
 cryptsetup and parted.
Date: Mon, 27 Nov 2017 15:09:47 +0100
Christopher Baines <mail <at> cbaines.net> skribis:

> This fixes some functionality in gnome-disks, which uses udisks. Adding
> cryptsetup enables creating partitions using LUKS, and adding parted enables
> editing the partition tables through the disks application.
>
> * gnu/packages/freedesktop.scm (udisks)[inputs]: Add cryptsetup and parted.
>   (arguments): Rename set-mount-file-name phase, and add cryptsetup and
>   parted.

I think the explanation above should be a comment, but otherwise LGTM.

Thanks for fixing it!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#29468; Package guix-patches. (Mon, 27 Nov 2017 19:30:02 GMT) Full text and rfc822 format available.

Message #20 received at 29468 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 29468 <at> debbugs.gnu.org
Subject: Re: [bug#29468] [PATCH 1/2] services: desktop: Create
 /var/run/udisks2 for the udisks service.
Date: Mon, 27 Nov 2017 19:29:18 +0000
[Message part 1 (text/plain, inline)]
Ludovic Courtès writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> * gnu/services/desktop.scm (%udisks-activation): New variable.
>>   (udisks-service-type)[extensions]: Extend the activation service type with
>>   %udisks-activation.
>
> What was the effect of lacking /var/run/udisks2?  Perhaps add a comment
> explaining what it’s used for.
>
> If it fixes something, fine with me!  :-)

Not quite sure, I don't know anything about udisks. I did write down the
error I got though...

  Cannot create directory /var/run/udisks2/block-format-tos-A9rUrL

  No such file or directory:

I've had a quick look, but haven't found anything documenting this
requirement.

I'll go ahead and push this, hopefully it can be clarified in the
future.

Thanks for reviewing,

Chris
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 27 Nov 2017 19:48:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Mon, 27 Nov 2017 19:48:02 GMT) Full text and rfc822 format available.

Message #25 received at 29468-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 29468-done <at> debbugs.gnu.org
Subject: Re: [bug#29468] [PATCH 2/2] gnu: Patch udisks to directly reference
 cryptsetup and parted.
Date: Mon, 27 Nov 2017 19:47:31 +0000
[Message part 1 (text/plain, inline)]
Ludovic Courtès writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> This fixes some functionality in gnome-disks, which uses udisks. Adding
>> cryptsetup enables creating partitions using LUKS, and adding parted enables
>> editing the partition tables through the disks application.
>>
>> * gnu/packages/freedesktop.scm (udisks)[inputs]: Add cryptsetup and parted.
>>   (arguments): Rename set-mount-file-name phase, and add cryptsetup and
>>   parted.
>
> I think the explanation above should be a comment, but otherwise LGTM.
>
> Thanks for fixing it!

No problem, I've added a couple of comments and pushed.

Thanks for reviewing :)

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Dec 2017 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.