RPM build
volga629-1 opened this issue · comments
Hello Everyone,
Is possible to share RPM spec file ?
Thank you, volga629
We use this Dockerfile to build rpm package. Let us know if that helps. If not, could you elaborate your use-case ?
Thank you for reply,
- Version control.
- Local repository package availability.
- Feature testing
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
Hi @volga629-1 ,
Did this #1884 (comment) help?
I generated spec and RPM package right here are.
http://ftpsrv01.networklab.ca/fedora/39/SRPMS/gcsfuse-2.0.1-1.fc39.src.rpm
Unfortunately I am not able to access this link. Closing this issue as you are able to generate rpm package your self. Feel free to reopen in case anything require from our side.
Thanks,
Tulsi Shah