[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add adb
Re: [PATCH] Add adb
Sun, 11 Dec 2016 19:51:30 +0100
Notmuch/0.23.3 (https://notmuchmail.org) Emacs/25.1.1 (x86_64-unknown-linux-gnu)
Julien Lepiller <address@hidden> writes:
> On Sun, 11 Dec 2016 18:28:56 +0100
> Marius Bakke <address@hidden> wrote:
>> Julien Lepiller <address@hidden> writes:
>> > Hi,
>> > I wanted to use adb, so here is a patch to have it in the distro. It
>> > works when ran as root, or if you add some udev rules to your os
>> > configuration.
>> > An issue I can see with this package is that it is only a part of
>> > the upstream repository, which in turn is only a part of a bigger
>> > build system. Normally, you would download multiple repos and build
>> > them all together to get an android image, and some android tools
>> > (including adb). I don't think we want to build a full android
>> > image, so I wrote a recipe for adb only.
>> > I took the recipe from archlinux, as well as the patch
>> > (android-tools package:
>> > https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/android-tools,
>> > see build.sh and fix-build.patch). They use clang, but our version
>> > isn't able to build c++ source files (it cannot find includes such
>> > as <string> or <iostream>), so I fixed the source to remove clang
>> > dialect in adb/adb_client.h so we can build the files using gcc.
>> > Archlinux also builds fastboot and mkbootimg. Should I build them
>> > along with adb, or in a separate packages?
>> Wow, go build system and adb in a single weekend, is it Christmas
>> already :)
>> I happen to have a work-in-progress adb expression as well, but
>> creating liblog and libbase as standalone packages. Also creating
>> Makefiles (based on the Debian approach) instead of calling g++
>> Looking at the attached patch here, I think what's missing in my build
>> is the string.h inclusions. We should join efforts and get this in
>> Attaching my patch here. I think having liblog and libbase as separate
>> expressions is cleaner, but creating Makefiles may be unnecessary.
>> I also wonder if it's worth adding a snippet to each package source,
>> so that the source derivations only contain the files relevant to each
>> respective package for licensing reasons.
> You're right, we should probably have separate libbase and liblog
> packages, so we should work from your patch. Using a Makefile is also
> probably cleaner than calling system*.
> android-platform-build appears to be unused. I think
> android-platform-system-core should not depend on version, because it
> contains a sha256 value that already restricts it to a specific version.
Yes, android-platform-build is an artifact from an early revision.
Taking a version argument is done mainly in order to be able to use the
'android-platform-version' variable everywhere, instead of updating it
> Maybe the makefiles could be improved to allow parallel build. Although
> the source is not so big that it actually matters.
> I don't understand the purpose of libbase-use-own-logging.patch.
> Shouldn't liblog be a propagated input of libbase?
The patch was lifted from the master branch which likely won't be
included in a tag before Android 8. It fixes references to the logging
library, which indeed should probably be propagated.
I will try incorporating the Arch patch later today.
Description: PGP signature