# SPDX-License-Identifier: Apache-2.0 %global goipath github.com/complytime/complyctl %global base_url https://%{goipath} %global app_dir complytime %global gopath %{_builddir}/go %global debug_package %{nil} Name: complyctl Version: 0.0.10 Release: 0.20250925175156274280.pr287.85.g351a289%{?dist} Summary: Tool to perform compliance assessment activities, scaled by plugins License: Apache-2.0 URL: %{base_url} Source0: complyctl-0.0.10.tar.gz BuildRequires: golang BuildRequires: go-rpm-macros %gometa -f %description %{name} leverages OSCAL to perform compliance assessment activities, using plugins for each stage of the life-cycle. %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 using Remote Procedure Calls, providing a standard and consistent communication mechanism that allows plugin developers to use their preferred programming languages. %prep %goprep -k %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 -buildmode=pie -o ${GO_BUILD_BINDIR}/ -ldflags="${GO_LD_EXTRAFLAGS}" ./cmd/... %install # Install complyctl directories install -d %{buildroot}%{_bindir} install -d -m 0755 %{buildroot}%{_datadir}/%{app_dir}/{plugins,bundles,controls} install -d -m 0755 %{buildroot}%{_libexecdir}/%{app_dir}/plugins install -d -m 0755 %{buildroot}%{_sysconfdir}/%{app_dir}/config.d install -d -m 0755 %{buildroot}%{_mandir}/{man1,man5,man7} # Copy sample data to be consumed by complyctl CLI cp -rp docs/samples %{buildroot}%{_datadir}/%{app_dir} install -p -m 0644 docs/samples/sample-{catalog,profile}.json %{buildroot}%{_datadir}/%{app_dir}/controls install -p -m 0644 docs/samples/sample-component-definition.json %{buildroot}%{_datadir}/%{app_dir}/bundles # 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}/%{app_dir}/plugins/openscap-plugin install -p -m 0644 docs/man/complyctl-openscap-plugin.7 %{buildroot}%{_mandir}/man7/complyctl-openscap-plugin.7 install -p -m 0644 docs/man/c2p-openscap-manifest.5 %{buildroot}%{_mandir}/man5/c2p-openscap-manifest.5 %post openscap-plugin plugin_path=%{_libexecdir}/%{app_dir}/plugins/openscap-plugin manifest_in=%{_datadir}/%{app_dir}/samples/c2p-openscap-manifest.json manifest_out=%{_datadir}/%{app_dir}/plugins/c2p-openscap-manifest.json # Use sed to replace placeholders in manifest file for openscap-plugin if [ -f "$plugin_path" ] && [ -f "$manifest_in" ]; then checksum=$(sha256sum "$plugin_path" | awk '{ print $1 }') version="%{version}" sed -e "s|checksum_placeholder|$checksum|" \ -e "s|version_placeholder|$version|" \ "$manifest_in" > "$manifest_out" fi %check # Run unit tests go test -mod=vendor -race -v ./... %files %attr(0755, root, root) %{_bindir}/complyctl %license LICENSE %{_mandir}/man1/complyctl.1* %dir %{_datadir}/%{app_dir} %dir %{_datadir}/%{app_dir}/{plugins,bundles,controls,samples} %dir %{_libexecdir}/%{app_dir} %dir %{_libexecdir}/%{app_dir}/plugins %dir %{_sysconfdir}/%{app_dir} %dir %{_sysconfdir}/%{app_dir}/config.d %{_datadir}/%{app_dir}/samples/{sample-catalog.json,sample-component-definition.json,sample-profile.json,c2p-openscap-manifest.json} %{_datadir}/%{app_dir}/controls/{sample-catalog.json,sample-profile.json} %{_datadir}/%{app_dir}/bundles/sample-component-definition.json %files openscap-plugin %attr(0755, root, root) %{_libexecdir}/%{app_dir}/plugins/openscap-plugin %license LICENSE %{_mandir}/man7/complyctl-openscap-plugin.7* %{_mandir}/man5/c2p-openscap-manifest.5* %ghost %{_datadir}/%{app_dir}/plugins/c2p-openscap-manifest.json %changelog * Thu Sep 25 2025 Packit - 0.0.10-0.20250925175156274280.pr287.85.g351a289 - fix: Ensure workspace error redundancy check (sonupreetam) - chore(deps): Bump github.com/defenseunicorns/go-oscal (dependabot[bot]) - docs: Update broken component definition URL in QUICK_START (Camilo Cota) - chore: [CPLYTM-1018] remove placeholders (Sophia Wang) - fix: updating image source for diagram (Hannah Braswell) - docs: introducing plugin diagram (Hannah Braswell) - chore(deps): Bump github.com/oscal-compass/compliance-to-policy-go/v2 (dependabot[bot]) - Add doc for testing farm tests (axuan) - chore: bump oscal-sdk-go version to 0.0.7 (Qingmin Duanmu) - feat: factoring in review comments (Hannah Braswell) - fix: reduced reference to scap (Hannah Braswell) - feat: updating complyctl man commands (Hannah Braswell) - docs: apply suggestions from code review (Hannah Braswell) - feat: adding context to man oscap plugin (Hannah Braswell) - Using test farm to test RPM provide content (axuan) - chore(deps): Bump github.com/charmbracelet/bubbletea from 1.3.8 to 1.3.9 (dependabot[bot]) - chore(deps): Bump github.com/oscal-compass/oscal-sdk-go (dependabot[bot]) - ci(deps): Bump anchore/sbom-action from 0.20.5 to 0.20.6 (dependabot[bot]) - ci(deps): Bump sigstore/cosign-installer from 3.9.2 to 3.10.0 (dependabot[bot]) - docs: applying suggestions from code review for docs (Hannah Braswell) - feat: updating the man page with waived rules (Hannah Braswell) - docs: updating the README.md with waived rules (Hannah Braswell) - chore: [CPLYTM-566] Create badge that shows pass/fail status on update-sonarcloud-github-status (#271) (t_hat) - chore(deps): Bump github.com/oscal-compass/compliance-to-policy-go/v2 (dependabot[bot]) - ci(deps): Bump github/codeql-action from 3.30.2 to 3.30.3 (dependabot[bot]) - chore: refine apply rule scope (Qingmin Duanmu) - chore(deps): Bump github.com/charmbracelet/bubbletea from 1.3.6 to 1.3.7 (dependabot[bot]) - chore: CPLYTM-985 add test cases for waived rules (Qingmin Duanmu) - feat: CPLYTM-983 add support for waived rules (Qingmin Duanmu) - ci(deps): Bump github/codeql-action from 3.30.1 to 3.30.2 (dependabot[bot]) - chore(deps): Bump github.com/spf13/pflag from 1.0.7 to 1.0.10 (dependabot[bot]) - chore(deps): Bump github.com/spf13/cobra from 1.9.1 to 1.10.1 (dependabot[bot]) - ci(deps): Bump actions/github-script from 7.0.1 to 8.0.0 (dependabot[bot]) - ci(deps): Bump github/codeql-action from 3.30.0 to 3.30.1 (dependabot[bot]) - docs: updating man page based on review (Hannah Braswell) - feat: initial man page plan editing example (Hannah Braswell) - chore: [CPLYTM-944] add document for e2e and integration test (Sophia Wang) - ci(deps): Bump github/codeql-action from 3.29.11 to 3.30.0 (dependabot[bot]) - chore: sync .packit.yaml with dist-git (Marcus Burghardt) - chore: update packit settings for f43 (Marcus Burghardt) - Add integration test cases (axuan) - ci(deps): Bump SonarSource/sonarqube-scan-action from 5.3.0 to 5.3.1 (dependabot[bot]) - ci: update codeql-action and align version in comment (Marcus Burghardt) - feat: updating unit test regeneration logic (Hannah Braswell) - fix: updating the plan command logic (Hannah Braswell) - feat: introducing plan regeneration logic (Hannah Braswell) - ci(deps): Bump actions/dependency-review-action from 4.7.2 to 4.7.3 (dependabot[bot]) - chore(deps): Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 (dependabot[bot]) - test: [CPLYTM-943] add e2e test cases (Sophia Wang) * Wed Jul 9 2025 Marcus Burghardt - 0.0.8-1 - Bump to upstream version v0.0.8 * Tue Jul 8 2025 Marcus Burghardt - 0.0.7-1 - Bump to upstream version v0.0.7 - Include manifest file for openscap-plugin * Mon Jun 16 2025 George Vauter - 0.0.6-2 - Update package name to complyctl * Wed Jun 11 2025 Marcus Burghardt - 0.0.6-1 - Bump to upstream version v0.0.6 - Align with Fedora Package Guidelines * Tue May 6 2025 Qingmin Duanmu - 0.0.3-2 - Add complytime and openscap plugin man pages * Wed Apr 30 2025 Qingmin Duanmu - 0.0.3-1 - Separate plugin binary from manifest * Fri Apr 11 2025 Qingmin Duanmu - 0.0.2-1 - Separate package for openscap-plugin * Tue Apr 08 2025 Marcus Burghardt - 0.0.2-1 - Initial RPM