Skip to content

Commit

Permalink
Remove redundant installations in rpm build
Browse files Browse the repository at this point in the history
  • Loading branch information
rydrman committed Mar 15, 2024
1 parent 815d3d5 commit 0f6ba7d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 1 addition & 5 deletions rpmbuild.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN yum install -y \
RUN ln -s cmake3 /usr/bin/cmake
# install rustup for the cargo tool and compile toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh /dev/stdin -y --default-toolchain=1.76.0
ENV PATH="${PATH}:/root/.cargo/bin"
# install protobuf compiler (protoc command)
ENV PB_REL="https://github.com/protocolbuffers/protobuf/releases"
RUN curl --proto '=https' --tlsv1.2 -sSfLO ${PB_REL}/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip && \
Expand All @@ -22,11 +23,6 @@ RUN curl --proto '=https' --tlsv1.2 -sSfL ${FB_REL}/download/v23.5.26/Linux.flat
RUN chmod +x /usr/bin/flatc
ENV PATH $PATH:/root/.cargo/bin

# Protobuf compiler (more recent than yum package)
ENV PB_REL="https://github.com/protocolbuffers/protobuf/releases"
RUN curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
RUN unzip protoc-3.15.8-linux-x86_64.zip -d /

RUN mkdir -p /root/rpmbuild/{SOURCES,SPECS,RPMS,SRPMS}

FROM build_env as rpm_build
Expand Down
8 changes: 5 additions & 3 deletions spfs.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: spfs
Version: 0.40.0
Release: 1
Release: 1%{?dist}
Summary: Filesystem isolation, capture, and distribution.
License: NONE
URL: https://github.com/imageworks/spfs
Expand All @@ -13,7 +13,9 @@ BuildRequires: make
BuildRequires: cmake3
BuildRequires: openssl-devel
BuildRequires: fuse3-devel
BuildRequires: flatbuffers-compiler
# see explicit versions from dockerfile
# BuildRequires: flatbuffers-compiler
# BuildRequires: protobuf-compiler
BuildRequires: m4
Requires: fuse3
Requires: rsync
Expand All @@ -27,7 +29,7 @@ Filesystem isolation, capture, and distribution.
%setup -q

%build
cargo build --release -p spfs -p spfs-cli-main -p spfs-cli-clean -p spfs-cli-enter -p spfs-cli-join -p spfs-cli-monitor -p spfs-cli-render --verbose --all --features=server,spfs/protobuf-src,fuse-backend-rhel-7-9
cargo build --release -p spfs -p spfs-cli-main -p spfs-cli-clean -p spfs-cli-enter -p spfs-cli-join -p spfs-cli-monitor -p spfs-cli-render --all --features=server,spfs/protobuf-src,fuse-backend-rhel-7-9

%install
mkdir -p %{buildroot}/usr/local/bin
Expand Down
5 changes: 4 additions & 1 deletion spk.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: spk
Version: 0.40.0
Release: 1
Release: 1%{?dist}
Summary: Package manager and a software runtime for studio environments
License: NONE
URL: https://github.com/imageworks/spk
Expand All @@ -14,6 +14,9 @@ BuildRequires: openssl-devel
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: fuse3-devel
# see explicit versions from dockerfile
# BuildRequires: flatbuffers-compiler
# BuildRequires: protobuf-compiler
BuildRequires: m4
BuildRequires: cmake3
BuildRequires: make
Expand Down

0 comments on commit 0f6ba7d

Please sign in to comment.