Accepting request 593027 from home:hauky:branches:filesystems

- build fuse-client unconditionally.
- do not build KMP on unsupported architectures so that overall
  build succeeds.

OBS-URL: https://build.opensuse.org/request/show/593027
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=6
This commit is contained in:
Christof Hanke 2018-04-03 07:19:18 +00:00 committed by Git OBS Bridge
parent 5a93aebabd
commit 419c541150
2 changed files with 42 additions and 48 deletions

View File

@ -1,4 +1,10 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Apr 2 20:59:53 UTC 2018 - christof.hanke@mpcdf.mpg.de
- build fuse-client unconditionally.
- do not build KMP on unsupported architectures so that overall
build succeeds.
Wed Mar 28 05:39:53 UTC 2018 - christof.hanke@mpcdf.mpg.de Wed Mar 28 05:39:53 UTC 2018 - christof.hanke@mpcdf.mpg.de
- rename binary backup to afs_backup. - rename binary backup to afs_backup.

View File

@ -26,11 +26,7 @@
# TUNABLES # TUNABLES
# #
# # package-wide definitions here
# define distribution and version
#
#distribution-definitions here
#kerberos5 #kerberos5
# 0=MIT | 1=Heimdal # 0=MIT | 1=Heimdal
@ -42,14 +38,11 @@
# build kernel modules # build kernel modules
%define build_kernel_modules 1 %define build_kernel_modules 1
# build fuse-based client
%define build_fuse_client 0
# run regen to create new configure script # run regen to create new configure script
%define run_regen 1 %define run_regen 1
# #
# auto-determined parameters # package internal directories
# #
%define afslogsdir /var/log/openafs %define afslogsdir /var/log/openafs
%define afsconfdir /etc/openafs/server %define afsconfdir /etc/openafs/server
@ -57,6 +50,14 @@
%define vicecachedir /var/cache/openafs %define vicecachedir /var/cache/openafs
%define afslocaldir /var/lib/openafs %define afslocaldir /var/lib/openafs
%ifarch ppc64le ppc64
%define build_kernel_modules 0
%endif
%if %{_arch} == arm
%define build_kernel_modules 0
%endif
# used for %setup only # used for %setup only
# leave upstream tar-balls untouched for integrity checks. # leave upstream tar-balls untouched for integrity checks.
%define upstream_version 1.8.0pre5 %define upstream_version 1.8.0pre5
@ -133,10 +134,8 @@ BuildRequires: kernel-syms
BuildRequires: module-init-tools BuildRequires: module-init-tools
%endif %endif
%if %{build_fuse_client}
BuildRequires: fuse-devel BuildRequires: fuse-devel
BuildRequires: pkg-config BuildRequires: pkg-config
%endif
%description %description
AFS is a cross-platform distributed file system product pioneered at AFS is a cross-platform distributed file system product pioneered at
@ -291,7 +290,6 @@ the openafs package.
%endif %endif
%if %{build_fuse_client}
%package fuse_client %package fuse_client
Summary: OpenAFS FUSE File System Client Summary: OpenAFS FUSE File System Client
Group: System/Filesystems Group: System/Filesystems
@ -315,8 +313,6 @@ data.
This client is using the EXPERIMENTAL FUSE interface on LINUX. This client is using the EXPERIMENTAL FUSE interface on LINUX.
It does not offer authentication etc. It does not offer authentication etc.
%else
%package client %package client
Summary: OpenAFS File System Client Summary: OpenAFS File System Client
Group: System/Filesystems Group: System/Filesystems
@ -341,7 +337,6 @@ In addition, among its features are authentication, encryption,
caching, disconnected operations, replication for higher availability caching, disconnected operations, replication for higher availability
and load balancing, and ACLs. This package contains the OpenAFS client. and load balancing, and ACLs. This package contains the OpenAFS client.
%endif
%prep %prep
@ -357,7 +352,6 @@ and load balancing, and ACLs. This package contains the OpenAFS client.
: @@@ sysconf dir: %{_sysconfdir} : @@@ sysconf dir: %{_sysconfdir}
: @@@ man dir: %{_mandir} : @@@ man dir: %{_mandir}
: @@@ build modules: %{build_kernel_modules} : @@@ build modules: %{build_kernel_modules}
: @@@ build fuse client: %{build_fuse_client}
%if %{option_heimdal} %if %{option_heimdal}
: @@@ krb5 : heimdal : @@@ krb5 : heimdal
%else %else
@ -391,12 +385,18 @@ done
%endif %endif
%build %build
# architecture specific settings
sysbase=%{_arch} sysbase=%{_arch}
%ifarch ppc %ifarch ppc
perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.ppc_linux24.in perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.ppc_linux24.in
%endif %endif
%ifarch ppc64 %ifarch ppc64 ppc64le
sysbase=ppc64 sysbase=ppc64
export LDFLAGS="$LDFLAGS -m64"
%endif
%ifarch armv7l
sysbase=arm
%endif %endif
%ifarch s390x %ifarch s390x
sysbase=s390 sysbase=s390
@ -406,6 +406,7 @@ sysbase=%{_arch}
perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.amd64_linux24.in perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.amd64_linux24.in
perl -pi -e 's,^(XLIBS.*),\1 -lresolv,' src/config/Makefile.amd64_linux24.in perl -pi -e 's,^(XLIBS.*),\1 -lresolv,' src/config/Makefile.amd64_linux24.in
%endif %endif
afs_sysname=${sysbase}_linux26 afs_sysname=${sysbase}_linux26
RPM_OPT_FLAGS=`echo ${RPM_OPT_FLAGS} | sed s/-D_FORTIFY_SOURCE=2//` RPM_OPT_FLAGS=`echo ${RPM_OPT_FLAGS} | sed s/-D_FORTIFY_SOURCE=2//`
@ -418,10 +419,6 @@ export KRB5LIBS='-lcom_err -lkrb5'
%endif %endif
export PATH_KRB5_CONFIG=%{krb5_config} export PATH_KRB5_CONFIG=%{krb5_config}
%ifarch ppc64
export LDFLAGS="$LDFLAGS -m64"
%endif
%configure \ %configure \
--disable-transarc-paths \ --disable-transarc-paths \
--disable-pam \ --disable-pam \
@ -479,6 +476,7 @@ mkdir -p %{buildroot}/%{viceetcdir}
mkdir -p %{buildroot}%{_datadir}/openafs/C mkdir -p %{buildroot}%{_datadir}/openafs/C
mkdir -p %{buildroot}/%{afsconfdir} mkdir -p %{buildroot}/%{afsconfdir}
mkdir -p %{buildroot}/%{afslocaldir} mkdir -p %{buildroot}/%{afslocaldir}
mkdir -p %{buildroot}/%{_sbindir}
# #
# client # client
@ -490,15 +488,13 @@ cp -a %{S:58} %{buildroot}/%{viceetcdir}/cacheinfo
cp -a src/afs/afszcm.cat %{buildroot}%{_datadir}/openafs/C cp -a src/afs/afszcm.cat %{buildroot}%{_datadir}/openafs/C
install -m 644 %{S:27} %{buildroot}/%{_fillupdir}/sysconfig.openafs-client install -m 644 %{S:27} %{buildroot}/%{_fillupdir}/sysconfig.openafs-client
install -m 644 %{S:23} %{buildroot}/%_unitdir install -m 644 %{S:23} %{buildroot}/%_unitdir
ln -s %{_sbindir}//service %{buildroot}/%{_sbindir}/rcopenafs-client ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-client
# #
# fuse client package # fuse client package
%if %{build_fuse_client}
install -m 644 %{S:29} %{buildroot}/%{_fillupdir}/sysconfig.openafs-fuse-client install -m 644 %{S:29} %{buildroot}/%{_fillupdir}/sysconfig.openafs-fuse-client
install -m 644 %{S:26} %{buildroot}/%_unitdir install -m 644 %{S:26} %{buildroot}/%_unitdir
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client
%endif
# #
# server # server
@ -623,14 +619,16 @@ echo sh ./build-modules.sh install
# #
# fuse client # fuse client
%if %{build_fuse_client}
%pre fuse_client %pre fuse_client
%service_add_pre openafs-client.service %service_add_pre openafs-fuse-client.service
%preun fuse_client
%service_del_preun openafs-fuse-client.service
%{stop_on_removal}
%post fuse_client %post fuse_client
%{fillup_only -n openafs-fuse-client} %{fillup_only -n openafs-fuse-client}
%service_add_post openafs-client.service %service_add_post openafs-fuse-client.service
/sbin/ldconfig /sbin/ldconfig
if [ "x$1" = "x" ]; then if [ "x$1" = "x" ]; then
@ -648,16 +646,10 @@ else
echo authentication etc. is not implemented yet in this version. echo authentication etc. is not implemented yet in this version.
fi fi
%preun fuse_client
%service_del_preun openafs-client.service
%{stop_on_removal}
%postun fuse_client %postun fuse_client
%service_del_postun openafs-client.service %service_del_postun openafs-fuse-client.service
/sbin/ldconfig /sbin/ldconfig
%else
# #
# client # client
@ -696,9 +688,6 @@ fi
/sbin/ldconfig /sbin/ldconfig
%service_del_postun openafs-client.service %service_del_postun openafs-client.service
#fuse-client
%endif
# #
# server # server
@ -823,17 +812,17 @@ fi
%{_sbindir}/vos %{_sbindir}/vos
%{_sbindir}/vsys %{_sbindir}/vsys
%if %{build_fuse_client}
%files fuse_client %files fuse_client
%defattr(-,root,root) %defattr(-,root,root)
%{_sbindir}/afsd.fuse %{_sbindir}/afsd.fuse
%{_sbindir}/rcopenafs-fuse-client
%config(noreplace) %{viceetcdir}/SuidCells %config(noreplace) %{viceetcdir}/SuidCells
%config(noreplace) %{viceetcdir}/cacheinfo %config(noreplace) %{viceetcdir}/cacheinfo
%doc %{_mandir}/man8/afsd.fuse.8.gz
%_unitdir/openafs-fuse-client.service %_unitdir/openafs-fuse-client.service
%{_sbindir}/rcopenafs-fuse-client
%{_fillupdir}/sysconfig.openafs-fuse-client %{_fillupdir}/sysconfig.openafs-fuse-client
%{vicecachedir} %{vicecachedir}
%else
%files client %files client
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/fs %{_bindir}/fs
@ -871,7 +860,6 @@ fi
%{_sbindir}/rcopenafs-client %{_sbindir}/rcopenafs-client
%{_fillupdir}/sysconfig.openafs-client %{_fillupdir}/sysconfig.openafs-client
%{vicecachedir} %{vicecachedir}
%endif
%files server %files server
%defattr(-,root,root) %defattr(-,root,root)