Update to 1.0.1 (Resolves: #1396430)

/usr/bin/collie is now /usr/bin/dog
Added /usr/sbin/sheepfs and /usr/sbin/shepherd
Revamped systemd spec file, added /etc/sysconfig/sheepdog
This commit is contained in:
Paolo Bonzini 2017-01-09 10:50:12 +01:00
parent c210216b0b
commit 6d9518f7bb
5 changed files with 104 additions and 55 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
*.rpm
/sheepdog-0.2.3.tar.gz
/sheepdog-0.2.4.tar.gz
/collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
/v1.0.1.tar.gz

11
sheepdog Normal file
View File

@ -0,0 +1,11 @@
# use stdout for journal; other possibilities include "default" and "syslog"
SHEEPDOG_LOGDEST=stdout
SHEEPDOG_LOGLEVEL=info
SHEEPDOG_LOGFMT=default
SHEEPDOG_PORT=7000
# --no-sync, --directio, --gateway, --journal, --wq-threads, ...
SHEEPDOG_EXTRA_OPTS=
SHEEPDOG_PATH=/var/lib/sheepdog

View File

@ -1,9 +1,15 @@
[Unit]
Description=Sheepdog QEMU/KVM Block Storage
After=syslog.target
After=network.target
Requires=corosync.service
[Service]
ExecStart=/usr/sbin/sheep -f /var/lib/sheepdog
EnvironmentFile=/etc/sysconfig/sheepdog
ExecStart=/usr/sbin/sheep -f --log level=${SHEEPDOG_LOGLEVEL},dst=${SHEEPDOG_LOGDEST},format=${SHEEPDOG_LOGFMT} $SHEEPDOG_EXTRA_OPTS ${SHEEPDOG_PATH}
#Restart=on-failure
#StartLimitInterval=10s
#StartLimitBurst=3
LimitNOFILE=32768
[Install]
WantedBy=multi-user.target

View File

@ -1,100 +1,130 @@
Name: sheepdog
Summary: The Sheepdog Distributed Storage System for KVM/QEMU
Version: 0.3.0
Release: 11%{?dist}
Summary: The Sheepdog distributed storage system for KVM/QEMU
Version: 1.0.1
Release: 1%{?dist}
License: GPLv2 and GPLv2+
Group: System Environment/Base
URL: http://www.osrg.net/sheepdog
Source0: collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
#get source from github here https://github.com/collie/sheepdog/tarball/v0.3.0
URL: http://sheepdog.github.io/sheepdog
Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz
Source1: sheepdog.service
Patch0: update_cpg_to_cs_defines.patch
Patch1: coroutine-stack-size.patch
Source2: sheepdog
# Runtime bits
Requires: corosync
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd-sysv
%{?systemd_requires}
# Build bits
BuildRequires: autoconf automake systemd-units
BuildRequires: autoconf automake libtool systemd
BuildRequires: corosync corosynclib corosynclib-devel
BuildRequires: userspace-rcu-devel
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# For sheepfs
BuildRequires: fuse-devel
%ifarch x86_64
BuildRequires: yasm
%endif
# corosync not available on ppc/ppc64/ppc64le
%if 0%{?rhel} >= 6
Excludearch: ppc
Excludearch: ppc64
Excludearch: ppc64le
%endif
%description
This package contains the Sheepdog server, and command line tool which offer
a distributed object storage system for KVM.
This package contains the Sheepdog server and the "dog" command line tool,
which offer a distributed object storage system for KVM.
%package devel
Summary: Header files for the Sheepdog distributed storage system
Group: Development/Libraries
License: GPLv2 and GPLv2+
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
This package contains the header files for libsheepdog.
%package libs
Summary: Libraries for the Sheepdog distributed storage system
Group: Applications/File
License: GPLv2 and GPLv2+
%description libs
This package contains the libsheepdog shared library.
%prep
%setup -qn collie-sheepdog-bb41896
%patch0 -p1
%patch1 -p1
%setup -q
%build
./autogen.sh
%{configure} --with-initddir=%{_initrddir}
make %{_smp_mflags}
# TODO: add LTTng-ust support
%{configure} \
--without-initddir \
--without-systemdsystemunitdir \
--disable-static
make %{_smp_mflags} V=1
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}/%{_libdir}/libsheepdog.la
rm -f %{buildroot}/%{_libdir}/libsheepdog.a
mkdir -p %{buildroot}/%{_unitdir}
cp -a %{SOURCE1} %{buildroot}/%{_unitdir}/
## tree fixup
# drop static libs
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_initddir}/sheepdog
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
cp -a %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig
%clean
rm -rf %{buildroot}
%post
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%systemd_post sheepdog.service
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable sheepdog.service > /dev/null 2>&1 || :
/bin/systemctl stop sheepdog.service > /dev/null 2>&1 || :
fi
%systemd_preun sheepdog.service
%triggerun -- sheepdog < 0.2.4-2
/usr/bin/systemd-sysv-convert --save httpd >/dev/null 2>&1 ||:
/sbin/chkconfig --del httpd >/dev/null 2>&1 || :
/bin/systemctl try-restart sheepdog.service >/dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart sheepdog.service >/dev/null 2>&1 || :
fi
%postun
%systemd_postun_with_restart sheepdog.service
%files
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/dog
%{_sbindir}/sheep
%{_sbindir}/collie
#%attr(755,-,-)%config %{_initddir}/sheepdog
%{_sbindir}/sheepfs
%{_sbindir}/shepherd
%{_sysconfdir}/bash_completion.d/dog
%{_unitdir}/sheepdog.service
%config %{_sysconfdir}/sysconfig/sheepdog
%dir %{_localstatedir}/lib/sheepdog
%{_mandir}/man8/sheep.8*
%{_mandir}/man8/dog.8*
%{_mandir}/man8/sheepfs.8*
%files devel
%dir %{_includedir}/sheepdog
%{_includedir}/sheepdog/internal.h
%{_includedir}/sheepdog/list.h
%{_includedir}/sheepdog/sheepdog.h
%{_includedir}/sheepdog/sheepdog_proto.h
%{_includedir}/sheepdog/util.h
%files libs
%{_libdir}/libsheepdog.so
%changelog
* Mon Jan 09 2017 Paolo Bonzini <pbonzini@redhat.com> - 1.0.1-1
- Update to 1.0.1 (Resolves: #1396430)
- /usr/bin/collie is now /usr/bin/dog
- Added /usr/sbin/sheepfs and /usr/sbin/shepherd
- Revamped systemd spec file, added /etc/sysconfig/sheepdog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
9b28dad11926ee52cda15a961d9b54fe collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
SHA512 (v1.0.1.tar.gz) = fc8c90f9631a12032e380f7ad559e18859211df65c7b53a1cf4a64fcf5c85fb4e2f08a9fbb9330f0eb6e67e9848a885af10013bba5f8665f0e2864ea8770bcf8