24 Commits

Author SHA1 Message Date
Christian Tosta
c3e7f84ea4 Testing Workflow 2025-04-18 06:24:58 -03:00
Christian Tosta
7c3ac02c85 Testing Workflow 2025-04-18 06:08:53 -03:00
Christian Tosta
05f254ff77 Testing Workflow 2025-04-18 06:04:25 -03:00
Christian Tosta
9825df6a89 Testing Workflow 2025-04-18 05:47:19 -03:00
Christian Tosta
5cf34fb6e7 Testing Workflow 2025-04-18 05:41:36 -03:00
Christian Tosta
035e9bf005 Testing Workflow 2025-04-18 05:36:20 -03:00
Christian Tosta
8c521b1b4e Testing Workflow 2025-04-18 05:34:45 -03:00
Christian Tosta
c459cb1d27 Testing Workflow 2025-04-18 05:12:02 -03:00
Christian Tosta
7dd581bac4 Testing Workflow 2025-04-18 05:10:28 -03:00
Christian Tosta
9dfedbf252 Testing Workflow 2025-04-18 05:03:23 -03:00
Christian Tosta
62ed07d606 Testing Workflow 2025-04-18 05:00:09 -03:00
Christian Tosta
39f0345952 Update build-rpm.yml 2025-04-18 04:44:59 -03:00
Christian Tosta
f65837bf58 Update build-rpm.yml 2025-04-18 04:38:57 -03:00
Christian Tosta
57ecb92a18 Update build-rpm.yml 2025-04-18 04:37:05 -03:00
Christian Tosta
6bf7f4975e Update build-rpm.yml 2025-04-18 04:24:26 -03:00
Christian Tosta
8f81572cf8 Update build-rpm.yml 2025-04-18 04:20:32 -03:00
Christian Tosta
05b3169a11 Added RPM build workflow 2025-04-18 04:01:14 -03:00
Christian Tosta
26517e6d95 Update build-rpm.yml 2025-04-18 03:24:40 -03:00
Christian Tosta
39bf70daeb Update build-rpm.yml 2025-04-18 03:21:08 -03:00
Christian Tosta
96e4941afc Update build-rpm.yml 2025-04-18 03:17:44 -03:00
Christian Tosta
beecd4d0b5 Update build-rpm.yml 2025-04-18 03:16:11 -03:00
Christian Tosta
d874ae75f0 Update build-rpm.yml 2025-04-18 03:12:55 -03:00
Christian Tosta
a7ddba0398 Update build-rpm.yml 2025-04-18 02:59:51 -03:00
Christian Tosta
55ff86f0ed Added workflow to build RPM 2025-04-18 02:43:39 -03:00
2 changed files with 123 additions and 0 deletions

71
.github/workflows/build-rpm.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: Build RPM Package
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build-rpm:
name: Build and upload RPM packages
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- uses: actions/checkout@v4
- name: install RPM build tools
run: |
dnf -y install \
cmake \
gcc \
gcc-c++ \
git \
rpm-build \
rpmdevtools \
tar
- name: Setup RPM build tree
run: |
rpmdev-setuptree
- name: Create source tarball
run: |
cmake -B build -S .
cmake --build build --target sdist
- name: Set environment variables
run: |
echo "PKG_NAME=ca-certificates-brazil" >> $GITHUB_ENV
echo "PKG_VERSION=$(grep \
-m1 -iPo '.*CPACK_PACKAGE_VERSION [\"]*\K[\S]*[^(\"\))]' \
build/CPackConfig.cmake) \
" >> $GITHUB_ENV
- name: Copy SOURCES and SPEC file
run: |
cp packaging/pkg.spec.in ~/rpmbuild/SPECS/${PKG_NAME}.spec
rpmdev-bumpspec -n ${PKG_VERSION} ~/rpmbuild/SPECS/${PKG_NAME}.spec
cp dist/*.src.tar.gz ~/rpmbuild/SOURCES/
- name: Build RPM
run: |
dnf -y builddep ~/rpmbuild/SPECS/ca-certificates-brazil.spec
rpmbuild -ba ~/rpmbuild/SPECS/ca-certificates-brazil.spec
- name: Upload built RPMs
uses: actions/upload-artifact@v4
with:
name: built-rpms
path: |
~/rpmbuild/RPMS/
~/rpmbuild/SRPMS/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
generate_release_notes: true
files: |
~/rpmbuild/RPMS/**/*.rpm

52
packaging/pkg.spec.in Normal file
View File

@@ -0,0 +1,52 @@
%global debug_package %{nil}
%global source_date_epoch_from_changelog 0
%define __openssl %{_bindir}/openssl
Name: ca-certificates-brazil
Version: __VERSION__
Release: %{autorelease}
Summary: The ICP-Brasil root certificate bundle
License: Public Domain
URL: https://www.gov.br/iti/pt-br/assuntos/certificado-digital
Source0: %{name}-%{version}.src.tar.gz
BuildArch: noarch
BuildRequires: %{__openssl}
BuildRequires: %{_bindir}/mktemp
BuildRequires: %{_bindir}/unzip
%description
The Brazilian Public Key Infrastructure - ICP-Brasil is a hierarchical chain
of trust that enables the issuance of digital certificates for the virtual
identification of citizens.
It is observed that the model adopted by Brazil was single-root certification,
and the ITI, in addition to playing the role of Root Certifying Authority - Root AC,
also has the role of accrediting and discrediting the other participants in the
chain, supervise and audit the processes.
%prep
%autosetup -c
%{cmake}
%build
%{cmake_build}
%install
%{__rm} -rf %{buildroot}
%{cmake_install}
%files
%{_datadir}/pki/ca-trust-source/anchors/isrg-root-x2.crt
%{_datadir}/pki/ca-trust-source/anchors/lets-encrypt-ca-bundle.crt
%{_datadir}/pki/ca-trust-source/anchors/icp-brasil-ca-bundle.crt
%post -p %{_bindir}/update-ca-trust
%postun -p %{_bindir}/update-ca-trust
%changelog
%autochangelog