File simple-livepatch-package.spec of Package simple-livepatch-package
#
# spec file for package openssl-1_1-livepatches
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define bname simple-livepatch-package
Name: %{bname}
Version: 0
Release: 0
Summary: A simple livepatch package
License: MIT
Group: Other
Source: %{bname}.tar.xz
BuildRequires: libpulp-tools
Requires: libpulp-tools
ExclusiveArch: x86_64
%description
%prep
%setup -q -n %{bname}
%autopatch -p1
%build
gcc -g -fPIC -fpatchable-function-entry=16,14 \
-shared -o libcrypto_livepatch1.so libcrypto_livepatch1.c
ulp packer libcrypto_livepatch1.dsc
%install
mkdir -p %{buildroot}/usr/lib64/%{bname}/
cp libcrypto_livepatch1.so %{buildroot}/usr/lib64/%{bname}/libcrypto_livepatch1.so
%post
ulp trigger '/usr/lib64/%{bname}/*.so'
%files
/usr/lib64/%{bname}
/usr/lib64/%{bname}/libcrypto_livepatch1.so