Accepting request 591809 from home:hauky:branches:filesystems
- rename binary backup to afs_backup. - rename man pages and prefix "backup" in content - prefix "scout" by "afs_" in man-page - remove unnecessary macro indirection %ARCH - replace hard-coded paths by macros - make whitespace more consistent - minor syntax and typo fixes OBS-URL: https://build.opensuse.org/request/show/591809 OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=4
This commit is contained in:
parent
b3066963ed
commit
45ef8e8161
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 28 05:39:53 UTC 2018 - christof.hanke@mpcdf.mpg.de
|
||||
|
||||
- rename binary backup to afs_backup.
|
||||
- rename man pages and prefix "backup" in content
|
||||
- prefix "scout" by "afs_" in man-page
|
||||
- remove unnecessary macro indirection %ARCH
|
||||
- replace hard-coded paths by macros
|
||||
- make whitespace more consistent
|
||||
- minor syntax and typo fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 18 23:34:56 UTC 2018 - jengelh@inai.de
|
||||
|
||||
|
188
openafs.spec
188
openafs.spec
@ -19,7 +19,7 @@
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
#
|
||||
@ -34,10 +34,7 @@
|
||||
|
||||
#kerberos5
|
||||
# 0=MIT | 1=Heimdal
|
||||
%define option_heimdal 0
|
||||
|
||||
# clean build-root after build
|
||||
%define option_clean_buildroot 0
|
||||
%define option_heimdal 0
|
||||
|
||||
# build authlibs
|
||||
%define build_authlibs 1
|
||||
@ -108,8 +105,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# GENERAL BuildRequires and Requires
|
||||
#
|
||||
|
||||
%if %{_vendor} == "suse"
|
||||
%define ARCH %{_arch}
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
BuildRequires: coreutils
|
||||
@ -126,10 +121,10 @@ Requires(post): %fillup_prereq
|
||||
|
||||
%if %{option_heimdal}
|
||||
BuildRequires: heimdal-devel
|
||||
%define krb5_config /usr/lib/heimdal/bin/krb5-config
|
||||
%define krb5_config /usr/lib/heimdal/bin/krb5-config
|
||||
%else
|
||||
BuildRequires: krb5-devel
|
||||
%define krb5_config /usr/lib/mit/bin/krb5-config
|
||||
%define krb5_config /usr/lib/mit/bin/krb5-config
|
||||
%endif
|
||||
|
||||
%if %{build_kernel_modules}
|
||||
@ -142,7 +137,6 @@ BuildRequires: module-init-tools
|
||||
BuildRequires: fuse-devel
|
||||
BuildRequires: pkg-config
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
AFS is a cross-platform distributed file system product pioneered at
|
||||
@ -369,7 +363,7 @@ and load balancing, and ACLs. This package contains the OpenAFS client.
|
||||
%else
|
||||
: @@@ krb5 : mit
|
||||
%endif
|
||||
: @@@ ARCH: %{ARCH}
|
||||
: @@@ architecture: %{_arch}
|
||||
: @@@ target cpu: %{_target_cpu}
|
||||
: @@@
|
||||
: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
@ -397,7 +391,7 @@ done
|
||||
%endif
|
||||
|
||||
%build
|
||||
sysbase=%{ARCH}
|
||||
sysbase=%{_arch}
|
||||
%ifarch ppc
|
||||
perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.ppc_linux24.in
|
||||
%endif
|
||||
@ -429,14 +423,14 @@ export LDFLAGS="$LDFLAGS -m64"
|
||||
%endif
|
||||
|
||||
%configure \
|
||||
--disable-transarc-paths \
|
||||
--disable-pam \
|
||||
--disable-strip-binaries \
|
||||
--includedir=%{_includedir}/openafs \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--with-afs-sysname=$afs_sysname \
|
||||
--disable-kernel-module
|
||||
--disable-transarc-paths \
|
||||
--disable-pam \
|
||||
--disable-strip-binaries \
|
||||
--includedir=%{_includedir}/openafs \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--with-afs-sysname=$afs_sysname \
|
||||
--disable-kernel-module
|
||||
|
||||
make CCFLAGS="$CFLAGS" XCFLAGS="$CFLAGS" PAM_CFLAGS="$CFLAGS" KOPTS="$CFLAGS" all_nolibafs
|
||||
make CCFLAGS="$CFLAGS" XCFLAGS="$CFLAGS" PAM_CFLAGS="$CFLAGS" KOPTS="$CFLAGS" only_libafs_tree
|
||||
@ -453,8 +447,8 @@ for flavor in %flavors_to_build; do
|
||||
rm -rf obj/$flavor
|
||||
cp -a libafs_tree obj/$flavor
|
||||
pushd obj/$flavor
|
||||
./configure --with-linux-kernel-build=/usr/src/linux-obj/%{ARCH}/$flavor --with-linux-kernel-headers=/usr/src/linux \
|
||||
--disable-transarc-paths
|
||||
./configure --with-linux-kernel-build=/usr/src/linux-obj/%{_arch}/$flavor --with-linux-kernel-headers=/usr/src/linux \
|
||||
--disable-transarc-paths
|
||||
make
|
||||
popd
|
||||
done
|
||||
@ -465,7 +459,7 @@ done
|
||||
#
|
||||
# install build binaries using make
|
||||
|
||||
make DESTDIR="%{buildroot}" install_nolibafs
|
||||
make DESTDIR=%{buildroot} install_nolibafs
|
||||
|
||||
#
|
||||
# man-pages
|
||||
@ -475,29 +469,6 @@ cd doc/man-pages
|
||||
%make_install
|
||||
cd $OLD_PWD
|
||||
|
||||
# remove unused man pages
|
||||
for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
|
||||
dkload knfs package runntp symlink symlink_list symlink_make \
|
||||
symlink_remove; do
|
||||
rm -f %{buildroot}/%{_mandir}/man1/${x}.1
|
||||
done
|
||||
|
||||
# compress man pages
|
||||
OLD_PWD=`pwd`
|
||||
for d in %{buildroot}/%{_mandir}/man*;do
|
||||
cd $d
|
||||
for f in *;do
|
||||
if [ -h $f ]; then
|
||||
mv $f $f.gz
|
||||
elif [ -f $f ];then
|
||||
gzip -9 $f
|
||||
else
|
||||
echo "Unknown thing to compress : $f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
cd $OLD_PWD
|
||||
|
||||
#
|
||||
# create directories
|
||||
mkdir -p %{buildroot}/%_unitdir
|
||||
@ -505,7 +476,7 @@ mkdir -p %{buildroot}/%{afslogsdir}/old
|
||||
mkdir -p %{buildroot}/%{_fillupdir}
|
||||
mkdir -p %{buildroot}/%{vicecachedir}
|
||||
mkdir -p %{buildroot}/%{viceetcdir}
|
||||
mkdir -p %{buildroot}/usr/share/openafs/C
|
||||
mkdir -p %{buildroot}%{_datadir}/openafs/C
|
||||
mkdir -p %{buildroot}/%{afsconfdir}
|
||||
mkdir -p %{buildroot}/%{afslocaldir}
|
||||
|
||||
@ -516,25 +487,25 @@ cp -a %{S:55} %{buildroot}/%{viceetcdir}/SuidCells
|
||||
cp -a %{S:56} %{buildroot}/%{viceetcdir}/CellAlias
|
||||
cp -a %{S:57} %{buildroot}/%{viceetcdir}/ThisCell
|
||||
cp -a %{S:58} %{buildroot}/%{viceetcdir}/cacheinfo
|
||||
cp -a src/afs/afszcm.cat %{buildroot}/usr/share/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:23} %{buildroot}/%_unitdir
|
||||
ln -s /usr/sbin/service %{buildroot}/%{_sbindir}/rcopenafs-client
|
||||
ln -s %{_sbindir}//service %{buildroot}/%{_sbindir}/rcopenafs-client
|
||||
|
||||
#
|
||||
# fuse client package
|
||||
|
||||
%if %{build_fuse_client}
|
||||
install -m 644 %{S:29} %{buildroot}/%{_fillupdir}/sysconfig.openafs-fuse-client
|
||||
install -m 644 %{S:26} %{buildroot}/%_unitdir
|
||||
ln -s /usr/sbin/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client
|
||||
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client
|
||||
%endif
|
||||
|
||||
#
|
||||
# server
|
||||
install -m 644 %{S:28} %{buildroot}/%{_fillupdir}/sysconfig.openafs-server
|
||||
install -m 644 %{S:25} %{buildroot}/%_unitdir
|
||||
ln -s /usr/sbin/service %{buildroot}/%{_sbindir}/rcopenafs-server
|
||||
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-server
|
||||
|
||||
#
|
||||
# kernel-source
|
||||
mkdir -p %{buildroot}/usr/src/kernel-modules/openafs
|
||||
@ -546,13 +517,13 @@ install -m 644 LICENSE %{buildroot}/usr/src/kernel-modules/openafs/LICENSE
|
||||
|
||||
# KMP
|
||||
%if %{build_kernel_modules}
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=updates
|
||||
export INSTALL_MOD_PATH=%{buildroot}
|
||||
export INSTALL_MOD_DIR=updates
|
||||
|
||||
for flavor in %flavors_to_build; do
|
||||
make -C /usr/src/linux-obj/%{ARCH}/$flavor modules_install \
|
||||
M=$PWD/`find obj/$flavor/ -name MODLOAD-\* -type d`
|
||||
done
|
||||
for flavor in %flavors_to_build; do
|
||||
make -C /usr/src/linux-obj/%{_arch}/$flavor modules_install \
|
||||
M=$PWD/`find obj/$flavor/ -name MODLOAD-\* -type d`
|
||||
done
|
||||
%endif
|
||||
|
||||
#
|
||||
@ -569,9 +540,18 @@ mv %{buildroot}/%{_bindir}/bos %{buildroot}/%{_sbindir}/bos
|
||||
mv %{buildroot}/%{_bindir}/akeyconvert %{buildroot}/%{_sbindir}/akeyconvert
|
||||
mv %{buildroot}/%{_bindir}/udebug %{buildroot}/%{_sbindir}/udebug
|
||||
|
||||
# avoid conflict with scout
|
||||
mv %{buildroot}/usr/bin/scout %{buildroot}/usr/bin/afs_scout
|
||||
mv %{buildroot}/%{_mandir}/man1/scout.1.gz %{buildroot}/%{_mandir}/man1/afs_scout.1.gz
|
||||
# avoid conflicts with other packages by adding the prefix afs_ to filenames
|
||||
mv %{buildroot}%{_bindir}/scout %{buildroot}%{_bindir}/afs_scout
|
||||
cat %{buildroot}/%{_mandir}/man1/scout.1 | sed 's/\<scout\>/afs_scout/g' > %{buildroot}/%{_mandir}/man1/afs_scout.1
|
||||
rm %{buildroot}/%{_mandir}/man1/scout.1
|
||||
mv %{buildroot}%{_sbindir}/backup %{buildroot}%{_sbindir}/afs_backup
|
||||
OLD_PWD=`pwd`
|
||||
cd %{buildroot}/%{_mandir}/man8/
|
||||
for f in $(ls backup*); do
|
||||
cat $f | sed 's/\<backup\>/afs_backup/g' > afs_"$f"
|
||||
rm $f
|
||||
done
|
||||
cd $OLD_PWD
|
||||
|
||||
# move %%{_libdir}/afs-stuff to %%{_libdir}/openafs
|
||||
mv %{buildroot}/%{_libdir}/afs/* %{buildroot}/%{_libdir}/openafs
|
||||
@ -582,20 +562,16 @@ rm -rf %{buildroot}/%{_libdir}/afs
|
||||
# general cleanup
|
||||
#
|
||||
|
||||
# it's already in /usr/bin
|
||||
rm -f %{buildroot}/usr/{%sbindir}/kpwvalid
|
||||
# we supposedly don't need this one on linux
|
||||
rm -f %{buildroot}/%{_sbindir}/rmtsysd
|
||||
rm -f %{buildroot}/%{_mandir}/man8/rmtsysd.8.gz
|
||||
rm -f %{buildroot}/%{_mandir}/man8/xfs_size_check.8.gz
|
||||
rm -f %{buildroot}/%{_mandir}/man1/dlog.1.gz
|
||||
# we supposedly don't need this on linux
|
||||
rm %{buildroot}/%{_sbindir}/rmtsysd
|
||||
|
||||
%if %{build_authlibs} == 0
|
||||
rm -f %{buildroot}/%{_libdir}/libafsauthent.so.*
|
||||
rm -f %{buildroot}/%{_libdir}/libafsrpc.so.*
|
||||
rm -f %{buildroot}/%{_libdir}/libkopenafs.so.*
|
||||
rm -f %{buildroot}/%{_libdir}/libafsauthent.so
|
||||
rm -f %{buildroot}/%{_libdir}/libafsrpc.so
|
||||
rm -f %{buildroot}/%{_libdir}/libkopenafs.so
|
||||
rm %{buildroot}/%{_libdir}/libafsauthent.so.*
|
||||
rm %{buildroot}/%{_libdir}/libafsrpc.so.*
|
||||
rm %{buildroot}/%{_libdir}/libkopenafs.so.*
|
||||
rm %{buildroot}/%{_libdir}/libafsauthent.so
|
||||
rm %{buildroot}/%{_libdir}/libafsrpc.so
|
||||
rm %{buildroot}/%{_libdir}/libkopenafs.so
|
||||
%endif
|
||||
|
||||
# check for duplicates, remove them and link them
|
||||
@ -604,6 +580,30 @@ rm -f %{buildroot}/%{_mandir}/man1/dlog.1.gz
|
||||
# remove all static libraries
|
||||
find %{buildroot} -type f -name "*.a" -delete
|
||||
|
||||
# remove unused man pages
|
||||
for x in dlog symlink symlink_list symlink_make symlink_remove; do
|
||||
rm %{buildroot}/%{_mandir}/man1/${x}.1
|
||||
done
|
||||
for x in rmtsysd xfs_size_check; do
|
||||
rm %{buildroot}/%{_mandir}/man8/${x}.8
|
||||
done
|
||||
|
||||
# compress man pages
|
||||
OLD_PWD=`pwd`
|
||||
for d in %{buildroot}%{_mandir}/man*; do
|
||||
cd $d
|
||||
for f in *; do
|
||||
if [ -h $f ]; then
|
||||
mv $f $f.gz
|
||||
elif [ -f $f ];then
|
||||
gzip -9 $f
|
||||
else
|
||||
echo "Unknown thing to compress : $f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
cd $OLD_PWD
|
||||
|
||||
#
|
||||
# main
|
||||
|
||||
@ -634,9 +634,9 @@ echo sh ./build-modules.sh install
|
||||
/sbin/ldconfig
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
my_operation=0
|
||||
my_operation=0
|
||||
else
|
||||
my_operation=$1
|
||||
my_operation=$1
|
||||
fi
|
||||
|
||||
if [ $my_operation -gt 1 ]; then
|
||||
@ -673,9 +673,9 @@ fi
|
||||
%service_add_post openafs-client.service
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
my_operation=0
|
||||
my_operation=0
|
||||
else
|
||||
my_operation=$1
|
||||
my_operation=$1
|
||||
fi
|
||||
if [ $my_operation -gt 1 ]; then
|
||||
echo Not stopping the possibly running client.
|
||||
@ -691,7 +691,7 @@ fi
|
||||
|
||||
%postun client
|
||||
if [ -d /afs ]; then
|
||||
echo make sure to remove directory /afs if unwanted.
|
||||
echo make sure to remove directory /afs if unwanted.
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
%service_del_postun openafs-client.service
|
||||
@ -711,9 +711,9 @@ fi
|
||||
%service_add_post openafs-server.service
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
my_operation=0
|
||||
my_operation=0
|
||||
else
|
||||
my_operation=$1
|
||||
my_operation=$1
|
||||
fi
|
||||
if [ $my_operation -gt 1 ]; then
|
||||
echo Not stopping the possibly running services.
|
||||
@ -787,8 +787,8 @@ fi
|
||||
%doc %{_mandir}/man5/sysid.5.gz
|
||||
%doc %{_mandir}/man5/uss.5.gz
|
||||
%doc %{_mandir}/man5/uss_*.5.gz
|
||||
%doc %{_mandir}/man8/backup.8.gz
|
||||
%doc %{_mandir}/man8/backup_*.8.gz
|
||||
%doc %{_mandir}/man8/afs_backup.8.gz
|
||||
%doc %{_mandir}/man8/afs_backup_*.8.gz
|
||||
%doc %{_mandir}/man8/bos.8.gz
|
||||
%doc %{_mandir}/man8/bos_[a-t]*.8.gz
|
||||
%doc %{_mandir}/man8/bos_uninstall.8.gz
|
||||
@ -812,7 +812,7 @@ fi
|
||||
%{_bindir}/xstat_fs_test
|
||||
%{_libdir}/openafs/libafshcrypto.so.*
|
||||
%{_libdir}/openafs/librokenafs.so.*
|
||||
%{_sbindir}/backup
|
||||
%{_sbindir}/afs_backup
|
||||
%{_sbindir}/bos
|
||||
%{_sbindir}/butc
|
||||
%{_sbindir}/fms
|
||||
@ -826,13 +826,13 @@ fi
|
||||
%if %{build_fuse_client}
|
||||
%files fuse_client
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/afsd.fuse
|
||||
%{_sbindir}/afsd.fuse
|
||||
%config(noreplace) %{viceetcdir}/SuidCells
|
||||
%config(noreplace) %{viceetcdir}/cacheinfo
|
||||
%_unitdir/openafs-fuse-client.service
|
||||
%{_sbindir}/rcopenafs-fuse-client
|
||||
/%{_fillupdir}/sysconfig.openafs-fuse-client
|
||||
/%{vicecachedir}
|
||||
%{_sbindir}/rcopenafs-fuse-client
|
||||
%{_fillupdir}/sysconfig.openafs-fuse-client
|
||||
%{vicecachedir}
|
||||
%else
|
||||
%files client
|
||||
%defattr(-,root,root)
|
||||
@ -862,15 +862,15 @@ fi
|
||||
%doc %{_mandir}/man1/copyauth.1.gz
|
||||
%doc %{_mandir}/man5/cacheinfo.5.gz
|
||||
%doc %{_mandir}/man5/afs_cache.5.gz
|
||||
%dir /usr/share/openafs
|
||||
%dir /usr/share/openafs/C
|
||||
/usr/share/openafs/C/afszcm.cat
|
||||
%dir %{_datadir}/openafs
|
||||
%dir %{_datadir}/openafs/C
|
||||
%{_datadir}/openafs/C/afszcm.cat
|
||||
%doc %{_mandir}/man5/afszcm.cat.5.gz
|
||||
%config(noreplace) %{viceetcdir}/SuidCells
|
||||
%config(noreplace) %{viceetcdir}/cacheinfo
|
||||
/usr/sbin/rcopenafs-client
|
||||
/%{_fillupdir}/sysconfig.openafs-client
|
||||
/%{vicecachedir}
|
||||
%{_sbindir}/rcopenafs-client
|
||||
%{_fillupdir}/sysconfig.openafs-client
|
||||
%{vicecachedir}
|
||||
%endif
|
||||
|
||||
%files server
|
||||
|
Loading…
Reference in New Issue
Block a user