SHA256
1
0
forked from pool/openafs

Accepting request 597537 from filesystems

- fdupes: use symlinks instead of hardlinks. Do not fdupe
  /etc and /var

- fix dependencies between packages, so that fuse-client
  can be installed.
- cleanup old sys-v sysconfig files and other minor fixes
- fix unit file for fuse-client

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

OBS-URL: https://build.opensuse.org/request/show/597537
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openafs?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2018-04-19 13:31:10 +00:00 committed by Git OBS Bridge
commit f4d391d977
6 changed files with 76 additions and 299 deletions

View File

@ -11,7 +11,7 @@ EnvironmentFile=/etc/sysconfig/openafs-client
ExecStartPre=/sbin/modprobe libafs
ExecStart=/usr/sbin/afsd $AFSD_ARGS
ExecStartPost=/usr/bin/fs sysname $SYSNAME
ExecStop=/bin/umount /afs
ExecStop=/usr/bin/umount /afs
ExecStop=/usr/sbin/afsd -shutdown
ExecStop=/sbin/rmmod libafs
KillMode=none

View File

@ -7,13 +7,11 @@ Before=remote-fs.target
[Service]
Type=forking
RemainAfterExit=true
EnvironmentFile=/etc/sysconfig/openafs-client
EnvironmentFile=/etc/sysconfig/openafs-fuse-client
ExecStartPre=/bin/chmod 0644 /etc/openafs/CellServDB
ExecStartPre=/sbin/modprobe libafs
ExecStart=/usr/sbin/afsd $AFSD_ARGS
ExecStop=/bin/umount /afs
ExecStop=/etc/openafs/afsd -shutdown
ExecStop=/sbin/rmmod libafs
ExecStart=/usr/sbin/afsd.fuse $AFSD_ARGS
ExecStop=/usr/bin/umount /afs
ExecStop=/usr/sbin/afsd.fuse -shutdown
KillMode=none
[Install]

View File

@ -1,4 +1,24 @@
-------------------------------------------------------------------
Mon Apr 16 15:35:15 UTC 2018 - christof.hanke@mpcdf.mpg.de
- fdupes: use symlinks instead of hardlinks. Do not fdupe
/etc and /var
-------------------------------------------------------------------
Fri Apr 6 10:53:13 UTC 2018 - christof.hanke@mpcdf.mpg.de
- fix dependencies between packages, so that fuse-client
can be installed.
- cleanup old sys-v sysconfig files and other minor fixes
- fix unit file for fuse-client
-------------------------------------------------------------------
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
- rename binary backup to afs_backup.

View File

