[arch-commits] Commit in ansible/repos/community-any (4 files)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Fri Feb 27 05:10:42 UTC 2015


    Date: Friday, February 27, 2015 @ 06:10:42
  Author: bpiotrowski
Revision: 128332

archrelease: copy trunk to community-any

Added:
  ansible/repos/community-any/0001-Fix-os_family-and-distribution-on-archlinux.patch
    (from rev 128331, ansible/trunk/0001-Fix-os_family-and-distribution-on-archlinux.patch)
  ansible/repos/community-any/PKGBUILD
    (from rev 128331, ansible/trunk/PKGBUILD)
Deleted:
  ansible/repos/community-any/0001-Fix-os_family-and-distribution-on-archlinux.patch
  ansible/repos/community-any/PKGBUILD

--------------------------------------------------------+
 0001-Fix-os_family-and-distribution-on-archlinux.patch |  350 +++++++--------
 PKGBUILD                                               |   91 +--
 2 files changed, 219 insertions(+), 222 deletions(-)

Deleted: 0001-Fix-os_family-and-distribution-on-archlinux.patch
===================================================================
--- 0001-Fix-os_family-and-distribution-on-archlinux.patch	2015-02-27 05:10:35 UTC (rev 128331)
+++ 0001-Fix-os_family-and-distribution-on-archlinux.patch	2015-02-27 05:10:42 UTC (rev 128332)
@@ -1,175 +0,0 @@
-From 5efc4efca7288f072028d1a13e5d0d731f0b7a8f Mon Sep 17 00:00:00 2001
-From: Christian Hammerl <info at christian-hammerl.de>
-Date: Sat, 18 Oct 2014 15:02:04 +0200
-Subject: [PATCH] Fix os_family and distribution on archlinux
-
-Fixes #8732, ansible/ansible-modules-core#34
----
- lib/ansible/module_utils/facts.py | 145 +++++++++++++++++++-------------------
- 1 file changed, 73 insertions(+), 72 deletions(-)
-
-diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py
-index 8ec1b4f..6bbcace 100644
---- a/lib/ansible/module_utils/facts.py
-+++ b/lib/ansible/module_utils/facts.py
-@@ -273,84 +273,85 @@ class Facts(object):
-             self.facts['distribution_release'] = dist[2] or 'NA'
-             # Try to handle the exceptions now ...
-             for (path, name) in Facts.OSDIST_LIST:
--                if os.path.exists(path) and os.path.getsize(path) > 0:
--                    if self.facts['distribution'] in ('Fedora', ):
--                        # Once we determine the value is one of these distros
--                        # we trust the values are always correct
--                        break
--                    elif name == 'RedHat':
--                        data = get_file_content(path)
--                        if 'Red Hat' in data:
--                            self.facts['distribution'] = name
--                        else:
--                            self.facts['distribution'] = data.split()[0]
--                        break
--                    elif name == 'OtherLinux':
--                        data = get_file_content(path)
--                        if 'Amazon' in data:
--                            self.facts['distribution'] = 'Amazon'
--                            self.facts['distribution_version'] = data.split()[-1]
--                            break
--                    elif name == 'OpenWrt':
--                        data = get_file_content(path)
--                        if 'OpenWrt' in data:
--                            self.facts['distribution'] = name
--                            version = re.search('DISTRIB_RELEASE="(.*)"', data)
--                            if version:
--                                self.facts['distribution_version'] = version.groups()[0]
--                            release = re.search('DISTRIB_CODENAME="(.*)"', data)
--                            if release:
--                                self.facts['distribution_release'] = release.groups()[0]
-+                if os.path.exists(path):
-+                    if os.path.getsize(path) > 0:
-+                        if self.facts['distribution'] in ('Fedora', ):
-+                            # Once we determine the value is one of these distros
-+                            # we trust the values are always correct
-                             break
--                    elif name == 'Alpine':
--                        data = get_file_content(path)
--                        self.facts['distribution'] = name
--                        self.facts['distribution_version'] = data
--                        break
--                    elif name == 'Solaris':
--                        data = get_file_content(path).split('\n')[0]
--                        if 'Solaris' in data:
--                            ora_prefix = ''
--                            if 'Oracle Solaris' in data:
--                                data = data.replace('Oracle ','')
--                                ora_prefix = 'Oracle '
--                            self.facts['distribution'] = data.split()[0]
--                            self.facts['distribution_version'] = data.split()[1]
--                            self.facts['distribution_release'] = ora_prefix + data
-+                        elif name == 'RedHat':
-+                            data = get_file_content(path)
-+                            if 'Red Hat' in data:
-+                                self.facts['distribution'] = name
-+                            else:
-+                                self.facts['distribution'] = data.split()[0]
-                             break
--                    elif name == 'SuSE':
--                        data = get_file_content(path)
--                        if 'suse' in data.lower():
--                            if path == '/etc/os-release':
--                                release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
-+                        elif name == 'OtherLinux':
-+                            data = get_file_content(path)
-+                            if 'Amazon' in data:
-+                                self.facts['distribution'] = 'Amazon'
-+                                self.facts['distribution_version'] = data.split()[-1]
-+                                break
-+                        elif name == 'OpenWrt':
-+                            data = get_file_content(path)
-+                            if 'OpenWrt' in data:
-+                                self.facts['distribution'] = name
-+                                version = re.search('DISTRIB_RELEASE="(.*)"', data)
-+                                if version:
-+                                    self.facts['distribution_version'] = version.groups()[0]
-+                                release = re.search('DISTRIB_CODENAME="(.*)"', data)
-                                 if release:
-                                     self.facts['distribution_release'] = release.groups()[0]
--                                    break
--                            elif path == '/etc/SuSE-release':
--                                data = data.splitlines()
--                                for line in data:
--                                    release = re.search('CODENAME *= *([^\n]+)', line)
--                                    if release:
--                                        self.facts['distribution_release'] = release.groups()[0].strip()
--                                        break
--                    elif name == 'Debian':
--                        data = get_file_content(path)
--                        if 'Debian' in data:
--                            release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
--                            if release:
--                                self.facts['distribution_release'] = release.groups()[0]
--                            break
--                    elif name == 'Mandriva':
--                        data = get_file_content(path)
--                        if 'Mandriva' in data:
--                            version = re.search('DISTRIB_RELEASE="(.*)"', data)
--                            if version:
--                                self.facts['distribution_version'] = version.groups()[0]
--                            release = re.search('DISTRIB_CODENAME="(.*)"', data)
--                            if release:
--                                self.facts['distribution_release'] = release.groups()[0]
-+                                break
-+                        elif name == 'Alpine':
-+                            data = get_file_content(path)
-                             self.facts['distribution'] = name
-+                            self.facts['distribution_version'] = data
-                             break
-+                        elif name == 'Solaris':
-+                            data = get_file_content(path).split('\n')[0]
-+                            if 'Solaris' in data:
-+                                ora_prefix = ''
-+                                if 'Oracle Solaris' in data:
-+                                    data = data.replace('Oracle ','')
-+                                    ora_prefix = 'Oracle '
-+                                self.facts['distribution'] = data.split()[0]
-+                                self.facts['distribution_version'] = data.split()[1]
-+                                self.facts['distribution_release'] = ora_prefix + data
-+                                break
-+                        elif name == 'SuSE':
-+                            data = get_file_content(path)
-+                            if 'suse' in data.lower():
-+                                if path == '/etc/os-release':
-+                                    release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
-+                                    if release:
-+                                        self.facts['distribution_release'] = release.groups()[0]
-+                                        break
-+                                elif path == '/etc/SuSE-release':
-+                                    data = data.splitlines()
-+                                    for line in data:
-+                                        release = re.search('CODENAME *= *([^\n]+)', line)
-+                                        if release:
-+                                            self.facts['distribution_release'] = release.groups()[0].strip()
-+                                            break
-+                        elif name == 'Debian':
-+                            data = get_file_content(path)
-+                            if 'Debian' in data:
-+                                release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
-+                                if release:
-+                                    self.facts['distribution_release'] = release.groups()[0]
-+                                break
-+                        elif name == 'Mandriva':
-+                            data = get_file_content(path)
-+                            if 'Mandriva' in data:
-+                                version = re.search('DISTRIB_RELEASE="(.*)"', data)
-+                                if version:
-+                                    self.facts['distribution_version'] = version.groups()[0]
-+                                release = re.search('DISTRIB_CODENAME="(.*)"', data)
-+                                if release:
-+                                    self.facts['distribution_release'] = release.groups()[0]
-+                                self.facts['distribution'] = name
-+                                break
-                     else:
-                         self.facts['distribution'] = name
- 
--- 
-2.2.1
-

