Python packaging pattern with RPM, setup.py and gnu/make

cat << EOF | curl -X PUT -d @- uberleet.org

Here’s the practice I follow to make RPMs in python easier. You can just clone my project [github] that uses this pattern if you want to see it in action. If you clone this project you will be able to run

make rpms

and have a working artifact you can put in Satelite/Katello/apache.

This solution is of particular interest to businesses who can’t deploy to production straight out of pypi, but would like to keep their software cooperative with the python ecosystem (setuptools.)

You will need these dependencies to work with this stuff.

yum groupinstall "Development Tools" # Get the tools needed for lots of stuff
yum install git

Here’s an example of the spec file, you will notice I use python subshells to gather data from my application to automatically generate portions of the spec dynamically on build. Specifically the dynamic stuff is for Version, URL, BuildRequires and Description.

I have choosen a file within my project to manage these items called url_monitor/packaging.py. This allows centralizing requirements for both setup.py and specfile.

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           url_monitor
Version:        %(%{__python} -c "import url_monitor.packaging as namespace; print(namespace.version)")
Release:        1%{?dist}
Group:          Applications/Systems
Summary:        This is an external script for zabbix for monitoring restful endpoints for data.

License:        ASLv2
URL:            %(%{__python} -c "import url_monitor.packaging as namespace; print(namespace.url)")
Source0:        %{name}-%{version}.tar.gz

BuildArch:      noarch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  python-setuptools
Requires(pre):  shadow-utils
%(%{__python} -c "import sys; import url_monitor.packaging as namespace; x = lambda x: sys.stdout.write(\" \".join(x) + \"\"); sys.stdout.write(\"Requires: \"); str(x(namespace.rpm_requires))")
 
%define service_name %{name}d
 
%description
%(%{__python} -c "import url_monitor.packaging as namespace; print(namespace.long_description)")
 
%prep
%setup -q -n %{name}-%{version}
 
%build
 
%pre
 
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --root $RPM_BUILD_ROOT
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
%post
 
%preun
 
%postun
 
%files
%doc README.md
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/url_monitor.yaml
%{python_sitelib}/%{name}
%{python_sitelib}/%{name}*.egg-info
%attr(0755,-,-) %{_bindir}/%{name}
 
%changelog
* Fri Apr 29 2016 Jonathan Kelley <jon.kelley@uberleet.org> - 0.8.5-1
- Fixes to work better when singleton doesnt take, like on py2.6

Here is a copy of the setup.py for reference, it is also including a lot of the variables referenced by the packaging.py file.

# -*- coding: utf-8 -*-
#!/usr/bin/python
 
import os
from setuptools import setup
 
import sys
sys.path.insert(0, '.')
 
from url_monitor.packaging import version, authors, emails, license, install_requires
from url_monitor.packaging import long_description, description, package, url, software_classified
 
if __name__ == "__main__":
    setup(
        name=package,
        version=version,
        author=authors,
        author_email=emails,
        url=url,
        license=license,
        packages=[package],
        package_dir={package: package},
        description=description,
        long_description=long_description,
        classifiers=software_classified,
        entry_points={
            'console_scripts': ['url_monitor = url_monitor.main:main'],
        },
        data_files=[('/etc', ['url_monitor.yaml'])],
        install_requires=install_requires
    )

Within my project, I have added packaging.py which includes all of my commonly used variables between the application, setup.py and specfile.

#!/usr/bin/python
# -*- coding: utf-8 -*-
__doc__ = """url_monitor
 
Extensible URL monitor that iterates through supplied json/yaml
files to pull remote data from fields in http, xml, or json
documents and sends data to remote sources.  To support zabbix,
Rackspace Cloud Monitoring, collectd, etc...
"""
 
# The package name, which is also the "UNIX name" for the project.
package             = 'url_monitor'
project             = "URL Monitor Module"
project_no_spaces   = project.replace(' ', '')
version             = '0.8.9'
description         = 'A zabbix plugin to perform URL endpoint monitoring for JSON and XML REST APIs,' \
                      + ' supporting multiple http auth mechinisms'
