Package init

This commit is contained in:
overweight 2019-09-30 10:53:13 -04:00
commit a4d2dd2b20
4 changed files with 119 additions and 0 deletions

12
docbook-xsl-path.patch Normal file
View File

@ -0,0 +1,12 @@
diff -urNp ima-evm-utils-1.0-orig/Makefile.am ima-evm-utils-1.0/Makefile.am
--- ima-evm-utils-1.0-orig/Makefile.am 2015-07-30 15:28:53.000000000 -0300
+++ ima-evm-utils-1.0/Makefile.am 2017-11-20 16:20:04.245591165 -0200
@@ -24,7 +24,7 @@ rpm: $(tarname)
rpmbuild -ba --nodeps $(SPEC)
# requires asciidoc, xslproc, docbook-xsl
-MANPAGE_DOCBOOK_XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl
+MANPAGE_DOCBOOK_XSL = /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
evmctl.1.html: README
@asciidoc -o $@ $<

BIN
ima-evm-utils-1.1.tar.gz Normal file

Binary file not shown.

78
ima-evm-utils.spec Normal file
View File

@ -0,0 +1,78 @@
Name: ima-evm-utils
Version: 1.1
Release: 6
Summary: IMA/EVM control utilities
License: GPLv2
URL: http://linux-ima.sourceforge.net/
Source0: http://sourceforge.net/projects/linux-ima/files/ima-evm-utils/%{name}-%{version}.tar.gz
BuildRequires: autoconf automake libtool m4 asciidoc libxslt openssl-devel keyutils-libs-devel git
Patch1: docbook-xsl-path.patch
Patch2: remove-libattr-dependency.patch
%description
ima-evm-utils package provides the evmctl utility that can be used for producing
and verifying digital signatures, which are used by Linux kernel integrity subsystem.
It can be also used to import keys into the kernel keyring.
%package devel
Summary: Development files for %{name}
Provides: %{name}-static = %{version}-%{release}
Obsoletes:%{name}-static < %{version}-%{release}
%description devel
This package provides the header files for %{name}
%package_help
%prep
%autosetup -n %{name}-%{version} -p1 -Sgit
%build
mkdir -p m4
autoreconf -f -i
%configure
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%make_install
%check
make check
%pre
%preun
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc ChangeLog README AUTHORS
%license COPYING
%{_bindir}/*
%{_libdir}/*.so.*
%files devel
%{_docdir}/%{name}/*.sh
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/libimaevm.a
%{_libdir}/libimaevm.la
%files help
%doc %{_mandir}/*/*
%changelog
* Tue Sep 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1-6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: revise spec file with new rules
* Mon Aug 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1-5
- Package init

View File

@ -0,0 +1,29 @@
diff --git a/configure.ac b/configure.ac
index 0497eb7..a5b4288 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ AC_SUBST(OPENSSL_LIBS)
AC_CHECK_HEADER(unistd.h)
AC_CHECK_HEADERS(openssl/conf.h)
-AC_CHECK_HEADERS(attr/xattr.h, , [AC_MSG_ERROR([attr/xattr.h header not found. You need the libattr development package.])])
+AC_CHECK_HEADERS(sys/xattr.h, , [AC_MSG_ERROR([sys/xattr.h header not found. You need the c-library development package.])])
AC_CHECK_HEADERS(keyutils.h, , [AC_MSG_ERROR([keyutils.h header not found. You need the libkeyutils development package.])])
#debug support - yes for a while
diff --git a/src/evmctl.c b/src/evmctl.c
index 2ffee78..3fbcd33 100644
--- a/src/evmctl.c
+++ b/src/evmctl.c
@@ -49,7 +49,7 @@
#include <stdint.h>
#include <string.h>
#include <dirent.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <linux/xattr.h>
#include <getopt.h>
#include <keyutils.h>
--
2.14.4