unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Serial line lock directory
@ 2017-06-06 18:54 Danny Milosavljevic
  2017-06-07  6:58 ` Chris Marusich
  0 siblings, 1 reply; 5+ messages in thread
From: Danny Milosavljevic @ 2017-06-06 18:54 UTC (permalink / raw)
  To: guix-devel

Hi,

I'm trying to package minicom and there I get an error message 

  checking for com line lock directory... configure: error: No suitable lock directory

... which was checking for a (common) directory to put a file in (as a marker) when a serial device is in use (and removing the file to free the serial device).  This is supposed to prevent multiple different programs accidentally using the same serial line.

Where and how should this be done in Guix?

To reproduce:

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7ad93653e..fc6e4068c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -44,6 +44,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -812,3 +813,21 @@ the 'showing the effect of'-style of operation.")
 for mathematical functions.  It also provides an machine-independent
 interface to select the best such procedures to use on a given system.")
     (license license:gpl3+)))
+
+(define-public minicom
+  (package
+    (name "minicom")
+    (version "2.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://alioth.debian.org/frs/download.php/"
+                           "file/4215/" name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk"))))
+    (build-system gnu-build-system)
+    (home-page "https://alioth.debian.org/projects/minicom/")
+    (synopsis "Serial terminal emulator")
+    (description "@code{minicom} is a serial terminal emulator.")
+    (license license:gpl2+)))

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Serial line lock directory
  2017-06-06 18:54 Serial line lock directory Danny Milosavljevic
@ 2017-06-07  6:58 ` Chris Marusich
  2017-06-07 12:32   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Marusich @ 2017-06-07  6:58 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

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

Danny Milosavljevic <dannym@scratchpost.org> writes:

> I'm trying to package minicom and there I get an error message 
>
>   checking for com line lock directory... configure: error: No suitable lock directory
>
> ... which was checking for a (common) directory to put a file in (as a marker) when a serial device is in use (and removing the file to free the serial device).  This is supposed to prevent multiple different programs accidentally using the same serial line.
>
> Where and how should this be done in Guix?

That sounds like a directory which should exist in the localstatedir
(info '(standards) Directory Variables').  I haven't looked closely at
the package, but your package definition makes it look like it's using a
GNU build system, so hopefully it provides a way to configure the
value used for the localstatedir.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serial line lock directory
  2017-06-07  6:58 ` Chris Marusich
@ 2017-06-07 12:32   ` Ludovic Courtès
  2017-06-08 19:08     ` Danny Milosavljevic
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-06-07 12:32 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel

Chris Marusich <cmmarusich@gmail.com> skribis:

> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
>> I'm trying to package minicom and there I get an error message 
>>
>>   checking for com line lock directory... configure: error: No suitable lock directory
>>
>> ... which was checking for a (common) directory to put a file in (as a marker) when a serial device is in use (and removing the file to free the serial device).  This is supposed to prevent multiple different programs accidentally using the same serial line.
>>
>> Where and how should this be done in Guix?
>
> That sounds like a directory which should exist in the localstatedir
> (info '(standards) Directory Variables').  I haven't looked closely at
> the package, but your package definition makes it look like it's using a
> GNU build system, so hopefully it provides a way to configure the
> value used for the localstatedir.

Probably it checks whether $localstatedir exist, and it doesn’t exist in
the build environment.  So you’ll have to somehow tweak ‘configure’ into
skipping that test, perhaps by setting the relevant ‘ac_cv_’ variable if
it exists.

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serial line lock directory
  2017-06-07 12:32   ` Ludovic Courtès
@ 2017-06-08 19:08     ` Danny Milosavljevic
  2017-06-09 13:50       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Danny Milosavljevic @ 2017-06-08 19:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

On Wed, 07 Jun 2017 14:32:09 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Probably it checks whether $localstatedir exist, and it doesn’t exist in
> the build environment.  So you’ll have to somehow tweak ‘configure’ into
> skipping that test, perhaps by setting the relevant ‘ac_cv_’ variable if
> it exists.

Good point.

But which directory does GuixSD [intend to] use for serial locks?  The locks only make sense if every application actually uses the same directory for locks :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serial line lock directory
  2017-06-08 19:08     ` Danny Milosavljevic
@ 2017-06-09 13:50       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2017-06-09 13:50 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Wed, 07 Jun 2017 14:32:09 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Probably it checks whether $localstatedir exist, and it doesn’t exist in
>> the build environment.  So you’ll have to somehow tweak ‘configure’ into
>> skipping that test, perhaps by setting the relevant ‘ac_cv_’ variable if
>> it exists.
>
> Good point.
>
> But which directory does GuixSD [intend to] use for serial locks?  The locks only make sense if every application actually uses the same directory for locks :)

I think /var/lock is what’s conventionally used so I’d stick to that.

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-09 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06 18:54 Serial line lock directory Danny Milosavljevic
2017-06-07  6:58 ` Chris Marusich
2017-06-07 12:32   ` Ludovic Courtès
2017-06-08 19:08     ` Danny Milosavljevic
2017-06-09 13:50       ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).