avatar
Rosa has added 41e8d42b9c
Automatic import for version 3.2.2-3.el6ev
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,2 @@
1
sources:
2
  "ovirt-iso-uploader-3.2.2.tar.gz": d1da17bc0d9b58dd24ad6f9e2e5f4bfd471b1e75
view file @ 41e8d42b9c
... ... --- /dev/null
... ... +++ b/0001-config-added-backward-compatibilty.patch
... ... @@ -0,0 +1,53 @@
1
From d36f61ed40acffe7771a3ecf2ae5073267d929af Mon Sep 17 00:00:00 2001
2
From: Sandro Bonazzola <sbonazzo@redhat.com>
3
Date: Tue, 18 Jun 2013 09:19:04 +0200
4
Subject: [PATCH] config: added backward compatibilty
5
6
Added backward compatibility supporting upgrade from
7
3.1 version which used the keyword rhevm instead of engine.
8
When reading configurarion files, the user will be warned
9
that there is a deprecated key that needs to be updated.
10
11
(cherry-picked with modifications from commit
12
7a0f6902576b1f71aa844f592c03d0514976f841)
13
14
Change-Id: I6755c1ad020ee3220aa5f5335c6d66ead5139e57
15
Bug-Url: https://bugzilla.redhat.com/975416
16
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
17
---
18
 src/__main__.py | 19 +++++++++++++++++++
19
 1 file changed, 19 insertions(+)
20
21
diff --git a/src/__main__.py b/src/__main__.py
22
index cc35457..a27af14 100644
23
--- a/src/__main__.py
24
+++ b/src/__main__.py
25
@@ -243,6 +243,25 @@ class Configuration(dict):
26
         cp = ConfigParser.ConfigParser()
27
         cp.read(filename)
28
 
29
+        #backward compatibility with existing setup
30
+        if cp.has_option('ISOUploader', 'rhevm'):
31
+            if not cp.has_option('ISOUploader', 'engine'):
32
+                cp.set(
33
+                    'ISOUploader',
34
+                    'engine',
35
+                    cp.get('ISOUploader', 'rhevm')
36
+                )
37
+                logging.warning(
38
+                    _(
39
+                        'A deprecated configuration key has been found. '
40
+                        'Please replace the deprecated key, \'rhevm\', '
41
+                        'with the new one \'engine\' in {configFiles}'
42
+                    ).format(
43
+                        configFiles=filename
44
+                    )
45
+                )
46
+            cp.remove_option('ISOUploader', 'rhevm')
47
+
48
         # we want the items from the ISOUploader section only
49
         try:
