[PATCH] substitute* hard-coded paths with paths from "out"

  • Done
  • quality assurance status badge
Details
4 participants
  • Kristofer Buffington
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • zimoun
Owner
unassigned
Submitted by
Kristofer Buffington
Severity
normal
K
K
Kristofer Buffington wrote on 15 Nov 2017 01:41
(address . guix-patches@gnu.org)
8760accpzl.fsf@gmail.com
* gnu/packages/guile.scm
used substitute* to correct some hardcoded paths in the artanis package
---
gnu/packages/guile.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Toggle diff (40 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index abcefd32e..b7c2dd4c7 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2017 ng0 <ng0@infotropique.org>
+;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -431,7 +432,8 @@ program can be installed in one go.")
post)))
(substitute* "artanis/artanis.scm"
(("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
- ""))))))
+ ""))
+ ))))
(build-system gnu-build-system)
;; TODO: Add guile-dbi and guile-dbd optional dependencies.
(inputs `(("guile" ,guile-2.2)
@@ -458,6 +460,14 @@ program can be installed in one go.")
((" /etc/bash.bashrc") " /dev/null"))
(substitute* "Makefile" ;set the root of config files to OUT
((" /etc") (string-append " " out "/etc")))
+ (substitute* "artanis/config.scm"
+ (("/etc/artanis/artanis.conf")
+ (string-append out "/etc/artanis.conf"))
+ (("/etc/artanis/pages")
+ (string-append out "/etc/artanis")))
+ (substitute* "etc/artanis/artanis.conf"
+ (("/etc/artanis/pages")
+ (string-append out "/etc/artanis")))
(mkdir-p (string-append out "/bin")) ;for the `art' executable
#t)))
(add-after 'install 'wrap-art
--
2.15.0
Message-ID: <877euscq0y.fsf@gmail.com>
L
L
Ludovic Courtès wrote on 23 Nov 2017 22:59
(name . Kristofer Buffington)(address . kristoferbuffington@gmail.com)(address . 29301@debbugs.gnu.org)
87shd4odvl.fsf@gnu.org
Hi Kristofer,

Kristofer Buffington <kristoferbuffington@gmail.com> skribis:

Toggle quote (3 lines)
> * gnu/packages/guile.scm
> used substitute* to correct some hardcoded paths in the artanis package

[...]

Toggle quote (9 lines)
> + (substitute* "artanis/config.scm"
> + (("/etc/artanis/artanis.conf")
> + (string-append out "/etc/artanis.conf"))
> + (("/etc/artanis/pages")
> + (string-append out "/etc/artanis")))
> + (substitute* "etc/artanis/artanis.conf"
> + (("/etc/artanis/pages")
> + (string-append out "/etc/artanis")))

Shouldn’t we instead configure it with --sysconfdir=/etc? That would
allow users to provide custom configuration files, whereas currently
OUTPUT/etc/artanis contains immutable configuration files.

WDYT?

Thanks,
Ludo’.
K
K
Kristofer Buffington wrote on 27 Nov 2017 02:31
Fwd: [bug#29301] [PATCH] substitute* hard-coded paths with paths from "out"
(address . 29301@debbugs.gnu.org)
CAN1Dt4RVo6dVwHDFZDiVgX3Ce-Wx=_xVqv2vjPuazF10_+PYRQ@mail.gmail.com
---------- Forwarded message ----------
From: Kristofer Buffington <kristoferbuffington@gmail.com>
Date: Sun, Nov 26, 2017 at 8:30 PM
Subject: Re: [bug#29301] [PATCH] substitute* hard-coded paths with paths
from "out"
To: Ludovic Courtès <ludo@gnu.org>


I will investigate. There are some hard coded paths in artanis/config.scm
looking for the configuration file in /etc/artanis/artanis.conf -- I don't
believe the --sysconfdir flag will have any impact on the hard-coded paths.
Perhaps I should send a patch upstream to eliminate the hard paths? Then
the substitute* would be unnecessary?

Thanks!
Kris

On Thu, Nov 23, 2017 at 4:59 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (27 lines)
> Hi Kristofer,
>
> Kristofer Buffington <kristoferbuffington@gmail.com> skribis:
>
> > * gnu/packages/guile.scm
> > used substitute* to correct some hardcoded paths in the artanis package
>
> [...]
>
> > + (substitute* "artanis/config.scm"
> > + (("/etc/artanis/artanis.conf")
> > + (string-append out "/etc/artanis.conf"))
> > + (("/etc/artanis/pages")
> > + (string-append out "/etc/artanis")))
> > + (substitute* "etc/artanis/artanis.conf"
> > + (("/etc/artanis/pages")
> > + (string-append out "/etc/artanis")))
>
> Shouldn’t we instead configure it with --sysconfdir=/etc? That would
> allow users to provide custom configuration files, whereas currently
> OUTPUT/etc/artanis contains immutable configuration files.
>
> WDYT?
>
> Thanks,
> Ludo’.
>
Attachment: file
L
L
Ludovic Courtès wrote on 27 Nov 2017 09:51
Re: [bug#29301] [PATCH] substitute* hard-coded paths with paths from "out"
(name . Kristofer Buffington)(address . kristoferbuffington@gmail.com)(address . 29301@debbugs.gnu.org)
87r2sknlxv.fsf@gnu.org
Hi,

(Please always keep the bug Cc’d.)

Kristofer Buffington <kristoferbuffington@gmail.com> skribis:

Toggle quote (6 lines)
> I will investigate. There are some hard coded paths in artanis/config.scm
> looking for the configuration file in /etc/artanis/artanis.conf -- I don't
> believe the --sysconfdir flag will have any impact on the hard-coded paths.
> Perhaps I should send a patch upstream to eliminate the hard paths? Then
> the substitute* would be unnecessary?

--sysconfdir would not change the hard-coded file names, but it would
actually make those hard-coded file names valid. And again, using /etc
as the sysconfdir would allow people to have a writable artanis.conf
file, for instance, so that’s definitely something we should do.

Thanks,
Ludo’.
K
K
Kristofer Buffington wrote on 28 Nov 2017 22:10
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29301@debbugs.gnu.org)
CAN1Dt4SP3_Y8eG2YqBQZbgLsFLRSqtjOjeKCYXpjd_PHCJkx-Q@mail.gmail.com
Cool! I am not very familiar with autotools. I appreciate the help! I will
follow up with a new patch.

Thanks
Kris

On Nov 27, 2017 3:52 AM, "Ludovic Courtès" <ludo@gnu.org> wrote:

Toggle quote (22 lines)
> Hi,
>
> (Please always keep the bug Cc’d.)
>
> Kristofer Buffington <kristoferbuffington@gmail.com> skribis:
>
> > I will investigate. There are some hard coded paths in artanis/config.scm
> > looking for the configuration file in /etc/artanis/artanis.conf -- I
> don't
> > believe the --sysconfdir flag will have any impact on the hard-coded
> paths.
> > Perhaps I should send a patch upstream to eliminate the hard paths? Then
> > the substitute* would be unnecessary?
>
> --sysconfdir would not change the hard-coded file names, but it would
> actually make those hard-coded file names valid. And again, using /etc
> as the sysconfdir would allow people to have a writable artanis.conf
> file, for instance, so that’s definitely something we should do.
>
> Thanks,
> Ludo’.
>
Attachment: file
L
L
Ludovic Courtès wrote on 6 Feb 2018 16:13
(name . Kristofer Buffington)(address . kristoferbuffington@gmail.com)(address . 29301@debbugs.gnu.org)
87h8qu6thu.fsf@gnu.org
Hi Kristofer,

Kristofer Buffington <kristoferbuffington@gmail.com> skribis:

Toggle quote (3 lines)
> Cool! I am not very familiar with autotools. I appreciate the help! I will
> follow up with a new patch.

Any update on this? :-)

Ludo’.
K
K
Kristofer Buffington wrote on 9 Feb 2018 15:15
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29301@debbugs.gnu.org)
CAN1Dt4QHfDqL86M33h9xQCNWG4saRt2a9NFdAeHcSAHao-=aVA@mail.gmail.com
Sorry I haven't had a stable internet connection since early december and
haven't been coding much as a result. I will be back at the computer in
about 3 weeks to revisit this.

Kristofer

On Feb 6, 2018 10:13 AM, "Ludovic Courtès" <ludo@gnu.org> wrote:

Toggle quote (12 lines)
> Hi Kristofer,
>
> Kristofer Buffington <kristoferbuffington@gmail.com> skribis:
>
> > Cool! I am not very familiar with autotools. I appreciate the help! I
> will
> > follow up with a new patch.
>
> Any update on this? :-)
>
> Ludo’.
>
Attachment: file
T
T
Tobias Geerinckx-Rice wrote on 27 Sep 2019 15:07
(address . 29301@debbugs.gnu.org)(address . kristoferbuffington@gmail.com)
87tv8xykdh.fsf@nckx
Kristofer Buffington ???
Toggle quote (2 lines)
> I will be back at the computer in about 3 weeks to revisit this.

…ping :-) Is this still relevant?

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl2OCXsACgkQ2Imw8BjF
STx0GA/9EAZ130iiyBUaIqgiDOYvPCeJU/RKrf4O3sQOJ/tA/j2Z+Oy8NQU8iLVu
GbP0gxo/sk+A8J39EsFXMyr7bmErQ9xGZdRv3LKJLEYYZPthxrc3B92ryzvKOHdJ
q5fiaP8KRPuvOTUi9y3DLvUsPajoFu2A511eBsaJCY1ckQwki0ui5bnl2o3T9I5O
ELHPE1DzzrjaZw9yvpuovhA1cXT9RsBC6vlSwuJ4R91M2XmqzfmU6hfhY/tVQ+vj
IdKaUWT3WPJa5KM1aALiXLR7+KHuaMyEfUgcSewRWfVrwTgQurqzonDgzNiU9cFs
RYMai9IAMxKE6zsUG88Tl6MdaKM6wT7qIKovWokFkblXxX8gZ6H7QXzf5z0+80B0
nktt3o5ePa3mwCuG7Hl1jtEp19CPNRO1sI/eCdYJDRIC8zPCo5uW5zflS+JY/t4g
sgPF7e+rY7sHiocPPUJLTeSCxrhJj+maJmV7VhUENOCZNhfu+QJw1vZlcqZykBCE
V2qRKR63Msv3AZ34ZdkzFnyPpy3rnvQGXdKdZjCzm4eLh896N0nxcVaHullvsm9g
zpB6z3vZCviutn31FndM15bE3GY2+HgV5boOUaIKcQ20hp7TbR3Vnta9l6jYJw7Q
q5mxboqaWixC1Td0NiP3wY76B6KZMZ25G+QD6SIUNd6Tb8YECyg=
=nXF4
-----END PGP SIGNATURE-----

Z
Z
zimoun wrote on 13 Jan 2022 16:56
Re: bug#29301: [PATCH] substitute* hard-coded paths with paths from "out"
(name . Ludovic Courtès)(address . ludo@gnu.org)
86k0f3iq83.fsf_-_@gmail.com
Hi,

The patch #29301 [1] had been submitted on 2017 and…

On Tue, 06 Feb 2018 at 16:13, ludo@gnu.org (Ludovic Courtès) wrote:

Toggle quote (2 lines)
> Any update on this? :-)

…this last message is from 2018. I am proposing to close.



Cheers,
simon
L
L
Ludovic Courtès wrote on 17 Jan 2022 14:18
(name . zimoun)(address . zimon.toutoune@gmail.com)
87fspmpkkc.fsf@gnu.org
Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (11 lines)
> The patch #29301 [1] had been submitted on 2017 and…
>
> On Tue, 06 Feb 2018 at 16:13, ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Any update on this? :-)
>
> …this last message is from 2018. I am proposing to close.
>
>
> 1: <http://issues.guix.gnu.org/issue/29301>

Agreed, and done (it may not even apply to current Artanis).

Thanks,
Ludo’.
Closed
?