Skip to content

Commit efb85ef

Browse files
committed
update rpm spec to fix rpm build
* CLOUDBLD-3153 Signed-off-by: Harsh Modi <[email protected]>
1 parent eaae0cc commit efb85ef

File tree

1 file changed

+73
-65
lines changed

1 file changed

+73
-65
lines changed

charon.spec

Lines changed: 73 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,97 @@
1-
%global binaries_py_version %{python3_version}
21
%global owner Commonjava
3-
%global project charon
2+
%global modulename charon
3+
4+
%global charon_version 1.1.2
5+
%global sdist_tar_name %{modulename}-%{charon_version}
6+
7+
%global python3_pkgversion 3
8+
9+
# Remove brp-python-bytecompile from os_install_post
10+
%global __os_install_post /usr/lib/rpm/brp-compress \
11+
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
12+
/usr/lib/rpm/brp-strip-static-archive %{__strip} \
13+
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
14+
/usr/lib/rpm/brp-python-hardlink
15+
16+
Name: %{modulename}
17+
Summary: Charon CLI
18+
Version: %{charon_version}
19+
Release: 1%{?dist}
20+
URL: https://github.com/%{owner}/%{modulename}
21+
Source0: %{url}/archive/%{charon_version}.tar.gz
22+
Provides: %{modulename} = %{version}-%{release}
23+
24+
Group: Development/Tools
25+
License: APLv2
26+
27+
# Build Requirements
28+
BuildArch: x86_64
29+
30+
BuildRequires: python%{python3_pkgversion}-setuptools
31+
BuildRequires: python%{python3_pkgversion}-devel
32+
33+
Requires: python%{python3_pkgversion}-boto3
34+
Requires: python%{python3_pkgversion}-botocore
35+
Requires: python%{python3_pkgversion}-jinja2
36+
Requires: python%{python3_pkgversion}-markupsafe
37+
Requires: python%{python3_pkgversion}-dateutil
38+
Requires: python%{python3_pkgversion}-six
39+
Requires: python%{python3_pkgversion}-jmespath
40+
Requires: python%{python3_pkgversion}-urllib3
41+
Requires: python%{python3_pkgversion}-s3transfer
42+
Requires: python%{python3_pkgversion}-click
43+
Requires: python%{python3_pkgversion}-requests
44+
Requires: python%{python3_pkgversion}-idna
45+
Requires: python%{python3_pkgversion}-chardet
46+
Requires: python%{python3_pkgversion}-cryptography
47+
Requires: python%{python3_pkgversion}-cffi
48+
Requires: python%{python3_pkgversion}-pycparser
49+
Requires: python%{python3_pkgversion}-certifi
50+
Requires: python%{python3_pkgversion}-pyOpenSSL
51+
Requires: python%{python3_pkgversion}-ruamel-yaml
52+
Requires: python%{python3_pkgversion}-defusedxml
53+
Requires: python%{python3_pkgversion}-semantic-version
54+
Requires: python%{python3_pkgversion}-subresource-integrity
55+
Requires: python%{python3_pkgversion}-jsonschema
56+
Requires: python%{python3_pkgversion}-importlib-metadata
57+
Requires: python%{python3_pkgversion}-zipp
58+
Requires: python%{python3_pkgversion}-attrs
59+
Requires: python%{python3_pkgversion}-pyrsistent
460

5-
Name: %{project}
6-
Version: 1.0.0
7-
Release: 1%{?dist}
8-
9-
Summary: Charon CLI
10-
Group: Development/Tools
11-
License: APLv2
12-
URL: https://github.com/%{owner}/%{project}
13-
Source0: https://github.com/%{owner}/%{project}/archive/%{version}.tar.gz
14-
15-
BuildArch: noarch
16-
17-
Requires: python3-charon = %{version}-%{release}
18-
Requires: git >= 1.7.10
19-
20-
BuildRequires: python3-devel
21-
BuildRequires: python3-setuptools
2261

2362
%description
2463
Simple Python tool with command line interface for charon init,
2564
upload, delete, gen and ls functions.
2665

27-
%package -n python3-charon
28-
Summary: Python 3 CHARON library
29-
Group: Development/Tools
30-
License: APLv2
31-
Requires: python3-requests
32-
Requires: python3-setuptools
33-
Requires: python3-rpm
34-
%{?python_provide:%python_provide python3-charon}
35-
36-
%description -n python3-charon
37-
Simple Python 3 library for CHARON functions.
38-
3966
%prep
40-
%setup -q
67+
%autosetup -p1 -n %{sdist_tar_name}
4168

4269
%build
70+
# Disable debuginfo packages
71+
%define _enable_debug_package 0
72+
%define debug_package %{nil}
4373
%py3_build
4474

4575

4676
%install
77+
export LANG=en_US.UTF-8 LANGUAGE=en_US.en LC_ALL=en_US.UTF-8
4778
%py3_install
48-
mv %{buildroot}%{_bindir}/charon %{buildroot}%{_bindir}/charon-%{python3_version}
49-
ln -s %{_bindir}/charon-%{python3_version} %{buildroot}%{_bindir}/charon-3
50-
51-
ln -s %{_bindir}/charon-%{binaries_py_version} %{buildroot}%{_bindir}/charon
52-
53-
# ship charon in form of tarball so it can be installed within build image
54-
mkdir -p %{buildroot}/%{_datadir}/%{name}/
55-
cp -a %{sources} %{buildroot}/%{_datadir}/%{name}/charon.tar.gz
56-
57-
# setup docs
58-
#mkdir -p %{buildroot}%{_mandir}/man1
59-
#cp -a docs/manpage/charon.1 %{buildroot}%{_mandir}/man1/
6079

6180

6281
%files
82+
%defattr(-,root,root)
6383
%doc README.md
64-
#%{_mandir}/man1/charon.1*
84+
%{_bindir}/%{modulename}*
85+
%{python3_sitelib}/*
6586
%{!?_licensedir:%global license %doc}
6687
%license LICENSE
67-
%{_bindir}/charon
68-
69-
%files -n python3-charon
70-
%doc README.md
71-
%{!?_licensedir:%global license %doc}
72-
%license LICENSE
73-
%{_bindir}/charon-%{python3_version}
74-
%{_bindir}/charon-3
75-
#%{_mandir}/man1/charon.1*
76-
%dir %{python3_sitelib}/charon
77-
%dir %{python3_sitelib}/charon/__pycache__
78-
%{python3_sitelib}/charon/*.*
79-
%{python3_sitelib}/charon/cmd
80-
%{python3_sitelib}/charon/pkgs
81-
%{python3_sitelib}/charon/utils
82-
%{python3_sitelib}/charon/__pycache__/*.py*
83-
%{python3_sitelib}/charon_*.egg-info
84-
%dir %{_datadir}/%{name}
85-
# ship charon in form of tarball so it can be installed within build image
86-
%{_datadir}/%{name}/charon.tar.gz
8788

8889

8990
%changelog
91+
* Tue Sep 20 2022 Harsh Modi <[email protected]>
92+
- 1.1.2 release
93+
- add configuration schema and validation
94+
- allow specifying multiple target buckets
95+
96+
* Thu Aug 25 2022 Harsh Modi <[email protected]>
97+
- 1.1.1 release

0 commit comments

Comments
 (0)