50
             opts = [
51
-- 
52
1.7.11.7
53
view file @ 41e8d42b9c
... ... --- /dev/null
... ... +++ b/0002-upload-nfs-set-correct-umask-while-renaming.patch
... ... @@ -0,0 +1,51 @@
1
From 7f6d881365ece6d6416c645b4ac38859cc93ec00 Mon Sep 17 00:00:00 2001
2
From: Sandro Bonazzola <sbonazzo@redhat.com>
3
Date: Mon, 29 Jul 2013 12:31:53 +0200
4
Subject: [PATCH] upload: nfs: set correct umask while renaming
5
6
set the correct umask while renaming the temporary
7
file to destination file. Avoid to have incorrect
8
access bits on systems with not standard umask
9
(like 077)
10
11
(cherry picked from c97c0f0a0c8617042698665ec98a39ad89938647)
12
13
Change-Id: I5b7401f91e5fb4ce604ff17209e7c1260dd57503
14
Bug-Url: https://bugzilla.redhat.com/990144
15
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
16
---
17
 src/__main__.py | 4 +++-
18
 1 file modificato, 3 inserzioni(+). 1 rimozione(-)
19
20
diff --git a/src/__main__.py b/src/__main__.py
21
index a27af14..d530ca3 100644
22
--- a/src/__main__.py
23
+++ b/src/__main__.py
24
@@ -731,7 +731,7 @@ class ISOUploader(object):
25
         """
26
         retVal = True
27
         logging.debug("euid(%s) egid(%s)" % (os.geteuid(), os.getegid()))
28
-        umask_save = os.umask(0137)  # Set to 660
29
+        umask_save = os.umask(0137)  # Set to 640
30
         try:
31
             src = open(src_file_name, 'r')
32
             os.setegid(gid)
33
@@ -758,6 +758,7 @@ class ISOUploader(object):
34
         NFS mount.
35
         """
36
         logging.debug("euid(%s) egid(%s)" % (os.geteuid(), os.getegid()))
37
+        umask_save = os.umask(0137)  # Set to 640
38
         try:
39
             os.setegid(gid)
40
             os.seteuid(uid)
41
@@ -768,6 +769,7 @@ class ISOUploader(object):
42
         finally:
43
             os.seteuid(0)
44
             os.setegid(0)
45
+            os.umask(umask_save)
46
 
47
     def rename_file_ssh(self, user, address, src_file_name, dest_file_name):
48
         """
49
-- 
50
1.7.12.1
51
view file @ 41e8d42b9c
... ... --- /dev/null
... ... +++ b/ovirt-iso-uploader.spec
... ... @@ -0,0 +1,88 @@
1
#
2
# Licensed to the Apache Software Foundation (ASF) under one or more
3
# contributor license agreements.  See the NOTICE file distributed with
4
# this work for additional information regarding copyright ownership.
5
# The ASF licenses this file to You under the Apache License, Version 2.0
6
# (the "License"); you may not use this file except in compliance with
7
# the License.  You may obtain a copy of the License at
8
#
9
#     http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
16
#
17
18
%global		package_version 3.2.2
19
%global		package_name ovirt-iso-uploader
20
21
Summary:	ISO Uploader for Red Hat Enterprise Virtualization
22
Name:		rhevm-iso-uploader
23
Version:	3.2.2
24
Release:	3%{?release_suffix}%{?dist}
25
License:	ASL 2.0
26
URL:		http://www.redhat.com/virtualization/rhev/server/
27
Source:		http://resources.ovirt.org/releases/3.2/src/%{package_name}-%{package_version}.tar.gz
28
Group:		Virtualization/Management
29
30
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}
31
BuildArch:	noarch
32
Requires:	gettext
33
Requires:	python
34
Requires:	rhevm-sdk >= 3.2.0.5-1
35
BuildRequires:	gettext-devel
36
BuildRequires:	python2-devel
37
38
Patch1: 0001-config-added-backward-compatibilty.patch
39
Patch2: 0002-upload-nfs-set-correct-umask-while-renaming.patch
40
41
%description
42
ISO Uploader tool for Red Hat Enterprise Virtualization
43
44
%prep
45
%setup -q -n %{package_name}-%{package_version}
46
%patch1 -p1
47
%patch2 -p1
48
49
%build
50
%configure \
51
	--docdir="%{_docdir}/%{package_name}-%{version}" \
52
	--disable-python-syntax-check
53
54
make %{?_smp_mflags}
55
56
%install
57
rm -rf "%{buildroot}"
58
make %{?_smp_mflags} install DESTDIR="%{buildroot}"
59
ln -s engine-iso-uploader %{buildroot}/%{_bindir}/rhevm-iso-uploader
60
echo ".so man8/engine-iso-uploader.8" > %{buildroot}/%{_mandir}/man8/rhevm-iso-uploader.8
61
62
%files
63
%doc AUTHORS
64
%doc COPYING
65
%config(noreplace) %{_sysconfdir}/ovirt-engine/isouploader.conf
66
%{python_sitelib}/ovirt_iso_uploader/*.py*
67
%{_bindir}/engine-iso-uploader
68
%{_mandir}/man8/*
69
%{_bindir}/rhevm-iso-uploader
70
71
%changelog
72
* Tue Jul 30 2013 Sandro Bonazzola <sbonazzo@redhat.com> - 3.2.2-3
73
Resolves: BZ#990144 
74
75
* Tue Jun 18 2013 Kiril Nesenko <knesenko@redhat.com> - 3.2.2-2
76
Resolves:  BZ#975416
77
78
* Thu Apr 18 2013 Kiril Nesenko <knesenko@redhat.com> - 3.2.2-1
79
- 3.2.2-1
80
81
* Sun Mar 31 2013 Kiril Nesenko <knesenko@redhat.com> - 3.2.0-2
82
Resolves: BZ#886525,BZ#904719,BZ#785670
83
84
* Sun Feb 17 2013 Kiril Nesenko <knesenko@redhat.com> - 3.2.0-1
85
- Release.
86
87
* Wed Feb 06 2013 Kiril Nesenko <knesenko@redhat.com> - 3.2.0-0.2.beta
88
- 3.2.0-0.2.beta

Comments