Browse Source

Initial packaging for freedom-maker

Joseph Nuthalpati 3 years ago
parent
commit
fae997b094
12 changed files with 500 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 5 0
      debian/changelog
  3. 1 0
      debian/compat
  4. 43 0
      debian/control
  5. 23 0
      debian/copyright
  6. 161 0
      debian/freedom-maker.1
  7. 1 0
      debian/manpages
  8. 11 0
      debian/rules
  9. 1 0
      debian/source/format
  10. 248 0
      doc/freedom-maker.xml
  11. 4 0
      freedommaker/__init__.py
  12. 1 1
      setup.py

+ 1 - 0
.gitignore

@@ -6,3 +6,4 @@ freedommaker/tests/output
 *.pyc
 .idea/
 .DS_Store
+.pybuild/

+ 5 - 0
debian/changelog

@@ -0,0 +1,5 @@
+freedom-maker (0.8) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Joseph Nuthalapati <njoseph@riseup.net>  Mon, 12 Jun 2017 09:13:35 +0000

+ 1 - 0
debian/compat

@@ -0,0 +1 @@
+9

+ 43 - 0
debian/control

@@ -0,0 +1,43 @@
+Source: freedom-maker
+Maintainer: FreedomBox Packaging Team <freedombox-pkg-team@lists.alioth.debian.org>
+Uploaders:
+ Joseph Nuthalapati <njoseph@riseup.net>,
+ Ferderico Ceratto <federico3@debian.org>
+Section: python
+Priority: extra
+Build-Depends:
+ debhelper (>= 9),
+ dh-python,
+ python3-all,
+ python3-setuptools,
+Standards-Version: 3.9.8
+Homepage: https://freedombox.org
+Vcs-Browser: https://anonscm.debian.org/git/freedombox/freedom-maker.git
+Vcs-Git: https://anonscm.debian.org/git/freedombox/freedom-maker.git
+
+Package: freedom-maker
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+ binfmt-support,
+ btrfs-tools,
+ dosfstools,
+ extlinux,
+ git,
+ pxz,
+ qemu-user-static,
+ qemu-utils,
+ sshpass,
+ sudo,
+ u-boot-tools,
+ vmdebootstrap
+Suggests:
+ virtualbox
+Description: FreedomBox image builder
+ FreedomBox is a personal cloud server which can be installed on single board
+ computers and debian machines.
+ .
+ Freedom-Maker is a tool to build images for FreedomBox for various supported
+ hardware that can then be copied to SD card, USB stick or Hard Disk drive to
+ boot into FreedomBox.

+ 23 - 0
debian/copyright

@@ -0,0 +1,23 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://anonscm.debian.org/git/freedombox/freedom-maker.git
+
+Files: *
+Copyright: 2011 - 2017 FreedomBox Developers
+License: GPL-3.0+
+
+License: GPL-3.0+
+ This package 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.
+ .
+ This package 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 this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

+ 161 - 0
debian/freedom-maker.1

