unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Building for Android and F-Droid
@ 2016-09-01 11:33 Hartmut Goebel
  2016-09-01 13:29 ` Thompson, David
  2016-09-11 12:44 ` Andreas Enge
  0 siblings, 2 replies; 6+ messages in thread
From: Hartmut Goebel @ 2016-09-01 11:33 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1484 bytes --]

Hello,

I just want to share an idea I had:

Recently I was involved in packaging a app for f-droid. The f-droid
build system consists of 1) a virtual machine which get cleaned up after
each build. and 2) meta-data descriptions of each package. The meta-data
includes build instructions and is basically a ini-like file. For a
simple examples see [1] and for a complex one see [2].

One of f-droid's goals is reproducible build. De-facto they fail on
this, given the current set up since they update the virtual machine to
some current state.

In got the idea to make f-droid use guix as a base. Of course, this
would be a lot of work, and I do not expect this to happen any time
soon. We have quite a lot of work to do on the guix-side, like building
the Android tools, implement maven and graddle builds, etc.

As said: just wanted to share this idea,

[1]
https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.colinmcdonough.android.torch.txt
[2]
https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/pep.android.k9.txt

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog:
http://www.goebel-consult.de/blog/digitale-burgerrechte-in-der-ara-snowden
Kolumne:
http://www.cissp-gefluester.de/2011-08-horrorszenario-bring-your-own-device


[-- Attachment #1.2: Type: text/html, Size: 2842 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2430 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building for Android and F-Droid
  2016-09-01 11:33 Building for Android and F-Droid Hartmut Goebel
@ 2016-09-01 13:29 ` Thompson, David
  2016-09-01 13:57   ` Ricardo Wurmus
  2016-09-11 12:44 ` Andreas Enge
  1 sibling, 1 reply; 6+ messages in thread
From: Thompson, David @ 2016-09-01 13:29 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Thu, Sep 1, 2016 at 7:33 AM, Hartmut Goebel
<h.goebel@goebel-consult.de> wrote:
> Hello,
>
> I just want to share an idea I had:
>
> Recently I was involved in packaging a app for f-droid. The f-droid build
> system consists of 1) a virtual machine which get cleaned up after each
> build. and 2) meta-data descriptions of each package. The meta-data includes
> build instructions and is basically a ini-like file. For a simple examples
> see [1] and for a complex one see [2].
>
> One of f-droid's goals is reproducible build. De-facto they fail on this,
> given the current set up since they update the virtual machine to some
> current state.
>
> In got the idea to make f-droid use guix as a base. Of course, this would be
> a lot of work, and I do not expect this to happen any time soon. We have
> quite a lot of work to do on the guix-side, like building the Android tools,
> implement maven and graddle builds, etc.

You are indeed correct that it would be a lot of work, but it is
certainly possible and sounds like it would be a big improvement over
the status quo.  I would also like to see this happen because I am an
F-Droid user.

Does anyone know what we are missing to be able to package android
tools?  I would like to be able to use the android debug bridge again
to shell into my phone. :)

- Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building for Android and F-Droid
  2016-09-01 13:29 ` Thompson, David
@ 2016-09-01 13:57   ` Ricardo Wurmus
  2016-09-05  9:35     ` Efraim Flashner
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-09-01 13:57 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel, Hartmut Goebel


Thompson, David <dthompson2@worcester.edu> writes:

> Does anyone know what we are missing to be able to package android
> tools?

Given the current state of our support for Java I’d say we mostly need
more Java packages in Guix.  A first big step would be to package enough
to be able to build Maven from source (no cheating).

~~ Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building for Android and F-Droid
  2016-09-01 13:57   ` Ricardo Wurmus
@ 2016-09-05  9:35     ` Efraim Flashner
  2016-09-05 10:08       ` Hartmut Goebel
  0 siblings, 1 reply; 6+ messages in thread
From: Efraim Flashner @ 2016-09-05  9:35 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, Hartmut Goebel


[-- Attachment #1.1: Type: text/plain, Size: 946 bytes --]

On Thu, Sep 01, 2016 at 03:57:13PM +0200, Ricardo Wurmus wrote:
> 
> Thompson, David <dthompson2@worcester.edu> writes:
> 
> > Does anyone know what we are missing to be able to package android
> > tools?
> 
> Given the current state of our support for Java I’d say we mostly need
> more Java packages in Guix.  A first big step would be to package enough
> to be able to build Maven from source (no cheating).
> 
> ~~ Ricardo
> 
> 

If anyone wants to play around with f-droid, I have it packaged in my
GUIX_PACKAGE_PATH, waiting to be tested more before breaking it down
into patches and submitting it. Of course currently building apks
doesn't work, and I haven't really tested much of the functionality yet.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: fdroid.scm --]
[-- Type: text/plain, Size: 10931 bytes --]

;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is an addendum to GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (wip fdroid)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system python)
  #:use-module (gnu packages python))

(define-public fdroidserver
  (package
    (name "fdroidserver")
    (version "0.6.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "fdroidserver" version))
        (sha256
         (base32
          "1fi4kkgi59gd9nssy9zc86b8rki3m47pd29vc821jgsa89lgjqf5"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         ;; this prevents the examples from being installed
         ;; we want to fix this later
         (add-before 'install 'patch-install-locations
           (lambda _
             (substitute* "setup.py"
                          (("\\(data_prefix\\ \\+\\ '/share/doc/fdroidserver/examples',") "")
                          (("\\['buildserver") "'buildserver")
                          (("'\\]\\)") "'")
                          )
             #t)))
       #:python ,python-2)) ; after 0.6.0 it switches to python3
    (inputs
     `(("python2-apache-libcloud" ,python2-apache-libcloud)
       ("python2-mwclient" ,python2-mwclient)
       ("python2-paramiko" ,python2-paramiko)
       ("python2-pillow" ,python2-pillow)
       ("python2-pyasn1" ,python2-pyasn1)
       ("python2-pyasn1-modules" ,python2-pyasn1-modules)
       ("python2-pyyaml" ,python2-pyyaml)
       ("python2-requests" ,python2-requests)))
    (propagated-inputs
     `(("python2-crypto" ,python2-crypto))) ; not sure this is the right one
    (home-page "https://f-droid.org")
    (synopsis "F-Droid Server Tools")
    (description "F-Droid Server Tools")
    (license license:agpl3+)))

(define-public python-mwclient
  (package
     (name "python-mwclient")
     (version "0.8.1")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "mwclient" version))
         (sha256
          (base32
           "1r322v6i6xps9xh861rbr4ggshydcgp8cycbdlmgy8qbrh8jg2az"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda _
             (zero? (system* "py.test")))))))
    (native-inputs
     `(("python-pytest-cache" ,python-pytest-cache)
       ("python-pytest-cov" ,python-pytest-cov)
       ("python-pytest-pep8" ,python-pytest-pep8)))
    (inputs
     `(("python-funcsigs" ,python-funcsigs)
       ("python-mock" ,python-mock)
       ("python-requests" ,python-requests)
       ("python-responses" ,python-responses)
       ("python-six" ,python-six)))
    (home-page "https://github.com/mwclient/mwclient")
    (synopsis "MediaWiki API client")
    (description "MediaWiki API client")
    (license license:expat)
    (properties `((python2-variant . ,(delay python2-mwclient))))))

