reconnects not exported from deployment.lisp

Sean Whitton spwhitton at spwhitton.name
Fri Aug 5 16:43:21 BST 2022


Hello,

On Fri 05 Aug 2022 at 11:18am +01, Andreas Reuleaux wrote:

>  (defprop moc-config-symlinked :posix ()
>   (:desc #?"moc config symlinked")
>   (:apply
>     (file:symlinked :from ".moc/config"
>           	    :to #?"${(get-connattr :remote-home)}cfg/moc/config"
> 		   )
>    )
>   )

This one can be

    (defproplist moc-config-symlinked :posix ()
       (:desc "moc config symlinked")
       (file:symlinked :from ".moc/config"
              	       :to #?"${(get-connattr :remote-home)}cfg/moc/config"))

> It would nevertheless be nice to have just one combined task:
> moc-combined, deployed as root, which internally does both of the
> above task:
>
>   make sure, moc is installed - as root
>   do the symlinking - temporarily becoming rx for that matter
>
> And I have succeeded in doing so: either with:
>
>
>   (defproplist moc-combined :posix ()
>     (apt:installed "moc")
>
>     (reconnects '((:setuid :user "rx"))
>                 (make-propspec :propspec `(moc-config-symlinked)
>                                ))
>   )

You can just use AS, which chooses between :SU and :SETUID for you.

    (defproplist moc-combined :posix ()
      (apt:installed "moc")
      (as "rx" (moc-config-symlinked)))

-- 
Sean Whitton



More information about the sgo-software-discuss mailing list