From 9883906dd533f2d5a893bee9825e59364bc6ce7d Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 7 Aug 2013 02:16:12 +0200 Subject: [PATCH 1/2] polkit: convert to new package format Signed-off-by: Stephan Raue --- packages/security/polkit/build | 46 ------------- packages/security/polkit/install | 68 ------------------- packages/security/polkit/{meta => package.mk} | 24 ++++++- 3 files changed, 22 insertions(+), 116 deletions(-) delete mode 100755 packages/security/polkit/build delete mode 100755 packages/security/polkit/install rename packages/security/polkit/{meta => package.mk} (64%) diff --git a/packages/security/polkit/build b/packages/security/polkit/build deleted file mode 100755 index 0da741cf88..0000000000 --- a/packages/security/polkit/build +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# 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 2, 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 OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --libexecdir=/usr/lib/polkit-1 \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-man-pages \ - --disable-gtk-doc \ - --disable-nls \ - --disable-introspection \ - --disable-systemd \ - --with-authfw=shadow \ - --with-os-type=redhat \ - --with-expat=$SYSROOT_PREFIX/usr \ - -make - -$MAKEINSTALL diff --git a/packages/security/polkit/install b/packages/security/polkit/install deleted file mode 100755 index 4d99cb6561..0000000000 --- a/packages/security/polkit/install +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# 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 2, 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 OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp -P $PKG_BUILD/data/org.freedesktop.PolicyKit1.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/etc/polkit-1/localauthority - echo "chmod 700 $INSTALL/etc/polkit-1/localauthority" >> $FAKEROOT_SCRIPT - -mkdir -p $INSTALL/etc/polkit-1/localauthority/10-vendor.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/20-org.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/30-site.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/50-local.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/90-mandatory.d - -mkdir -p $INSTALL/etc/polkit-1/localauthority.conf.d - cp -P $PKG_BUILD/src/polkitbackend/50-localauthority.conf $INSTALL/etc/polkit-1/localauthority.conf.d - -mkdir -p $INSTALL/etc/polkit-1/nullbackend.conf.d - cp -P $PKG_BUILD/src/nullbackend/50-nullbackend.conf $INSTALL/etc/polkit-1/nullbackend.conf.d - -mkdir -p $INSTALL/usr/bin - cp -P $PKG_BUILD/src/programs/.libs/pkaction $INSTALL/usr/bin - cp -P $PKG_BUILD/src/programs/.libs/pkcheck $INSTALL/usr/bin - cp -P $PKG_BUILD/src/programs/.libs/pkexec $INSTALL/usr/bin - echo "chmod 4755 $INSTALL/usr/bin/pkexec" >> $FAKEROOT_SCRIPT - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/src/polkitagent/.libs/libpolkit-agent-1.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libpolkit-agent-1.so*T - cp -P $PKG_BUILD/src/polkitbackend/.libs/libpolkit-backend-1.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libpolkit-backend-1.so*T - cp -P $PKG_BUILD/src/polkit/.libs/libpolkit-gobject-1.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/lib/polkit-1/extensions - cp -P $PKG_BUILD/src/nullbackend/.libs/*.so $INSTALL/usr/lib/polkit-1/extensions - -mkdir -p $INSTALL/usr/lib/polkit-1 - cp -P $PKG_BUILD/src/polkitagent/.libs/polkit-agent-helper-1 $INSTALL/usr/lib/polkit-1 - echo "chmod 4755 $INSTALL/usr/lib/polkit-1/polkit-agent-helper-1" >> $FAKEROOT_SCRIPT - cp -P $PKG_BUILD/src/polkitd/.libs/polkitd $INSTALL/usr/lib/polkit-1 - -mkdir -p $INSTALL/usr/share/dbus-1/system-services - cp -P $PKG_BUILD/data/org.freedesktop.PolicyKit1.service $INSTALL/usr/share/dbus-1/system-services - -mkdir -p $INSTALL/usr/share/polkit-1/actions - cp -P $PKG_BUILD/actions/org.freedesktop.policykit.policy $INSTALL/usr/share/polkit-1/actions diff --git a/packages/security/polkit/meta b/packages/security/polkit/package.mk similarity index 64% rename from packages/security/polkit/meta rename to packages/security/polkit/package.mk index e8932328f2..48b4a69c60 100644 --- a/packages/security/polkit/meta +++ b/packages/security/polkit/package.mk @@ -26,11 +26,31 @@ PKG_LICENSE="MIT" PKG_SITE="http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary" PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="zlib glib expat" -PKG_BUILD_DEPENDS="toolchain zlib sg3_utils glib expat" +PKG_BUILD_DEPENDS_TARGET="toolchain zlib sg3_utils glib expat" PKG_PRIORITY="optional" PKG_SECTION="security" PKG_SHORTDESC="polkit: Authorization Toolkit" PKG_LONGDESC="PolicyKit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--libexecdir=/usr/lib/polkit-1 \ + --disable-man-pages \ + --disable-gtk-doc \ + --disable-nls \ + --disable-introspection \ + --disable-systemd \ + --with-authfw=shadow \ + --with-os-type=redhat \ + --with-expat=$SYSROOT_PREFIX/usr" + +post_makeinstall_target() { + rm -rf $INSTALL/usr/bin/pk-example-frobnicate + rm -rf $INSTALL/usr/share/polkit-1/actions/org.freedesktop.policykit.examples.pkexec.policy +} + +post_install() { + echo "chmod 4755 $INSTALL/usr/bin/pkexec" >> $FAKEROOT_SCRIPT + echo "chmod 4755 $INSTALL/usr/lib/polkit-1/polkit-agent-helper-1" >> $FAKEROOT_SCRIPT +} From 9bcf835a1b32849ed335a0e35bd8e09e9f0af155 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 7 Aug 2013 10:39:57 +0200 Subject: [PATCH 2/2] udisks: rework automounter script Signed-off-by: Stephan Raue --- .../sysutils/udisks/init.d/31_mount-disks | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/packages/sysutils/udisks/init.d/31_mount-disks b/packages/sysutils/udisks/init.d/31_mount-disks index 70ee7a72a4..4824c39236 100644 --- a/packages/sysutils/udisks/init.d/31_mount-disks +++ b/packages/sysutils/udisks/init.d/31_mount-disks @@ -28,22 +28,12 @@ wait_for_dbus - drive_dump () { - udisks --dump | tr -d ' ' | grep 'device-file:' | cut -d ':' -f2 - } - - show_info () { - udisks --show-info $2 | grep "$1:" | tr -d ' ' | cut -d ":" -f2 - } - - for DEVICE in `drive_dump`; do - REMOVABLE="`show_info "removable" $DEVICE`" - MOUNTED="`show_info "is mounted" $DEVICE`" - USAGE="`show_info "usage" $DEVICE`" - - if [ "$REMOVABLE" = "0" -a "$MOUNTED" = "0" -a "$USAGE" = "filesystem" ]; then - udisks --mount "$DEVICE" >/dev/null + for DEVICE in `find /sys/class/block/sd*/removable`; do + if [ "$(cat $DEVICE)" = "0" ]; then + DISK=$(echo "$DEVICE" | sed -e "s,/sys/class/block,/dev," -e "s,/removable,,") + for PART in $(ls "$DISK"[0-9]*);do + udisks --mount "$PART" >/dev/null + done fi - done )&