Rework debian packaging to include things from anbox-installer

This commit is contained in:
Simon Fels 2017-04-20 20:04:42 +02:00
commit 432bb8d58b
24 changed files with 498 additions and 82 deletions

5
debian/README.Debian vendored Normal file
View file

@ -0,0 +1,5 @@
MODULE_NAME DKMS module for Debian
This package was automatically generated by the DKMS system,
for distribution on Debian based operating systems.

3
debian/anbox-common.install vendored Normal file
View file

@ -0,0 +1,3 @@
etc/X11/Xsession.d/68anbox
usr/share/upstart/sessions/anbox.conf
usr/lib/systemd/user/anbox.service

3
debian/anbox-modules-dkms.install vendored Normal file
View file

@ -0,0 +1,3 @@
usr/src/anbox-modules-*
etc/modules-load.d
lib/udev/rules.d

51
debian/anbox-modules-dkms.postinst vendored Executable file
View file

@ -0,0 +1,51 @@
#!/bin/sh
# Copyright (C) 2002-2005 Flavio Stanchina
# Copyright (C) 2005-2006 Aric Cyr
# Copyright (C) 2007 Mario Limonciello
# Copyright (C) 2009 Alberto Milone
set -e
NAME=anbox-modules
PACKAGE_NAME=$NAME-dkms
DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,')
CVERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
ARCH=`dpkg --print-architecture`
dkms_configure () {
for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do
if [ -f "$POSTINST" ]; then
for d in ashmem binder ; do
"$POSTINST" "$NAME-$d" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2"
done
return 0
fi
echo "WARNING: $POSTINST does not exist." >&2
done
echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2
echo "built with legacy DKMS support." >&2
echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2
echo "support or upgrade DKMS to a more current version." >&2
return 1
}
case "$1" in
configure)
dkms_configure
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

28
debian/anbox-modules-dkms.prerm vendored Executable file
View file

@ -0,0 +1,28 @@
#!/bin/sh
NAME=anbox-modules-dkms
VERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
set -e
case "$1" in
remove|upgrade|deconfigure)
if [ "`dkms status -m $NAME`" ]; then
dkms remove -m $NAME -v $VERSION --all
fi
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

25
debian/changelog vendored Normal file
View file

@ -0,0 +1,25 @@
anbox (5) zesty; urgency=medium
* Rework packaging to also ship things we installed through the snap
based installer before.
-- Simon Fels <morphis@gravedo.de> Thu, 20 Apr 2017 19:58:22 +0200
anbox (4) zesty; urgency=medium
* Fetch dkms version from debian package in post-install step.
-- Simon Fels <morphis@gravedo.de> Thu, 23 Feb 2017 19:12:15 +0100
anbox (3) zesty; urgency=medium
* Use correct package version in our Makefile to avoid failing module
builds on the target device.
-- Simon Fels <morphis@gravedo.de> Tue, 21 Feb 2017 07:36:45 +0100
anbox (1) xenial; urgency=low
* Initial release.
-- Simon Fels <morphis@gravedo.de> Mon, 06 Feb 2017 21:43:58 +0100

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
7

29
debian/control vendored Normal file
View file

@ -0,0 +1,29 @@
Source: anbox
Section: misc
Priority: optional
Maintainer: Simon Fels <morphis@gravedo.de>
Build-Depends: debhelper (>= 7), dkms, dh-systemd
Standards-Version: 3.9.7
Homepage: http://anbox.io
Vcs-Browser: https://github.com/anbox/anbox
Vcs-Git: https://github.com/anbox/anbox.git
Package: anbox-common
Architecture: all
Depends: ${misc:Depends}
Description: Common files necessary for Anbox
.
This package contains necessary things which can't be shipped
with anbox snap package
Package: anbox-modules-dkms
Architecture: all
Depends: dkms (>= 1.95), ${misc:Depends}
# Get existing installations to install the anbox-common package
# as this will replace our existing classic snap based install
# approach.
Recommends: anbox-common
Description: Android kernel driver (binder, ashmem) in DKMS format.
.
This package contains a out-of-tree version of the core Android
kernel functionalities binder and ashmem.

374
debian/copyright vendored Normal file
View file