long_description    = 'A Zabbix plugin written in Python that creates low level discovery items containing ' \
                      + 'values from your JSON API. It supports multiple requests auth backends including ' \
                      + 'oauth, basicauth, and your even own custom requests auth provider plugins. The low' \
                      + ' level discovery items can generate item prototypes which can be used to represent' \
                      + ' your data through this plugin.'
authors             = ['Jon Kelley']
authors_string      = ', '.join(authors)
emails              = ['jon.kelley@rackspace.com']
license             = 'ASLv2'
company             = "Rackspace, Inc."
copyright           = '2016 ' + company
url                 = 'https://github.com/rackerlabs/zabbix_url_monitor'
install_requires    = ['python-daemon',
                          'requests',
                          'requests-oauthlib',
                          'oauthlib',
                          'argparse',
                          'PyYAML',
                          'importlib'
                        ]
rpm_requires    = ['python',
                   'python-daemon',
                   'python-setuptools',
                   'python-importlib', #cent 6.5
                   'python-requests',
                   'python-requests-oauthlib',
                   'python-argparse',
                   'PyYAML'
                        ]
software_classified = [
                        'Intended Audience :: System Administrators',
                        'License :: OSI Approved :: Apache Software License',
                        'Natural Language :: English',
                        'Operating System :: OS Independent',
                        'Programming Language :: Python',
                        'Programming Language :: Python :: 2',
                        'Programming Language :: Python :: 3',
                        'Topic :: System :: Monitoring',
                        'Topic :: System :: Networking :: Monitoring',
                        'Topic :: System :: Systems Administration ',
                    ]

You can finish this off by setting up the Makefile and MANIFEST.in

#Makefile
#SERIAL 201601291542
 
# Base the name of the software on the spec file
PACKAGE := $(shell basename *.spec .spec)
# Override this arch if the software is arch specific
ARCH = noarch
 
# Variables for clean build directory tree under repository
BUILDDIR = ./build
ARTIFACTDIR = ./artifacts
SDISTDIR = ${ARTIFACTDIR}/sdist
WHEELDIR = ${ARTIFACTDIR}/wheels
RPMBUILDDIR = ${BUILDDIR}/rpm-build
RPMDIR = ${ARTIFACTDIR}/rpms
DEBBUILDDIR = ${BUILDDIR}/deb-build
DEBDIR = ${ARTIFACTDIR}/debs
 
# base rpmbuild command that utilizes the local buildroot
# not using the above variables on purpose.
# if you can make it work, PRs are welcome!
RPMBUILD = rpmbuild --define "_topdir %(pwd)/build" \
	--define "_sourcedir  %(pwd)/artifacts/sdist" \
	--define "_builddir %{_topdir}/rpm-build" \
	--define "_srcrpmdir %{_rpmdir}" \
	--define "_rpmdir %(pwd)/artifacts/rpms"
 
# Allow which python to be overridden at the environment level
PYTHON := $(shell which python)
 
ifneq ("$(wildcard setup.py)","")
GET_SDIST = ${PYTHON} setup.py sdist -d "${SDISTDIR}"
else
GET_SDIST = spectool -g -C ${SDISTDIR} ${PACKAGE}.spec
endif
 
ifneq ($(origin MOCK_REPO), undefined)
MOCK_REPO_MACRO := -r ${MOCK_REPO}
endif
 
all: rpms
 
clean:
	rm -rf ${BUILDDIR}/ *~
	rm -rf docs/*.gz
	rm -rf *.egg-info
	find . -name '*.pyc' -exec rm -f {} \;
 
clean_all: clean
	rm -rf ${ARTIFACTDIR}/
 
manpage:
	-gzip -c docs/${PACKAGE}.1 > docs/${PACKAGE}.1.gz
 
build: clean manpage
	${PYTHON} setup.py build -f
 
install: build
	${PYTHON} setup.py install -f --root ${DESTDIR}/
 
install_rpms: rpms
	yum install ${RPMDIR}/${ARCH}/${PACKAGE}*.${ARCH}.rpm
 
reinstall: uninstall install
 
uninstall: clean
	rm -f /usr/bin/${PACKAGE}
	rm -rf /usr/lib/python*/site-packages/${PACKAGE}
 
