Skip to content

Commit

Permalink
Merge pull request #3395 from ytti/update-net-scp
Browse files Browse the repository at this point in the history
Update net-scp
  • Loading branch information
robertcheramy authored Feb 11, 2025
2 parents 35ddd43 + 1505669 commit d04b343
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
18 changes: 3 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ RUN apt-get update && apt-get install -y \
build-essential \
git \
ruby-dev \
# Needed to build Net::SCP from https://github.com/robertcheramy/net-scp.git
# Can be removed after issue
# https://github.com/robertcheramy/net-scp/issues/1 is fixed
rubocop \
&& rm -rf /var/lib/apt/lists/*

# create bundle directory
Expand All @@ -23,12 +19,6 @@ ENV GEM_HOME=/usr/local/bundle
RUN gem install x25519 --no-document


###################
# build net-scp from https://github.com/robertcheramy/net-scp for APC devices
WORKDIR /tmp/net-scp/
RUN git clone -c advice.detachedHead=false --branch 4.0.3.fork --single-branch https://github.com/robertcheramy/net-scp.git /tmp/net-scp
RUN rake build

###################
# build oxidized
COPY . /tmp/oxidized/
Expand Down Expand Up @@ -107,16 +97,14 @@ COPY --from=prebuilder /usr/local/bundle /usr/local/bundle
ENV GEM_HOME="/usr/local/bundle"
ENV PATH="$GEM_HOME/bin:$PATH"

# Install previously built net-scp
COPY --from=prebuilder /tmp/net-scp/pkg/net-scp-4.0.3.fork.gem /tmp/
RUN gem install /tmp/net-scp-4.0.3.fork.gem

# gems not available in ubuntu noble
RUN gem install --no-document \
# dependencies for hooks
slack-ruby-client cisco_spark \
# dependencies for specific inputs
net-tftp
net-tftp \
# Net scp is needed in Version >= 4.1.0, which is not available in ubuntu
net-scp

# install oxidized from prebuilder
# The Dockerfile ist version-independent, so use oxidized-*.gem to cach the gem
Expand Down
2 changes: 1 addition & 1 deletion oxidized.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_dependency 'ed25519', '~> 1.2'
s.add_dependency 'net-ftp', '~> 0.2'
s.add_dependency 'net-http-digest_auth', '~> 1.4'
s.add_dependency 'net-scp', '~> 4.0'
s.add_dependency 'net-scp', '~> 4.1'
s.add_dependency 'net-ssh', '~> 7.3'
s.add_dependency 'net-telnet', '~> 0.2'
s.add_dependency 'ostruct', '~> 0.6'
Expand Down

0 comments on commit d04b343

Please sign in to comment.