GNU bug report logs - #42734
Export android-platform-system-core

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Fri, 7 Aug 2020 00:51:02 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42734 in the body.
You can then email your comments to 42734 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Fri, 07 Aug 2020 00:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 07 Aug 2020 00:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Subject: Export android-platform-system-core
Date: Fri, 7 Aug 2020 02:44:23 +0200
[Message part 1 (text/plain, inline)]
Hi,

Here are two patches to export android-platform-system-core.

This way it can be used as a dependency like that:
> (native-inputs
> `(("android-core" ,(android-platform-system-core
>                    (android-platform-version)))))

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Fri, 07 Aug 2020 02:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 42734 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 42734 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe <at> gnu.org>,
 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 1/2] gnu: android: Export android-platform-version.
Date: Fri,  7 Aug 2020 04:10:26 +0200
* gnu/packages/android.scm (android-platform-version): Export it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/android.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index f7f3aca4a2..8a094d0827 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -126,7 +126,7 @@ use their packages mostly unmodified in our Android NDK build system.")
 ;; Big thanks to them for laying the groundwork.
 
 ;; The version tag is consistent between all repositories.
-(define (android-platform-version) "7.1.2_r36")
+(define-public (android-platform-version) "7.1.2_r36")
 
 (define (android-platform-system-core version)
   (origin
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Fri, 07 Aug 2020 02:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 42734 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 42734 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe <at> gnu.org>,
 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 2/2] gnu: android: Export android-platform-system-core.
Date: Fri,  7 Aug 2020 04:10:27 +0200
* gnu/packages/android.scm (android-platform-system-core): Export it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/android.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 8a094d0827..544a65d0af 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -128,7 +128,7 @@ use their packages mostly unmodified in our Android NDK build system.")
 ;; The version tag is consistent between all repositories.
 (define-public (android-platform-version) "7.1.2_r36")
 
-(define (android-platform-system-core version)
+(define-public (android-platform-system-core version)
   (origin
     (method git-fetch)
     (uri (git-reference
-- 
2.28.0





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Fri, 07 Aug 2020 08:25:02 GMT) Full text and rfc822 format available.

Notification sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
bug acknowledged by developer. (Fri, 07 Aug 2020 08:25:02 GMT) Full text and rfc822 format available.

Message #16 received at 42734-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 42734-done <at> debbugs.gnu.org
Subject: Re: [bug#42734] [PATCH 1/2] gnu: android: Export
 android-platform-version.
Date: Fri, 07 Aug 2020 10:24:34 +0200
Hello Denis,

>  ;; The version tag is consistent between all repositories.
> -(define (android-platform-version) "7.1.2_r36")
> +(define-public (android-platform-version) "7.1.2_r36")

We could turn this procedure into a variable.

Anyway, pushed those two patches,

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Fri, 07 Aug 2020 11:34:01 GMT) Full text and rfc822 format available.

Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: guix-patches <at> gnu.org, Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>,
 42734 <at> debbugs.gnu.org
Subject: Re: [bug#42734] Export android-platform-system-core
Date: Fri, 07 Aug 2020 07:33:03 -0400
[Message part 1 (text/plain, inline)]
Unfortunately, android-platform-core should first be fixed to accept a hash as an argument, otherwise any other version will fail. Don't know why we haven't done that before…

On 2020年8月6日 20:44:23 GMT-04:00, Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> wrote:
>Hi,
>
>Here are two patches to export android-platform-system-core.
>
>This way it can be used as a dependency like that:
>> (native-inputs
>> `(("android-core" ,(android-platform-system-core
>>                    (android-platform-version)))))
>
>Denis.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Fri, 07 Aug 2020 11:34:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 03:22:01 GMT) Full text and rfc822 format available.

Message #25 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: guix-patches <at> gnu.org, 42734 <at> debbugs.gnu.org
Subject: Re: [bug#42734] Export android-platform-system-core
Date: Mon, 10 Aug 2020 05:19:49 +0200
[Message part 1 (text/plain, inline)]
On Fri, 07 Aug 2020 07:33:03 -0400
Julien Lepiller <julien <at> lepiller.eu> wrote:

> Unfortunately, android-platform-core should first be fixed to accept
> a hash as an argument, otherwise any other version will fail. Don't
> know why we haven't done that before…

I don't understand what the hash would be here, nor the consequences
you describe. Do you have some pointers on the documentation or source
code that I should read to better understand that?

By the way I find it a bit strange to refer to have to manually extract 
android-platform-system-core to be able to refer its include path.

Beside the native-input, this results in the following code:
> #:make-flags (list (string-append "CFLAGS= "
>                                   "-I core/include "
> [...]))
>
> [...]
>
> #:phases
> (modify-phases %standard-phases
> (add-after 'unpack 'unpack-core
>  (lambda* (#:key inputs #:allow-other-keys)
>   (mkdir-p "core")
>    (with-directory-excursion "core"
>     (invoke "tar" "axf" (assoc-ref inputs "android-core")
>             "--strip-components=1"))
>   #t))
> [...])

Instead of just that:
> #:make-flags (list (string-append "CFLAGS= "
>                    "-I " (assoc-ref %build-inputs "android-core")
>                    "/include "))
> [...]))

