From 167dc4818be99d467783658815e4097e49f5b610 Mon Sep 17 00:00:00 2001 From: mgb01105731 Date: Fri, 11 Apr 2025 10:48:10 +0800 Subject: [PATCH] - to #IC0CGQ - Disable glusterfs-glusterfs and Rebuild with python3.11 - Project: TC2024080204 - Signed-off-by: mgb01105731 --- glusterfs.spec | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/glusterfs.spec b/glusterfs.spec index 28c4f5d..1f92f1f 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -1,5 +1,6 @@ -%define anolis_release 1 - +%define anolis_release 2 +# # Disabled by OpenAnolis +%define enable_ganesha 0 %global _hardened_build 1 %{?_with_asan:%global _with_asan --enable-asan} @@ -244,6 +245,7 @@ This package provides support to FUSE based clients and includes the glusterfs and glusterfsd binaries. %if ( 0%{!?_without_server:1} ) +%if %{enable_ganesha} %package ganesha Summary: NFS-Ganesha configuration Group: Applications/File @@ -271,6 +273,7 @@ Much of the code in GlusterFS is in user space and easily manageable. This package provides the configuration and related files for using NFS-Ganesha as the NFS server using GlusterFS %endif +%endif %if ( 0%{!?_without_georeplication:1} ) %package geo-replication @@ -529,6 +532,7 @@ Requires: python3-pyxattr %if (0%{?_with_valgrind:1}) Requires: valgrind %endif +Obsoletes: glusterfs-ganesha %description server GlusterFS is a distributed file-system capable of scaling to several @@ -656,11 +660,18 @@ install -D -p -m 0644 extras/glusterfs-logrotate \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterfs %if ( 0%{!?_without_server:1} ) +%if %{enable_ganesha} mkdir -p %{buildroot}%{_sysconfdir}/ganesha touch %{buildroot}%{_sysconfdir}/ganesha/ganesha-ha.conf mkdir -p %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ touch %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha.conf touch %{buildroot}%{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf +%else +rm -f %{buildroot}%{_sysconfdir}/ganesha/ganesha-ha.conf.sample +rm -f %{buildroot}%{_libexecdir}/ganesha/* +rm -f %{buildroot}%{_prefix}/lib/ocf/resource.d/heartbeat/* +rm -f %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh +%endif %endif %if ( 0%{!?_without_georeplication:1} ) @@ -693,7 +704,7 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid %generate_compatibility_deps # remove unexpected abi files rm -f %{buildroot}%{abidir}/{addr.dump,afr.dump,api.dump,arbiter.dump,barrier.dump,bit-rot.dump,bitrot-stub.dump,cdc.dump,changelog.dump,client.dump,cloudsync.dump,cloudsynccvlt.dump,cloudsyncs3.dump,delay-gen.dump,dht.dump,ec.dump,error-gen.dump,fuse.dump,gfid-access.dump,glusterd.dump,index.dump,io-cache.dump,io-stats.dump,io-threads.dump,leases.dump,locks.dump,login.dump,marker.dump,md-cache.dump,meta.dump,namespace.dump,nl-cache.dump,nufa.dump,open-behind.dump,posix-acl.dump,posix.dump,quick-read.dump,quiesce.dump,quota.dump,quotad.dump,read-ahead.dump,read-only.dump,readdir-ahead.dump,sdfs.dump,selinux.dump,server.dump,shard.dump,simple-quota.dump,sink.dump,snapview-client.dump,snapview-server.dump,socket.dump,switch.dump,template.dump,thin-arbiter.dump,trace.dump,trash.dump,upcall.dump,utime.dump,worm.dump,write-behind.dump} -rm -f %{buildroot}/usr/sbin/__pycache__/conf.cpython-310.pyc +rm -f %{buildroot}/usr/sbin/__pycache__/conf.cpython-311.pyc %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) %if "%{bashcompdir}" == "" @@ -713,12 +724,14 @@ exit 0 %endif %if ( 0%{!?_without_server:1} ) +%if %{enable_ganesha} %post ganesha if [ $1 -eq 1 ]; then %selinux_set_booleans ganesha_use_fusefs=1 fi exit 0 %endif +%endif %if ( 0%{!?_without_georeplication:1} ) %post geo-replication @@ -843,12 +856,14 @@ exit 0 %endif %if ( 0%{!?_without_server:1} ) +%if %{enable_ganesha} %postun ganesha if [ $1 -eq 0 ]; then %selinux_unset_booleans ganesha_use_fusefs=1 fi exit 0 %endif +%endif %if ( 0%{!?_without_georeplication:1} ) %postun geo-replication @@ -859,10 +874,12 @@ exit 0 %endif %if ( 0%{!?_without_server:1} ) +%if %{enable_ganesha} %triggerun ganesha -- selinux-policy-targeted semanage boolean -m ganesha_use_fusefs --on -S targeted exit 0 %endif +%endif %files %{!?_licensedir:%global license %%doc} @@ -1023,6 +1040,7 @@ exit 0 %if ( 0%{!?_without_server:1} ) +%if %{enable_ganesha} %files ganesha %dir %{_libexecdir}/ganesha %{_sysconfdir}/ganesha/ganesha-ha.conf.sample @@ -1034,6 +1052,7 @@ exit 0 %ghost %attr(0644,-,-) %config(noreplace) %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha.conf %ghost %attr(0644,-,-) %config(noreplace) %{_localstatedir}/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf %endif +%endif %if ( 0%{!?_without_georeplication:1} ) %files geo-replication @@ -1262,5 +1281,8 @@ exit 0 %doc ChangeLog INSTALL README.md THANKS COMMITMENT %changelog +* Fri Apr 11 2025 mgb01105731 - 11.0-2 +- Disable glusterfs-ganesha and Rebuild with python3.11 + * Thu Mar 16 2023 Chunmei Xu - 11.0-1 - init from upstream -- Gitee