Copied: ansible/repos/community-any/0001-Fix-os_family-and-distribution-on-archlinux.patch (from rev 128331, ansible/trunk/0001-Fix-os_family-and-distribution-on-archlinux.patch)
===================================================================
--- 0001-Fix-os_family-and-distribution-on-archlinux.patch	                        (rev 0)
+++ 0001-Fix-os_family-and-distribution-on-archlinux.patch	2015-02-27 05:10:42 UTC (rev 128332)
@@ -0,0 +1,175 @@
+From 5efc4efca7288f072028d1a13e5d0d731f0b7a8f Mon Sep 17 00:00:00 2001
+From: Christian Hammerl <info at christian-hammerl.de>
+Date: Sat, 18 Oct 2014 15:02:04 +0200
+Subject: [PATCH] Fix os_family and distribution on archlinux
+
+Fixes #8732, ansible/ansible-modules-core#34
+---
+ lib/ansible/module_utils/facts.py | 145 +++++++++++++++++++-------------------
+ 1 file changed, 73 insertions(+), 72 deletions(-)
+
+diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py
+index 8ec1b4f..6bbcace 100644
+--- a/lib/ansible/module_utils/facts.py
++++ b/lib/ansible/module_utils/facts.py
+@@ -273,84 +273,85 @@ class Facts(object):
+             self.facts['distribution_release'] = dist[2] or 'NA'
+             # Try to handle the exceptions now ...
+             for (path, name) in Facts.OSDIST_LIST:
+-                if os.path.exists(path) and os.path.getsize(path) > 0:
+-                    if self.facts['distribution'] in ('Fedora', ):
+-                        # Once we determine the value is one of these distros
+-                        # we trust the values are always correct
+-                        break
+-                    elif name == 'RedHat':
+-                        data = get_file_content(path)
+-                        if 'Red Hat' in data:
+-                            self.facts['distribution'] = name
+-                        else:
+-                            self.facts['distribution'] = data.split()[0]
+-                        break
+-                    elif name == 'OtherLinux':
+-                        data = get_file_content(path)
+-                        if 'Amazon' in data:
+-                            self.facts['distribution'] = 'Amazon'
+-                            self.facts['distribution_version'] = data.split()[-1]
+-                            break
+-                    elif name == 'OpenWrt':
+-                        data = get_file_content(path)
+-                        if 'OpenWrt' in data:
+-                            self.facts['distribution'] = name
+-                            version = re.search('DISTRIB_RELEASE="(.*)"', data)
+-                            if version:
+-                                self.facts['distribution_version'] = version.groups()[0]
+-                            release = re.search('DISTRIB_CODENAME="(.*)"', data)
+-                            if release:
+-                                self.facts['distribution_release'] = release.groups()[0]
++                if os.path.exists(path):
++                    if os.path.getsize(path) > 0:
++                        if self.facts['distribution'] in ('Fedora', ):
++                            # Once we determine the value is one of these distros
++                            # we trust the values are always correct
+                             break
+-                    elif name == 'Alpine':
+-                        data = get_file_content(path)
+-                        self.facts['distribution'] = name
+-                        self.facts['distribution_version'] = data
+-                        break
+-                    elif name == 'Solaris':
+-                        data = get_file_content(path).split('\n')[0]
+-                        if 'Solaris' in data:
+-                            ora_prefix = ''
+-                            if 'Oracle Solaris' in data:
+-                                data = data.replace('Oracle ','')
+-                                ora_prefix = 'Oracle '
+-                            self.facts['distribution'] = data.split()[0]
+-                            self.facts['distribution_version'] = data.split()[1]
+-                            self.facts['distribution_release'] = ora_prefix + data
++                        elif name == 'RedHat':
++                            data = get_file_content(path)
++                            if 'Red Hat' in data:
++                                self.facts['distribution'] = name
++                            else:
++                                self.facts['distribution'] = data.split()[0]
+                             break
+-                    elif name == 'SuSE':
+-                        data = get_file_content(path)
+-                        if 'suse' in data.lower():
+-                            if path == '/etc/os-release':
+-                                release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
++                        elif name == 'OtherLinux':
++                            data = get_file_content(path)
++                            if 'Amazon' in data:
++                                self.facts['distribution'] = 'Amazon'
++                                self.facts['distribution_version'] = data.split()[-1]
++                                break
++                        elif name == 'OpenWrt':
++                            data = get_file_content(path)
++                            if 'OpenWrt' in data:
++                                self.facts['distribution'] = name
++                                version = re.search('DISTRIB_RELEASE="(.*)"', data)
++                                if version:
++                                    self.facts['distribution_version'] = version.groups()[0]
++                                release = re.search('DISTRIB_CODENAME="(.*)"', data)
+                                 if release:
+                                     self.facts['distribution_release'] = release.groups()[0]
+-                                    break
+-                            elif path == '/etc/SuSE-release':
+-                                data = data.splitlines()
+-                                for line in data:
+-                                    release = re.search('CODENAME *= *([^\n]+)', line)
+-                                    if release:
+-                                        self.facts['distribution_release'] = release.groups()[0].strip()
+-                                        break
+-                    elif name == 'Debian':
+-                        data = get_file_content(path)
+-                        if 'Debian' in data:
+-                            release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
+-                            if release:
+-                                self.facts['distribution_release'] = release.groups()[0]
+-                            break
+-                    elif name == 'Mandriva':
+-                        data = get_file_content(path)
+-                        if 'Mandriva' in data:
+-                            version = re.search('DISTRIB_RELEASE="(.*)"', data)
+-                            if version:
+-                                self.facts['distribution_version'] = version.groups()[0]
+-                            release = re.search('DISTRIB_CODENAME="(.*)"', data)
+-                            if release:
+-                                self.facts['distribution_release'] = release.groups()[0]
++                                break
++                        elif name == 'Alpine':
++                            data = get_file_content(path)
+                             self.facts['distribution'] = name
++                            self.facts['distribution_version'] = data
+                             break
++                        elif name == 'Solaris':
++                            data = get_file_content(path).split('\n')[0]
++                            if 'Solaris' in data:
++                                ora_prefix = ''
++                                if 'Oracle Solaris' in data:
++                                    data = data.replace('Oracle ','')
++                                    ora_prefix = 'Oracle '
++                                self.facts['distribution'] = data.split()[0]
++                                self.facts['distribution_version'] = data.split()[1]
++                                self.facts['distribution_release'] = ora_prefix + data
++                                break
++                        elif name == 'SuSE':
++                            data = get_file_content(path)
++                            if 'suse' in data.lower():
++                                if path == '/etc/os-release':
++                                    release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
++                                    if release:
++                                        self.facts['distribution_release'] = release.groups()[0]
++                                        break
++                                elif path == '/etc/SuSE-release':
++                                    data = data.splitlines()
++                                    for line in data:
++                                        release = re.search('CODENAME *= *([^\n]+)', line)
++                                        if release:
++                                            self.facts['distribution_release'] = release.groups()[0].strip()
++                                            break
++                        elif name == 'Debian':
++                            data = get_file_content(path)
++                            if 'Debian' in data:
++                                release = re.search("PRETTY_NAME=[^(]+ \(?([^)]+?)\)", data)
++                                if release:
++                                    self.facts['distribution_release'] = release.groups()[0]
++                                break
++                        elif name == 'Mandriva':
++                            data = get_file_content(path)
++                            if 'Mandriva' in data:
++                                version = re.search('DISTRIB_RELEASE="(.*)"', data)
++                                if version:
++                                    self.facts['distribution_version'] = version.groups()[0]
++                                release = re.search('DISTRIB_CODENAME="(.*)"', data)
++                                if release:
++                                    self.facts['distribution_release'] = release.groups()[0]
++                                self.facts['distribution'] = name
++                                break
+                     else:
+                         self.facts['distribution'] = name
+ 
+-- 
+2.2.1
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-27 05:10:35 UTC (rev 128331)
+++ PKGBUILD	2015-02-27 05:10:42 UTC (rev 128332)
@@ -1,47 +0,0 @@
-# $Id$
-# Maintainer:  Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Chris <seitz.christoph at gmail.com>
-# Contributor: m0ikz <ndelatorre at moikz.com.ar>
-# Contributor: atweiden <archbaum at gmail.com>
-
-pkgname=ansible
-pkgver=1.8.2
-pkgrel=2
-pkgdesc='Radically simple IT automation platform'
-arch=('any')
-url='http://www.ansible.com'
-license=('GPL3')
-depends=('python2' 'python2-yaml' 'python2-paramiko' 'python2-jinja')
-makedepends=('asciidoc' 'fakeroot')
-optdepends=('python2-pyasn1: needed for accelerated mode'
-            'python2-crypto: needed for accelerated mode'
-            'python2-keyczar: needed for accelerated mode')
-backup=('etc/ansible/ansible.cfg')
-source=(http://releases.ansible.com/ansible/$pkgname-$pkgver.tar.gz
-        0001-Fix-os_family-and-distribution-on-archlinux.patch)
-md5sums=('c2ac0e5a4c092dfa84c7e9e51cd45095'
-         '2d00eecedea58697186087b7c446f112')
-
-prepare() {
-  cd $pkgname-$pkgver
-  patch -p1 -i ../0001-Fix-os_family-and-distribution-on-archlinux.patch
-}
-
-build() {
-  cd $pkgname-$pkgver
-  python2 setup.py build
-}
-
-package() {
-  cd $pkgname-$pkgver
-  python2 setup.py install -O1 --root="$pkgdir"
-  install -Dm644 COPYING "$pkgdir"/usr/share/doc/ansible/COPYING
-
-  install -d "$pkgdir"/usr/share/ansible/doc
-  cp -dpr --no-preserve=ownership ./examples "$pkgdir"/usr/share/ansible/doc/
-  install -Dm644 examples/ansible.cfg "$pkgdir"/etc/ansible/ansible.cfg
-
-  install -d "$pkgdir"/usr/share/man/man1
-  cp -dpr --no-preserve=ownership docs/man/man1/*.1 "$pkgdir"/usr/share/man/man1
-}

Copied: ansible/repos/community-any/PKGBUILD (from rev 128331, ansible/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-02-27 05:10:42 UTC (rev 128332)
@@ -0,0 +1,44 @@
+# $Id$
+# Maintainer:  Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Chris <seitz.christoph at gmail.com>
+# Contributor: m0ikz <ndelatorre at moikz.com.ar>
+# Contributor: atweiden <archbaum at gmail.com>
+
+pkgname=ansible
+pkgver=1.8.4
+pkgrel=1
+pkgdesc='Radically simple IT automation platform'
+arch=('any')
+url='http://www.ansible.com'
+license=('GPL3')
+depends=('python2' 'python2-yaml' 'python2-paramiko' 'python2-jinja')
+makedepends=('asciidoc' 'fakeroot')
+backup=('etc/ansible/ansible.cfg')
+source=(http://releases.ansible.com/ansible/$pkgname-$pkgver.tar.gz
+        0001-Fix-os_family-and-distribution-on-archlinux.patch)
+md5sums=('e0bbf484e9fa49cd119f50ad65905978'
+         '2d00eecedea58697186087b7c446f112')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p1 -i ../0001-Fix-os_family-and-distribution-on-archlinux.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  python2 setup.py build
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python2 setup.py install -O1 --root="$pkgdir"
+  install -Dm644 COPYING "$pkgdir"/usr/share/doc/ansible/COPYING
+
+  install -d "$pkgdir"/usr/share/ansible/doc
+  cp -dpr --no-preserve=ownership ./examples "$pkgdir"/usr/share/ansible/doc/
+  install -Dm644 examples/ansible.cfg "$pkgdir"/etc/ansible/ansible.cfg
+
+  install -d "$pkgdir"/usr/share/man/man1
+  cp -dpr --no-preserve=ownership docs/man/man1/*.1 "$pkgdir"/usr/share/man/man1
+}



More information about the arch-commits mailing list