Another potential improvement would be to remove the
android-platform-version argument completely and set version to it in
android.mk like that:
> (define-public (android-platform-system-core
> [...]
>  (version (android-platform-version))
> [...]

That would make the native-input look like that:
> (native-inputs
>  `(
>    ("android-core" ,android-platform-system-core)))

And if we need the version 9.0.0_r3 we could define a new package:
> (define-public android-platform-system-core-9
>   (package
>    (inherit android-platform-system-core)
>     (version "9.0.0_r3"))))

and use it:
> (native-inputs
>  `(
>    ("android-core" ,android-platform-system-core-9)))

Are both proposal a good idea? Or does it have any downsides that I
didn't think of?

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 03:22:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 03:30:02 GMT) Full text and rfc822 format available.

Message #31 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: guix-patches <at> gnu.org, 42734 <at> debbugs.gnu.org
Subject: Re: [bug#42734] Export android-platform-system-core
Date: Mon, 10 Aug 2020 05:27:50 +0200
[Message part 1 (text/plain, inline)]
On Mon, 10 Aug 2020 05:19:49 +0200
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> wrote:

> On Fri, 07 Aug 2020 07:33:03 -0400
> Julien Lepiller <julien <at> lepiller.eu> wrote:
> 
> > Unfortunately, android-platform-core should first be fixed to accept
> > a hash as an argument, otherwise any other version will fail. Don't
> > know why we haven't done that before…
> 
> I don't understand what the hash would be here, nor the consequences
> you describe. Do you have some pointers on the documentation or source
> code that I should read to better understand that?
> 
> By the way I find it a bit strange to refer to have to manually
> extract android-platform-system-core to be able to refer its include
> path.

> Instead of just that:
> > #:make-flags (list (string-append "CFLAGS= "
> >                    "-I " (assoc-ref %build-inputs "android-core")
> >                    "/include "))
> > [...]))
One way of doing that would be to create an android-system-core-header
package and reference that.

Does that look like a good idea?

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 03:30:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 03:48:02 GMT) Full text and rfc822 format available.

Message #37 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: guix-patches <at> gnu.org, 42734 <at> debbugs.gnu.org
Subject: Re: [bug#42734] Export android-platform-system-core
Date: Mon, 10 Aug 2020 05:46:08 +0200
[Message part 1 (text/plain, inline)]
On Mon, 10 Aug 2020 05:27:50 +0200
Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> wrote:

> One way of doing that would be to create an android-system-core-header
> package and reference that.
> 
> Does that look like a good idea?
I keep sending mails too fast.

Inside the tarball we have:
> $ ls  include/
> android  backtrace  binderwrapper  cutils  diskconfig  log  memtrack
> mincrypt  nativebridge  netutils  private  system  sysutils  usbhost
> utils  ziparchive

So that could be spitted somehow.

For instance include/log/ would be packaged in android-liblog for
instance.

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 03:48:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#42734; Package guix-patches. (Mon, 10 Aug 2020 13:52:01 GMT) Full text and rfc822 format available.

Message #43 received at 42734 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 42734 <at> debbugs.gnu.org
Subject: Re: [bug#42734] Export android-platform-system-core
Date: Mon, 10 Aug 2020 09:50:51 -0400
[Message part 1 (text/plain, inline)]
I think I confused a few things here. Currently android-platform-system-core is a procedure that takes a version number and returns an origin record (a source). However, that record hard-codes a hash, so if you specify a different version, the source can't be fetcged, as the hash mismatches.

It also includes patches that may not work with other versions, so I'm not sure why we allow to pass a version number in tge first place…

How about this:

android-platform-system-core is renamed to android-platform-system-core-source and takes a version, a hash and a list patch names.

android-platform-system-core is the result of calling this function with the default version, hash anl patch set.

The other source procedures should probably be fixed in the same way.

I also found out that android-liblog didn't install its headers. I'll fix that this evening if I remember.

On 2020年8月9日 23:19:49 GMT-04:00, Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> wrote:
>On Fri, 07 Aug 2020 07:33:03 -0400
>Julien Lepiller <julien <at> lepiller.eu> wrote:
>
>> Unfortunately, android-platform-core should first be fixed to accept
>> a hash as an argument, otherwise any other version will fail. Don't
>> know why we haven't done that before…
>
>I don't understand what the hash would be here, nor the consequences
>you describe. Do you have some pointers on the documentation or source
>code that I should read to better understand that?
>
>By the way I find it a bit strange to refer to have to manually extract
>
>android-platform-system-core to be able to refer its include path.
>
>Beside the native-input, this results in the following code:
>> #:make-flags (list (string-append "CFLAGS= "
>>                                   "-I core/include "
>> [...]))
>>
>> [...]
>>
>> #:phases
>> (modify-phases %standard-phases
>> (add-after 'unpack 'unpack-core
>>  (lambda* (#:key inputs #:allow-other-keys)
>>   (mkdir-p "core")
>>    (with-directory-excursion "core"
>>     (invoke "tar" "axf" (assoc-ref inputs "android-core")
>>             "--strip-components=1"))
>>   #t))
>> [...])
>
>Instead of just that:
>> #:make-flags (list (string-append "CFLAGS= "
>>                    "-I " (assoc-ref %build-inputs "android-core")
>>                    "/include "))
>> [...]))
>
>Another potential improvement would be to remove the
>android-platform-version argument completely and set version to it in
>android.mk like that:
>> (define-public (android-platform-system-core
>> [...]
>>  (version (android-platform-version))
>> [...]
>
>That would make the native-input look like that:
>> (native-inputs
>>  `(
>>    ("android-core" ,android-platform-system-core)))
>
>And if we need the version 9.0.0_r3 we could define a new package:
>> (define-public android-platform-system-core-9
>>   (package
>>    (inherit android-platform-system-core)
>>     (version "9.0.0_r3"))))
>
>and use it:
>> (native-inputs
>>  `(
>>    ("android-core" ,android-platform-system-core-9)))
>
>Are both proposal a good idea? Or does it have any downsides that I
>didn't think of?
>
>Denis.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Sep 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.