uninstall_rpms: clean
	rpm -e ${PACKAGE}
 
sdist:
	mkdir -p ${SDISTDIR}
	${GET_SDIST}
 
wheel:
	mkdir -p ${WHEELDIR}
	${PYTHON} setup.py bdist_wheel -d "${WHEELDIR}"
 
prep_rpmbuild: prep_build
	mkdir -p ${RPMBUILDDIR}
	mkdir -p ${RPMDIR}
	-cp -p *.patch ${SDISTDIR}/
 
rpms: prep_rpmbuild
	${RPMBUILD} -ba ${PACKAGE}.spec
 
srpm: prep_rpmbuild
	${RPMBUILD} -bs ${PACKAGE}.spec
 
mock: srpm
	mock ${MOCK_OPTIONS} ${MOCK_REPO_MACRO} --cleanup-after --resultdir=${RPMDIR} ${RPMDIR}/${PACKAGE}*.src.rpm
 
prep_build: manpage sdist
	mkdir -p ${BUILDDIR}
 
prep_debbuild: prep_build
	mkdir -p ${DEBBUILDDIR}
	mkdir -p ${DEBDIR}
	SDISTPACKAGE=`ls ${SDISTDIR}`; \
	BASE=`basename $$SDISTPACKAGE .tar.gz`; \
	DEBBASE=`echo $$BASE | sed 's/-/_/'`; \
	TARGET=${DEBBUILDDIR}/$$DEBBASE.orig.tar.gz; \
	ln -f -s ../../${SDISTDIR}/$$SDISTPACKAGE $$TARGET; \
	tar -xz -f $$TARGET -C ${DEBBUILDDIR}; \
	rm -rf ${DEBBUILDDIR}/$$BASE/debian; \
	cp -pr debian/ ${DEBBUILDDIR}/$$BASE
 