@ -0,0 +1,374 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: anbox
Source: http://github.com/anbox/anbox
Files: *
License: GPL-3
Files: android/*
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: android/appmgr/src/org/anbox/appmgr/AppViewActivity.java
android/appmgr/src/org/anbox/appmgr/LauncherActivity.java
android/appmgr/src/org/anbox/appmgr/LauncherService.java
android/appmgr/src/org/anbox/appmgr/MainApplication.java
android/appmgr/src/org/anbox/appmgr/PackageEventReceiver.java
android/appmgr/src/org/anbox/appmgr/PlatformService.java
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: android/appmgr/src/org/anbox/appmgr/GridFragment.java
Copyright: 2012, Loupe Inc
License: Apache-2.0
Files: android/hwcomposer/*
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: android/service/*
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: cross-compile-chroot.sh
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: external/android-emugl/*
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: external/android-emugl/host/include/ETC1/*
Copyright: 2009, Google Inc
License: Apache-2.0
Files: external/android-emugl/host/libs/Translator/GLcommon/etc1.cpp
Copyright: 2009, Google Inc
License: Apache-2.0
Files: external/android-emugl/host/libs/Translator/include/GLcommon/etc1.h
Copyright: 2009, Google Inc
License: Apache-2.0
Files: external/nsexec/*
Copyright: 2012-2016, Canonical, Inc
License: GPL-2
Files: external/process-cpp-minimal/include/*
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: external/process-cpp-minimal/include/core/testing/*
Copyright: 2012-2015, Canonical Ltd
License: GPL-3
Files: external/process-cpp-minimal/include/core/testing/fork_and_run.h
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: external/process-cpp-minimal/src/*
Copyright: 2012-2015, Canonical Ltd
License: GPL-3
Files: external/process-cpp-minimal/src/core/posix/*
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: external/process-cpp-minimal/src/core/testing/fork_and_run.cpp
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: external/xdg/*
Copyright: 2015, Thomas Voß <thomas.voss.bochum@gmail.com>
License: LGPL-3+
Files: kernel/*
Copyright: 2008-2012 Google Inc.
License: GPL-2
Copyright (C) 2008-2012 Google, Inc.
.
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
.
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.
Files: kernel/ashmem/ashmem.c
Copyright: 2007, 2008, 2012, Google, Inc
License: GPL-2
Copyright (C) 2008-2012 Google, Inc.
.
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
.
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.
Files: kernel/ashmem/ashmem.h
Copyright: 2008, Google Inc
License: GPL-2
Copyright (C) 2008-2012 Google, Inc.
.
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
.
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.
Files: kernel/ashmem/uapi/*
Copyright: 2008, Google Inc
License: GPL-2
Copyright (C) 2008-2012 Google, Inc.
.
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
.
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.
Files: kernel/binder/binder.c
kernel/binder/binder_trace.h
Copyright: 2007, 2008, 2012, Google, Inc
License: GPL-2
Copyright (C) 2008-2012 Google, Inc.
.
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
.
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.
Files: kernel/binder/binder.h
Copyright: 2008, Google, Inc
2005, Palmsource, Inc
License: GPL-2
Copyright (C) 2008-2012 Google, Inc.
.
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
.
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.
Files: scripts/*
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: scripts/setup-partial-chroot.sh
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: src/*
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: src/anbox/cli.cpp
src/anbox/cli.h
src/anbox/not_reachable.cpp
src/anbox/not_reachable.h
src/anbox/optional.h
src/anbox/version.cpp
src/anbox/version.h
Copyright: 2016, Canonical, Ltd
License: LGPL-3
Files: src/anbox/cmds/system_info.cpp
src/anbox/cmds/system_info.h
Copyright: 2017, Simon Fels <morphis@gravedo.de>
License: LGPL-3
Files: src/anbox/cmds/version.cpp
src/anbox/cmds/version.h
Copyright: 2016, Canonical, Ltd
License: LGPL-3
Files: src/anbox/common/dispatcher.cpp
src/anbox/common/dispatcher.h
Copyright: 2016, Canonical, Ltd
License: LGPL-3
Files: src/anbox/common/fd.cpp
src/anbox/common/fd.h
src/anbox/common/variable_length_array.h
src/anbox/common/wait_handle.cpp
src/anbox/common/wait_handle.h
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: src/anbox/common/fd_sets.h
Copyright: 2012-2015, Canonical Ltd
License: GPL-3
Files: src/anbox/common/message_channel.cpp
src/anbox/common/message_channel.h
src/anbox/common/type_traits.h
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: src/anbox/common/scope_ptr.h
src/anbox/common/small_vector.h
Copyright: 2014, 2016, The Android Open Source Project
License: Apache-2.0
Files: src/anbox/dbus/codecs.h
Copyright: 2017, Simon Fels <morphis@gravedo.de>
License: LGPL-3
Files: src/anbox/graphics/buffer_queue.cpp
src/anbox/graphics/buffer_queue.h
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: src/anbox/graphics/emugl/*
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: src/anbox/graphics/emugl/DisplayManager.cpp
src/anbox/graphics/emugl/DisplayManager.h
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: src/anbox/graphics/emugl/Renderable.cpp
src/anbox/graphics/emugl/Renderable.h
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: Apache-2.0
Files: src/anbox/graphics/primitives.h
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: src/anbox/graphics/program_family.cpp
src/anbox/graphics/program_family.h
Copyright: 2012-2015, Canonical Ltd
License: GPL-3
Files: src/anbox/logger.cpp
src/anbox/logger.h
Copyright: 2015, Canonical, Ltd
License: GPL-3
Files: src/anbox/network/base_socket_messenger.cpp
src/anbox/network/base_socket_messenger.h
src/anbox/network/connection_context.h
src/anbox/network/connections.h
src/anbox/network/message_receiver.h
src/anbox/network/message_sender.h
src/anbox/network/socket_connection.cpp
src/anbox/network/socket_connection.h
src/anbox/network/socket_messenger.h
Copyright: 2012-2015, Canonical Ltd
License: GPL-3
Files: src/anbox/network/fd_socket_transmission.cpp
src/anbox/network/fd_socket_transmission.h
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: src/anbox/protobuf/*
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: src/anbox/rpc/channel.cpp
Copyright: 2016, Simon Fels <morphis@gravedo.de>
2012, Canonical Ltd
License: LGPL-3
Files: src/anbox/rpc/make_protobuf_object.h
src/anbox/rpc/pending_call_cache.cpp
src/anbox/rpc/pending_call_cache.h
Copyright: 2012-2016, Canonical Ltd
License: LGPL-3
Files: src/anbox/rpc/template_message_processor.h
Copyright: 2012-2015, Canonical Ltd
License: GPL-3
Files: src/anbox/testing/*
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: src/anbox/utils/*
Copyright: 2017, Simon Fels <morphis@gravedo.de>
License: LGPL-3
Files: tests/*
Copyright: 2016, 2017, Simon Fels <morphis@gravedo.de>
License: GPL-3
Files: tests/anbox/common/*
Copyright: 2014, 2016, The Android Open Source Project
License: Apache-2.0
Files: tests/anbox/common/message_channel_tests.cpp
tests/anbox/common/scope_ptr_tests.cpp
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
Files: tests/anbox/graphics/buffer_queue_tests.cpp
Copyright: 2008-2016, The Android Open Source Project
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS"BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache License,
Version 2.0 can be found in '/usr/share/common-licenses/Apache-2.0'.
License: GPL-2
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; version 2 dated June, 1991.
.
On Debian systems, the complete text of version 2 of the GNU General
Public License can be found in '/usr/share/common-licenses/GPL-2'.
License: GPL-3
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; version 3 dated June, 2007.
.
On Debian systems, the complete text of version 3 of the GNU General
Public License can be found in '/usr/share/common-licenses/GPL-3'.
License: LGPL-3
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; version 3 of the License.
.
On Debian systems, the complete text of version 3 of the GNU Lesser
General Public License can be found in `/usr/share/common-licenses/LGPL-3'.
License: LGPL-3+
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; version 3 of the License, or (at
your option) any later version.
.
On Debian systems, the complete text of version 3 of the GNU Lesser
General Public License can be found in `/usr/share/common-licenses/LGPL-3'.

1
debian/dirs vendored Normal file
View file

@ -0,0 +1 @@
usr/src

40
debian/rules vendored Executable file
View file

@ -0,0 +1,40 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
VERSION=$(shell dpkg-parsechangelog -SVersion)
# include /usr/share/dpkg/default.mk
%:
dh $@ --parallel --fail-missing --with systemd
override_dh_auto_build:
cat data/anbox.service.in | sed s:@SNAP_MOUNT_DIR@:/snap/bin:g > data/anbox.service
cat data/anbox.conf.in | sed s:@SNAP_MOUNT_DIR@:/snap/bin:g > data/anbox.conf
override_dh_install:
VERSION=$(shell dpkg-parsechangelog -SVersion)
install -d $(CURDIR)/debian/tmp/usr/src
for d in ashmem binder ; do \
cp -a $(CURDIR)/kernel/$$d $(CURDIR)/debian/tmp/usr/src/anbox-modules-$$d-$(VERSION) ; \
done
install -d $(CURDIR)/debian/tmp/lib/udev/rules.d
install -m 0644 kernel/99-anbox.rules $(CURDIR)/debian/tmp/lib/udev/rules.d
install -d $(CURDIR)/debian/tmp/etc/modules-load.d
install -m 0644 kernel/anbox.conf $(CURDIR)/debian/tmp/etc/modules-load.d
install -d $(CURDIR)/debian/tmp/usr/lib/systemd/user/
install -m 0644 data/anbox.service $(CURDIR)/debian/tmp/usr/lib/systemd/user/
install -d $(CURDIR)/debian/tmp/usr/share/upstart/sessions/
install -m 0644 data/anbox.conf $(CURDIR)/debian/tmp/usr/share/upstart/sessions/
install -d $(CURDIR)/debian/tmp/etc/X11/Xsession.d
install -m 0644 data/xsession.conf $(CURDIR)/debian/tmp/etc/X11/Xsession.d/68anbox
dh_install

1
debian/source/format vendored Normal file
View file

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

2
debian/source/options vendored Normal file
View file

@ -0,0 +1,2 @@
tar-ignore = ".git"
tar-ignore = "*.swp"