support PKGSYSTEM_ENABLE_FSYNC (#1052173, #fdo70366)

This commit is contained in:
Rex Dieter 2014-05-21 10:17:40 -05:00
parent c23e5d9afe
commit be619fa497
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,19 @@
diff -up shared-mime-info-1.2/update-mime-database.c.PKGSYSTEM_FSYNC shared-mime-info-1.2/update-mime-database.c
--- shared-mime-info-1.2/update-mime-database.c.PKGSYSTEM_FSYNC 2013-07-09 17:10:53.000000000 -0500
+++ shared-mime-info-1.2/update-mime-database.c 2014-05-21 10:06:54.195566088 -0500
@@ -951,6 +951,7 @@ static gboolean atomic_update(const gcha
new_name = g_strndup(pathname, len - 4);
#ifdef HAVE_FDATASYNC
+ if (g_getenv ("PKGSYSTEM_ENABLE_FSYNC")) {
fd = open(pathname, O_RDONLY);
if (fd == -1)
{
@@ -967,6 +968,7 @@ static gboolean atomic_update(const gcha
set_error_from_errno(error);
goto out;
}
+ }
#endif
#ifdef _WIN32

View File

@ -1,7 +1,7 @@
Summary: Shared MIME information database Summary: Shared MIME information database
Name: shared-mime-info Name: shared-mime-info
Version: 1.3 Version: 1.3
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
URL: http://freedesktop.org/Software/shared-mime-info URL: http://freedesktop.org/Software/shared-mime-info
@ -20,6 +20,10 @@ Source4: shotwell-viewer-defaults.list
# Work-around for https://bugs.freedesktop.org/show_bug.cgi?id=40354 # Work-around for https://bugs.freedesktop.org/show_bug.cgi?id=40354
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
# support PKGSYSTEM_ENABLE_FSYNC
# https://bugs.freedesktop.org/show_bug.cgi?id=70366#c19
Patch1: shared-mime-info-1.2-PKGSYSTEM_FSYNC.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: glib2-devel BuildRequires: glib2-devel
@ -40,6 +44,7 @@ and looking up the correct MIME type in a database.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .ooo-zip %patch0 -p1 -b .ooo-zip
%patch1 -p1 -b .PKGSYSTEM_FSYNC
%build %build
@ -87,6 +92,9 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*
%{_mandir}/man*/* %{_mandir}/man*/*
%changelog %changelog
* Wed May 21 2014 Rex Dieter <rdieter@fedoraproject.org> 1.3-3
- support PKGSYSTEM_ENABLE_FSYNC (#1052173, #fdo70366)
* Tue May 20 2014 Rex Dieter <rdieter@fedoraproject.org> 1.3-2 * Tue May 20 2014 Rex Dieter <rdieter@fedoraproject.org> 1.3-2
- %%configure --disable-silent-rules - %%configure --disable-silent-rules