@@ -0,0 +1,161 @@
+'\" t
+.\"     Title: freedom-maker
+.\"    Author: [see the "Author" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 06/05/2017
+.\"    Manual: FreedomBox
+.\"    Source: 0.8
+.\"  Language: English
+.\"
+.TH "FREEDOM\-MAKER" "1" "06/05/2017" "0\&.8" "FreedomBox"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+freedom-maker \- image builder for FreedomBox
+.SH "SYNOPSIS"
+.HP \w'\fBfreedom\-maker\fR\ 'u
+\fBfreedom\-maker\fR [\fB\-\-vmdebootstrap\fR] [\fB\-\-build\-stamp\fR] [\fB\-\-image\-size\fR] [\fB\-\-build\-mirror\fR] [\fB\-\-mirror\fR] [\fB\-\-distribution\fR] [\fB\-\-include\-source\fR] [\fB\-\-package\fR] [\fB\-\-custom\-package\fR] [\fB\-\-build\-dir\fR] [\fB\-\-log\-level\*(Aq\fR] [\fB\-\-hostname\fR] [\fB\-\-sign\fR] [\fB\-\-force\fR] [\fBtargets\fR] [\fB\-h,\ \fR\fB\-\-help\fR]
+.SH "DESCRIPTION"
+.PP
+FreedomBox is a community project to develop, design and promote personal servers running free software for private, personal communications\&. It is a networking appliance designed to allow interfacing with the rest of the Internet under conditions of protected privacy and data security\&. It hosts applications such as blog, wiki, website, social network, email, web proxy and a Tor relay on a device that can replace a wireless router so that data stays with the users\&.
+.PP
+FreedomMaker is a tool to build FreedomBox images for various single board computers, virtual machines and general purpose computers\&.
+.SH "OPTIONS"
+.PP
+\fB\-\-vmdebootstrap\fR
+.RS 4
+Path to vmdebootstrap executable
+.RE
+.PP
+\fB\-\-build\-stamp\fR
+.RS 4
+Build stamp to use on image file names
+.RE
+.PP
+\fB\-\-image\-size\fR
+.RS 4
+Size of the image to build
+.RE
+.PP
+\fB\-\-build\-mirror\fR
+.RS 4
+Debian mirror to use for building
+.RE
+.PP
+\fB\-\-mirror\fR
+.RS 4
+Debian mirror to use in built image
+.RE
+.PP
+\fB\-\-distribution\fR
+.RS 4
+Debian release to use in built image
+.RE
+.PP
+\fB\-\-include\-source\fR
+.RS 4
+Whether to include source in build image, False by default
+.RE
+.PP
+\fB\-\-package\fR
+.RS 4
+Install additional packages in the image
+.RE
+.PP
+\fB\-\-custom\-package\fR
+.RS 4
+Install package from DEB file into the image
+.RE
+.PP
+\fB\-\-build\-dir\fR
+.RS 4
+Directory to build images and create log file
+.RE
+.PP
+\fB\-\-log\-level\*(Aq\fR
+.RS 4
+The logging level \- choose one of (\*(Aqcritical\*(Aq, \*(Aqerror\*(Aq, \*(Aqwarn\*(Aq, \*(Aqinfo\*(Aq, \*(Aqdebug\*(Aq)\&. Default log level is \*(Aqdebug\*(Aq\&.
+.RE
+.PP
+\fB\-\-hostname\fR
+.RS 4
+Hostname to set inside the built images
+.RE
+.PP
+\fB\-\-sign\fR
+.RS 4
+Sign the images with default GPG key after building
+.RE
+.PP
+\fB\-\-force\fR
+.RS 4
+Force rebuild of images even when required image exists
+.RE
+.PP
+\fBtargets\fR
+.RS 4
+Image targets to build\&. Choose one or more of freedommaker, dreamplug, raspberry, raspberry2, beaglebone, cubieboard2, cubietruck, a20\-olinuxino\-lime, a20\-olinuxino\-lime2, a20\-olinuxino\-micro, i386, amd64, virtualbox\-i386, virtualbox\-amd64, qemu\-i386, qemu\-amd64
+.RE
+.SH "EXAMPLES"
+.PP
+\fBExample\ \&1.\ \&Build BeagleBone image\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ freedom\-maker beaglebone
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+Build a FreedomBox image for the BeagleBone Single Board Computer\&.
+.PP
+\fBExample\ \&2.\ \&Build all images\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ python3 \-m freedommaker dreamplug raspberry raspberry2
+      beaglebone cubieboard2 cubietruck a20\-olinuxino\-lime a20\-olinuxino\-lime2 
+      a20\-olinuxino\-micro i386 amd64 virtualbox\-i386 virtualbox\-amd64 
+      qemu\-i386 qemu\-amd64
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+Build all the available FreedomBox images using freedom\-maker\&.
+.SH "BUGS"
+.PP
+See the
+\m[blue]\fBFreedom\-maker issue tracker\fR\m[]\&\s-2\u[1]\d\s+2
+for a full list of known issues and TODO items\&.
+.SH "AUTHOR"
+.PP
+Freedom\-Maker Developers
+.SH "NOTES"
+.IP " 1." 4
+Freedom-maker issue tracker
+.RS 4
+\%https://github.com/freedombox/freedom-maker/issues
+.RE

+ 1 - 0
debian/manpages

@@ -0,0 +1 @@
+debian/freedom-maker.1

+ 11 - 0
debian/rules

@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+export PYBUILD_NAME=freedom-maker
+
+%:
+	dh $@ --with python3 --buildsystem=pybuild
+
+# Skipping tests due to https://github.com/freedombox/freedom-maker/issues/102
+override_dh_auto_test:
+	true

+ 1 - 0
debian/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 248 - 0
doc/freedom-maker.xml

@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd">
+<!--
+#
+# This file is part of Freedom Maker.
+#
+# This program 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.
+#
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+-->
+<refentry>
+  <refmeta>
+    <refentrytitle><application>freedom-maker</application></refentrytitle>
+    <manvolnum>1</manvolnum>
+    <refmiscinfo class="manual">FreedomBox</refmiscinfo>
+    <refmiscinfo class="version">0.8</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname><application>freedom-maker</application></refname>
+    <refpurpose>
+      image builder for FreedomBox
+    </refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>freedom-maker</command>
+        <arg> <option>--vmdebootstrap</option></arg>
+        <arg> <option>--build-stamp</option></arg>
+        <arg> <option>--image-size</option></arg>
+        <arg> <option>--build-mirror</option></arg>
+        <arg> <option>--mirror</option></arg>
+        <arg> <option>--distribution</option></arg>
+        <arg> <option>--include-source</option></arg>
+        <arg> <option>--package</option></arg>
+        <arg> <option>--custom-package</option></arg>
+        <arg> <option>--build-dir</option></arg>
+        <arg> <option>--log-level'</option></arg>
+        <arg> <option>--hostname</option></arg>
+        <arg> <option>--sign</option></arg>
+        <arg> <option>--force</option></arg>
+        <arg> <option>targets</option></arg>     
+        <arg><option>-h, </option><option>--help</option></arg>
+   </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    <para>
+      FreedomBox is a community project to develop, design and promote
+      personal servers running free software for private, personal
+      communications.  It is a networking appliance designed to allow
+      interfacing with the rest of the Internet under conditions of
+      protected privacy and data security.  It hosts applications such
+      as blog, wiki, website, social network, email, web proxy and a
+      Tor relay on a device that can replace a wireless router so that
+      data stays with the users.
+    </para>
+    <para>
+      FreedomMaker is a tool to build FreedomBox images for various single
+      board computers, virtual machines and general purpose computers. 
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Options</title>
+    <variablelist>
+      <varlistentry>
+        <term> <option>--vmdebootstrap</option></term>
+        <listitem>
+          <para>
+            Path to vmdebootstrap executable
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--build-stamp</option></term>
+         <listitem>
+          <para>
+            Build stamp to use on image file names
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--image-size</option></term>
+         <listitem>
+          <para>
+            Size of the image to build
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--build-mirror</option></term>
+         <listitem>
+          <para>
+            Debian mirror to use for building
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--mirror</option></term>
+         <listitem>
+           <para>
+             Debian mirror to use in built image
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--distribution</option></term>
+         <listitem>
+           <para>
+             Debian release to use in built image
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--include-source</option></term>
+         <listitem>
+           <para>
+             Whether to include source in build image,
+             False by default
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--package</option></term>
+         <listitem>
+           <para>
+             Install additional packages in the image
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--custom-package</option></term>
+         <listitem>
+           <para>
+             Install package from DEB file into the image
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--build-dir</option></term>
+         <listitem>
+           <para>
+             Directory to build images and create log file
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--log-level'</option></term>
+         <listitem>
+           <para>
+             The logging level - choose one of ('critical',
+             'error', 'warn', 'info', 'debug'). Default log level
+             is 'debug'.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--hostname</option></term>
+         <listitem>
+          <para>
+            Hostname to set inside the built images
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--sign</option></term>
+         <listitem>
+           <para>
+             Sign the images with default GPG key after building
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>--force</option></term>
+         <listitem>
+           <para>
+             Force rebuild of images even when required image exists
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term> <option>targets</option></term>
+        <listitem>
+          <para>
+            Image targets to build. Choose one or more of freedommaker, dreamplug,
+            raspberry, raspberry2, beaglebone, cubieboard2, cubietruck, 
+            a20-olinuxino-lime, a20-olinuxino-lime2, a20-olinuxino-micro, i386, amd64, 
+            virtualbox-i386, virtualbox-amd64, qemu-i386, qemu-amd64
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Examples</title>
+
+    <example>
+      <title>Build BeagleBone image</title>
+      <synopsis>$ freedom-maker beaglebone</synopsis>
+      <para>
+        Build a FreedomBox image for the BeagleBone Single Board Computer.
+      </para>
+    </example>
+
+    <example>
+      <title>Build all images</title>
+      <synopsis>$ python3 -m freedommaker dreamplug raspberry raspberry2
+      beaglebone cubieboard2 cubietruck a20-olinuxino-lime a20-olinuxino-lime2 
+      a20-olinuxino-micro i386 amd64 virtualbox-i386 virtualbox-amd64 
+      qemu-i386 qemu-amd64</synopsis>
+      <para>
+        Build all the available FreedomBox images using freedom-maker.
+      </para>
+    </example>
+  </refsect1>
+
+  <refsect1>
+    <title>Bugs</title>
+    <para>
+      See the <ulink url="https://github.com/freedombox/freedom-maker/issues">Freedom-maker
+      issue tracker</ulink> for a full list of known issues and TODO items.
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+    <para>
+      <author>
+        <firstname>Freedom-Maker Developers</firstname>
+        <contrib>Original author</contrib>
+      </author>
+    </para>
+  </refsect1>
+</refentry>

+ 4 - 0
freedommaker/__init__.py

@@ -26,4 +26,8 @@ __version__ = '0.8'
 
 __all__ = [
     'Application',
+    'main',
 ]
+
+def main():
+    Application().run()

+ 1 - 1
setup.py

@@ -35,7 +35,7 @@ setuptools.setup(
     packages=setuptools.find_packages(),
     entry_points={
         'console_scripts': [
-            'freedom-maker = freedommaker'
+            'freedom-maker = freedommaker:main'
         ]
     },
     test_suite='freedommaker.tests',