## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.16.0 %bcond check 1 %global gomodulesmode GO111MODULE=on # https://github.com/rfjakob/gocryptfs %global goipath github.com/rfjakob/gocryptfs/v2 Version: 2.5.4 %gometa -L -f %global common_description %{expand: Encrypted overlay filesystem written in Go.} Name: gocryptfs Release: %autorelease Summary: Encrypted overlay filesystem written in Go # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: gcc BuildRequires: go-vendor-tools BuildRequires: pandoc BuildRequires: pkgconfig(libcrypto) BuildRequires: /usr/bin/fusermount Requires: fuse3 %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build export GO_LDFLAGS="-X main.GitVersion=%{version} \ -X main.GitVersionFuse=$(go list -m github.com/hanwen/go-fuse/v2 | cut -d' ' -f2-) \ -X main.BuildDate=$(date -u --date="@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" %gobuild -o %{gobuilddir}/bin/gocryptfs %{goipath} %gobuild -o %{gobuilddir}/bin/gocryptfs-xray %{goipath}/gocryptfs-xray ./Documentation/MANPAGE-render.bash %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm644 Documentation/gocryptfs.1 -t %{buildroot}%{_mandir}/man1 install -Dpm644 Documentation/gocryptfs-xray.1 -t %{buildroot}%{_mandir}/man1 %check %go_vendor_license_check -c %{S:2} %if %{with check} # Requires the allow_other option in /etc/fuse for test in "TestForceOwner" \ "TestGetdents" \ ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done sed -i '/allow_other:/d' tests/cli/directmount_test.go # Requires root rm -rf tests/root_test # Hardcoded paths ln -s %{gobuilddir}/bin/gocryptfs . ln -s %{gobuilddir}/bin/gocryptfs-xray gocryptfs-xray %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md %{_bindir}/gocryptfs %{_bindir}/gocryptfs-xray %{_mandir}/man1/gocryptfs-xray.1.* %{_mandir}/man1/gocryptfs.1.* %changelog ## START: Generated by rpmautospec * Tue May 27 2025 John Doe - 2.5.4-1 - Uncommitted changes ## END: Generated by rpmautospec