debs: prep_debbuild
	SDISTPACKAGE=`ls ${SDISTDIR}`; \
	BASE=`basename $$SDISTPACKAGE .tar.gz`; \
	cd ${DEBBUILDDIR}/$$BASE; \
	debuild -uc -us
	mv ${DEBBUILDDIR}/*.deb ${DEBDIR}/

The manifest, this will include files you wish to bundle with your app.

# MANIFEST.in
# Informational files
recursive-include url_monitor *.py
include README.md
include url_monitor.yaml
include LICENSE
 
# Include docs AND tests. It's unclear whether convention dictates
# including built docs. However, Sphinx doesn't include built docs, so
# we are following their lead.
graft docs
prune docs/build
graft tests
 
# Exclude any compile Python files (most likely grafted BY tests/ directory).
global-exclude *.pyc
 
# Setup-related things
include requirements-dev.txt
include requirements.txt
include setup.py

And finally the proof it all works.
(Somewhere it says
Wrote: /home/jon/zabbix_api_monitor/artifacts/rpms/noarch/url_monitor-0.8.9-1.el6.noarch.rpm)

[ root@vm929732-n01 zabbix_api_monitor ] (master)# make rpms
gzip -c docs/url_monitor.1 > docs/url_monitor.1.gz
gzip: docs/url_monitor.1: No such file or directory
make: [manpage] Error 1 (ignored)
mkdir -p ./artifacts/sdist
/usr/bin/python setup.py sdist -d "./artifacts/sdist"
running sdist
running egg_info
creating url_monitor.egg-info
writing requirements to url_monitor.egg-info/requires.txt
writing url_monitor.egg-info/PKG-INFO
writing top-level names to url_monitor.egg-info/top_level.txt
writing dependency_links to url_monitor.egg-info/dependency_links.txt
writing entry points to url_monitor.egg-info/entry_points.txt
writing manifest file 'url_monitor.egg-info/SOURCES.txt'
reading manifest file 'url_monitor.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'url_monitor.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.txt
creating url_monitor-0.8.9
creating url_monitor-0.8.9/docs
creating url_monitor-0.8.9/docs/source
creating url_monitor-0.8.9/docs/source/_static
creating url_monitor-0.8.9/tests
creating url_monitor-0.8.9/url_monitor
creating url_monitor-0.8.9/url_monitor.egg-info
making hard links in url_monitor-0.8.9...
hard linking LICENSE -> url_monitor-0.8.9
hard linking MANIFEST.in -> url_monitor-0.8.9
hard linking README.md -> url_monitor-0.8.9
hard linking requirements-dev.txt -> url_monitor-0.8.9
hard linking requirements.txt -> url_monitor-0.8.9
hard linking setup.py -> url_monitor-0.8.9
hard linking url_monitor.yaml -> url_monitor-0.8.9
hard linking docs/Makefile -> url_monitor-0.8.9/docs
hard linking docs/make.bat -> url_monitor-0.8.9/docs
hard linking docs/url_monitor.1.gz -> url_monitor-0.8.9/docs
hard linking docs/source/README -> url_monitor-0.8.9/docs/source
hard linking docs/source/conf.py -> url_monitor-0.8.9/docs/source
hard linking docs/source/index.rst -> url_monitor-0.8.9/docs/source
hard linking docs/source/_static/.gitkeep -> url_monitor-0.8.9/docs/source/_static
hard linking tests/test_main.py -> url_monitor-0.8.9/tests
hard linking url_monitor/__init__.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor/commons.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor/configuration.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor/jpath.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor/main.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor/packaging.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor/zbxsend.py -> url_monitor-0.8.9/url_monitor
hard linking url_monitor.egg-info/PKG-INFO -> url_monitor-0.8.9/url_monitor.egg-info
hard linking url_monitor.egg-info/SOURCES.txt -> url_monitor-0.8.9/url_monitor.egg-info
hard linking url_monitor.egg-info/dependency_links.txt -> url_monitor-0.8.9/url_monitor.egg-info
hard linking url_monitor.egg-info/entry_points.txt -> url_monitor-0.8.9/url_monitor.egg-info
hard linking url_monitor.egg-info/requires.txt -> url_monitor-0.8.9/url_monitor.egg-info
hard linking url_monitor.egg-info/top_level.txt -> url_monitor-0.8.9/url_monitor.egg-info
Writing url_monitor-0.8.9/setup.cfg
tar -cf ./artifacts/sdist/url_monitor-0.8.9.tar url_monitor-0.8.9
gzip -f9 ./artifacts/sdist/url_monitor-0.8.9.tar
tar -cf ./artifacts/sdist/url_monitor-0.8.9.tar url_monitor-0.8.9
gzip -f9 ./artifacts/sdist/url_monitor-0.8.9.tar
removing 'url_monitor-0.8.9' (and everything under it)
mkdir -p ./build
mkdir -p ./build/rpm-build
mkdir -p ./artifacts/rpms
cp -p *.patch ./artifacts/sdist/
cp: cannot stat `*.patch': No such file or directory
make: [prep_rpmbuild] Error 1 (ignored)
rpmbuild --define "_topdir %(pwd)/build" --define "_sourcedir  %(pwd)/artifacts/sdist" --define "_builddir %{_topdir}/rpm-build" --define "_srcrpmdir %{_rpmdir}" --define "_rpmdir %(pwd)/artifacts/rpms" -ba url_monitor.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.D6x3KJ
+ umask 022
+ cd /home/jon/zabbix_api_monitor/build/rpm-build
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/jon/zabbix_api_monitor/build/rpm-build
+ rm -rf url_monitor-0.8.9
+ /bin/tar -xf -
+ /usr/bin/gzip -dc /home/jon/zabbix_api_monitor/artifacts/sdist/url_monitor-0.8.9.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd url_monitor-0.8.9
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.B78q6J
+ umask 022
+ cd /home/jon/zabbix_api_monitor/build/rpm-build
+ cd url_monitor-0.8.9
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.k160sK
+ umask 022
+ cd /home/jon/zabbix_api_monitor/build/rpm-build
+ '[' /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64 '!=' / ']'
+ rm -rf /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
++ dirname /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
+ mkdir -p /home/jon/zabbix_api_monitor/build/BUILDROOT
+ mkdir /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
+ cd url_monitor-0.8.9
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
+ /usr/bin/python setup.py install --root /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/url_monitor
copying url_monitor/commons.py -> build/lib/url_monitor
copying url_monitor/packaging.py -> build/lib/url_monitor
copying url_monitor/zbxsend.py -> build/lib/url_monitor
copying url_monitor/jpath.py -> build/lib/url_monitor
copying url_monitor/main.py -> build/lib/url_monitor
copying url_monitor/configuration.py -> build/lib/url_monitor
copying url_monitor/__init__.py -> build/lib/url_monitor
running install_lib
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/commons.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/packaging.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/zbxsend.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/jpath.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/main.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/configuration.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
copying build/lib/url_monitor/__init__.py -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor
byte-compiling /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor/commons.py to commons.pyc
byte-compiling /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor/packaging.py to packaging.pyc
byte-compiling /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor/zbxsend.py to zbxsend.pyc
byte-compiling /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor/jpath.py to jpath.pyc
byte-compiling /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor/main.py to main.pyc
byte-compiling /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor/configuration.py to configuration.pyc
running install_data
creating /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/etc
copying url_monitor.yaml -> /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/etc
running install_egg_info
running egg_info
writing requirements to url_monitor.egg-info/requires.txt
writing url_monitor.egg-info/PKG-INFO
writing top-level names to url_monitor.egg-info/top_level.txt
writing dependency_links to url_monitor.egg-info/dependency_links.txt
writing entry points to url_monitor.egg-info/entry_points.txt
reading manifest file 'url_monitor.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'url_monitor.egg-info/SOURCES.txt'
Copying url_monitor.egg-info to /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6/site-packages/url_monitor-0.8.9-py2.6.egg-info
running install_scripts
Installing url_monitor script to /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/bin
+ mkdir -p /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/var/log/url_monitor
+ mkdir -p /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/var/lib/url_monitor
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /home/jon/zabbix_api_monitor/build/rpm-build/url_monitor-0.8.9
find: `debug': No such file or directory
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python
Bytecompiling .py files below /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/lib/python2.6 using /usr/bin/python2.6
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: url_monitor-0.8.9-1.el6.noarch
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.uWqiLL
+ umask 022
+ cd /home/jon/zabbix_api_monitor/build/rpm-build
+ cd url_monitor-0.8.9
+ DOCDIR=/home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/share/doc/url_monitor-0.8.9
+ export DOCDIR
+ rm -rf /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/share/doc/url_monitor-0.8.9
+ /bin/mkdir -p /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/share/doc/url_monitor-0.8.9
+ cp -pr README.md /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64/usr/share/doc/url_monitor-0.8.9
+ exit 0
Provides: config(url_monitor) = 0.8.9-1.el6
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(pre): /bin/sh shadow-utils
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Requires: /usr/bin/python python(abi) = 2.6
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
Wrote: /home/jon/zabbix_api_monitor/artifacts/rpms/url_monitor-0.8.9-1.el6.src.rpm
Wrote: /home/jon/zabbix_api_monitor/artifacts/rpms/noarch/url_monitor-0.8.9-1.el6.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.0LegVV
+ umask 022
+ cd /home/jon/zabbix_api_monitor/build/rpm-build
+ cd url_monitor-0.8.9
+ /bin/rm -rf /home/jon/zabbix_api_monitor/build/BUILDROOT/url_monitor-0.8.9-1.el6.x86_64
+ exit 0
EOF

Leave a Reply

Your email address will not be published. Required fields are marked *