@ -26,11 +26,7 @@
# TUNABLES
#
#
# define distribution and version
#
#distribution-definitions here
# package-wide definitions here
#kerberos5
# 0=MIT | 1=Heimdal
@ -42,14 +38,11 @@
# build kernel modules
%define build_kernel_modules 1
# build fuse-based client
%define build_fuse_client 0
# run regen to create new configure script
%define run_regen 1
#
# auto-determined parameters
# package internal directories
#
%define afslogsdir /var/log/openafs
%define afsconfdir /etc/openafs/server
@ -57,6 +50,14 @@
%define vicecachedir /var/cache/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
# leave upstream tar-balls untouched for integrity checks.
%define upstream_version 1.8.0pre5
@ -77,8 +78,6 @@ Source3: openafs-%{version}-doc.tar.bz2.md5
Source4: openafs-%{version}-src.tar.bz2.sha256
Source5: openafs-%{version}-doc.tar.bz2.sha256
Source10: README.SUSE.openafs
Source13: sysconfig.openafs-client
Source14: sysconfig.openafs-server
Source15: logrotate.openafs-server
Source16: ld.conf.openafs
Source18: RELNOTES-%{version}
@ -133,10 +132,8 @@ BuildRequires: kernel-syms
BuildRequires: module-init-tools
%endif
%if %{build_fuse_client}
BuildRequires: fuse-devel
BuildRequires: pkg-config
%endif
%description
AFS is a cross-platform distributed file system product pioneered at
@ -262,7 +259,7 @@ Requires: heimdal-tools
%package krb5-mit
Summary: OpenAFS programs to use with krb5
Group: System/Filesystems
Requires: %{name}-client = %{version}
Requires: %{name}-client
Requires: krb5-client
%description krb5-mit
@ -291,18 +288,11 @@ the openafs package.
%endif
%if %{build_fuse_client}
%package fuse_client
Summary: OpenAFS FUSE File System Client
Group: System/Filesystems
Requires: %{name} = %{version}
Requires: %{name}-krb5-mit = %{version}
Conflicts: %{name}-client
Requires: coreutils
Requires: diffutils
Requires: fillup
Requires: grep
Requires: sed
Requires: %{name} = %{version}
%description fuse_client
AFS is a cross-platform distributed file system product pioneered at
@ -315,19 +305,12 @@ data.
This client is using the EXPERIMENTAL FUSE interface on LINUX.
It does not offer authentication etc.
%else
%package client
Summary: OpenAFS File System Client
Group: System/Filesystems
Requires: %{name} = %{version}
Requires: %{name}-kmp
Requires: %{name}-krb5-mit = %{version}
Requires: coreutils
Requires: diffutils
Requires: fillup
Requires: grep
Requires: sed
%description client
AFS is a cross-platform distributed file system product pioneered at
@ -341,7 +324,6 @@ In addition, among its features are authentication, encryption,
caching, disconnected operations, replication for higher availability
and load balancing, and ACLs. This package contains the OpenAFS client.
%endif
%prep
@ -357,7 +339,6 @@ and load balancing, and ACLs. This package contains the OpenAFS client.
: @@@ sysconf dir: %{_sysconfdir}
: @@@ man dir: %{_mandir}
: @@@ build modules: %{build_kernel_modules}
: @@@ build fuse client: %{build_fuse_client}
%if %{option_heimdal}
: @@@ krb5 : heimdal
%else
@ -391,21 +372,28 @@ done
%endif
%build
# architecture specific settings
sysbase=%{_arch}
%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
%ifarch ppc64
sysbase=ppc64
%ifarch ppc64 ppc64le
sysbase=ppc64
export LDFLAGS="$LDFLAGS -m64"
%endif
%ifarch armv7l
sysbase=arm
%endif
%ifarch s390x
sysbase=s390
sysbase=s390
%endif
%ifarch x86_64
sysbase=amd64
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
sysbase=amd64
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
%endif
afs_sysname=${sysbase}_linux26
RPM_OPT_FLAGS=`echo ${RPM_OPT_FLAGS} | sed s/-D_FORTIFY_SOURCE=2//`
@ -418,10 +406,6 @@ export KRB5LIBS='-lcom_err -lkrb5'
%endif
export PATH_KRB5_CONFIG=%{krb5_config}
%ifarch ppc64
export LDFLAGS="$LDFLAGS -m64"
%endif
%configure \
--disable-transarc-paths \
--disable-pam \
@ -479,6 +463,7 @@ mkdir -p %{buildroot}/%{viceetcdir}
mkdir -p %{buildroot}%{_datadir}/openafs/C
mkdir -p %{buildroot}/%{afsconfdir}
mkdir -p %{buildroot}/%{afslocaldir}
mkdir -p %{buildroot}/%{_sbindir}
#
# client
@ -490,15 +475,13 @@ cp -a %{S:58} %{buildroot}/%{viceetcdir}/cacheinfo
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 %{_sbindir}//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 %{_sbindir}/service %{buildroot}/%{_sbindir}/rcopenafs-fuse-client
%endif
#
# server
@ -553,6 +536,10 @@ for f in $(ls backup*); do
done
cd $OLD_PWD
# create manpage for afsd.fuse as a real file
rm %{buildroot}/%{_mandir}/man8/afsd.fuse.8
cp -p %{buildroot}/%{_mandir}/man8/afsd.8 %{buildroot}/%{_mandir}/man8/afsd.fuse.8
# move %%{_libdir}/afs-stuff to %%{_libdir}/openafs
mv %{buildroot}/%{_libdir}/afs/* %{buildroot}/%{_libdir}/openafs
mv %{buildroot}/%{_libdir}/*.* %{buildroot}/%{_libdir}/openafs
@ -574,9 +561,6 @@ rm %{buildroot}/%{_libdir}/libafsrpc.so
rm %{buildroot}/%{_libdir}/libkopenafs.so
%endif
# check for duplicates, remove them and link them
%fdupes %{buildroot}
# remove all static libraries
find %{buildroot} -type f -name "*.a" -delete
@ -604,6 +588,9 @@ for d in %{buildroot}%{_mandir}/man*; do
done
cd $OLD_PWD
# replace duplicates by symlinks
%fdupes -s %{buildroot}/usr
#
# main
@ -611,9 +598,6 @@ cd $OLD_PWD
%postun -p /sbin/ldconfig
#
# kernel-source
%post kernel-source
echo To install the kernel-module, do:
echo cd /usr/src/kernel-modules/openafs
@ -623,14 +607,19 @@ echo sh ./build-modules.sh install
#
# fuse client
%if %{build_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
if [ ! -d /afs ]; then
mkdir /afs
fi
%{fillup_only -n openafs-fuse-client}
%service_add_post openafs-client.service
%service_add_post openafs-fuse-client.service
/sbin/ldconfig
if [ "x$1" = "x" ]; then
@ -648,16 +637,13 @@ else
echo authentication etc. is not implemented yet in this version.
fi
%preun fuse_client
%service_del_preun openafs-client.service
%{stop_on_removal}
%postun fuse_client
%service_del_postun openafs-client.service
%service_del_postun openafs-fuse-client.service
if [ -d /afs ]; then
echo make sure to remove directory /afs if unwanted.
fi
/sbin/ldconfig
%else
#
# client
@ -696,9 +682,6 @@ fi
/sbin/ldconfig
%service_del_postun openafs-client.service
#fuse-client
%endif
#
# server
@ -823,17 +806,17 @@ fi
%{_sbindir}/vos
%{_sbindir}/vsys
%if %{build_fuse_client}
%files fuse_client
%defattr(-,root,root)
%{_sbindir}/afsd.fuse
%{_sbindir}/rcopenafs-fuse-client
%config(noreplace) %{viceetcdir}/SuidCells
%config(noreplace) %{viceetcdir}/cacheinfo
%doc %{_mandir}/man8/afsd.fuse.8.gz
%_unitdir/openafs-fuse-client.service
%{_sbindir}/rcopenafs-fuse-client
%{_fillupdir}/sysconfig.openafs-fuse-client
%{vicecachedir}
%else
%files client
%defattr(-,root,root)
%{_bindir}/fs
@ -871,7 +854,6 @@ fi
%{_sbindir}/rcopenafs-client
%{_fillupdir}/sysconfig.openafs-client
%{vicecachedir}
%endif
%files server
%defattr(-,root,root)

View File

@ -1,144 +0,0 @@
## Path: Network/File systems/AFS client
## Description: AFS client configuration, default mode
## Type: yesno
## Default: no
#
# Set to "yes" if you want to generate CellServDB and ThisCell files
# from THIS_CELL and THIS_CELL_SERVER variables.
# If you want more complicated setting, set REGENERATE_CELL_INFO to "no"
# and edit the files manually.
#
REGENERATE_CELL_INFO="no"
## Type: string
## Default: ""
#
# This cell name
#
THIS_CELL=""
## Type: string
## Default: ""
#
# IP address of afs server for this cell
#
THIS_CELL_SERVER=""
## Type: string
## Default: ""
#
# DNS name of afs server for this cell
#
THIS_CELL_SERVER_NAME=""
## Type: yesno
## Default: yes
#
# Set to "yes" if you want to use data encription (secure, slower)
#
DATA_ENCRYPTION="yes"
## Type: yesno
## Default: yes
#
# Set to "yes" if you want to generate cacheinfo file
#
REGENERATE_CACHE_INFO="yes"
## Type: string
## Default: ""
#
# AFS client configuration options
#
XXLARGE="-stat 8000 -daemons 6 -volumes 256 -files 50000"
XLARGE="-stat 3600 -daemons 5 -volumes 196 -files 50000"
LARGE="-stat 2800 -daemons 5 -volumes 128"
MEDIUM="-stat 2000 -daemons 3 -volumes 70"
SMALL="-stat 300 -daemons 2 -volumes 50"
## Type: yesno
## Default: yes
#
# Instead of mounting the home cell's root.afs volume at the AFS mount
# point (typically /afs) a fake root is constructed from information
# available in the client's CellServDB.
# With this option enabled openafs can start up even on network outage.
#
DYNROOT="yes"
## Type: yesno
## Default: yes
#
# Instead of calling a stat on a mountpoint to a foreign cell,
# return a faked status to the application.
# "ls -l /afs" is the most prominent example for its usefulness.
#
FAKESTAT="yes"
## Type: yesno
## Default: yes
#
# Instead of looking up database server in CellServDB try DNS first.
# With this option enabled openafs can access cells which are not in the packaged CellServDB-file, but
# which do provide the required DNS-information.
#
AFSDB="yes"
## Type: yesno
## Default: yes
#
# use memory-only cache
#
MEMCACHE="yes"
## Type: string(AUTOMATIC)
## Default: AUTOMATIC
#
# if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
# deduced by parition sizes (does not work if your cache is on / or
# /usr or /var) or by machine memory size for memory-only cache,
# otherwise the value in (1k-blocks) specified here will be used.
#
CACHESIZE="AUTOMATIC"
## Type: string(AUTOMATIC,$XXLARGE,$XLARGE,$LARGE,$MEDIUM,$SMALL)
## Default: AUTOMATIC
#
# If you set OPTIONS to "AUTOMATIC", the init script will choose a set
# of options based on the cache size, otherwise the values specified here
# will be used.
#
OPTIONS="AUTOMATIC"
## Type: string(/var/cache/openafs)
## Default: /var/cache/openafs
#
# Path to cache directory, it is recommended to use separate partition.
# It does not work on reiserfs. A valid directory must be specified
# even if memory only cache is used.
# Recommended cache directory is "/var/cache/openafs"
#
CACHEDIR="/var/cache/openafs"
## Type: string(/afs)
## Default: /afs
#
# AFS directory. You should never need to change this
#
AFSDIR=/afs
## Type: yesno
## Default: no
#
# Set to "yes" for a lot of debugging information from afsd. Only
# useful for debugging as it prints _a lot_ of information.
#
VERBOSE="no"
## Type: string
## Default: ""
#
# SYSNAME of client. Used to expand the magic "@sys" in pathes within /afs.
# If left blank, the hardcoded sysname (e.g. amd64_linux26) will be used.
SYSNAME=""

View File

@ -1,79 +0,0 @@
## Path: Network/File systems/AFS server
## Description: AFS server configuration, default mode
## Type: yesno
## Default: no
#
# Set to "yes" if you want to generate the BosConfig file
# from START_DB_SERVERS, START_FILESERVER and accompanying variables.
# If you want more complicated setting, set REGENERATE_BOS_CONFIG to "no"
# and edit the files manually.
#
REGENERATE_BOS_CONFIG="no"
## Type: yesno
## Default: yes
#
# Set to "yes" if you require a NetInfo file before starting the service.
# useful for new installations, where you might forget this issue.
#
REQUIRE_NETINFO="yes"
## Type: yesno
## Default: no
#
# Set to "yes" if want to start the database servers (vlserver,ptserver) on this host.
# Only useful if REGENERATE_BOS_CONFIG is set to 'yes'
#
START_DB_SERVERS="no"
## Type: yesno
## Default: no
#
# Set to "yes" if want to start the fileserver on this host.
# Only useful if REGENERATE_BOS_CONFIG is set to 'yes'
#
START_FILESERVER="no"
## Type: yesno
## Default: no
#
# Set to "yes" if want to start the bosserver in restricted mode on this host.
# Only useful if REGENERATE_BOS_CONFIG is set to 'yes'
#
BOSSERVER_RESTICTED="no"
## Type: string
## Default: ""
#
# Set time to restart the AFS-servers at a given time in the week.
# Leave empty if you don't want to restart the servers at all
# Only useful if REGENERATE_BOS_CONFIG is set to 'yes'
#
BOSSERVER_RESTART_TIME=""
## Type: string
## Default: ""
#
# Set time to check for new server-binaries of the AFS-servers at a given time in the week.
# Leave empty if you don't want to do this automatic restart.
# When upgrading the openafs-servers rpm, running server processes are not restarted automatically.
# Use this to do so automatically.
# Only useful if REGENERATE_BOS_CONFIG is set to 'yes'
#
BOSSERVER_RESTART_FOR_NEWBINARIES_TIME=""
## Type: string
## Default: ""
#
# AFS server configuration options
# command line options how to start the required servers.
# Only useful if REGENERATE_BOS_CONFIG is set to 'yes'
#
BOSSERVER_OPTIONS=""
PTSERVER_OPTIONS=""
VLSERVER_OPTIONS=""
FSSERVER_OPTIONS=""
VOLSERVER_OPTIONS=""
SALVAGER_OPTIONS=""