(define-public python2-mwclient
  (let ((base (package-with-python2
                (strip-python2-variant python-mwclient))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-funcsigs
  (package
    (name "python-funcsigs")
    (version "1.0.2")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "funcsigs" version))
        (sha256
         (base32
          "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
    (build-system python-build-system)
    (arguments `(#:tests? #f)) ; tests fail to recongnize unittest2
    (native-inputs
     `(("python-setuptools" ,python-setuptools)))
    (home-page "http://funcsigs.readthedocs.org")
    (synopsis
     "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+")
    (description
     "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+")
    (license license:asl2.0)))

(define-public python2-funcsigs
  (package-with-python2 python-funcsigs))

(define-public python-pytest-pep8
  (package
    (name "python-pytest-pep8")
    (version "1.0.6")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-pep8" version))
        (sha256
         (base32
          "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
    (build-system python-build-system)
    (inputs
     `(("python-pep8" ,python-pep8)
       ("python-pytest" ,python-pytest)
       ("python-pytest-cache" ,python-pytest-cache)))
    (home-page
     "https://bitbucket.org/pytest-dev/pytest-pep8")
    (synopsis
     "pytest plugin to check PEP8 requirements")
    (description
     "pytest plugin to check PEP8 requirements")
    (license license:expat)
    (properties `((python2-variant . ,(delay python2-pytest-pep8))))))

(define-public python2-pytest-pep8
  (let ((base (package-with-python2
                (strip-python2-variant python-pytest-pep8))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-apache-libcloud
  (package
    (name "python-apache-libcloud")
    (version "1.1.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "apache-libcloud" version ".tar.bz2"))
        (sha256
         (base32
          "15fqs5ppkrbky2s4lpq4aif9rki4v18jv9l1j74g88g8qlmh3iwl"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'check 'prep-tests
           (lambda _
             ;; this test requires using ssh
             (delete-file "libcloud/test/compute/test_ssh_client.py")
             ;; this is required for the tests to run
             (copy-file "libcloud/test/secrets.py-dist"
                        "libcloud/test/secrets.py"))))))
    (native-inputs
     `(("python-mock" ,python-mock)))
    (home-page "https://libcloud.apache.org/")
    (synopsis
     "A Python library to abstract away differences among cloud provider APIs")
    (description
     "Apache Libcloud is a Python library which hides differences between
different cloud provider APIs and allows you to manage different cloud resources
through a unified and easy to use API.  Resources you can manage with Libcloud
are divided into compute, storage, load balancers, DNS, and container
categories.")
    (license license:asl2.0)))

(define-public python2-apache-libcloud
  (let ((base (package-with-python2 python-apache-libcloud)))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-crypto
  (package
    (name "python-crypto")
    (version "1.4.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "crypto" version))
        (sha256
         (base32
          "1gd9cvw1j5j9nxhi7gla2pggnp678zj7l2dc8n4c2r82d9syjblg"))))
    (build-system python-build-system)
    (inputs
     `(("python-naked" ,python-naked)
       ("python-pyyaml" ,python-pyyaml)
       ("python-shellescape" ,python-shellescape)))
    (home-page "https://github.com/chrissimpkins/crypto")
    (synopsis "Simple symmetric GPG file encryption and decryption")
    (description
     "Simple symmetric GPG file encryption and decryption")
    (license license:expat)))

(define-public python2-crypto
  (let ((base (package-with-python2 python-crypto)))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-shellescape
  (package
    (name "python-shellescape")
    (version "3.4.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "shellescape" version))
        (sha256
         (base32
          "0n5ky1b2vw2y0d4xl3qybyp2rk0gq5frjs8nr8ak6mgj2fyb4676"))))
    (build-system python-build-system)
    (home-page
     "https://github.com/chrissimpkins/shellescape")
    (synopsis
     "Shell escape a string to safely use it as a token in a shell command (backport of Python shlex.quote for Python versions 2.x & < 3.3)")
    (description
     "Shell escape a string to safely use it as a token in a shell command (backport of Python shlex.quote for Python versions 2.x & < 3.3)")
    (license license:expat)
    (properties `((python2-variant . ,(delay python2-shellescape))))))

(define-public python2-shellescape
  (let ((base (package-with-python2
                (strip-python2-variant python-shellescape))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-naked
  (package
    (name "python-naked")
    (version "0.1.31")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Naked" version))
        (sha256
         (base32
          "0zk793hh6z4lirfxz73z4f5yzyx8khhx5w92jh1hfpar2j56pdqj"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-reference
           ;; installing is much easier when you don't depend on yourself
           (lambda _
             (substitute* "setup.py" (("\\['Naked', ") "[")))))))
    (inputs
     `(("python-pyyaml" ,python-pyyaml)
       ("python-requests" ,python-requests)))
    (home-page "http://naked-py.com")
    (synopsis "A command line application framework")
    (description
     "A command line application framework")
    (license license:expat)
    (properties `((python2-variant . ,(delay python2-naked))))))

(define-public python2-naked
  (let ((base (package-with-python2 (strip-python2-variant python-naked))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building for Android and F-Droid
  2016-09-05  9:35     ` Efraim Flashner
@ 2016-09-05 10:08       ` Hartmut Goebel
  0 siblings, 0 replies; 6+ messages in thread
From: Hartmut Goebel @ 2016-09-05 10:08 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1193 bytes --]

Am 05.09.2016 um 11:35 schrieb Efraim Flashner:
> Of course currently building apks
> doesn't work, and I haven't really tested much of the functionality yet.

Well, building apks actually works :-) (I have not tested your code,
though).

fdroid is building it's own build-server VM (this is what
fdroidbuildserver does). And the apks are build in there. For actually
building an apk you'll need the fdroiddata package (which to have
package for guix is quite useless IMHO). See the manual at
<https://f-droid.org/manual/> and my updates to the manual
<https://gitlab.com/fdroid/fdroidserver/merge_requests/158>.

So the vision I expressed in my first posting on this thread is: Change
the fdroid-server to use GuixSD (in a container?) instead of a VM :-)

-- 
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog:
http://www.goebel-consult.de/blog/filmgesprach-zu-201ecitizenfour201c-in-herrsching

Kolumne: http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes


[-- Attachment #1.1.2: Type: text/html, Size: 2604 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Building for Android and F-Droid
  2016-09-01 11:33 Building for Android and F-Droid Hartmut Goebel
  2016-09-01 13:29 ` Thompson, David
@ 2016-09-11 12:44 ` Andreas Enge
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2016-09-11 12:44 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hello,

if I remember correctly, the last time I tried I could not use our icedtea
package to build android apps, so I gave up looking into anything android
like for guix. Did this work for you?

Andreas

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-11 12:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01 11:33 Building for Android and F-Droid Hartmut Goebel
2016-09-01 13:29 ` Thompson, David
2016-09-01 13:57   ` Ricardo Wurmus
2016-09-05  9:35     ` Efraim Flashner
2016-09-05 10:08       ` Hartmut Goebel
2016-09-11 12:44 ` Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).