From e1f198b392c50f3b769bb29b60ef2eb5ae130513d1450a607a61da658cab0cff Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 5 Apr 2017 11:34:03 +0000 Subject: [PATCH] Accepting request 485759 from home:linux4humans:sle11_software:filesystems Fix SLE 11 build after last commit OBS-URL: https://build.opensuse.org/request/show/485759 OBS-URL: https://build.opensuse.org/package/show/filesystems/ntfs-3g_ntfsprogs?expand=0&rev=33 --- ntfs-3g_ntfsprogs.changes | 5 +++++ ntfs-3g_ntfsprogs.spec | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ntfs-3g_ntfsprogs.changes b/ntfs-3g_ntfsprogs.changes index c6c147d..d498403 100644 --- a/ntfs-3g_ntfsprogs.changes +++ b/ntfs-3g_ntfsprogs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 01 10:32:33 UTC 2017 - zenitur@ya.ru + +- Fix SLES 11 build. + ------------------------------------------------------------------- Thu Aug 11 21:39:51 UTC 2016 - Greg.Freemyer@gmail.com diff --git a/ntfs-3g_ntfsprogs.spec b/ntfs-3g_ntfsprogs.spec index 47d59a3..c40bc19 100644 --- a/ntfs-3g_ntfsprogs.spec +++ b/ntfs-3g_ntfsprogs.spec @@ -27,7 +27,8 @@ Release: 0 Source: http://tuxera.com/opensource/%{name}-%{version}.tgz Source2: 21-storage-ntfs-3g.fdi Url: http://www.tuxera.com/community/ntfs-3g-download/ -%if 0%{?sles_version} +# SLES 11 is still supported +%if 0%{?sles_version} && 0%{?suse_version} == 1110 BuildRequires: fuse-devel >= 2.6.0 %else BuildRequires: pkgconfig(fuse) >= 2.6.0 @@ -134,10 +135,15 @@ make install DESTDIR="%buildroot" # Hal stuff for mounting on hotplug. %{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/ %{__install} -m 644 %{SOURCE2} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/21-storage-ntfs-3g.fdi +%if 0%{?sles_version} && 0%{?suse_version} == 1110 +# Touch ghost files +touch %{buildroot}/sbin/mount.ntfs %{buildroot}%{_mandir}/man8/mount.ntfs.8 +%else # Alternatives for mount.ntfs (binary and manpage) mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/mount.ntfs %{buildroot}/sbin/mount.ntfs ln -s -f %{_sysconfdir}/alternatives/mount.ntfs.8%{ext_man} %{buildroot}%{_mandir}/man8/mount.ntfs.8%{?ext_man} +%endif %check TESTFS=$(mktemp) || exit 1 @@ -146,6 +152,15 @@ src/ntfs-3g.probe --readonly $TESTFS src/ntfs-3g.probe --readwrite $TESTFS rm -v $TESTFS +# Workaround old bug in 11.1/11.2 packages that always removed the symlinks in +# %postun. +%if 0%{?sles_version} && 0%{?suse_version} == 1110 +%posttrans -n ntfs-3g +if [ ! -f /sbin/mount.ntfs -a -f /sbin/mount.ntfs-3g ]; then + update-alternatives --install /sbin/mount.ntfs mount.ntfs /sbin/mount.ntfs-3g 10 --slave /usr/share/man/man8/mount.ntfs.8.gz mount.ntfs.8.gz /usr/share/man/man8/mount.ntfs-3g.8.gz +fi +%endif + %post -n ntfs-3g # If the mount.ntfs group is in automatic mode, then this will also switch all # symlinks automatically @@ -175,8 +190,10 @@ fi %{_bindir}/ntfs-3g.usermap %{_bindir}/lowntfs-3g %ghost /sbin/mount.ntfs +%if 0%{?suse_version} > 1110 %ghost %{_sysconfdir}/alternatives/mount.ntfs %ghost %{_sysconfdir}/alternatives/mount.ntfs.8%{?ext_man} +%endif /sbin/mount.ntfs-3g /sbin/mount.lowntfs-3g %{_mandir}/man8/mount.lowntfs-3g.8%{?ext_man}