Commit 525bd99d authored by Franco Lanza's avatar Franco Lanza

Recreated original upstream

parent ee1af883
This diff is collapsed.
Source: udisks2
Section: admin
Priority: optional
Maintainer: Dimitri Puzin <max@psycasst.de>
Build-Depends: debhelper (>= 9),
pkg-config,
xsltproc,
gtk-doc-tools,
intltool (>= 0.40.0),
libglib2.0-dev (>= 2.31.13),
udev (>= 147),
libgudev-1.0-dev (>= 165),
libpolkit-gobject-1-dev (>= 0.97),
libpolkit-agent-1-dev (>= 0.97),
libacl1-dev,
libgirepository1.0-dev (>= 1.30),
gobject-introspection (>= 1.30),
libatasmart-dev (>= 0.17),
dh-autoreconf
Standards-Version: 3.9.5
Vcs-Git: git://anonscm.debian.org/pkg-utopia/udisks2.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-utopia/udisks2.git;a=summary
Homepage: http://www.freedesktop.org/wiki/Software/udisks
XS-Testsuite: autopkgtest
Package: udisks2
Architecture: linux-any
Multi-Arch: foreign
Depends: ${shlibs:Depends}, ${misc:Depends}, udev, dbus, parted
Pre-Depends: ${misc:Pre-Depends}
Recommends: policykit-1, dosfstools, ntfs-3g, eject, gdisk
Suggests: xfsprogs, reiserfsprogs, exfat-utils, btrfs-tools, mdadm, cryptsetup-bin
Description: D-Bus service to access and manipulate storage devices
The udisks daemon serves as an interface to system block devices,
implemented via D-Bus. It handles operations such as querying, mounting,
unmounting, formatting, or detaching storage devices such as hard disks
or USB thumb drives.
.
This package also provides the udisksctl utility, which can be used to
trigger these operations from the command line (if permitted by
PolicyKit).
.
Creating or modifying file systems such as XFS, RAID, or LUKS encryption
requires that the corresponding mkfs.* and admin tools are installed, such as
dosfstools for VFAT, xfsprogs for XFS, or cryptsetup for LUKS.
Package: udisks2-doc
Architecture: all
Section: doc
Depends: ${misc:Depends}
Suggests: devhelp
Description: udisks2 documentation
The udisks daemon serves as an interface to system block devices,
implemented via D-Bus. It handles operations such as querying, mounting,
unmounting, formatting, or detaching storage devices such as hard disks
or USB thumb drives.
.
This package provides the API reference and manuals in devhelp format.
Package: libudisks2-0
Section: libs
Architecture: linux-any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: GObject based library to access udisks2
The udisks daemon serves as an interface to system block devices,
implemented via D-Bus. It handles operations such as querying, mounting,
unmounting, formatting, or detaching storage devices such as hard disks
or USB thumb drives.
.
This provides a convenience library for communicating with udisks2 from
GObject based programs.
Package: libudisks2-dev
Section: libdevel
Architecture: linux-any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
gir1.2-udisks-2.0 (= ${binary:Version}),
libudisks2-0 (= ${binary:Version})
Description: GObject based library to access udisks2 - development files
The udisks daemon serves as an interface to system block devices,
implemented via D-Bus. It handles operations such as querying, mounting,
unmounting, formatting, or detaching storage devices such as hard disks
or USB thumb drives.
.
This package contains files that are needed to build applications using
libudisks.
Package: gir1.2-udisks-2.0
Section: introspection
Architecture: linux-any
Multi-Arch: same
Depends: ${gir:Depends},
${shlibs:Depends},
${misc:Depends}
Description: GObject based library to access udisks2 - introspection data
The udisks daemon serves as an interface to system block devices,
implemented via D-Bus. It handles operations such as querying, mounting,
unmounting, formatting, or detaching storage devices such as hard disks
or USB thumb drives.
.
This package provides introspection data for libudisks. It can be used
by packages using the GIRepository format to generate dynamic bindings.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: UDisks2
Upstream-Contact: David Zeuthen <zeuthen@gmail.com>
Source: http://udisks.freedesktop.org/releases/
Files: *
Copyright: 2007-2011 David Zeuthen <zeuthen@gmail.com>
2011 Martin Pitt <martin.pitt@ubuntu.com>
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; either version 2 of the License, or
(at your option) any later version.
.
The full text of the GPL is distributed as in
/usr/share/common-licenses/GPL-2 on Debian systems.
Files: udisks/*
Copyright: 2011 David Zeuthen <zeuthen@gmail.com>
License: LGPL-2+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
.
The full text of the LGPL is distributed as in
/usr/share/common-licenses/LGPL-2 on Debian systems.
[DEFAULT]
pristine-tar = True
compression = xz
This diff is collapsed.
usr/include
usr/lib/*/*.so
usr/lib/*/*.a
usr/lib/*/pkgconfig/
usr/share/gir*/
'''apport package hook for udisks2
(c) 2011 Canonical Ltd.
Author: Martin Pitt <martin.pitt@ubuntu.com>
'''
import os
import os.path
import apport.hookutils
import dbus
def add_info(report):
apport.hookutils.attach_hardware(report)
user_rules = []
for f in os.listdir('/etc/udev/rules.d'):
if not f.startswith('70-persistent-') and f != 'README':
user_rules.append(f)
if user_rules:
report['CustomUdevRuleFiles'] = ' '.join(user_rules)
report['UDisksDump'] = apport.hookutils.command_output(['udisksctl', 'dump'])
report['Mounts'] = apport.hookutils.command_output(['mount'])
if __name__ == '__main__':
r = {}
add_info(r)
for k, v in r.items():
print('%s: "%s"' % (k, v))
#!/bin/sh
# Disallow udisks2 mount operations for anyone but root while a program is running.
# This is similar to udisks 1.x's "udisks --inhibit .." command.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
set -e
RULE="[Inhibit udisks2]
Identity=unix-user:*
Action=org.freedesktop.udisks2.filesystem*;
ResultActive=no
ResultInactive=no
ResultAny=no
"
[ -n "$1" ] || {
echo "Usage: $0 <command> [<arguments> ...]" >&2
exit 1
}
[ "`id -u`" = 0 ] || {
echo "You need to run this script as root" >&2
exit 1
}
DIR=/var/lib/polkit-1/localauthority/90-mandatory.d
[ -d $DIR ] || {
echo "$DIR does not exist. Please install policykit-1" >&2
exit 1
}
# mount a tmpfs over $DIR and place our rule in there, together with the
# already existing ones; this will guarantee that the file will not
# accidentally stay around across reboot, etc.
mkdir -p /run/udisks2/inhibit-polkit
mount -t tmpfs tmpfs /run/udisks2/inhibit-polkit
find "$DIR" -mindepth 1 -exec cp -a '{}' /run/udisks2/inhibit-polkit \;
echo "$RULE" > /run/udisks2/inhibit-polkit/udisks2-inhibit.pkla
mount --move /run/udisks2/inhibit-polkit "$DIR"
trap "umount $DIR; pkill --signal HUP polkitd" 0 HUP INT QUIT ILL ABRT FPE KILL SEGV PIPE ALRM TERM BUS
rmdir /run/udisks2/inhibit-polkit
pkill --signal HUP polkitd || :
# run wrapped command
"$@"
This diff is collapsed.
From 301855291954c5b7343ca826c478fa80219149a0 Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Mon, 29 Sep 2014 23:13:33 +0200
Subject: [PATCH] Support building against libsystemd library
In systemd v209, the various libraries were merged into a single
libsystemd library [1].
Add support for building against this new library and fall back to the
old library names if not found.
[1] http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
---
configure.ac | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3a39b5a..e3125cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,10 +145,10 @@ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.17])
AC_SUBST(LIBATASMART_CFLAGS)
AC_SUBST(LIBATASMART_LIBS)
-PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN,
- [libsystemd-login >= 44 libsystemd-daemon],
- have_libsystemd_login=yes,
- have_libsystemd_login=no)
+PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd >= 209], [have_libsystemd_login=yes],
+ [PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 44 libsystemd-daemon],
+ [have_libsystemd_login=yes],
+ [have_libsystemd_login=no])])
AM_CONDITIONAL(HAVE_LIBSYSTEMD_LOGIN, test x$have_libsystemd_login = xyes)
if test "x$have_libsystemd_login" = "xyes"; then
AC_DEFINE([HAVE_LIBSYSTEMD_LOGIN], 1, [Define to 1 if libsystemd-login is available])
--
2.1.1
Description: Mount drives in /media, not /run/media/, to stay FHS compatible. As on Debian and Ubuntu /media is not currently a tmpfs, we need to put the "mounted-fs" file to a persistent path as well.
Author: Martin Pitt <martin.pitt@ubuntu.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51709
Bug-Debian: http://bugs.debian.org/680403
Bug-Ubuntu: https://launchpad.net/bugs/1020759
Index: udisks2/src/udiskslinuxfilesystem.c
===================================================================
--- udisks2.orig/src/udiskslinuxfilesystem.c 2013-03-21 07:44:19.320207135 +0100
+++ udisks2/src/udiskslinuxfilesystem.c 2013-03-21 07:44:19.308207134 +0100
@@ -877,26 +877,26 @@
}
/* If we know the user-name and it doesn't have any '/' character in
- * it, mount in /run/media/$USER
+ * it, mount in /media/$USER
*/
if (!fs_shared && (user_name != NULL && strstr (user_name, "/") == NULL))
{
- mount_dir = g_strdup_printf ("/run/media/%s", user_name);
+ mount_dir = g_strdup_printf ("/media/%s", user_name);
if (!g_file_test (mount_dir, G_FILE_TEST_EXISTS))
{
- /* First ensure that /run/media exists */
- if (!g_file_test ("/run/media", G_FILE_TEST_EXISTS))
+ /* First ensure that /media exists */
+ if (!g_file_test ("/media", G_FILE_TEST_EXISTS))
{
- if (g_mkdir ("/run/media", 0755) != 0)
+ if (g_mkdir ("/media", 0755) != 0)
{
g_set_error (error,
UDISKS_ERROR,
UDISKS_ERROR_FAILED,
- "Error creating directory /run/media: %m");
+ "Error creating directory /media: %m");
goto out;
}
}
- /* Then create the per-user /run/media/$USER */
+ /* Then create the per-user /media/$USER */
if (g_mkdir (mount_dir, 0700) != 0)
{
g_set_error (error,
Index: udisks2/src/udisksstate.c
===================================================================
--- udisks2.orig/src/udisksstate.c 2013-03-21 07:44:19.320207135 +0100
+++ udisks2/src/udisksstate.c 2013-03-21 07:44:19.312207135 +0100
@@ -2235,7 +2235,10 @@
* - could also mmap the file
*/
- path = g_strdup_printf ("/run/udisks2/%s", key);
+ if (strcmp (key, "mounted-fs") == 0)
+ path = g_strdup_printf ("/var/lib/udisks2/%s", key);
+ else
+ path = g_strdup_printf ("/run/udisks2/%s", key);
/* see if it's already in the cache */
ret = g_hash_table_lookup (state->cache, path);
@@ -2301,7 +2304,10 @@
data = g_malloc (size);
g_variant_store (normalized, data);
- path = g_strdup_printf ("/run/udisks2/%s", key);
+ if (strcmp (key, "mounted-fs") == 0)
+ path = g_strdup_printf ("/var/lib/udisks2/%s", key);
+ else
+ path = g_strdup_printf ("/run/udisks2/%s", key);
g_hash_table_insert (state->cache, g_strdup (path), g_variant_ref (value));
00git_test_fixes.patch
# Debian patches for udisks
mount_in_media.patch
unsupported_acls.patch
#libsystemd.patch
Description: Some file systems, such as ext2/ext3 that were created a few years ago, do not support ACLs. As long as we do not have /media on a tmpfs, ignore failures to set the ACL on /media/<user> and fall back to chowning the directory to the target user.
Bug-Ubuntu: https://launchpad.net/bugs/1048059
Index: udisks2/src/udiskslinuxfilesystem.c
===================================================================
--- udisks2.orig/src/udiskslinuxfilesystem.c 2013-03-21 07:45:01.404209172 +0100
+++ udisks2/src/udiskslinuxfilesystem.c 2013-03-21 07:45:01.400209172 +0100
@@ -802,12 +802,10 @@
acl_calc_mask (&acl) == -1 ||
acl_set_file (path, ACL_TYPE_ACCESS, acl) == -1)
{
- g_set_error (error,
- G_IO_ERROR,
- g_io_error_from_errno (errno),
+ udisks_warning(
"Adding read ACL for uid %d to `%s' failed: %m",
(gint) uid, path);
- goto out;
+ chown(path, uid, -1);
}
ret = TRUE;
#!/usr/bin/make -f
%:
dh $@ --with gir,autoreconf
override_dh_auto_configure:
dh_auto_configure -- \
--with-systemdsystemunitdir="" \
--enable-gtk-doc
override_dh_auto_build:
dh_auto_build
# make -C po udisks.pot
override_dh_auto_install:
dh_auto_install
# install Apport hook on Ubuntu
if dpkg-vendor --is ubuntu; then \
install -m 644 -D debian/local/apport-hook.py debian/udisks2/usr/share/apport/package-hooks/udisks2.py; \
fi
override_dh_install:
dh_install -X.la --fail-missing
Tests: upstream-system
Depends: @, python3-gi, gir1.2-glib-2.0, reiserfsprogs, xfsprogs, ntfs-3g, dosfstools, lvm2, mdadm, cryptsetup-bin, kpartx, libatasmart-bin, policykit-1, dbus-x11
Restrictions: needs-root isolation-machine
#!/bin/sh
set -e
# succeeding test must not write anything to stderr, as per DEP-8
mkdir -p /var/run/udisks2
src/tests/integration-test 2>&1
etc/
lib/udev/
usr/bin/
usr/sbin/* /sbin/
usr/lib/udisks2/
usr/share/bash-completion/
usr/share/dbus-1/
usr/share/locale/
usr/share/man/
usr/share/polkit-1/
debian/local/udisks2-inhibit usr/lib/udisks2/
udisks2: binary-without-manpage sbin/umount.udisks2
rm_conffile /etc/bash_completion.d/udisksctl-bash-completion.sh 2.0.0-1~
#!/bin/sh
set -e
get_pid() {
[ -n "$1" ] || return 0
[ -S /var/run/dbus/system_bus_socket ] || return 0
dbus-send --system --dest=org.freedesktop.DBus --print-reply \
/org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
string:$1 2>/dev/null | awk '/uint32/ {print $2}'
}
if [ "$1" = "configure" ]; then
# stop udisksd
pid=$(get_pid org.freedesktop.UDisks2)
kill $pid 2>/dev/null || true
# in that version, the mounted-fs file moved
if dpkg --compare-versions "$2" lt-nl "1.99.0-4" &&
[ -e /run/udisks2/mounted-fs ] &&
[ -d /var/lib/udisks2 ] &&
[ ! -e /var/lib/udisks2/mounted-fs ]; then
mv /run/udisks2/mounted-fs /var/lib/udisks2/
fi
# restart daemon if it was running before
[ -z "$pid" ] || udisksctl status >/dev/null || true # will trigger through D-Bus activation
# we ship udev rules, so trigger an update
udevadm trigger --subsystem-match=block --action=change
fi
#DEBHELPER#
#!/bin/sh
set -e
get_pid() {
[ -n "$1" ] || return 0
[ -S /var/run/dbus/system_bus_socket ] || return 0
dbus-send --system --dest=org.freedesktop.DBus --print-reply \
/org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
string:$1 2>/dev/null | awk '/uint32/ {print $2}'
}
if [ "$1" = "remove" ]; then
kill $(get_pid org.freedesktop.UDisks2) 2>/dev/null || true
fi
#DEBHELPER#
version=3
http://udisks.freedesktop.org/releases/udisks-(.*).tar.bz2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment