Skip to content

Commit

Permalink
Keep existing filenames (#624)
Browse files Browse the repository at this point in the history
* Update version number and xmlsec to 1.3.6

IB-7927, Fixes #637, IB-8260

Signed-off-by: Raul Metsma <[email protected]>

* Keep existing filenames

IB-8168

Signed-off-by: Raul Metsma <[email protected]>

---------

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Nov 8, 2024
1 parent fb38ed4 commit a4e83c4
Show file tree
Hide file tree
Showing 29 changed files with 167 additions and 141 deletions.
38 changes: 8 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
brew update
Expand Down Expand Up @@ -79,7 +77,7 @@ jobs:
container: fedora:${{ matrix.container }}
strategy:
matrix:
container: [39, 40]
container: [39, 40, 41]
steps:
- name: Install Deps
run: |
Expand All @@ -93,8 +91,6 @@ jobs:
sh cmake-3.28.1-linux-x86_64.sh --skip-license --prefix=/usr/local
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: |
cmake -DCMAKE_INSTALL_SYSCONFDIR=/etc -B build -S .
Expand All @@ -111,7 +107,7 @@ jobs:
container: ubuntu:${{ matrix.container }}
strategy:
matrix:
container: ['20.04', '22.04', '24.04']
container: ['20.04', '22.04', '24.04', '24.10']
env:
DEBIAN_FRONTEND: noninteractive
DEBFULLNAME: github-actions
Expand All @@ -121,8 +117,6 @@ jobs:
run: apt update -qq && apt install --no-install-recommends -y git lsb-release build-essential devscripts debhelper lintian pkg-config ${UBUNTU_DEPS} doxygen swig openjdk-11-jdk-headless libpython3-dev python3-setuptools libboost-test-dev
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup changelog
run: |
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
Expand All @@ -144,48 +138,38 @@ jobs:
runs-on: ${{ matrix.image }}
strategy:
matrix:
toolset: [143, 142]
toolset: [143]
platform: [x86, x64]
include:
- toolset: 143
image: windows-2022
vcvars: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"
- toolset: 142
image: windows-2019
vcvars: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"
env:
VER_SUFFIX: .VS${{ matrix.toolset }}
CXXFLAGS: '/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR' # https://github.com/actions/runner-images/issues/10004
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 511d74f695bd45959d12b50b00f1b68f69e8f0b0
vcpkgGitCommitId: e2edf52610d2c94d2038fe30b247ea5a26964e1b
vcpkgJsonGlob: ./vcpkg.json
runVcpkgInstall: true
runVcpkgFormatString: "[`install`, `--recurse`, `--clean-after-build`, `--x-install-root`, `$[env.VCPKG_INSTALLED_DIR]`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `tests`]"
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed_${{ matrix.platform }}
- name: Install dependencies
run: choco install doxygen.install -y > $null
- uses: actions/setup-python@v5
if: matrix.platform == 'x86'
with:
python-version: 3.12
architecture: x86
- name: Install WiX
run: |
dotnet tool install -g wix --version 5.0.1
wix extension -g add WixToolset.UI.wixext/5.0.1
- name: Build
run: |
& .\build.ps1 `
-vcpkg_installed ${{ env.VCPKG_INSTALLED_DIR }} `
-vcvars "${{ matrix.vcvars }}" `
-platform ${{ matrix.platform }} `
-swig C:/ProgramData/chocolatey/bin/swig.exe `
Expand All @@ -199,14 +183,12 @@ jobs:
pages:
name: Deploy pages
if: github.repository == 'open-eid/libdigidocpp' && contains(github.ref, 'master')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y doxygen ${UBUNTU_DEPS}
- name: Build docs
Expand All @@ -222,15 +204,13 @@ jobs:
coverity:
name: Run Coverity tests
if: github.repository == 'open-eid/libdigidocpp' && contains(github.ref, 'coverity_scan')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
PROJECTNAME: ${{ github.repository }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y curl ca-certificates ${UBUNTU_DEPS}
- name: Download Coverity Build Tool
Expand All @@ -257,14 +237,12 @@ jobs:
codeql:
name: Run CodeQL tests
if: github.repository == 'open-eid/libdigidocpp'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y ${UBUNTU_DEPS}
- name: Initialize CodeQL
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

25 changes: 15 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
cmake_minimum_required(VERSION 3.16)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
endif()

if(POLICY CMP0122)
cmake_policy(SET CMP0122 NEW)
endif()
if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()
project(libdigidocpp VERSION 4.0.0)
project(libdigidocpp VERSION 4.1.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})

include(VersionInfo)
macro(SET_ENV NAME DEF)
if(DEFINED ENV{${NAME}})
set(${NAME} $ENV{${NAME}} ${ARGN})
else()
set(${NAME} ${DEF} ${ARGN})
endif()
endmacro()

include(GNUInstallDirs)

set_env( TSL_URL "https://ec.europa.eu/tools/lotl/eu-lotl.xml" CACHE STRING "TSL trust list primary URL" )
Expand All @@ -32,6 +35,11 @@ set( BUILD_TOOLS YES CACHE BOOL "Build digidoc-tool" )
set( BUILD_SHARED_LIBS YES CACHE BOOL "Build library as SHARED or STATIC" )
set( SIGNCERT "" CACHE STRING "Common name of certificate to used sign binaries, empty skip signing" )
set( CROSSSIGNCERT "" CACHE STRING "Common name of certificate to used cross sign binaries, empty skip signing" )
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Adds a postfix for debug-built libraries.")
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_GENERATOR RPM)
Expand Down Expand Up @@ -64,10 +72,7 @@ if(UNIX)
endif()
else()
find_package(unofficial-xmlsec REQUIRED)
target_link_libraries(xmlsec INTERFACE
unofficial::xmlsec::xmlsec1
unofficial::xmlsec::xmlsec1-openssl
)
target_link_libraries(xmlsec INTERFACE unofficial::xmlsec::xmlsec1-openssl)
endif()
find_package(SWIG)
if(SWIG_FOUND)
Expand Down
Binary file added ID.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Ubuntu
sudo apt install cmake libxml2-dev libxmlsec1-dev zlib1g-dev
# Fedora
sudo dnf install cmake gcc-c++ openssl-devel libxml2-devel xmlsec1-openssl-devel zlib-devel
sudo dnf install cmake gcc-c++ openssl-devel libxml2-devel xmlsec1-openssl-devel libtool-ltdl-devel zlib-devel

* doxygen - Optional, for API documentation
* libboost-test-dev - Optional, for unittests
Expand Down
6 changes: 3 additions & 3 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Libdigidocpp library [3.18.0](https://github.com/open-eid/libdigidocpp/releases/tag/v3.18.0) release notes
Libdigidocpp library [4.0.0](https://github.com/open-eid/libdigidocpp/releases/tag/v4.0.0) release notes
--------------------------------------
- Major rewrite of library internals due upstream dependecy xalan-c and xml-security-c package has been retired.
https://shibboleth.atlassian.net/wiki/spaces/DEV/pages/3726671873/Santuario
https://lists.apache.org/thread/tls9xgp45zbhzc9k8jhd3m49r6npbrql
- Update libraries and platform support
(#572, #565, #571, #570, #574, #578, #581, #582, #583, #579, #587, #589, #590, #563, #592, #597, #605, #608, #616)
- Improve signature and container compatibility
(#573, #585, #586, #588, #591, #584, #596, #593, #595, #603, #604, #607, #613, #609)
(#573, #585, #586, #588, #591, #584, #596, #593, #595, #603, #604, #607, #613, #609, #619)
- Other fixes and optimizations
(#564, #577, #580, #599, #606, #612, #614, #611, #610)

[Full Changelog](https://github.com/open-eid/libdigidocpp/compare/v3.17.0...v3.18.0)
[Full Changelog](https://github.com/open-eid/libdigidocpp/compare/v3.17.0...v4.0.0)

Libdigidocpp library [3.17.1](https://github.com/open-eid/libdigidocpp/releases/tag/v3.17.1) release notes
--------------------------------------
Expand Down
Binary file added banner.bmp
Binary file not shown.
21 changes: 9 additions & 12 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
#powershell -ExecutionPolicy ByPass -File build.ps1
param(
[string]$libdigidocpp = $PSScriptRoot,
[string]$platform = "x64",
[string]$git = "git.exe",
[string]$vcpkg = "vcpkg\vcpkg.exe",
[string]$vcpkg_dir = (split-path -parent $vcpkg),
[string]$vcpkg_installed = $libdigidocpp,
[string]$vcpkg_installed_platform = "$vcpkg_installed\vcpkg_installed_$platform",
[string]$build_number = $(if ($null -eq $env:BUILD_NUMBER) {"0"} else {$env:BUILD_NUMBER}),
[string]$msiversion = "4.0.0.$build_number",
[string]$platform = "x64",
[string]$msiversion = "4.1.0.$build_number",
[string]$msi_name = "libdigidocpp-$msiversion$env:VER_SUFFIX.$platform.msi",
[string]$cmake = "cmake.exe",
[string]$generator = "NMake Makefiles",
[string]$vcvars = "vcvarsall",
[string]$wix = "wix.exe",
[string]$swig = $null,
[string]$doxygen = $null,
[switch]$boost = $false,
[string]$sign = $null
)

Try {
& $wix > $null
& wix > $null
}
Catch {
& dotnet tool install --global --version 5.0.1 wix
& $wix extension add -g WixToolset.UI.wixext/5.0.1
& dotnet tool install -g --version 5.0.2 wix
& wix extension add -g WixToolset.UI.wixext/5.0.2
}

if(!(Test-Path -Path $vcpkg)) {
& $git clone https://github.com/microsoft/vcpkg $vcpkg_dir
& $vcpkg_dir\bootstrap-vcpkg.bat
& $vcpkg install --clean-after-build --triplet x64-windows --x-feature=tests --x-install-root=$vcpkg_installed_platform
}

$cmakeext = @()
Expand Down Expand Up @@ -69,12 +67,11 @@ if($sign) {
$vcpkg_installed_platform/$platform-windows/debug/bin/*.dll
}

& $vcvars $platform "&&" $wix build -nologo -arch $platform -out $msi_name $wixext `
& $vcvars $platform "&&" wix build -nologo -arch $platform -out $msi_name $wixext `
-ext WixToolset.UI.wixext `
-bv "WixUIBannerBmp=$libdigidocpp/cmake/modules/banner.bmp" `
-bv "WixUIDialogBmp=$libdigidocpp/cmake/modules/dlgbmp.bmp" `
-d "ICON=$libdigidocpp/cmake/modules/ID.ico" `
-d "MSI_VERSION=$msiversion" `
-bv "WixUIBannerBmp=$libdigidocpp/banner.bmp" `
-bv "WixUIDialogBmp=$libdigidocpp/dlgbmp.bmp" `
-d "ICON=$libdigidocpp/ID.ico" `
-d "vcpkg=$vcpkg_installed_platform/$platform-windows" `
-d "libdigidocpp=$(Get-Location)/$platform" `
$libdigidocpp\libdigidocpp.wxs
Expand Down
1 change: 0 additions & 1 deletion cmake
Submodule cmake deleted from 8ce75e
21 changes: 21 additions & 0 deletions cmake/modules/FindPKCS11.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# - Find pkcs11
# Find the PKCS11 module
#
# PKCS11_MODULE - pkcs11 module path and name
# PKCS11_FOUND - True if pkcs11 module found.

if(APPLE)
find_library(PKCS11_MODULE NAMES opensc-pkcs11.so HINTS /Library/OpenSC/lib)
elseif(WIN32)
if(NOT PKCS11_MODULE)
set(PKCS11_MODULE opensc-pkcs11.dll)
endif()
else()
if(NOT PKCS11_MODULE)
set(PKCS11_MODULE opensc-pkcs11.so)
endif()
endif()

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PKCS11 DEFAULT_MSG PKCS11_MODULE)
MARK_AS_ADVANCED(PKCS11)
Binary file added dlgbmp.bmp
Binary file not shown.
2 changes: 1 addition & 1 deletion etc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = @CMAKE_MODULE_PATH@/ID.ico
PROJECT_LOGO = @CMAKE_SOURCE_DIR@/ID.ico

# With the PROJECT_ICON tag one can specify an icon that is included in the tabs
# when the HTML document is shown. Doxygen will copy the logo to the output
Expand Down
4 changes: 2 additions & 2 deletions libdigidocpp.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="Libdigidocpp $(sys.BUILDARCH)" UpgradeCode="$(var.UpgradeCode)"
Language="1033" Version="$(var.MSI_VERSION)" Manufacturer="RIA" InstallerVersion="500">
Language="1033" Version="!(bind.FileVersion.digidocpp)" Manufacturer="RIA" InstallerVersion="500">
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<Icon Id="ID.ico" SourceFile="$(var.ICON)" />
<Property Id="ARPPRODUCTICON" Value="ID.ico" />
Expand Down Expand Up @@ -54,7 +54,7 @@
</ComponentGroup>

<ComponentGroup Id="Libraries" Source="$(var.libdigidocpp)\bin">
<File Name="digidocpp.dll" />
<File Id="digidocpp" Name="digidocpp.dll" />
<File Name="digidoc-tool.exe" />
<File Source="$(var.libdigidocpp)\etc\digidocpp\digidocpp.conf" />
<?ifdef var.swig ?>
Expand Down
2 changes: 1 addition & 1 deletion prepare_osx_build_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

OPENSSL_DIR=openssl-3.0.15
LIBXML2_DIR=libxml2-2.12.9
XMLSEC_DIR=xmlsec1-1.3.5
XMLSEC_DIR=xmlsec1-1.3.6
ANDROID_NDK=android-ndk-r26d
FREETYPE_DIR=freetype-2.10.1
FONTCONFIG_DIR=fontconfig-2.13.1
Expand Down
Loading

0 comments on commit a4e83c4

Please sign in to comment.