# SPDX-License-Identifier: Apache-2.0 %global goipath github.com/complytime/complyctl %global base_url https://%{goipath} %global gopath %{_builddir}/go Name: complyctl Version: 0.0.7 Release: 1.20250704011307978257.pr190.28.gad89302%{?dist} Summary: Tool to perform compliance assessment activities, scaled by plugins License: Apache-2.0 URL: %{base_url} Source0: complyctl-0.0.7.tar.gz # git is temporarily used BuildRequires: git BuildRequires: golang BuildRequires: go-rpm-macros %gometa -f %description %{name} leverages OSCAL to perform compliance assessment activities, using plugins for each stage of the lifecycle. %package openscap-plugin Summary: A plugin which extends complyctl capabilities to use OpenSCAP Requires: %{name}%{?_isa} = %{version}-%{release} Requires: scap-security-guide %description openscap-plugin openscap-plugin is a plugin which extends the complyctl capabilities to use OpenSCAP. The plugin communicates with complyctl via gRPC, providing a standard and consistent communication mechanism that gives independence for plugin developers to choose their preferred languages. %prep %autosetup -n complyctl-0.0.7 %build BUILD_DATE_GO=$(date -u +'%Y-%m-%dT%H:%M:%SZ') # Set up environment variables and flags to build properly and securely %set_build_flags # Align GIT_COMMIT and GIT_TAG with version for simplicity GO_LD_EXTRAFLAGS="-X %{goipath}/internal/version.version=%{version} \ -X %{goipath}/internal/version.gitTreeState=clean \ -X %{goipath}/internal/version.commit=%{version} \ -X %{goipath}/internal/version.buildDate=${BUILD_DATE_GO}" # Adapt go env to RPM build environment export GO111MODULE=on # Define and create the output directory for binaries GO_BUILD_BINDIR=./bin mkdir -p ${GO_BUILD_BINDIR} # Not calling the macro for more control on go env variables go build -mod=vendor -o ${GO_BUILD_BINDIR}/ -ldflags="${GO_LD_EXTRAFLAGS}" ./cmd/... %install # Install complyctl directories install -d %{buildroot}%{_bindir} install -d -m 0755 %{buildroot}%{_datadir}/%{name}/{plugins,bundles,controls} install -d -m 0755 %{buildroot}%{_libexecdir}/%{name}/plugins install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/config.d install -d -m 0755 %{buildroot}%{_mandir}/{man1,man5} # Copy sample data to be consumed by complyctl CLI cp -rp docs/samples %{buildroot}%{_datadir}/%{name} # Install files for complyctl CLI install -p -m 0755 bin/complyctl %{buildroot}%{_bindir}/complyctl install -p -m 0644 docs/man/complyctl.1 %{buildroot}%{_mandir}/man1/complyctl.1 # Install files for openscap-plugin package install -p -m 0755 bin/openscap-plugin %{buildroot}%{_libexecdir}/%{name}/plugins/openscap-plugin install -p -m 0644 docs/man/c2p-openscap-manifest.5 %{buildroot}%{_mandir}/man5/c2p-openscap-manifest.5 %check # Run unit tests go test -mod=vendor -race -v ./... %files %defattr(0644, root, root, 0755) %attr(0755, root, root) %{_bindir}/complyctl %license LICENSE %{_mandir}/man1/complyctl.1* %{_datadir}/%{name}/samples/{sample-catalog.json,sample-component-definition.json,sample-profile.json} %{_datadir}/%{name}/{plugins,bundles,controls} %{_sysconfdir}/%{name}/config.d %files openscap-plugin %attr(0755, root, root) %{_libexecdir}/%{name}/plugins/openscap-plugin %{_mandir}/man5/c2p-openscap-manifest.5* %changelog * Fri Jul 04 2025 Packit - 0.0.7-1.20250704011307978257.pr190.28.gad89302 - ci(deps): Bump anchore/sbom-action from 0.20.1 to 0.20.2 (dependabot[bot]) - feat: add support for excluding rules in a scope config (George Vauter) - feat: add default includeRules statement for dry-run (George Vauter) - ci(deps): Bump github/codeql-action from 3.29.1 to 3.29.2 (dependabot[bot]) - ci: introduce packit integration (Marcus Burghardt) - ci(deps): Bump github/codeql-action from 3.29.0 to 3.29.1 (dependabot[bot]) - fix: rename complyctl man file (Marcus Burghardt) - chore: update spec file to use vendored dependencies (Marcus Burghardt) - chore: update Makefile to use vendored dependencies (Marcus Burghardt) - feat: vendor go dependencies (Marcus Burghardt) - chore: set nil default to empty string for optional configuration (Qingmin Duanmu) - chore: update sonar project key and name (George Vauter) - chore(deps): Bump github.com/goccy/go-yaml from 1.17.1 to 1.18.0 (dependabot[bot]) - rename complytime in documentation and utils (George Vauter) - rename complytime command throughout codebase (George Vauter) - ci(deps): Bump sigstore/cosign-installer from 3.9.0 to 3.9.1 (dependabot[bot]) * Mon Jun 16 2025 George Vauter - Update package name to complyctl * Wed Jun 11 2025 Marcus Burghardt - Bump to upstream version v0.0.6 - Align with Fedora Package Guidelines * Tue May 6 2025 Qingmin Duanmu - Add complytime and openscap plugin man pages * Wed Apr 30 2025 Qingmin Duanmu - Separate plugin binary from manifest * Fri Apr 11 2025 Qingmin Duanmu - Separate package for openscap-plugin * Tue Apr 08 2025 Marcus Burghardt - Initial RPM