Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add copyright file #1225

Merged
merged 3 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 Team <gcs-fuse-maintainers@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
ashmeenkaur marked this conversation as resolved.
Show resolved Hide resolved
Source: gcsfuse
Maintainer: GCSFuse Team <gcs-fuse-maintainers@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-maintainers@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
35 changes: 24 additions & 11 deletions tools/package_gcsfuse_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ ENV GCSFUSE_PATH "$GOPATH/src/$GCSFUSE_REPO"
RUN go get -d ${GCSFUSE_REPO}

WORKDIR ${GCSFUSE_PATH}
ARG DEBEMAIL="gcs-fuse-maintainers@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}"
Expand All @@ -39,26 +42,35 @@ 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

# Creating structure for debian package as we are using 'dpkg-deb --build' to create debian package
RUN mkdir -p ${GCSFUSE_BIN}/DEBIAN && cp $GOPATH/src/$GCSFUSE_REPO/DEBIAN/* ${GCSFUSE_BIN}/DEBIAN/
ashmeenkaur marked this conversation as resolved.
Show resolved Hide resolved
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}
# Update gcsfuse version in changelog and control file
RUN sed -i "1s/.*/gcsfuse (${GCSFUSE_VERSION}) stable; urgency=medium/" ${GCSFUSE_DOC}/changelog && \
sed -i "1s/.*/Version: ${GCSFUSE_VERSION}/" ${GCSFUSE_BIN}/DEBIAN/control
# Compress changelog as required by lintian
RUN gzip -9 -n ${GCSFUSE_DOC}/changelog
# Strip unneeded from binaries as required by lintian
ashmeenkaur marked this conversation as resolved.
Show resolved Hide resolved
RUN strip --strip-unneeded ${GCSFUSE_BIN}/usr/bin/gcsfuse && \
strip --strip-unneeded ${GCSFUSE_BIN}/sbin/mount.gcsfuse

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."
# Build the package
RUN dpkg-deb --build ${GCSFUSE_BIN}
RUN mv ${GCSFUSE_BIN}.deb .
RUN fpm \
ashmeenkaur marked this conversation as resolved.
Show resolved Hide resolved
-s dir \
-t rpm \
Expand All @@ -67,6 +79,7 @@ RUN fpm \
-v ${GCSFUSE_VERSION} \
-d fuse \
--rpm-digest sha256 \
--license Apache-2.0 \
--vendor "" \
--url "https://$GCSFUSE_REPO" \
--description "A user-space file system for Google Cloud Storage."