* Using patches from intermne, not from /gnu/packages/aux-files
@ 2017-06-28 14:41 Dmitry Nikolaev
2017-06-29 14:44 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Nikolaev @ 2017-06-28 14:41 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
Hello friends.
I want to apply Reiser4 patch for my Linux
https://reiser4.wiki.kernel.org/index.php/Main_Page
https://sourceforge.net/projects/reiser4/files/reiser4-for-linux-4.x/reiser4-for-4.11.0.patch.gz
But all code examples in guix repository use code like this
(patches (search-patches "somepackage-CVE-fix.patch"))
which uses patches from /gnu/packages/aux-files
What code should I write in package definition to download file, unzip it
and apply patch?
Dmitry
[-- Attachment #2: Type: text/html, Size: 799 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using patches from intermne, not from /gnu/packages/aux-files
2017-06-28 14:41 Dmitry Nikolaev
@ 2017-06-29 14:44 ` Ludovic Courtès
0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2017-06-29 14:44 UTC (permalink / raw)
To: Dmitry Nikolaev; +Cc: help-guix
Hi Dmitry,
Dmitry Nikolaev <cameltheman@gmail.com> skribis:
> I want to apply Reiser4 patch for my Linux
>
> https://reiser4.wiki.kernel.org/index.php/Main_Page
> https://sourceforge.net/projects/reiser4/files/reiser4-for-linux-4.x/reiser4-for-4.11.0.patch.gz
>
> But all code examples in guix repository use code like this
>
> (patches (search-patches "somepackage-CVE-fix.patch"))
>
> which uses patches from /gnu/packages/aux-files
>
> What code should I write in package definition to download file, unzip it
> and apply patch?
You can do:
(patches (list (origin
(method url-fetch)
(uri …)
(sha256 …))))
There are a few instances of this pattern I think.
I think it won’t handle gzip though. So perhaps you need something like
this (untested):
(patches (list (computed-file "reiser4.patch"
(let ((compressed (origin …)))
#~(system
(string-append #+(file-append gzip "/bin/gunzip")
" < " #$compressed
" > " #$output))))))
Note that you need the (guix gexp) module for this to work.
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using patches from intermne, not from /gnu/packages/aux-files
@ 2017-07-22 20:28 Dmitry Nikolaev
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Nikolaev @ 2017-07-22 20:28 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2314 bytes --]
On 29 June 2017 at 17:44, Ludovic Courtès <ludo@gnu.org> wrote:
> Hi Dmitry,
>
> Dmitry Nikolaev <cameltheman@gmail.com> skribis:
>
> > I want to apply Reiser4 patch for my Linux
> >
> > https://reiser4.wiki.kernel.org/index.php/Main_Page
> > https://sourceforge.net/projects/reiser4/files/
> reiser4-for-linux-4.x/reiser4-for-4.11.0.patch.gz
> >
> > But all code examples in guix repository use code like this
> >
> > (patches (search-patches "somepackage-CVE-fix.patch"))
> >
> > which uses patches from /gnu/packages/aux-files
> >
> > What code should I write in package definition to download file, unzip it
> > and apply patch?
>
> You can do:
>
> (patches (list (origin
> (method url-fetch)
> (uri …)
> (sha256 …))))
>
> There are a few instances of this pattern I think.
>
> I think it won’t handle gzip though. So perhaps you need something like
> this (untested):
>
> (patches (list (computed-file "reiser4.patch"
> (let ((compressed (origin …)))
> #~(system
> (string-append #+(file-append gzip
> "/bin/gunzip")
> " < " #$compressed
> " > " #$output))))))
>
> Note that you need the (guix gexp) module for this to work.
>
Thanks Ludo. It helps. Here is final code.
(patches (list (computed-file "reiser4-for-4.11.0.patch"
(let ((compressed (origin
(method url-fetch)
(uri "
https://downloads.sourceforge.net/project/reiser4/reiser4-for-linux-4.x/reiser4-for-4.11.0.patch.gz
")
(sha256 (base32 "1qc421bqassrxv7z5pzsnwsf9d5pz0azm96rykxh02xlrf8ig3hc")))))
#~(system
(string-append
#+(file-append gzip "/bin/gunzip")
" < "
#$compressed
" > "
#$output))))))))
I know I should reuse "reiser4-for-4.11.0.patch" as variable, but I still
lack Lisp knowledge.
Camel
[-- Attachment #2: Type: text/html, Size: 4058 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-22 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-22 20:28 Using patches from intermne, not from /gnu/packages/aux-files Dmitry Nikolaev
-- strict thread matches above, loose matches on Subject: below --
2017-06-28 14:41 Dmitry Nikolaev
2017-06-29 14:44 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.