Merge pull request #1 from zhsj/master

WIP: improve debian package
This commit is contained in:
Simon Fels 2018-06-08 18:25:50 +02:00 committed by GitHub
commit c807ff7648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 65 additions and 476 deletions

View File

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

View File

@ -1,51 +0,0 @@
#!/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

View File

@ -1,28 +0,0 @@
#!/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

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
anbox-modules (11) bionic; urgency=medium
* Split kernel modules out of anbox main repository.
-- Shengjing Zhu <i@zhsj.me> Fri, 08 Jun 2018 23:53:35 +0800
anbox (10) bionic; urgency=medium
* Bump version

21
debian/control vendored
View File

@ -1,16 +1,21 @@
Source: anbox
Section: misc
Source: anbox-modules
Section: kernel
Priority: optional
Maintainer: Simon Fels <morphis@gravedo.de>
Build-Depends: debhelper (>= 9), dkms, dh-systemd
Standards-Version: 4.1.3
Homepage: http://anbox.io
Vcs-Browser: https://github.com/anbox/anbox
Vcs-Git: https://github.com/anbox/anbox.git
Uploaders:
Shengjing Zhu <i@zhsj.me>,
Build-Depends:
debhelper (>= 9),
dkms,
Standards-Version: 4.1.4
Homepage: https://anbox.io
Vcs-Browser: https://github.com/anbox/anbox-modules
Vcs-Git: https://github.com/anbox/anbox-modules.git
Package: anbox-modules-dkms
Architecture: all
Depends: dkms (>= 1.95), ${misc:Depends}
Depends:
${misc:Depends},
Description: Android kernel driver (binder, ashmem) in DKMS format.
.
This package contains a out-of-tree version of the core Android

386
debian/copyright vendored
View File

@ -1,374 +1,44 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: anbox
Source: http://github.com/anbox/anbox
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: anbox-modules
Source: http://github.com/anbox/anbox-modules
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>
Files: debian/*
Copyright: 2016-2018, Simon Fels <morphis@gravedo.de>
2018, Shengjing Zhu <i@zhsj.me>
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
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; version 2 dated June, 1991.
the Free Software Foundation; version 2 of the License.
.
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'.
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 <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 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
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.
the Free Software Foundation, version 3 of the License.
.
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.
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.
.
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.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
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'.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

3
debian/dirs vendored
View File

@ -1 +1,2 @@
usr/src
usr/src/anbox-1
etc/modules-load.d/

11
debian/dkms vendored Normal file
View File

@ -0,0 +1,11 @@
PACKAGE_NAME="anbox"
PACKAGE_VERSION="1"
CLEAN="make -C ashmem clean && make -C binder clean"
MAKE[0]="'make' -j$parallel_jobs -C ashmem KERNEL_SRC=$kernel_source_dir && make -j$parallel_jobs -C binder KERNEL_SRC=$kernel_source_dir"
BUILT_MODULE_NAME[0]="ashmem_linux"
BUILT_MODULE_LOCATION[0]="ashmem"
DEST_MODULE_LOCATION[0]="/updates"
BUILT_MODULE_NAME[1]="binder_linux"
BUILT_MODULE_LOCATION[1]="binder"
DEST_MODULE_LOCATION[1]="/updates"
AUTOINSTALL="yes"

3
debian/install vendored Normal file
View File

@ -0,0 +1,3 @@
ashmem usr/src/anbox-1
binder usr/src/anbox-1
anbox.conf /etc/modules-load.d/

28
debian/rules vendored
View File

@ -1,31 +1,5 @@
#!/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_configure:
override_dh_auto_build:
override_dh_install:
VERSION=$(shell dpkg-parsechangelog -SVersion)
install -d $(CURDIR)/debian/tmp/usr/src
for d in ashmem binder ; do \
cp -a $(CURDIR)/$$d $(CURDIR)/debian/tmp/usr/src/anbox-modules-$$d-$(VERSION) ; \
done
install -d $(CURDIR)/debian/tmp/lib/udev/rules.d
install -m 0644 99-anbox.rules $(CURDIR)/debian/tmp/lib/udev/rules.d
install -d $(CURDIR)/debian/tmp/etc/modules-load.d
install -m 0644 anbox.conf $(CURDIR)/debian/tmp/etc/modules-load.d
dh_install
dh $@ --with dkms

1
debian/udev vendored Symbolic link
View File

@ -0,0 +1 @@
../99-anbox.rules