- don't set xterm function keys in default config (#151556)

- always return 0 in scriptlet (#433882)
- fix pty permissions
- enable utempter support
- link with libtinfo, don't link with libutil
- spec cleanup
epel9
Miroslav Lichvar 17 years ago
parent c2aac5cbbc
commit 6f40f59395

@ -1,25 +0,0 @@
--- screen-3.9.11/Makefile.in.orig 2002-07-17 18:31:21.000000000 -0400
+++ screen-3.9.11/Makefile.in 2002-07-17 18:48:17.000000000 -0400
@@ -73,7 +73,7 @@
install_bin: .version screen
-if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
- $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
+ $(INSTALL) -m 755 screen $(DESTDIR)$(bindir)/$(SCREEN)
-chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
# This doesn't work if $(bindir)/screen is a symlink
-if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
--- screen-3.9.11/configure.in.orig 2002-07-17 18:51:09.000000000 -0400
+++ screen-3.9.11/configure.in 2002-07-17 18:54:50.000000000 -0400
@@ -196,7 +196,10 @@
], LIBS="$LIBS -lsocket -linet";seqptx=1)
oldlibs="$LIBS"
-LIBS="$LIBS -lelf"
+# Humm we don't actually need to link against libelf for linux
+#LIBS="$LIBS -lelf"
+LIBS="$LIBS"
+
AC_CHECKING(SVR4)
AC_TRY_LINK([#include <utmpx.h>
],,

@ -1,20 +0,0 @@
--- screen-3.9.11/Makefile.in.hack Thu Feb 14 14:36:33 2002
+++ screen-3.9.11/Makefile.in Sat Feb 16 11:54:23 2002
@@ -79,7 +79,7 @@
-if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
rm -f $(DESTDIR)$(bindir)/screen
(cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen)
- cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
+ cp $(srcdir)/utf8encodings/?? $(DDESTDIR)$(SCREENENCODINGS)
###############################################################################
install: installdirs install_bin
@@ -95,7 +95,7 @@
installdirs:
# Path leading to ETCSCREENRC and Socketdirectory not checked.
- $(srcdir)/etc/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(SCREENENCODINGS)
+ $(srcdir)/etc/mkinstalldirs $(DESTDIR)$(bindir) $(DDESTDIR)$(SCREENENCODINGS)
cd doc ; $(MAKE) installdirs
uninstall: .version

@ -1,13 +0,0 @@
diff -ur screen-3.9.13/configure.in screen-3.9.13-lhh/configure.in
--- screen-3.9.13/configure.in 2002-08-12 10:34:14.000000000 -0400
+++ screen-3.9.13-lhh/configure.in 2002-12-05 16:54:44.000000000 -0500
@@ -664,6 +664,9 @@
AC_MSG_ERROR(!!! no tgetent - no screen))))))
AC_TRY_RUN([
+
+extern char *tgoto(char *,int,int);
+
main()
{
exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);

@ -1,13 +0,0 @@
diff -ur screen-4.0.1/etc/screenrc screen-4.0.1-lhh/etc/screenrc
--- screen-4.0.1/etc/screenrc 2003-09-18 12:13:03.000000000 -0400
+++ screen-4.0.1-lhh/etc/screenrc 2003-10-24 12:03:22.000000000 -0400
@@ -143,6 +143,9 @@
# hardstatus alwaysignore
# hardstatus alwayslastline "%Lw"
+# Red Hat's normal status line
+hardstatus string "[screen %n%?: %t%?] %h"
+
# bind = resize =
# bind + resize +1
# bind - resize -1

@ -1,21 +0,0 @@
--- screen-4.0.2/configure.in.lib64 2006-02-27 09:48:58.000000000 +0100
+++ screen-4.0.2/configure.in 2006-02-27 09:49:25.000000000 +0100
@@ -871,8 +871,16 @@
dnl **** loadav ****
dnl
AC_CHECKING(for libutil(s))
-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
+if test -f /usr/lib/libutils.a; then
+ LIBS="$LIBS -lutils";
+elif test -f /usr/lib64/libutils.a; then
+ LIBS="$LIBS -lutils";
+fi
+if test -f /usr/lib/libutil.a; then
+ LIBS="$LIBS -lutil";
+elif test -f /usr/lib64/libutil.a; then
+ LIBS="$LIBS -lutil"
+fi
AC_CHECKING(getloadavg)
AC_TRY_LINK(,[getloadavg((double *)0, 0);],

@ -1,17 +0,0 @@
--- screen-4.0.2/etc/etcscreenrc.lock-shortcut 2006-01-17 22:03:38.000000000 +0100
+++ screen-4.0.2/etc/etcscreenrc 2006-01-17 22:04:55.000000000 +0100
@@ -82,6 +82,8 @@
terminfo wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
#remove some stupid / dangerous key bindings
+bind ^x
+bind x
bind ^k
#bind L
bind ^\
@@ -91,4 +93,4 @@
bind I login on
bind O login off
bind } history
-
+bind X lockscreen

@ -9,6 +9,15 @@
# advertise hardstatus support to $TERMCAP
# termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\'
@@ -60,7 +60,7 @@
# tell screen that xterm can switch to dark background and has function
# keys.
termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l'
-termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
+#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~'
# special xterm hardstatus: use the window title.
@@ -126,9 +126,9 @@
# Yet another hack:
# Prepend/append register [/] to the paste if ^a^] is pressed.

@ -0,0 +1,50 @@
diff -up screen-4.0.3/configure.in.libs screen-4.0.3/configure.in
--- screen-4.0.3/configure.in.libs 2003-06-03 13:58:24.000000000 +0200
+++ screen-4.0.3/configure.in 2008-02-26 13:58:29.000000000 +0100
@@ -196,7 +196,9 @@ AC_EGREP_CPP(yes,
], LIBS="$LIBS -lsocket -linet";seqptx=1)
oldlibs="$LIBS"
-LIBS="$LIBS -lelf"
+# Humm we don't actually need to link against libelf for linux
+#LIBS="$LIBS -lelf"
+LIBS="$LIBS"
AC_CHECKING(SVR4)
AC_TRY_LINK([#include <utmpx.h>
],,
@@ -643,14 +645,10 @@ dnl
AC_CHECKING(for tgetent)
AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
olibs="$LIBS"
-LIBS="-lcurses $olibs"
-AC_CHECKING(libcurses)
+LIBS="-ltinfo $olibs"
+AC_CHECKING(libtinfo)
AC_TRY_LINK(,[
-#ifdef __hpux
-__sorry_hpux_libcurses_is_totally_broken_in_10_10();
-#else
tgetent((char *)0, (char *)0);
-#endif
],,
LIBS="-ltermcap $olibs"
AC_CHECKING(libtermcap)
@@ -666,7 +664,7 @@ AC_MSG_ERROR(!!! no tgetent - no screen)
AC_TRY_RUN([
main()
{
- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+ return 1;
}], AC_NOTE(- you use the termcap database),
AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
AC_CHECKING(ospeed)
@@ -864,9 +862,6 @@ fi
dnl
dnl **** loadav ****
dnl
-AC_CHECKING(for libutil(s))
-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
AC_CHECKING(getloadavg)
AC_TRY_LINK(,[getloadavg((double *)0, 0);],

@ -1,11 +0,0 @@
--- screen-4.0.3/Makefile.in.perm 2007-02-06 10:25:58.000000000 +0100
+++ screen-4.0.3/Makefile.in 2007-02-06 10:26:10.000000000 +0100
@@ -74,7 +74,7 @@
-if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
$(INSTALL) -m 755 screen $(DESTDIR)$(bindir)/$(SCREEN)
- -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
+ -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 755 $(DESTDIR)$(bindir)/$(SCREEN)
# This doesn't work if $(bindir)/screen is a symlink
-if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
rm -f $(DESTDIR)$(bindir)/screen

@ -0,0 +1,19 @@
diff -up screen-4.0.3/window.c.ptygroup screen-4.0.3/window.c
--- screen-4.0.3/window.c.ptygroup 2008-02-26 10:38:35.000000000 +0100
+++ screen-4.0.3/window.c 2008-02-26 10:39:53.000000000 +0100
@@ -1083,6 +1083,7 @@ char **namep;
return f;
#ifndef PTYROFS
+#if 0
#ifdef PTYGROUP
if (chown(*namep, real_uid, PTYGROUP) && !eff_uid)
#else
@@ -1093,6 +1094,7 @@ char **namep;
close(f);
return -1;
}
+#endif
#ifdef UTMPOK
if (chmod(*namep, lflag ? TtyMode : (TtyMode & ~022)) && !eff_uid)
#else

@ -1,7 +1,7 @@
Summary: A screen manager that supports multiple logins on one terminal
Name: screen
Version: 4.0.3
Release: 9%{?dist}
Release: 10%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://www.gnu.org/software/screen
@ -9,55 +9,21 @@ Requires(pre): /usr/sbin/groupadd
Requires(preun): /sbin/install-info
Requires(post): /sbin/install-info
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gawk ncurses-devel texinfo pam-devel libtool
BuildRequires: ncurses-devel pam-devel libutempter-devel autoconf texinfo
#
# The one and only true source
#
Source0: ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-%{version}.tar.gz
# Except for the PAM configuration, that is.
Source1: screen.pam
# Small tweak for ia64
#
Patch1: screen-3.9.13-ia64.patch
Patch1: screen-4.0.3-libs.patch
# Some tweaks of the default screenrc
# really end users should visit /etc/screenrc and tweak
# it to suit their personal preferances
#
Patch2: screen-4.0.2-screenrc.patch
#Patch3: screen-4.0.1-etcscreenrc.patch
# Due to the way the build system creates rpms in a buildroot
# we need this tweak for utf8encodings
#
# This is not needed anymore
#Patch4: screen-3.9.11-utf8-install.patch
# We need to allow rpm to strip the binary and we don't have a
# libelf dependancy
Patch5: screen-3.9.11-no-stripping-or-elf.patch
# The maintainers really didn't like this patch, and I couldn't
# reproduce the "access denied" problem on 4.0.1, so this
# patch is not applied for now. We'll include it in the srpm
# in case someone else wants it.
#
#Patch6: screen-3.9.15-home-screendir.patch
Patch3: screen-4.0.3-ptygroup.patch
# Fixes potential buffer overflow when > 2^31 semicolons are passed.
#
Patch7: screen-4.0.1-args.patch
#Patch8: screen-4.0.2-logname.patch
# reassign lockscreen to ^aX so its harder to hit by accident
#Patch9: screen-4.0.2-lock-shortcut.patch
Patch10: screen-4.0.2-lib64.patch
Patch11: screen-4.0.2-maxstr.patch
Patch12: screen-4.0.3-ipv6.patch
Patch13: screen-4.0.3-perm.patch
%description
The screen utility allows you to have multiple logins on just one
@ -70,32 +36,15 @@ support multiple logins on one terminal.
%prep
%setup -q
%patch1 -p1 -b .ia64
%patch1 -p1 -b .libs
%patch2 -p1 -b .screenrc
#%patch3 -p1 -b .etcscreenrc
#%patch4 -p1 -b .utf8-install
%patch5 -p1 -b .no-stripping-or-elf
#%patch8 -p1 -b .logname
# Uncomment if you want screen to first try to use $HOME/.screens
# and subsequently try to use /tmp/S-<user>
#
#%patch6 -p1 -b .screendir
#
#
%patch3 -p1 -b .ptygroup
%patch7 -p0 -b .args
#%patch9 -p1 -b .lock-shortcut
%patch10 -p1 -b .lib64
%patch11 -p1 -b .maxstr
%patch12 -p1 -b .ipv6
%patch13 -p1 -b .perm
%build
libtoolize --copy --force
autoconf
%configure \
@ -104,64 +53,45 @@ autoconf
--enable-rxvt_osc \
--enable-locale \
--enable-telnet \
--with-sys-screenrc="/etc/screenrc" \
--with-socket-dir="/var/run/screen"
--with-pty-mode=0620 \
--without-pty-group \
--with-sys-screenrc="%{_sysconfdir}/screenrc" \
--with-socket-dir="%{_localstatedir}/run/screen"
# We would like to have braille support.
#
sed -e 's/.*#.*undef.*HAVE_BRAILLE.*/#define HAVE_BRAILLE 1/;' \
< config.h > config.tmp.h
mv config.tmp.h config.h
# We really don't want to be using /usr/local
# because we wish to be FSB complient
#
#sed -e 's/\/usr\/local\/etc/\/etc/g;' < etc/etcscreenrc > etc/etcscreenrc.tmp
#mv etc/etcscreenrc.tmp etc/etcscreenrc
find doc -type f | while read line; do
sed -e 's/\(\/usr\)\?\/local\/etc/\/etc/g;' < $line > $line.tmp;
mv $line.tmp $line
done
sed -i -e 's/.*#.*undef.*HAVE_BRAILLE.*/#define HAVE_BRAILLE 1/;' config.h
sed -i -e 's/\(\/usr\)\?\/local\/etc/\/etc/g;' doc/screen.{1,texinfo}
rm doc/screen.info*
make clean
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" make $BUILD_MAKE_FLAGS
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc
make install DESTDIR=$RPM_BUILD_ROOT
mv -f $RPM_BUILD_ROOT%{_bindir}/screen{-%{version},}
( cd $RPM_BUILD_ROOT
rm -f .%{_bindir}/screen.old .%{_bindir}/screen
mv .%{_bindir}/screen-%{version} .%{_bindir}/screen
)
install -c -m 0644 etc/etcscreenrc $RPM_BUILD_ROOT/etc/screenrc
cat etc/screenrc >> $RPM_BUILD_ROOT/etc/screenrc
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
install -m 0644 etc/etcscreenrc $RPM_BUILD_ROOT%{_sysconfdir}/screenrc
cat etc/screenrc >> $RPM_BUILD_ROOT%{_sysconfdir}/screenrc
# Better not forget to copy the pam file around
#
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/screen
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/screen
# Create the socket dir
mkdir -p $RPM_BUILD_ROOT/var/run/screen
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/screen
# Remove files from the buildroot which we don't want packaged
#
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%clean
rm -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/groupadd -g 84 -r -f screen
:
%post
/sbin/install-info %{_infodir}/screen.info.gz %{_infodir}/dir --entry="* screen: (screen). Terminal multiplexer." ||:
@ -171,20 +101,26 @@ if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/screen.info.gz %{_infodir}/dir --entry="* screen: (screen). Terminal multiplexer." ||:
fi
%files
%defattr(-,root,root,-)
%doc NEWS README doc/FAQ doc/README.DOTSCREEN COPYING
# group screen is needed for writing into /var/run/screen with "low" permission.
%attr(2755,root,screen) %{_bindir}/screen
%{_mandir}/man1/screen.*
%{_infodir}/screen.info*
%{_datadir}/screen
%attr(775,root,screen) %{_localstatedir}/run/screen
%config(noreplace) /etc/screenrc
%config(noreplace) /etc/pam.d/screen
%config(noreplace) %{_sysconfdir}/screenrc
%config(noreplace) %{_sysconfdir}/pam.d/screen
%changelog
* Tue Feb 26 2008 Miroslav Lichvar <mlichvar@redhat.com> - 4.0.3-10
- don't set xterm function keys in default config (#151556)
- always return 0 in scriptlet (#433882)
- fix pty permissions
- enable utempter support
- link with libtinfo, don't link with libutil
- spec cleanup
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.0.3-9
- Autorebuild for GCC 4.3

Loading…
Cancel
Save