[PATCH 0/4] Add android-fastboot and rename packages.

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Julien Lepiller
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 7 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180509203947.10746-1-dannym@scratchpost.org
Danny Milosavljevic (4):
gnu: Add android-fastboot.
gnu: Rename "liblog" to "android-liblog".
gnu: Rename "libbase" to "android-libbase".
gnu: Rename "libcutils" to "android-libcutils".

gnu/packages/android.scm | 96 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 80 insertions(+), 16 deletions(-)
Danny Milosavljevic wrote 7 years ago
[PATCH 1/4] gnu: Add android-fastboot.
(address . 31393@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180509204140.10819-1-dannym@scratchpost.org
* gnu/packages/android.scm (android-fastboot): New variable.
---
gnu/packages/android.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 2e5f1d593..eaae0229a 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -568,6 +568,70 @@ Android core.")
(description "@code{android-libutils} provides utilities for Android NDK developers.")
(license license:asl2.0)))
+(define-public android-fastboot
+ (package
+ (name "android-fastboot")
+ (version (android-platform-version))
+ (source #f)
+ (build-system android-ndk-build-system)
+ (arguments
+ `(#:make-flags (list "CXXFLAGS=-std=gnu++11")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "core")
+ (with-directory-excursion "core"
+ (invoke "tar" "axf" (assoc-ref inputs "core") "--strip-components=1")
+ (substitute* "fastboot/Android.mk"
+ (("libext4_utils_host") "libext4_utils_host libselinux libpcre")))
+ (copy-recursively (assoc-ref inputs "extras") "extras"
+ #:keep-mtime? #t)
+ #t))
+ (add-after 'unpack 'enter-source
+ (lambda _
+ (chdir "core/fastboot")
+ #t))
+ (add-after 'enter-source 'make-googletest-available
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((googletest (assoc-ref inputs "googletest")))
+ (symlink (string-append googletest "/lib/libgtest.so") "libgtest_host.so")
+ #t)))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (bin (string-append out "/bin")))
+ (install-file "fastboot" bin)
+ #t))))
+ #:tests? #f))
+ (inputs
+ `(("adb" ,adb)
+ ("android-safe-iop" ,android-safe-iop)
+ ("android-ext4-utils" ,android-ext4-utils)
+ ("android-f2fs-utils" ,android-f2fs-utils)
+ ("googletest" ,googletest)
+ ("libbase" ,libbase)
+ ("libcutils" ,libcutils)
+ ("liblog" ,liblog)
+ ("android-libutils" ,android-libutils)
+ ("android-libsparse" ,android-libsparse)
+ ("android-libziparchive" ,android-libziparchive)
+ ("android-libselinux" ,android-libselinux)
+ ("pcre" ,pcre)
+ ("mkbootimg" ,mkbootimg)
+ ("openssl" ,openssl) ; FIXME remove
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("core" ,(android-platform-system-core version))
+ ("extras" ,(android-platform-system-extras version))
+ ("xz" ,xz)))
+ (home-page "https://developer.android.com/studio/command-line/")
+ (synopsis "Android image flasher")
+ (description
+ "This package provides @command{fastboot}, a tool to upload file system images to Android devices.")
+ (license license:asl2.0)))
+
(define-public android-udev-rules
(package
(name "android-udev-rules")
Danny Milosavljevic wrote 7 years ago
[PATCH 2/4] gnu: Rename "liblog" to "android-liblog".
(address . 31393@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180509204140.10819-2-dannym@scratchpost.org
* gnu/packages/android.scm (liblog): Rename to...
(android-liblog): ...this.
---
gnu/packages/android.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index eaae0229a..db5a00298 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -143,9 +143,9 @@ use their packages mostly unmodified in our Android NDK build system.")
(base32
checksum))))
-(define liblog
+(define android-liblog
(package
- (name "liblog")
+ (name "android-liblog")
(version (android-platform-version))
(source (android-platform-system-core version))
(build-system android-ndk-build-system)
@@ -182,7 +182,7 @@ in Main, System, Radio and Events sub-logs.")
(modify-phases %standard-phases
(add-after 'unpack 'enter-source
(lambda _ (chdir "base") #t)))))
- (inputs `(("liblog" ,liblog)))
+ (inputs `(("android-liblog" ,android-liblog)))
(home-page "https://developer.android.com/")
(synopsis "Android platform base library")
(description "@code{libbase} is a library in common use by the
@@ -322,7 +322,7 @@ various Android core host applications.")
(inputs
`(("libbase" ,libbase)
("libcutils" ,libcutils)
- ("liblog" ,liblog)
+ ("android-liblog" ,android-liblog)
("openssl" ,openssl)))
(home-page "https://developer.android.com/studio/command-line/adb.html")
(synopsis "Android Debug Bridge")
@@ -477,7 +477,7 @@ that is safe to use for user space. It also includes
"/include "
"-I " (assoc-ref %build-inputs "libcutils")
"/include "
- "-I " (assoc-ref %build-inputs "liblog") "/include "
+ "-I " (assoc-ref %build-inputs "android-liblog") "/include "
"-I ../core/include")
"CFLAGS=-Wno-error"
"install-libext4_utils_host.a"
@@ -500,7 +500,7 @@ that is safe to use for user space. It also includes
#t)))))
(inputs
`(("libcutils" ,libcutils)
- ("liblog" ,liblog)
+ ("android-liblog" ,android-liblog)
("android-libselinux" ,android-libselinux)
("android-libsparse" ,android-libsparse)
("zlib" ,zlib)))
@@ -613,7 +613,7 @@ Android core.")
("googletest" ,googletest)
("libbase" ,libbase)
("libcutils" ,libcutils)
- ("liblog" ,liblog)
+ ("android-liblog" ,android-liblog)
("android-libutils" ,android-libutils)
("android-libsparse" ,android-libsparse)
("android-libziparchive" ,android-libziparchive)
Danny Milosavljevic wrote 7 years ago
[PATCH 3/4] gnu: Rename "libbase" to "android-libbase".
(address . 31393@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180509204140.10819-3-dannym@scratchpost.org
* gnu/packages/android.scm (libbase): Rename to...
(android-libbase): ...this.
---
gnu/packages/android.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index db5a00298..563ed32ea 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -169,9 +169,9 @@ interfaces for either writing or reading logs. The log buffers are divided up
in Main, System, Radio and Events sub-logs.")
(license license:asl2.0)))
-(define libbase
+(define android-libbase
(package
- (name "libbase")
+ (name "android-libbase")
(version (android-platform-version))
(source (android-platform-system-core version))
(build-system android-ndk-build-system)
@@ -320,7 +320,7 @@ various Android core host applications.")
(install-file "diagnose_usb.h" (string-append (assoc-ref outputs "out") "/include"))
#t)))))
(inputs
- `(("libbase" ,libbase)
+ `(("android-libbase" ,android-libbase)
("libcutils" ,libcutils)
("android-liblog" ,android-liblog)
("openssl" ,openssl)))
@@ -611,7 +611,7 @@ Android core.")
("android-ext4-utils" ,android-ext4-utils)
("android-f2fs-utils" ,android-f2fs-utils)
("googletest" ,googletest)
- ("libbase" ,libbase)
+ ("android-libbase" ,android-libbase)
("libcutils" ,libcutils)
("android-liblog" ,android-liblog)
("android-libutils" ,android-libutils)
Danny Milosavljevic wrote 7 years ago
[PATCH 4/4] gnu: Rename "libcutils" to "android-libcutils".
(address . 31393@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180509204140.10819-4-dannym@scratchpost.org
* gnu/packages/android.scm (libcutils): Rename to...
(android-libcutils): ...this.
---
gnu/packages/android.scm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

Toggle diff (70 lines)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 563ed32ea..6f68f583c 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -189,9 +189,9 @@ in Main, System, Radio and Events sub-logs.")
various Android core host applications.")
(license license:asl2.0)))
-(define libcutils
+(define android-libcutils
(package
- (name "libcutils")
+ (name "android-libcutils")
(version (android-platform-version))
(source (android-platform-system-core version))
(build-system gnu-build-system)
@@ -321,7 +321,7 @@ various Android core host applications.")
#t)))))
(inputs
`(("android-libbase" ,android-libbase)
- ("libcutils" ,libcutils)
+ ("android-libcutils" ,android-libcutils)
("android-liblog" ,android-liblog)
("openssl" ,openssl)))
(home-page "https://developer.android.com/studio/command-line/adb.html")
@@ -475,7 +475,7 @@ that is safe to use for user space. It also includes
"/include "
"-I " (assoc-ref %build-inputs "android-libsparse")
"/include "
- "-I " (assoc-ref %build-inputs "libcutils")
+ "-I " (assoc-ref %build-inputs "android-libcutils")
"/include "
"-I " (assoc-ref %build-inputs "android-liblog") "/include "
"-I ../core/include")
@@ -499,7 +499,7 @@ that is safe to use for user space. It also includes
(copy-recursively "." (string-append out "/include")))
#t)))))
(inputs
- `(("libcutils" ,libcutils)
+ `(("android-libcutils" ,android-libcutils)
("android-liblog" ,android-liblog)
("android-libselinux" ,android-libselinux)
("android-libsparse" ,android-libsparse)
@@ -533,7 +533,7 @@ Android core.")
`(("f2fs-tools" ,f2fs-tools-1.7)
("android-libselinux" ,android-libselinux)
("android-libsparse" ,android-libsparse)
- ("libcutils" ,libcutils)
+ ("android-libcutils" ,android-libcutils)
("zlib" ,zlib)))
(home-page "https://developer.android.com/")
(synopsis "Android ext4 utils")
@@ -560,7 +560,7 @@ Android core.")
(copy-recursively "../include/utils" (string-append (assoc-ref outputs "out") "/include/utils")))))))
(inputs
`(("android-safe-iop" ,android-safe-iop)
- ("libcutils" ,libcutils)))
+ ("android-libcutils" ,android-libcutils)))
(native-inputs
`(("android-bionic-uapi" ,android-bionic-uapi)))
(home-page "https://developer.android.com/")
@@ -612,7 +612,7 @@ Android core.")
("android-f2fs-utils" ,android-f2fs-utils)
("googletest" ,googletest)
("android-libbase" ,android-libbase)
- ("libcutils" ,libcutils)
+ ("android-libcutils" ,android-libcutils)
("android-liblog" ,android-liblog)
("android-libutils" ,android-libutils)
("android-libsparse" ,android-libsparse)
Julien Lepiller wrote 7 years ago
Re: [bug#31393] [PATCH 0/4] Add android-fastboot and rename packages.
(address . 31393@debbugs.gnu.org)
20180509225323.6678fe71@lepiller.eu
Le Wed, 9 May 2018 22:39:47 +0200,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :

Toggle quote (10 lines)
> Danny Milosavljevic (4):
> gnu: Add android-fastboot.
> gnu: Rename "liblog" to "android-liblog".
> gnu: Rename "libbase" to "android-libbase".
> gnu: Rename "libcutils" to "android-libcutils".
>
> gnu/packages/android.scm | 96
> ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 80
> insertions(+), 16 deletions(-)

I haven't tested your patches, but if they work, LGTM!

Could you simply add a comment to explain why you don't run tests (I
guess there aren't any). Also, I'm not sure about the name of the
android-fastboot package. Since it provides the fastboot command, I
think the convention is to call it fastboot, like adb is not
android-adb.
Danny Milosavljevic wrote 7 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 31393-done@debbugs.gnu.org)
20180510025216.1e995bb3@scratchpost.org
Hi Julien,

On Wed, 9 May 2018 22:53:23 +0200
Julien Lepiller <julien@lepiller.eu> wrote:

Toggle quote (3 lines)
> Could you simply add a comment to explain why you don't run tests (I
> guess there aren't any).

I didn't have the building of the tests implemented yet. I do now :)

Toggle quote (5 lines)
> Also, I'm not sure about the name of the
> android-fastboot package. Since it provides the fastboot command, I
> think the convention is to call it fastboot, like adb is not
> android-adb.

Okay!

Pushed to master.

Fastboot works now - and a few packages have tests enabled now. Phiew...
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlrzl8AACgkQ5xo1VCww
uqWfBQf+PGgzAWXEociSrNVbvb9kk1yVyBI4Vu8dMUfBLxbK0vEnjqCkxzZznwvb
LNpdzc09rrCfix7y+iShwM7vvcK8dG6Pstl1uSlrx1vcjMrc/pr4497wQMflu3HV
5j6OTS3Wya4G4x2NWUtXkPv4wSIIVJce+xNRCQO5EBbMIW0NaOrQlDTdoO+BQz5K
85HfMhTBy/WpvIJL+N/JDnLMze7ThTJDjpBXswu4xv+nCFXaRoDcfVpBl68Mfm1y
+0s31+YVBekvTrLhkujNBf4r8ZMEcuSwwXjB9u7IWnX1NFCc/Uoc0ubWgTo+WPcK
u2ksn1TTmjrPYOW+OGhGDpT9sdBasA==
=4eeD
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 31393@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 31393
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help