Skip to content

Commit

Permalink
Simplify dependancy installation in CI
Browse files Browse the repository at this point in the history
Unclear if `BuildRequires:  python3dist(tox-current-env)` is actually
required. More testing required.
  • Loading branch information
thebeanogamer committed May 26, 2023
1 parent ac8b3b8 commit a66ea3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ ifdef outdir
endif

rpm: tar
sudo dnf builddep -y hstsparser.spec
rpmbuild -br --define "_topdir `pwd`/rpmbuild" ./hstsparser.spec
sudo dnf builddep -y rpmbuild/SRPMS/hstsparser*buildreqs.nosrc.rpm
rpmbuild -br --define "_topdir `pwd`/rpmbuild" ./hstsparser.spec
sudo dnf builddep -y rpmbuild/SRPMS/hstsparser*buildreqs.nosrc.rpm
sudo dnf builddep --setopt=install_weak_deps=False -y hstsparser.spec
# rpmbuild -bd returns 1 even though it's doing what we asked for
rpmbuild -bd --define "_topdir `pwd`/rpmbuild" ./hstsparser.spec || true
ls -d rpmbuild/SRPMS/* | grep buildreqs | xargs -r sudo dnf builddep --setopt=install_weak_deps=False -y
rpmbuild -ba --define "_topdir `pwd`/rpmbuild" ./hstsparser.spec

mock: srpm
Expand All @@ -26,4 +25,4 @@ clean:
rm -rf rpmbuild

fakeci:
podman run -tv .:/repo:z fedora:38 sh -c "dnf install rpmdevtools rpm-build make tar dnf-plugins-core mock -y && cd /repo && make rpm"
podman run -tv .:/repo:z fedora:38 sh -c "dnf install rpmdevtools rpm-build make tar dnf-plugins-core -y && cd /repo && make rpm"
1 change: 1 addition & 0 deletions hstsparser.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Source: %{url}/archive/refs/tags/%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(poetry)
BuildRequires: python3dist(tox-current-env)

%description %{expand:
Parse Firefox and Chrome HSTS databases into Digital Forensics artifacts}
Expand Down

0 comments on commit a66ea3c

Please sign in to comment.