[bug#78188] gnu: kwallet-pam: Fix socat not in 'libexec/pam_kwallet_init' wrapper path.

Message ID a73931b2adbba2b1949b30d9d3bf6e63662d0da2.1746106891.git.sergio.pastorperez@gmail.com
State New
Headers
Series [bug#78188] gnu: kwallet-pam: Fix socat not in 'libexec/pam_kwallet_init' wrapper path. |

Commit Message

Sergio Pastor Pérez May 1, 2025, 1:53 p.m. UTC
  * gnu/packages/kde-plasma.scm (kwallet-pam)[phase]: Wrapper phase not setting
PATH variable to access 'socat' input.

Change-Id: I6e7a421af3dbbc844e319b7852246c89d979609c
---
 gnu/packages/kde-plasma.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
  

Comments

Zheng Junjie May 1, 2025, 4:34 p.m. UTC | #1
Sergio Pastor Pérez <sergio.pastorperez@gmail.com> writes:

> * gnu/packages/kde-plasma.scm (kwallet-pam)[phase]: Wrapper phase not setting
> PATH variable to access 'socat' input.
>
> Change-Id: I6e7a421af3dbbc844e319b7852246c89d979609c
> ---
>  gnu/packages/kde-plasma.scm | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
> index 679a68cef6..a15f7ad8a2 100644
> --- a/gnu/packages/kde-plasma.scm
> +++ b/gnu/packages/kde-plasma.scm
> @@ -1303,9 +1303,17 @@ (define-public kwallet-pam
>                  "0dif5y7qbayb2yfgl7940978ayyir948kpjavczvgkr70czb293k"))))
>      (build-system qt-build-system)
>      (arguments
> -     (list
> -      #:qtbase qtbase
> -      #:tests? #f)) ;no tests
> +     `(#:qtbase ,qtbase
> +       #:tests? #f ;no tests
> +       #:phases
> +       (modify-phases %standard-phases

please use gexp.

> +         (add-after 'install 'wrap-program
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((socat (search-input-file inputs "bin/socat")))
> +               (wrap-program (search-input-file outputs
> +                              "libexec/pam_kwallet_init")
> +                 `("PATH" ":" prefix
> +                   ,(list (dirname socat))))))))))

This is just a sh script, I prefer to replace socat in the
pam_kwallet_init file after unpack


>      (native-inputs (list extra-cmake-modules pkg-config))
>      (inputs (list linux-pam kwallet libgcrypt socat))
>      (synopsis "PAM Integration with KWallet")
  
Sergio Pastor Pérez May 1, 2025, 5:56 p.m. UTC | #2
Z572 <z572@z572.online> writes:
> Sergio Pastor Pérez <sergio.pastorperez@gmail.com> writes:
>
>> * gnu/packages/kde-plasma.scm (kwallet-pam)[phase]: Wrapper phase not setting
>> PATH variable to access 'socat' input.
>>
>> Change-Id: I6e7a421af3dbbc844e319b7852246c89d979609c
>> ---
>>  gnu/packages/kde-plasma.scm | 14 +++++++++++---
>>  1 file changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
>> index 679a68cef6..a15f7ad8a2 100644
>> --- a/gnu/packages/kde-plasma.scm
>> +++ b/gnu/packages/kde-plasma.scm
>> @@ -1303,9 +1303,17 @@ (define-public kwallet-pam
>>                  "0dif5y7qbayb2yfgl7940978ayyir948kpjavczvgkr70czb293k"))))
>>      (build-system qt-build-system)
>>      (arguments
>> -     (list
>> -      #:qtbase qtbase
>> -      #:tests? #f)) ;no tests
>> +     `(#:qtbase ,qtbase
>> +       #:tests? #f ;no tests
>> +       #:phases
>> +       (modify-phases %standard-phases
>
> please use gexp.
>
>> +         (add-after 'install 'wrap-program
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let ((socat (search-input-file inputs "bin/socat")))
>> +               (wrap-program (search-input-file outputs
>> +                              "libexec/pam_kwallet_init")
>> +                 `("PATH" ":" prefix
>> +                   ,(list (dirname socat))))))))))
>
> This is just a sh script, I prefer to replace socat in the
> pam_kwallet_init file after unpack

Done!
  

Patch

diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
index 679a68cef6..a15f7ad8a2 100644
--- a/gnu/packages/kde-plasma.scm
+++ b/gnu/packages/kde-plasma.scm
@@ -1303,9 +1303,17 @@  (define-public kwallet-pam
                 "0dif5y7qbayb2yfgl7940978ayyir948kpjavczvgkr70czb293k"))))
     (build-system qt-build-system)
     (arguments
-     (list
-      #:qtbase qtbase
-      #:tests? #f)) ;no tests
+     `(#:qtbase ,qtbase
+       #:tests? #f ;no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((socat (search-input-file inputs "bin/socat")))
+               (wrap-program (search-input-file outputs
+                              "libexec/pam_kwallet_init")
+                 `("PATH" ":" prefix
+                   ,(list (dirname socat))))))))))
     (native-inputs (list extra-cmake-modules pkg-config))
     (inputs (list linux-pam kwallet libgcrypt socat))
     (synopsis "PAM Integration with KWallet")