From 78eb9350e9f367be534c72a4ceb7ae778b31ab76 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Feb 03 2014 16:04:57 +0000 Subject: import yum-rhn-plugin-2.0.1-4.el7.src.rpm --- diff --git a/SOURCES/yum-rhn-plugin-2.0.1-2-el7-to-yum-rhn-plugin-2.0.1-3-el7.patch b/SOURCES/yum-rhn-plugin-2.0.1-2-el7-to-yum-rhn-plugin-2.0.1-3-el7.patch new file mode 100644 index 0000000..1f555b0 --- /dev/null +++ b/SOURCES/yum-rhn-plugin-2.0.1-2-el7-to-yum-rhn-plugin-2.0.1-3-el7.patch @@ -0,0 +1,43 @@ +diff --git a/yum-rhn-plugin.spec b/yum-rhn-plugin.spec +index 5178223..1ee4a5e 100644 +--- a/yum-rhn-plugin.spec ++++ b/yum-rhn-plugin.spec +@@ -1,7 +1,7 @@ + Summary: Spacewalk support for yum + Name: yum-rhn-plugin + Version: 2.0.1 +-Release: 2%{?dist} ++Release: 3%{?dist} + License: GPLv2 + Group: System Environment/Base + Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz +@@ -49,16 +49,16 @@ export pluginconf='/etc/yum/pluginconf.d/rhnplugin.conf' + if [ $1 -gt 1 ] && [ -f /etc/sysconfig/rhn/systemid ] && [ -f "$pluginconf" ]; then + if grep -q '^[[:space:]]*enabled[[:space:]]*=[[:space:]]*1[[:space:]]*$' \ + "$pluginconf"; then +- touch /var/tmp/enable-yum-rhn-plugin ++ echo "1" > /etc/enable-yum-rhn-plugin + fi + fi + + %post + # 682820 - re-enable yum-rhn-plugin after package upgrade if the system is already registered + export pluginconf='/etc/yum/pluginconf.d/rhnplugin.conf' +-if [ $1 -gt 1 ] && [ -f "$pluginconf" ] && [ -f "/var/tmp/enable-yum-rhn-plugin" ]; then ++if [ $1 -gt 1 ] && [ -f "$pluginconf" ] && [ -f "/etc/enable-yum-rhn-plugin" ]; then + sed -i '/\[main]/,/^$/{/enabled/s/0/1/}' "$pluginconf" +- rm -f /var/tmp/enable-yum-rhn-plugin ++ rm -f /etc/enable-yum-rhn-plugin + fi + + %files -f %{name}.lang +@@ -70,6 +70,9 @@ fi + %doc LICENSE + + %changelog ++* Mon Feb 03 2014 Milan Zazrivec 2.0.1-3 ++- Resolves: #1043850 - avoid insecure use of /var/tmp ++ + * Mon Sep 09 2013 Stephen Herr 2.0.1-2 + - Resolves: #1006045 - keep yum-rhn-plugins higher default timeout + diff --git a/SOURCES/yum-rhn-plugin-2.0.1-3-el7-to-yum-rhn-plugin-2.0.1-4-el7.patch b/SOURCES/yum-rhn-plugin-2.0.1-3-el7-to-yum-rhn-plugin-2.0.1-4-el7.patch new file mode 100644 index 0000000..2562b95 --- /dev/null +++ b/SOURCES/yum-rhn-plugin-2.0.1-3-el7-to-yum-rhn-plugin-2.0.1-4-el7.patch @@ -0,0 +1,24 @@ +diff --git a/yum-rhn-plugin.spec b/yum-rhn-plugin.spec +index 1ee4a5e..5bf7dfa 100644 +--- a/yum-rhn-plugin.spec ++++ b/yum-rhn-plugin.spec +@@ -1,7 +1,7 @@ + Summary: Spacewalk support for yum + Name: yum-rhn-plugin + Version: 2.0.1 +-Release: 3%{?dist} ++Release: 4%{?dist} + License: GPLv2 + Group: System Environment/Base + Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz +@@ -70,8 +70,8 @@ fi + %doc LICENSE + + %changelog +-* Mon Feb 03 2014 Milan Zazrivec 2.0.1-3 +-- Resolves: #1043850 - avoid insecure use of /var/tmp ++* Mon Feb 03 2014 Milan Zazrivec 2.0.1-4 ++- Related: #1043850 - avoid insecure use of /var/tmp + + * Mon Sep 09 2013 Stephen Herr 2.0.1-2 + - Resolves: #1006045 - keep yum-rhn-plugins higher default timeout diff --git a/SPECS/yum-rhn-plugin.spec b/SPECS/yum-rhn-plugin.spec index 441bb84..17fc2bd 100644 --- a/SPECS/yum-rhn-plugin.spec +++ b/SPECS/yum-rhn-plugin.spec @@ -1,11 +1,13 @@ Summary: Spacewalk support for yum Name: yum-rhn-plugin Version: 2.0.1 -Release: 2%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz Patch0: yum-rhn-plugin-2.0.1-1-to-yum-rhn-plugin-2.0.1-2-el7.patch +Patch1: yum-rhn-plugin-2.0.1-2-el7-to-yum-rhn-plugin-2.0.1-3-el7.patch +Patch2: yum-rhn-plugin-2.0.1-3-el7-to-yum-rhn-plugin-2.0.1-4-el7.patch URL: https://fedorahosted.org/spacewalk BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1} @@ -32,6 +34,8 @@ software updates. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build make -f Makefile.yum-rhn-plugin @@ -51,16 +55,16 @@ export pluginconf='/etc/yum/pluginconf.d/rhnplugin.conf' if [ $1 -gt 1 ] && [ -f /etc/sysconfig/rhn/systemid ] && [ -f "$pluginconf" ]; then if grep -q '^[[:space:]]*enabled[[:space:]]*=[[:space:]]*1[[:space:]]*$' \ "$pluginconf"; then - touch /var/tmp/enable-yum-rhn-plugin + echo "1" > /etc/enable-yum-rhn-plugin fi fi %post # 682820 - re-enable yum-rhn-plugin after package upgrade if the system is already registered export pluginconf='/etc/yum/pluginconf.d/rhnplugin.conf' -if [ $1 -gt 1 ] && [ -f "$pluginconf" ] && [ -f "/var/tmp/enable-yum-rhn-plugin" ]; then +if [ $1 -gt 1 ] && [ -f "$pluginconf" ] && [ -f "/etc/enable-yum-rhn-plugin" ]; then sed -i '/\[main]/,/^$/{/enabled/s/0/1/}' "$pluginconf" - rm -f /var/tmp/enable-yum-rhn-plugin + rm -f /etc/enable-yum-rhn-plugin fi %files -f %{name}.lang @@ -72,6 +76,9 @@ fi %doc LICENSE %changelog +* Mon Feb 03 2014 Milan Zazrivec 2.0.1-4 +- Related: #1043850 - avoid insecure use of /var/tmp + * Mon Sep 09 2013 Stephen Herr 2.0.1-2 - Resolves: #1006045 - keep yum-rhn-plugins higher default timeout