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

RPM build #1884

Open
volga629-1 opened this issue May 3, 2024 · 3 comments
Open

RPM build #1884

volga629-1 opened this issue May 3, 2024 · 3 comments
Labels
p1 P1 question Customer Issue: question about how to use tool

Comments

@volga629-1
Copy link

Hello Everyone,
Is possible to share RPM spec file ?

Thank you, volga629

@volga629-1 volga629-1 added p1 P1 question Customer Issue: question about how to use tool labels May 3, 2024
@sethiay
Copy link
Collaborator

sethiay commented May 4, 2024

We use this Dockerfile to build rpm package. Let us know if that helps. If not, could you elaborate your use-case ?

@volga629-1
Copy link
Author

Thank you for reply,

  1. Version control.
  2. Local repository package availability.
  3. Feature testing

@volga629-1
Copy link
Author

Here are test spec file which I was working on.

#bcond_without check

# https://github.com/GoogleCloudPlatform/gcsfuse
%global goipath         gcsfuse.spec
%global forgeurl        https://github.com/GoogleCloudPlatform/gcsfuse
Version:                2.0.1

# REMOVE BEFORE SUBMITTING THIS FOR REVIEW
# ---
# New Fedora packages should use %%gometa -f, which makes the package
# ExclusiveArch to %%golang_arches_future and thus excludes the package from
# %%ix86. If the new package is needed as a dependency for another package,
# please consider removing that package from %%ix86 in the same way, instead of
# building more go packages for i686. If your package is not a leaf package,
# you'll need to coordinate the removal of the package's dependents first.
# ---
# REMOVE BEFORE SUBMITTING THIS FOR REVIEW
%gometa -f

%global common_description %{expand:
A user-space file system for interacting with Google Cloud Storage.}

%global golicenses      LICENSE
%global godocs          docs README.md perfmetrics/scripts/README.md\\\
                        perfmetrics/scripts/requirements.txt\\\
                        perfmetrics/scripts/ml_tests/tf/resnet/README.md\\\
                        perfmetrics/scripts/ml_tests/pytorch/README-usage.md\\\
                        perfmetrics/scripts/ls_metrics/README.md\\\
                        perfmetrics/scripts/ls_metrics/requirements.txt\\\
                        perfmetrics/scripts/load_tests/python/README.md perfm\\\
                        etrics/scripts/load_tests/python/requirements.txt per\\\
                        fmetrics/scripts/continuous_test/gcp_ubuntu/periodic_\\\
                        experiments/README.md\\\
                        perfmetrics/scripts/bigquery/requirements.txt\\\
                        DEBIAN/changelog tools/cd_scripts/requirements.txt

Name:           golang-gcsfuse
Release:        %autorelease
Summary:        A user-space file system for interacting with Google Cloud Storage

License:        Apache-2.0
URL:            %{gourl}
Source:         %{gosource}

%description %{common_description}
BuildRequires: golang

%gopkg

%prep
%goprep -A
%autopatch -p1

%generate_buildrequires
%go_generate_buildrequires

%build
%gobuild -o %{gobuilddir}/bin/gcsfuse %{goipath}
for cmd in benchmarks/read_within_file benchmarks/read_full_file benchmarks/write_to_gcs benchmarks/stat_files tools/package_gcsfuse tools/prefetch_cache_gcsfuse tools/mount_gcsfuse tools/build_gcsfuse benchmarks/write_locally; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done

%install
%gopkginstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

%if %{with check}
%check
%gocheck
%endif

%files
%license LICENSE
%doc docs README.md perfmetrics/scripts/README.md
%doc perfmetrics/scripts/requirements.txt
%doc perfmetrics/scripts/ml_tests/tf/resnet/README.md
%doc perfmetrics/scripts/ml_tests/pytorch/README-usage.md
%doc perfmetrics/scripts/ls_metrics/README.md
%doc perfmetrics/scripts/ls_metrics/requirements.txt
%doc perfmetrics/scripts/load_tests/python/README.md
%doc perfmetrics/scripts/load_tests/python/requirements.txt
%doc perfmetrics/scripts/continuous_test/gcp_ubuntu/periodic_experiments/README.md
%doc perfmetrics/scripts/bigquery/requirements.txt DEBIAN/changelog
%doc tools/cd_scripts/requirements.txt
%{_bindir}/*

%gopkgfiles

%changelog
%autochangelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 P1 question Customer Issue: question about how to use tool
Projects
None yet
Development

No branches or pull requests

3 participants