- New upstream release - fixes rhbz #1380562

- Adapt shells handling to be atomic and support rpm-ostree - fixes rhbz #1367587
This commit is contained in:
Sven Lankes 2016-10-28 13:30:29 +02:00
parent 8c922a41e9
commit 6e5c294649
3 changed files with 17 additions and 10 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ tmux-1.3.tar.gz
/tmux-2.0.tar.gz /tmux-2.0.tar.gz
/tmux-2.1.tar.gz /tmux-2.1.tar.gz
/tmux-2.2.tar.gz /tmux-2.2.tar.gz
/tmux-2.3.tar.gz

View File

@ -1 +1 @@
bd95ee7205e489c62c616bb7af040099 tmux-2.2.tar.gz fcfd1611d705d8b31df3c26ebc93bd3e tmux-2.3.tar.gz

View File

@ -1,6 +1,6 @@
Name: tmux Name: tmux
Version: 2.2 Version: 2.3
Release: 3%{?dist} Release: 1%{?dist}
Summary: A terminal multiplexer Summary: A terminal multiplexer
Group: Applications/System Group: Applications/System
@ -38,18 +38,20 @@ install -Dpm 644 %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/
%post %post
if [ "$1" = 1 ]; then if [ "$1" = 1 ]; then
if [ ! -f %{_sysconfdir}/shells ] ; then if [ ! -f %{_sysconfdir}/shells ] ; then
echo "%{_bindir}/tmux" > %{_sysconfdir}/shells touch %{_sysconfdir}/shells
echo "/bin/tmux" >> %{_sysconfdir}/shells
else
grep -q "^%{_bindir}/tmux$" %{_sysconfdir}/shells || echo "%{_bindir}/tmux" >> %{_sysconfdir}/shells
grep -q "^/bin/tmux$" %{_sysconfdir}/shells || echo "/bin/tmux" >> %{_sysconfdir}/shells
fi fi
for binpath in %{_bindir} /bin; do
if ! grep -q "^${binpath}/tmux$" %{_sysconfdir}/shells; then
(cat %{_sysconfdir}/shells; echo "$binpath/tmux") > %{_sysconfdir}/shells.new
mv %{_sysconfdir}/shells{.new,}
fi
done
fi fi
%postun %postun
if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then
sed -i '\!^%{_bindir}/tmux$!d' %{_sysconfdir}/shells sed -e '\!^%{_bindir}/tmux$!d' -e '\!^/bin/tmux$!d' < %{_sysconfdir}/shells > %{_sysconfdir}/shells.new
sed -i '\!^/bin/tmux$!d' %{_sysconfdir}/shells mv %{_sysconfdir}/shells{.new,}
fi fi
%files %files
@ -59,6 +61,10 @@ fi
%{_datadir}/bash-completion/completions/tmux %{_datadir}/bash-completion/completions/tmux
%changelog %changelog
* Fri Oct 28 2016 Sven Lankes <sven@lank.es> - 2.3-1
- New upstream release - fixes rhbz #1380562
- Adapt shells handling to be atomic and support rpm-ostree - fixes rhbz #1367587
* Tue May 24 2016 Sven Lankes <sven@lank.es> - 2.2-3 * Tue May 24 2016 Sven Lankes <sven@lank.es> - 2.2-3
- add libutempter-devel as buildrequires to allow writing to utmp - add libutempter-devel as buildrequires to allow writing to utmp
- fixes rhbz #1338936 - fixes rhbz #1338936