Skip to content

Commit

Permalink
alvistack/5.7.1
Browse files Browse the repository at this point in the history
    git clean -xdf
    pip download -d /tmp --no-deps --no-binary=:all: ansible==5.7.1
    tar zxvf /tmp/ansible-5.7.1.tar.gz --strip-components=1 --exclude=debian --exclude=ansible.egg-info
    tar zcvf ../python-ansible_5.7.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-ansible.spec ../python-ansible_5.7.1-1.spec
    mv ../python*-ansible*5.7.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-ansible-build-data-5.7.1/
    rm -rf ../python*-ansible*5.7.1*.* ../ansible*5.7.1*.*

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
  • Loading branch information
hswong3i committed May 4, 2022
1 parent 4978f70 commit 58ec392
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.substvars
*debhelper*
.debhelper
files
ansible
tmp
1 change: 1 addition & 0 deletions debian/ansible.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/python*/*-packages/*
15 changes: 15 additions & 0 deletions debian/ansible.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ansible: backup-file-in-package
ansible: broken-zip
ansible: copyright-without-copyright-notice
ansible: embedded-javascript-library
ansible: executable-not-elf-or-script
ansible: initial-upload-closes-no-bugs
ansible: macos-ds-store-file-in-package
ansible: national-encoding
ansible: no-manual-page
ansible: package-contains-python-dot-directory
ansible: package-contains-vcs-control-file
ansible: script-not-executable
ansible: shell-script-fails-syntax-check
ansible: unusual-interpreter
ansible: zero-byte-file-in-doc-directory
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python-ansible (100:5.7.1-1) UNRELEASED; urgency=medium

* https://github.com/ansible-community/ansible-build-data/releases/tag/5.7.1

-- Wong Hoi Sing Edison <[email protected]> Thu, 05 May 2022 00:14:20 +0800
29 changes: 29 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Source: python-ansible
Section: python
Priority: optional
Standards-Version: 4.5.0
Maintainer: Wong Hoi Sing Edison <[email protected]>
Homepage: https://github.com/ansible-community/ansible-build-data/tags
Vcs-Browser: https://github.com/alvistack/pallets-ansible
Vcs-Git: https://github.com/alvistack/pallets-ansible.git
Build-Depends:
debhelper,
debhelper-compat (= 10),
dh-python,
fdupes,
python3-dev,
python3-setuptools,

Package: ansible
Architecture: all
Description: Official assortment of Ansible collections
Ansible collections for ansible-core.
Depends:
${misc:Depends},
${shlibs:Depends},
${python3:Depends},
python3,
ansible-core (>= 100:2.12.0),
ansible-core (<< 100:2.13),
Provides:
python3-ansible,
Empty file added debian/copyright
Empty file.
30 changes: 30 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/make -f

SHELL := /bin/bash

override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
find debian/tmp/usr/lib/python*/*-packages -type d -name '.*' -prune -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '.*' -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.orig' -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pem' -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.rej' -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.swp' -exec rm -rf {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.rst' -exec chmod a-x {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.py' -exec sed -i -e 's|^#!/usr/bin/env python|#!/usr/bin/python3|' {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.py' -exec sed -i -e 's|^#!/usr/bin/python.*|#!/usr/bin/python3|' {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.py' | xargs grep -E -l -e '^#!/usr/bin/python3' | xargs chmod a+x
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.sh' -exec sed -i -e 's|^#!/usr/bin/env bash|#!/bin/bash|' {} \;
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.sh' | xargs grep -E -l -e '^#!/bin/bash' | xargs chmod a+x
rm -rf debian/tmp/usr/lib/python*/*-packages/ansible_collections/ansible/windows/tests/integration/targets/win_command/files/crt_setmode.c
rm -rf debian/tmp/usr/lib/python*/*-packages/ansible_collections/community/vmware/check-ignores-order
rm -rf debian/tmp/usr/lib/python*/*-packages/ansible_collections/kubernetes/core/molecule/default/roles/k8scopy/files/hello
fdupes -s debian/tmp/usr/lib/python*/*-packages

override_dh_auto_test:

override_dh_auto_clean:

%:
dh $@ --buildsystem=pybuild --with python3
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
4 changes: 4 additions & 0 deletions debian/source/lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python-ansible source: no-debian-changes
python-ansible source: source-contains-prebuilt-windows-binary
python-ansible source: source-package-encodes-python-version
python-ansible source: source-is-missing
68 changes: 68 additions & 0 deletions python-ansible.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
%global debug_package %{nil}

Name: python-ansible
Epoch: 100
Version: 5.7.1
Release: 1%{?dist}
BuildArch: noarch
Summary: Official assortment of Ansible collections
License: GPL-3.0-only
URL: https://github.com/ansible-community/ansible-build-data/tags
Source0: %{name}_%{version}.orig.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-setuptools

%description
Ansible collections for ansible-core.

%prep
%autosetup -T -c -n %{name}_%{version}-%{release}
tar -zx -f %{S:0} --strip-components=1 -C .

%build
%py3_build

%install
%py3_install
find %{buildroot}%{python3_sitelib} -type d -name '.*' -prune -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '.*' -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.orig' -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.pem' -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.rej' -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.swp' -exec rm -rf {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.rst' -exec chmod a-x {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.py' -exec sed -i -e 's|^#!/usr/bin/env python|#!/usr/bin/python3|' {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.py' -exec sed -i -e 's|^#!/usr/bin/python.*|#!/usr/bin/python3|' {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.py' | xargs grep -E -l -e '^#!/usr/bin/python3' | xargs chmod a+x
find %{buildroot}%{python3_sitelib} -type f -name '*.sh' -exec sed -i -e 's|^#!/usr/bin/env bash|#!/bin/bash|' {} \;
find %{buildroot}%{python3_sitelib} -type f -name '*.sh' | xargs grep -E -l -e '^#!/bin/bash' | xargs chmod a+x
rm -rf %{buildroot}%{python3_sitelib}/ansible_collections/ansible/windows/tests/integration/targets/win_command/files/crt_setmode.c
rm -rf %{buildroot}%{python3_sitelib}/ansible_collections/community/vmware/check-ignores-order
rm -rf %{buildroot}%{python3_sitelib}/ansible_collections/kubernetes/core/molecule/default/roles/k8scopy/files/hello
%fdupes -s %{buildroot}%{python3_sitelib}

%check

%package -n ansible
Summary: Official assortment of Ansible collections
Requires: ansible-core >= 100:2.12.0
Requires: ansible-core < 100:2.13
Requires: python3
Provides: python3-ansible = %{epoch}:%{version}-%{release}
Provides: python3dist(ansible) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-ansible = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(ansible) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-ansible = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(ansible) = %{epoch}:%{version}-%{release}

%description -n ansible
Ansible collections for ansible-core.

%files -n ansible
%license COPYING
%{python3_sitelib}/*

%changelog

0 comments on commit 58ec392

Please sign in to comment.