# Generated by go2rpm 1.9.0 %bcond_without check # https://github.com/containers/storage %global goipath github.com/containers/storage Version: 1.48.0 %gometa %global godevelheader %{expand: Requires: pkgconfig(devmapper)} %global common_description %{expand: Container Storage Library.} %global golicenses LICENSE NOTICE LICENSE-mflag %global godocs docs AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md\\\ README.md SECURITY.md Name: %{goname} Release: %autorelease Summary: Container Storage Library # Main package: Apache-2.0 # pkg/mflag: BSD-3-Clause License: Apache-2.0 AND BSD-3-Clause URL: %{gourl} Source: %{gosource} BuildRequires: pkgconfig(devmapper) %description %{common_description} %gopkg %prep %goprep %autopatch -p1 mv pkg/mflag/LICENSE LICENSE-mflag sed -i "s|gotest.tools|gotest.tools/v3|" $(find . -iname "*.go" -type f) %generate_buildrequires %go_generate_buildrequires %build for cmd in cmd/* ; 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 # All theses tests fail because of Permission Denied in the mock chroot for test in "TestCheckDetectWriteable" \ "TestBtrfsSetup" \ "TestBtrfsCreateEmpty" \ "TestBtrfsCreateBase" \ "TestBtrfsCreateSnap" \ "TestBtrfsCreateFromTemplate" \ "TestBtrfsSubvolDelete" \ "TestBtrfsEcho" \ "TestBtrfsListLayers" \ "TestOverlaySetup" \ "TestOverlayCreateEmpty" \ "TestOverlayCreateBase" \ "TestOverlayCreateSnap" \ "TestOverlayCreateFromTemplate" \ "TestOverlay128LayerRead" \ "TestOverlayTarUntar" \ "TestOverlayTarAUFSUntar" \ "TestOverlayEcho" \ "TestOverlayListLayers" \ "TestVfsSetup" \ "TestVfsCreateEmpty" \ "TestVfsCreateBase" \ "TestVfsCreateSnap" \ "TestVfsCreateFromTemplate" \ "TestVfsDiffApply100Files" \ "TestVfsChanges" \ "TestVfsEcho" \ "TestVfsListLayers" \ "TestUntarPath" \ "TestUntarHardlinkToSymlink" \ "TestVfTestReplaceFileTarWrappersEcho" \ "TestTarWithBlockCharFifo" \ "TestTarUntarWithXattr" \ "TestChangesWithChangesGH13590" \ "TestCopyWithTarInexistentDestWillCreateIt" \ "TestReplaceFileTarWrapper" \ "TestChrootTarUntar" \ "TestChrootUntarWithHugeExcludesList" \ "TestChrootTarUntarWithSymlink" \ "TestChrootCopyWithTar" \ "TestChrootCopyWithTarAndChown" \ "TestChrootCopyFileWithTar" \ "TestChrootCopyFileWithTarAndChown" \ "TestChrootUntarPath" \ "TestChrootUntarPathAndChown" \ "TestChrootUntarEmptyArchiveFromSlowReader" \ "TestChrootApplyEmptyArchiveFromSlowReader" \ "TestChrootApplyDotDotFile" \ "TestUntarWithMaliciousSymlinks" \ "TestTarWithMaliciousSymlinks" \ "TestMkdirAllAs" \ "TestMkdirAllAndChownNew" \ "TestMkdirAs" \ "TestEnsureRemoveAllWithMount" \ "TestUnshareOOMScoreAdj" \ ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done rm -rfv drivers/devmapper/devmapper_test.go %gocheck %endif %files %license LICENSE NOTICE LICENSE-mflag %doc docs AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md README.md SECURITY.md %{_bindir}/containers-storage %gopkgfiles %changelog %autochangelog