Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock
Severity: important
unblock android-permissions/0.2
Fix RC bug to keep this package in testing. Here is the debdiff:
$ debdiff android-permissions_0.1.dsc android-permissions_0.2.dsc
dpkg-source: warning: extracting unsigned source package
(/var/cache/pbuilder/result/android-permissions_0.2.dsc)
diff -Nru android-permissions-0.1/debian/changelog
android-permissions-0.2/debian/changelog
--- android-permissions-0.1/debian/changelog 2014-09-29 23:34:28.000000000 +0200
+++ android-permissions-0.2/debian/changelog 2014-11-17 22:41:23.000000000 +0100
@@ -1,3 +1,10 @@
+android-permissions (0.2) unstable; urgency=low
+
+ * force all groups to use Android gid (Closes: #767677)
+ * remove inode chroot check that is failing on Android
+
+ -- Hans-Christoph Steiner <hans@eds.org> Mon, 17 Nov 2014 22:40:54 +0100
+
android-permissions (0.1) unstable; urgency=low
* Initial Release (Closes: #763392)
diff -Nru android-permissions-0.1/debian/postinst
android-permissions-0.2/debian/postinst
--- android-permissions-0.1/debian/postinst 2014-09-29 23:29:40.000000000 +0200
+++ android-permissions-0.2/debian/postinst 2014-11-17 22:40:34.000000000 +0100
@@ -19,8 +19,17 @@
usergroupadd() {
- grep -q ^$2: /etc/group || groupadd --system --gid $1 $2
- grep -q ^$2: /etc/passwd || useradd --system --gid $1 --uid $1 --home
/system --comment "$3" $2
+ if grep -q ^$2: /etc/group; then
+ echo "group $2 exists, forcing to gid $1 to match Android"
+ sed -i "s,^$2:x:[0-9][0-9]*:,$2:x:$1:," /etc/group
+ else
+ groupadd --system --gid $1 $2
+ fi
+ if grep -q ^$2: /etc/passwd; then
+ echo "ERROR: user $2 exists, skipping ($1 $2 '$3')"
+ else
+ useradd --system --gid $1 --uid $1 --home /system --comment "$3" $2
+ fi
}
case "$1" in
@@ -35,7 +44,7 @@
usergroupadd 1002 bluetooth "bluetooth subsystem"
usergroupadd 1003 graphics "graphics devices"
usergroupadd 1004 input "input devices"
- usergroupadd 1005 a_audio "audio devices"
+ usergroupadd 1005 audio "audio devices"
usergroupadd 1006 camera "camera devices"
usergroupadd 1007 log "log devices"
usergroupadd 1008 compass "compass device"
@@ -241,6 +250,9 @@
s/^[[:space:]]*#\?[[:space:]]*\(ADD_EXTRA_GROUPS[[:space:]]*=[[:space:]]*\)[[:digit:]]\+/\11/
s/^[[:space:]]*#\?[[:space:]]*\(EXTRA_GROUPS[[:space:]]*=[[:space:]]*\).*/\1"shell
graphics input log adb sdcard_rw net_bt_admin net_bt inet"/
' /etc/adduser.conf
+
+ # update shadow in case any groups had their gid changed to match Android's
+ grpconv
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru android-permissions-0.1/debian/preinst
android-permissions-0.2/debian/preinst
--- android-permissions-0.1/debian/preinst 2014-09-29 23:28:11.000000000 +0200
+++ android-permissions-0.2/debian/preinst 2014-11-17 18:10:10.000000000 +0100
@@ -16,11 +16,10 @@
case "$1" in
install|upgrade)
- # In a normal system, the inode for / is 2, except for systems with an
- # XFS root filesystem, then it is 128. If the root inode is something
- # else, then this is a chroot.
+ # For systems with an XFS root filesystem, the inode for / is 128.
+ # This is a weak test, but it'll warn at least some people.
root_inode=$(stat -c %i /)
- if [ $root_inode -eq 2 -o $root_inode -eq 128 ]; then
+ if [ $root_inode -eq 128 ]; then
echo "This package should only be installed in a chroot running
on Android!" >&2
exit 1
fi
Attachment:
signature.asc
Description: OpenPGP digital signature