Skip to content

Commit

Permalink
added copyright file
Browse files Browse the repository at this point in the history
added debian directory
lintian fixes
Updated main dockerfile
  • Loading branch information
ashmeenkaur committed Jul 14, 2023
1 parent 3399736 commit 82c4c87
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 13 deletions.
5 changes: 5 additions & 0 deletions DEBIAN/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gcsfuse (1.0.0) stable; urgency=medium

* Package created with dpkg-deb --build

-- GCSFuse Eng Team <gcs-fuse-eng@google.com> Thu, 13 Jul 2023 05:37:50 +0000
12 changes: 12 additions & 0 deletions DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Version: 1.0.0
Source: gcsfuse
Maintainer: GCSFuse Eng Team <gcs-fuse-eng@google.com>
Homepage: https://github.com/GoogleCloudPlatform/gcsfuse
Package: gcsfuse
Architecture: amd64
Depends: libc6 (>= 2.3.2), fuse
Description: User-space file system for Google Cloud Storage.
GCSFuse is a FUSE adapter that allows you to mount and access Cloud Storage
buckets as local file systems, so applications can read and write objects in
your bucket using standard file system semantics. Cloud Storage FUSE is an
open source product that's supported by Google.
23 changes: 23 additions & 0 deletions DEBIAN/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gcsfuse
Upstream-Contact: gcs-fuse-eng@google.com

Files: *
Copyright: Copyright 2020 Google Inc.
License: Apache-2.0

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
3 changes: 3 additions & 0 deletions DEBIAN/gcsfuse-docs.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://cloud.google.com/storage/docs/gcs-fuse
https://github.com/GoogleCloudPlatform/gcsfuse#readme
https://github.com/GoogleCloudPlatform/gcsfuse/tree/master/docs
32 changes: 19 additions & 13 deletions tools/package_gcsfuse_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
FROM golang:1.20.4 as builder

RUN apt-get update -qq && apt-get install -y ruby ruby-dev rubygems build-essential rpm && gem install --no-document bundler
RUN apt update -qq && apt install -y binutils debhelper devscripts

ENV CGO_ENABLED=0
ENV GOOS=linux
Expand All @@ -31,42 +32,47 @@ ENV GCSFUSE_PATH "$GOPATH/src/$GCSFUSE_REPO"
RUN go get -d ${GCSFUSE_REPO}

WORKDIR ${GCSFUSE_PATH}
ARG DEBEMAIL="gcs-fuse-dev@google.com"
ARG DEBFULLNAME="GCSFuse Team"

# Build Arg for building through a particular branch/commit. By default, it uses
# the tag corresponding to passed GCSFUSE VERSION
ARG BRANCH_NAME="v${GCSFUSE_VERSION}"
#ARG BRANCH_NAME="v${GCSFUSE_VERSION}"
RUN git checkout "${BRANCH_NAME}"

# Install fpm package using bundle
RUN bundle install --gemfile=${GCSFUSE_PATH}/tools/gem_dependency/Gemfile

ARG GCSFUSE_BIN="/gcsfuse"
ARG GCSFUSE_BIN="/gcsfuse_${GCSFUSE_VERSION}_amd64"
ARG GCSFUSE_DOC="${GCSFUSE_BIN}/usr/share/doc/gcsfuse"
WORKDIR ${GOPATH}
RUN go install ${GCSFUSE_REPO}/tools/build_gcsfuse
RUN mkdir -p ${GCSFUSE_BIN}
RUN build_gcsfuse ${GCSFUSE_PATH} ${GCSFUSE_BIN} ${GCSFUSE_VERSION}
RUN mkdir -p ${GCSFUSE_BIN}/usr && mv ${GCSFUSE_BIN}/bin ${GCSFUSE_BIN}/usr/bin
RUN mkdir -p ${GCSFUSE_BIN}/DEBIAN && cp $GOPATH/src/$GCSFUSE_REPO/DEBIAN/* ${GCSFUSE_BIN}/DEBIAN/
RUN mkdir -p ${GCSFUSE_DOC}
RUN mv ${GCSFUSE_BIN}/DEBIAN/copyright ${GCSFUSE_DOC} && \
mv ${GCSFUSE_BIN}/DEBIAN/changelog ${GCSFUSE_DOC} && \
mv ${GCSFUSE_BIN}/DEBIAN/gcsfuse-docs.docs ${GCSFUSE_DOC}
RUN sed -i "1s/.*/gcsfuse (${GCSFUSE_VERSION}) stable; urgency=medium/" ${GCSFUSE_DOC}/changelog && \
sed -i "1s/.*/Version: ${GCSFUSE_VERSION}/" ${GCSFUSE_BIN}/DEBIAN/control
RUN gzip -9 -n ${GCSFUSE_DOC}/changelog
RUN strip --strip-unneeded ${GCSFUSE_BIN}/usr/bin/gcsfuse && \
strip --strip-unneeded ${GCSFUSE_BIN}/sbin/mount.gcsfuse
RUN dpkg-deb --build ${GCSFUSE_BIN}

ARG GCSFUSE_PKG="/packages"
RUN mkdir -p ${GCSFUSE_PKG}
WORKDIR ${GCSFUSE_PKG}
RUN fpm \
-s dir \
-t deb \
-n gcsfuse \
-C ${GCSFUSE_BIN} \
-v ${GCSFUSE_VERSION} \
-d fuse \
--vendor "" \
--url "https://$GCSFUSE_REPO" \
--description "A user-space file system for Google Cloud Storage."
RUN mv ${GCSFUSE_BIN}.deb .
RUN fpm \
-s dir \
-t rpm \
-n gcsfuse \
-C ${GCSFUSE_BIN} \
-v ${GCSFUSE_VERSION} \
-d fuse \
--rpm-digest sha256 \
--vendor "" \
--url "https://$GCSFUSE_REPO" \
--description "A user-space file system for Google Cloud Storage."

0 comments on commit 82c4c87

Please sign in to comment.