From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH] Add adb Date: Sun, 11 Dec 2016 19:51:30 +0100 Message-ID: <8760mqmh8t.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20161211172643.0da9750f@lepiller.eu> <87fuluml2f.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <20161211191713.14538fe7@lepiller.eu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG9Dk-0006nv-RP for guix-devel@gnu.org; Sun, 11 Dec 2016 13:51:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cG9Dh-00022l-PV for guix-devel@gnu.org; Sun, 11 Dec 2016 13:51:36 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:47337) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cG9Dh-00022P-IF for guix-devel@gnu.org; Sun, 11 Dec 2016 13:51:33 -0500 In-Reply-To: <20161211191713.14538fe7@lepiller.eu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Julien Lepiller , guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Julien Lepiller writes: > On Sun, 11 Dec 2016 18:28:56 +0100 > Marius Bakke wrote: > >> Julien Lepiller writes: >>=20 >> > 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=3Dpackag= es/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 or ), 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? >>=20 >> Wow, go build system and adb in a single weekend, is it Christmas >> already :) >>=20 >> 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++ >> directly. >>=20 >> 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 >> ASAP! >>=20 >> Attaching my patch here. I think having liblog and libbase as separate >> expressions is cleaner, but creating Makefiles may be unnecessary. >> WDYT? >>=20 >> 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. >>=20 > > 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 multiple places. > 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhNoDIACgkQoqBt8qM6 VPoxaQgAztVJZEPfdzshtZ1U7jBR99CsTS/SOFiNge9JO6Orjd8qhRSeI7XsclqG T60UExY7MqtAqoZZwQnwZfuRmpnD40tJU0+Hjno0v/y4W6jpFZf2z1B6S67HGgx9 W2B/VaUPhGNzc0miikkUpDO6kHM482gZv5EdCE8KHH6ItdC8+1gN8UOGCJtkXd+h RtMgqUZtncCvYWZPSiODN5HNNkFsqW/39D/vRgqeRG2E2q3Mg/KwWyXDXSQsKoSc 9MeZ7eEKdygp9lVZefeuXS9FeruU78bRunBCzzqideN8DodlpDKM5mVgXQ5+gE/o Rz6dxxY3BZ6Z8vYzuaQ0WbtkIgLZzw== =W730 -----END PGP SIGNATURE----- --=-=-=--