fix flatpack issues

This commit is contained in:
Tom spot Callaway 2022-02-16 19:51:56 -05:00
parent 4129df19ad
commit 3363ea45cb

View File

@ -1,6 +1,13 @@
# Need to be specific for flatpak builds, otherwise it'll create rules
# in other directory than /app/etc which will make builds fail.
# On Fedora, this should be the same definition.
%if 0%{?flatpak}
%global _udevrulesdir %{_prefix}/lib/udev/rules.d
%endif
Name: fuse3
Version: 3.10.5
Release: 2%{?dist}
Release: 3%{?dist}
Summary: File System in Userspace (FUSE) v3 utilities
License: GPL+
URL: http://fuse.sf.net
@ -80,7 +87,7 @@ export LC_ALL=en_US.UTF-8
%if ! 0%{?__global_ldflags:1}
%global __global_ldflags ""
%endif
%meson -D udevrulesdir=/etc/udev/rules.d
%meson -D udevrulesdir=%{_udevrulesdir}
%else
%meson
%endif
@ -99,7 +106,7 @@ ninja-build reconfigure
%meson_build
%install
export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}/usr %meson_install
export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}%{_prefix} %meson_install
find %{buildroot} .
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
# change from 4755 to 0755 to allow stripping -- fixed later in files
@ -109,6 +116,11 @@ chmod 0755 %{buildroot}/%{_bindir}/fusermount3
rm -f %{buildroot}/%{_libdir}/*.a
# No need to create init-script
rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3
# This path is hardcoded:
# https://github.com/libfuse/libfuse/blob/master/util/install_helper.sh#L43
# so flatpaks will fail unless we delete it below.
rm -f %{buildroot}/etc/init.d/fuse3
%if 0%{?el6} || 0%{?el7}
# This is in the fuse package on el7 and there's no default on el6
@ -118,8 +130,8 @@ rm -f %{buildroot}%{_sysconfdir}/fuse.conf
install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}
%endif
# Delete pointless udev rules, which do not belong in /usr/lib (brc#748204)
rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
# Delete pointless udev rules (brc#748204)
rm -f %{buildroot}%{_udevrulesdir}/99-fuse3.rules
%if 0%{?el6} || 0%{?el7}
%post -p /sbin/ldconfig libs
@ -138,7 +150,7 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
%{_mandir}/man1/*
%{_mandir}/man8/*
%if 0%{?el6}
%{_sysconfdir}/udev/rules.d/*
%{_udevrulesdir}/*
%endif
%files libs
@ -156,6 +168,9 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
%endif
%changelog
* Wed Feb 16 2022 Tom Callaway <spot@fedoraproject.org> - 3.10.5-3
- fix flatpak issues
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild