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:
Christof Hanke 2018-03-28 06:39:12 +00:00 committed by Git OBS Bridge
parent b3066963ed
commit 45ef8e8161
2 changed files with 105 additions and 94 deletions

View File

@ -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 Sun Mar 18 23:34:56 UTC 2018 - jengelh@inai.de

View File

@ -36,9 +36,6 @@
# 0=MIT | 1=Heimdal # 0=MIT | 1=Heimdal
%define option_heimdal 0 %define option_heimdal 0
# clean build-root after build
%define option_clean_buildroot 0
# build authlibs # build authlibs
%define build_authlibs 1 %define build_authlibs 1
@ -108,8 +105,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# GENERAL BuildRequires and Requires # GENERAL BuildRequires and Requires
# #
%if %{_vendor} == "suse"
%define ARCH %{_arch}
BuildRequires: automake BuildRequires: automake
BuildRequires: bison BuildRequires: bison
BuildRequires: coreutils BuildRequires: coreutils
@ -142,7 +137,6 @@ BuildRequires: module-init-tools
BuildRequires: fuse-devel BuildRequires: fuse-devel
BuildRequires: pkg-config BuildRequires: pkg-config
%endif %endif
%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
@ -369,7 +363,7 @@ and load balancing, and ACLs. This package contains the OpenAFS client.
%else %else
: @@@ krb5 : mit : @@@ krb5 : mit
%endif %endif
: @@@ ARCH: %{ARCH} : @@@ architecture: %{_arch}
: @@@ target cpu: %{_target_cpu} : @@@ target cpu: %{_target_cpu}
: @@@ : @@@
: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ -397,7 +391,7 @@ done
%endif %endif
%build %build
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
@ -453,7 +447,7 @@ for flavor in %flavors_to_build; do
rm -rf obj/$flavor rm -rf obj/$flavor
cp -a libafs_tree obj/$flavor cp -a libafs_tree obj/$flavor
pushd obj/$flavor pushd obj/$flavor
./configure --with-linux-kernel-build=/usr/src/linux-obj/%{ARCH}/$flavor --with-linux-kernel-headers=/usr/src/linux \ ./configure --with-linux-kernel-build=/usr/src/linux-obj/%{_arch}/$flavor --with-linux-kernel-headers=/usr/src/linux \
--disable-transarc-paths --disable-transarc-paths
make make
popd popd
@ -465,7 +459,7 @@ done
# #
# install build binaries using make # install build binaries using make
make DESTDIR="%{buildroot}" install_nolibafs make DESTDIR=%{buildroot} install_nolibafs
# #
# man-pages # man-pages
@ -475,29 +469,6 @@ cd doc/man-pages
%make_install %make_install
cd $OLD_PWD 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 # create directories
mkdir -p %{buildroot}/%_unitdir mkdir -p %{buildroot}/%_unitdir
@ -505,7 +476,7 @@ mkdir -p %{buildroot}/%{afslogsdir}/old
mkdir -p %{buildroot}/%{_fillupdir} mkdir -p %{buildroot}/%{_fillupdir}
mkdir -p %{buildroot}/%{vicecachedir} mkdir -p %{buildroot}/%{vicecachedir}
mkdir -p %{buildroot}/%{viceetcdir} mkdir -p %{buildroot}/%{viceetcdir}
mkdir -p %{buildroot}/usr/share/openafs/C mkdir -p %{buildroot}%{_datadir}/openafs/C
mkdir -p %{buildroot}/%{afsconfdir} mkdir -p %{buildroot}/%{afsconfdir}
mkdir -p %{buildroot}/%{afslocaldir} 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:56} %{buildroot}/%{viceetcdir}/CellAlias
cp -a %{S:57} %{buildroot}/%{viceetcdir}/ThisCell cp -a %{S:57} %{buildroot}/%{viceetcdir}/ThisCell
cp -a %{S:58} %{buildroot}/%{viceetcdir}/cacheinfo 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:27} %{buildroot}/%{_fillupdir}/sysconfig.openafs-client
install -m 644 %{S:23} %{buildroot}/%_unitdir 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 # fuse client package
%if %{build_fuse_client} %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 /usr/sbin/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client
%endif %endif
# #
# server # server
install -m 644 %{S:28} %{buildroot}/%{_fillupdir}/sysconfig.openafs-server install -m 644 %{S:28} %{buildroot}/%{_fillupdir}/sysconfig.openafs-server
install -m 644 %{S:25} %{buildroot}/%_unitdir 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 # kernel-source
mkdir -p %{buildroot}/usr/src/kernel-modules/openafs mkdir -p %{buildroot}/usr/src/kernel-modules/openafs
@ -550,7 +521,7 @@ install -m 644 LICENSE %{buildroot}/usr/src/kernel-modules/openafs/LICENSE
export INSTALL_MOD_DIR=updates export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do for flavor in %flavors_to_build; do
make -C /usr/src/linux-obj/%{ARCH}/$flavor modules_install \ make -C /usr/src/linux-obj/%{_arch}/$flavor modules_install \
M=$PWD/`find obj/$flavor/ -name MODLOAD-\* -type d` M=$PWD/`find obj/$flavor/ -name MODLOAD-\* -type d`
done done
%endif %endif
@ -569,9 +540,18 @@ mv %{buildroot}/%{_bindir}/bos %{buildroot}/%{_sbindir}/bos
mv %{buildroot}/%{_bindir}/akeyconvert %{buildroot}/%{_sbindir}/akeyconvert mv %{buildroot}/%{_bindir}/akeyconvert %{buildroot}/%{_sbindir}/akeyconvert
mv %{buildroot}/%{_bindir}/udebug %{buildroot}/%{_sbindir}/udebug mv %{buildroot}/%{_bindir}/udebug %{buildroot}/%{_sbindir}/udebug
# avoid conflict with scout # avoid conflicts with other packages by adding the prefix afs_ to filenames
mv %{buildroot}/usr/bin/scout %{buildroot}/usr/bin/afs_scout mv %{buildroot}%{_bindir}/scout %{buildroot}%{_bindir}/afs_scout
mv %{buildroot}/%{_mandir}/man1/scout.1.gz %{buildroot}/%{_mandir}/man1/afs_scout.1.gz 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 # move %%{_libdir}/afs-stuff to %%{_libdir}/openafs
mv %{buildroot}/%{_libdir}/afs/* %{buildroot}/%{_libdir}/openafs mv %{buildroot}/%{_libdir}/afs/* %{buildroot}/%{_libdir}/openafs
@ -582,20 +562,16 @@ rm -rf %{buildroot}/%{_libdir}/afs
# general cleanup # general cleanup
# #
# it's already in /usr/bin # we supposedly don't need this on linux
rm -f %{buildroot}/usr/{%sbindir}/kpwvalid rm %{buildroot}/%{_sbindir}/rmtsysd
# 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
%if %{build_authlibs} == 0 %if %{build_authlibs} == 0
rm -f %{buildroot}/%{_libdir}/libafsauthent.so.* rm %{buildroot}/%{_libdir}/libafsauthent.so.*
rm -f %{buildroot}/%{_libdir}/libafsrpc.so.* rm %{buildroot}/%{_libdir}/libafsrpc.so.*
rm -f %{buildroot}/%{_libdir}/libkopenafs.so.* rm %{buildroot}/%{_libdir}/libkopenafs.so.*
rm -f %{buildroot}/%{_libdir}/libafsauthent.so rm %{buildroot}/%{_libdir}/libafsauthent.so
rm -f %{buildroot}/%{_libdir}/libafsrpc.so rm %{buildroot}/%{_libdir}/libafsrpc.so
rm -f %{buildroot}/%{_libdir}/libkopenafs.so rm %{buildroot}/%{_libdir}/libkopenafs.so
%endif %endif
# check for duplicates, remove them and link them # check for duplicates, remove them and link them
@ -604,6 +580,30 @@ rm -f %{buildroot}/%{_mandir}/man1/dlog.1.gz
# remove all static libraries # remove all static libraries
find %{buildroot} -type f -name "*.a" -delete 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 # main
@ -787,8 +787,8 @@ fi
%doc %{_mandir}/man5/sysid.5.gz %doc %{_mandir}/man5/sysid.5.gz
%doc %{_mandir}/man5/uss.5.gz %doc %{_mandir}/man5/uss.5.gz
%doc %{_mandir}/man5/uss_*.5.gz %doc %{_mandir}/man5/uss_*.5.gz
%doc %{_mandir}/man8/backup.8.gz %doc %{_mandir}/man8/afs_backup.8.gz
%doc %{_mandir}/man8/backup_*.8.gz %doc %{_mandir}/man8/afs_backup_*.8.gz
%doc %{_mandir}/man8/bos.8.gz %doc %{_mandir}/man8/bos.8.gz
%doc %{_mandir}/man8/bos_[a-t]*.8.gz %doc %{_mandir}/man8/bos_[a-t]*.8.gz
%doc %{_mandir}/man8/bos_uninstall.8.gz %doc %{_mandir}/man8/bos_uninstall.8.gz
@ -812,7 +812,7 @@ fi
%{_bindir}/xstat_fs_test %{_bindir}/xstat_fs_test
%{_libdir}/openafs/libafshcrypto.so.* %{_libdir}/openafs/libafshcrypto.so.*
%{_libdir}/openafs/librokenafs.so.* %{_libdir}/openafs/librokenafs.so.*
%{_sbindir}/backup %{_sbindir}/afs_backup
%{_sbindir}/bos %{_sbindir}/bos
%{_sbindir}/butc %{_sbindir}/butc
%{_sbindir}/fms %{_sbindir}/fms
@ -831,8 +831,8 @@ fi
%config(noreplace) %{viceetcdir}/cacheinfo %config(noreplace) %{viceetcdir}/cacheinfo
%_unitdir/openafs-fuse-client.service %_unitdir/openafs-fuse-client.service
%{_sbindir}/rcopenafs-fuse-client %{_sbindir}/rcopenafs-fuse-client
/%{_fillupdir}/sysconfig.openafs-fuse-client %{_fillupdir}/sysconfig.openafs-fuse-client
/%{vicecachedir} %{vicecachedir}
%else %else
%files client %files client
%defattr(-,root,root) %defattr(-,root,root)
@ -862,15 +862,15 @@ fi
%doc %{_mandir}/man1/copyauth.1.gz %doc %{_mandir}/man1/copyauth.1.gz
%doc %{_mandir}/man5/cacheinfo.5.gz %doc %{_mandir}/man5/cacheinfo.5.gz
%doc %{_mandir}/man5/afs_cache.5.gz %doc %{_mandir}/man5/afs_cache.5.gz
%dir /usr/share/openafs %dir %{_datadir}/openafs
%dir /usr/share/openafs/C %dir %{_datadir}/openafs/C
/usr/share/openafs/C/afszcm.cat %{_datadir}/openafs/C/afszcm.cat
%doc %{_mandir}/man5/afszcm.cat.5.gz %doc %{_mandir}/man5/afszcm.cat.5.gz
%config(noreplace) %{viceetcdir}/SuidCells %config(noreplace) %{viceetcdir}/SuidCells
%config(noreplace) %{viceetcdir}/cacheinfo %config(noreplace) %{viceetcdir}/cacheinfo
/usr/sbin/rcopenafs-client %{_sbindir}/rcopenafs-client
/%{_fillupdir}/sysconfig.openafs-client %{_fillupdir}/sysconfig.openafs-client
/%{vicecachedir} %{vicecachedir}
%endif %endif
%files server %files server