Skip to content

Commit

Permalink
More Fedora fixes
Browse files Browse the repository at this point in the history
- SPDX license identifier
- don't mix tabs and spaces
- check dependencies with rpmdeplint
- define Python dependencies when not using pyproject macros

Signed-off-by: Christian Heimes <cheimes@redhat.com>
  • Loading branch information
tiran committed Mar 20, 2024
1 parent 44326aa commit d54a19f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ $(FEDORABUILDDIR)/ipa-hcc.spec: $(SPECDIR)/ipa-hcc.spec
@mkdir -p $(dir $@)
sed \
-e s'|^VCS:.*||' \
-e s'|^Version:.*|Version:\t\t$(VERSION)|' \
-e 's|^Source:.*|Source:\t\thttps://github.com/podengo-project/ipa-hcc/archive/refs/tags/ipa-hcc-%{version}-1.tar.gz|' \
-e s'|^Version:.*|Version: $(VERSION)|' \
-e 's|^Source:.*|Source: https://github.com/podengo-project/ipa-hcc/archive/refs/tags/ipa-hcc-%{version}-1.tar.gz|' \
-e 's|^%setup.*|%autosetup -n ipa-hcc-ipa-hcc-%{version}-1|' \
$< > $@

Expand All @@ -153,7 +153,10 @@ fedorabuild: $(FEDORABUILDDIR)/ipa-hcc.spec
$(foreach cond,$(RPM_WITH),--with $(cond)) \
$(foreach cond,$(RPM_WITHOUT),--without $(cond)) \
-ba $<
find $(FEDORABUILDDIR) -name '*.rpm'
rpmlint --ignore-unused-rpmlintrc --strict -r ipa-hcc.rpmlintrc $(FEDORA_RPMDIRS)
find $(FEDORABUILDDIR) -name '*.rpm' -printf '%f\n'
rpm -qR ./build/fedora/RPMS/noarch/*.rpm | sort -u
rpmdeplint check-sat --repos-from-system $(FEDORABUILDDIR)/RPMS/noarch/ipa-hcc-server-*.rpm

.PHONY: test
test:
Expand Down
9 changes: 8 additions & 1 deletion ipa-hcc.spec.rpkg
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Summary: Hybrid Cloud Console extension for IPA

BuildArch: noarch

License: GPLv3+
License: GPL-3.0-or-later
URL: https://github.com/podengo-project/ipa-hcc
VCS: {{{ git_dir_vcs }}}
# tag names are generated by rpkg
Expand Down Expand Up @@ -103,6 +103,8 @@ BuildRequires: krb5-devel
BuildRequires: python3-pyyaml
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: rpmdeplint
BuildRequires: rpmlint
%endif

%description
Expand All @@ -118,7 +120,12 @@ Requires: %{ipa_name}-server >= %{ipa_version}
Requires(post): %{ipa_name}-server >= %{ipa_version}
Requires: httpd
Requires: mod_ssl
%if %{without pyproject_macros}
Requires: python3-cryptography
Requires: python3-jsonschema
Requires: python3-jwcrypto
Requires: python3-requests
%endif
Requires: selinux-policy
Requires(post): selinux-policy
%{?systemd_requires}
Expand Down

0 comments on commit d54a19f

Please sign in to comment.