- Update to 0.7.91

- Use udev callout, disable HAL callouts
- Enable iPhone/iPod Touch support
This commit is contained in:
Bastien Nocera 2010-03-04 14:54:31 +00:00
parent cc817b7437
commit 0d17c11c23
5 changed files with 107 additions and 42 deletions

View File

@ -1 +1 @@
libgpod-0.7.90.tar.gz
libgpod-0.7.91.tar.gz

View File

@ -0,0 +1,85 @@
From bd44ab460a2f0d531df0b6b34176efaf6a0641ac Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 4 Mar 2010 14:47:17 +0000
Subject: [PATCH] Make the temporary mount point configurable
Distributions that use SELinux cannot have libgpod's callouts
mount devices as they wish in random location on the disk.
Instead, we'd use a specific directory, so that the SELinux
rules could be amended for that case.
This patch does not change the default location of the temporary
directory.
---
configure.ac | 15 +++++++++++++++
tools/Makefile.am | 9 +++++++++
tools/generic-callout.c | 2 +-
3 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 14d7135..1d03dcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,6 +203,20 @@ AC_ARG_ENABLE(udev,
AM_CONDITIONAL(USE_UDEV, test x"$enable_udev" = xyes)
AC_SUBST([udevdir], [/lib/udev])
+dnl ***********************************************************************
+dnl * for the udev and hal callouts, we need a temporary directory to
+dnl * mount the iPod to write out its extended info file.
+dnl ***********************************************************************
+
+temp_mount_dir="/tmp/"
+AC_ARG_WITH(temp_mount_dir, AC_HELP_STRING([--with-mount-dir=DIR],
+ [Directory where HAL/udev will create a sub-directory to mount iPods]),,
+ with_temp_mount_dir="$temp_mount_dir")
+TMPMOUNTDIR="$with_temp_mount_dir"
+AC_SUBST(TMPMOUNTDIR)
+AH_TEMPLATE([TMPMOUNTDIR], [Directory where HAL/udev will create a sub-directory to mount iPods])
+AC_DEFINE_UNQUOTED(TMPMOUNTDIR, "$with_temp_mount_dir", [Directory where HAL/udev will create a sub-directory to mount iPods])
+
dnl **************************************************
dnl * TagLib is only used by test-rebuild-db
dnl **************************************************
@@ -393,6 +407,7 @@ Configuration for $PACKAGE $VERSION :
Python bindings ..........: $with_python
PyGObject support ........: $have_pygobject
iPhone/iPod Touch support.: $enable_libimobiledevice
+ Temporary mount directory.: $with_temp_mount_dir
Now type 'make' to build $PACKAGE $VERSION,
and then 'make install' for installation.
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e6334cd..2f8553e 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -90,3 +90,12 @@ ipod_time_sync_CFLAGS=$(SGUTILS_CFLAGS) $(LIBGPOD_CFLAGS)
ipod_time_sync_LDADD=$(SGUTILS_LIBS) $(LIBGPOD_LIBS)
endif
+if USE_UDEV
+install-data-hook:
+ $(MKDIR_P) "$(DESTDIR)$(MOUNTDIR)"
+endif
+if HAVE_HAL
+install-data-hook:
+ $(MKDIR_P) "$(DESTDIR)$(MOUNTDIR)"
+endif
+
diff --git a/tools/generic-callout.c b/tools/generic-callout.c
index b45f6da..b8b617e 100644
--- a/tools/generic-callout.c
+++ b/tools/generic-callout.c
@@ -560,7 +560,7 @@ static char *mount_ipod (const char *dev_path, const char *fstype)
char *tmpname;
int result;
- filename = g_build_filename (g_get_tmp_dir (), "ipodXXXXXX", NULL);
+ filename = g_build_filename (TMPMOUNTDIR, "ipodXXXXXX", NULL);
if (filename == NULL) {
return NULL;
}
--
1.6.6.1

View File

@ -1,26 +0,0 @@
From e8633211edb36d633864a6ee82ad4655984fa732 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Sun, 4 Jan 2009 21:32:14 -0500
Subject: [PATCH] Use /var/run/hald as mount dir for hal callout
This is preferred over /tmp by SELinux.
---
tools/hal-callout.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/hal-callout.c b/tools/hal-callout.c
index e7313fe..4d6044b 100644
--- a/tools/hal-callout.c
+++ b/tools/hal-callout.c
@@ -52,7 +52,7 @@ static char *mount_ipod (const char *dev_path)
if (fstype == NULL) {
return NULL;
}
- filename = g_build_filename (g_get_tmp_dir (), "ipodXXXXXX", NULL);
+ filename = g_build_filename ("/var/run/hald", "ipodXXXXXX", NULL);
if (filename == NULL) {
return NULL;
}
--
1.6.1

View File

@ -2,20 +2,19 @@
Summary: Library to access the contents of an iPod
Name: libgpod
Version: 0.7.90
Version: 0.7.91
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtkpod.org/libgpod.html
Source0: http://downloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.gz
# See http://www.redhat.com/archives/fedora-selinux-list/2009-January/msg00005.html
Patch0: 0001-Use-var-run-hald-as-mount-dir-for-hal-callout.patch
Patch0: 0001-Make-the-temporary-mount-point-configurable.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: docbook-style-xsl
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
BuildRequires: gettext
BuildRequires: hal-devel
BuildRequires: intltool
BuildRequires: libimobiledevice-devel >= 0.9.7
BuildRequires: libplist-devel >= 1.0
@ -24,12 +23,13 @@ BuildRequires: libxml2-devel
BuildRequires: libxslt
BuildRequires: perl(XML::Parser)
BuildRequires: pygobject2-devel
Buildrequires: python-devel
Buildrequires: python-mutagen
Buildrequires: sg3_utils-devel
Buildrequires: sqlite-devel
Buildrequires: swig
Requires: hal
BuildRequires: python-devel
BuildRequires: python-mutagen
BuildRequires: sg3_utils-devel
BuildRequires: sqlite-devel
BuildRequires: libimobiledevice-devel
BuildRequires: swig
Requires: udev
%description
Libgpod is a library to access the contents of an iPod. It supports playlists,
@ -82,14 +82,14 @@ libgpod library.
%prep
%setup -q
%patch0 -p1 -b .selinux
%patch0 -p1 -b .mount-dir
# remove execute perms on the python examples as they'll be installed in %doc
%{__chmod} -x bindings/python/examples/*.py
%build
%configure --with-hal-callouts-dir=%{_libexecdir}/scripts
%configure --without-hal --enable-udev --with-mount-dir=%{_localstatedir}/run/libgpod
%{__make} %{?_smp_mflags}
@ -115,9 +115,10 @@ libgpod library.
%doc AUTHORS ChangeLog COPYING NEWS README*
%{_bindir}/*
%{_libdir}/*.so.*
%{_libexecdir}/scripts/*
%{_datadir}/hal/fdi/policy/20thirdparty/*.fdi
/lib/udev/iphone-set-info
/lib/udev/ipod-set-info
/lib/udev/rules.d/libgpod.rules
%dir %{_localstatedir}/run/libgpod
%files devel
%defattr(-, root, root, 0755)
@ -142,6 +143,11 @@ libgpod library.
%changelog
* Thu Mar 04 2010 Bastien Nocera <bnocera@redhat.com> 0.7.91-1
- Update to 0.7.91
- Use udev callout, disable HAL callouts
- Enable iPhone/iPod Touch support
* Tue Feb 09 2010 Todd Zullinger <tmz@pobox.com> - 0.7.90-1
- Update to 0.7.90
- Adjust default hal callout path (#547049)

View File

@ -1 +1 @@
b81988f262074a0712362dd10673951c libgpod-0.7.90.tar.gz
172c35369a7013bbf84917b31be758f3 libgpod-0.7.91.tar.gz