diff --git a/SOURCES/setup-2.8.71-bashrc-shellvar.patch b/SOURCES/setup-2.8.71-bashrc-shellvar.patch
new file mode 100644
index 0000000..584dd7a
--- /dev/null
+++ b/SOURCES/setup-2.8.71-bashrc-shellvar.patch
@@ -0,0 +1,11 @@
+diff -urNp setup-2.8.71-orig/bashrc setup-2.8.71/bashrc
+--- setup-2.8.71-orig/bashrc	2013-06-07 16:31:32.000000000 +0200
++++ setup-2.8.71/bashrc	2014-02-25 14:10:03.253913395 +0100
+@@ -73,6 +73,7 @@ if ! shopt -q login_shell ; then # We're
+        umask 022
+     fi
+ 
++    SHELL=/bin/bash
+     # Only display echos from profile.d scripts if we are no login shell
+     # and interactive - otherwise just process them to set envvars
+     for i in /etc/profile.d/*.sh; do
diff --git a/SOURCES/setup-2.8.71-securetty-mainframes.patch b/SOURCES/setup-2.8.71-securetty-mainframes.patch
new file mode 100644
index 0000000..6de9b70
--- /dev/null
+++ b/SOURCES/setup-2.8.71-securetty-mainframes.patch
@@ -0,0 +1,22 @@
+diff -urNp setup-2.8.71-orig/securetty setup-2.8.71/securetty
+--- setup-2.8.71-orig/securetty	2013-06-07 16:31:32.000000000 +0200
++++ setup-2.8.71/securetty	2014-02-25 14:08:57.883857304 +0100
+@@ -21,8 +21,18 @@ tty8
+ tty9
+ tty10
+ tty11
++ttyS0
++ttysclp0
++sclp_line0
++3270/tty1
+ hvc0
+ hvc1
++hvc2
++hvc3
++hvc4
++hvc5
++hvc6
++hvc7
+ hvsi0
+ hvsi1
+ hvsi2
diff --git a/SPECS/setup.spec b/SPECS/setup.spec
index 1cb0d0c..b7f67f0 100644
--- a/SPECS/setup.spec
+++ b/SPECS/setup.spec
@@ -1,22 +1,31 @@
 Summary: A set of system configuration and setup files
 Name: setup
 Version: 2.8.71
-Release: 1%{?dist}
+Release: 4%{?dist}
 License: Public Domain
 Group: System Environment/Base
 URL: https://fedorahosted.org/setup/
 Source0: https://fedorahosted.org/releases/s/e/%{name}/%{name}-%{version}.tar.bz2
 BuildArch: noarch
 BuildRequires: bash tcsh perl
+#require system release for saner dependency order
+Requires: system-release
 Conflicts: filesystem < 3
 Conflicts: initscripts < 4.26, bash <= 2.0.4-21
 
+Patch1: setup-2.8.71-securetty-mainframes.patch
+Patch2: setup-2.8.71-bashrc-shellvar.patch
+
 %description
 The setup package contains a set of important system configuration and
 setup files, such as passwd, group, and profile.
 
 %prep
 %setup -q
+
+%patch1 -p1 -b .mainframe
+%patch2 -p1 -b .envvar
+
 ./shadowconvert.sh
 
 %build
@@ -45,6 +54,9 @@ rm -f %{buildroot}/etc/serviceslint
 rm -f %{buildroot}/etc/uidgidlint
 rm -f %{buildroot}/etc/shadowconvert.sh
 rm -f %{buildroot}/etc/setup.spec
+# remove the "originals" of patched files
+rm -f %{buildroot}/etc/securetty.mainframe
+rm -f %{buildroot}/etc/bashrc.envvar
 
 %clean
 rm -rf %{buildroot}
@@ -90,6 +102,16 @@ end
 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab
 
 %changelog
+* Wed Mar 12 2014 Ondrej Vasik <ovasik@redhat.com> - 2.8.71-4
+- require system-release for saner dependency order (#1075578)
+
+* Tue Feb 25 2014 Ondrej Vasik <ovasik@redhat.com> - 2.8.71-3
+- add more securetty required for mainframes (#1067347)
+- set SHELL envvar to /bin/bash in bashrc (#1063552)
+
+* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.8.71-2
+- Mass rebuild 2013-12-27
+
 * Fri Jun 07 2013 Ondrej Vasik <ovasik@redhat.com> 2.8.71-1
 - fix escape codes for screen (#969429)
 - handle vte terminals in bashrc (#924275)