commit a4d2dd2b20c4da50fa24aca451c432e0469ee0bd Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:53:13 2019 -0400 Package init diff --git a/docbook-xsl-path.patch b/docbook-xsl-path.patch new file mode 100644 index 0000000..e4ee8e5 --- /dev/null +++ b/docbook-xsl-path.patch @@ -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 $@ $< diff --git a/ima-evm-utils-1.1.tar.gz b/ima-evm-utils-1.1.tar.gz new file mode 100644 index 0000000..23411a4 Binary files /dev/null and b/ima-evm-utils-1.1.tar.gz differ diff --git a/ima-evm-utils.spec b/ima-evm-utils.spec new file mode 100644 index 0000000..8bd0c96 --- /dev/null +++ b/ima-evm-utils.spec @@ -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 - 1.1-6 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: revise spec file with new rules + +* Mon Aug 12 2019 openEuler Buildteam - 1.1-5 +- Package init diff --git a/remove-libattr-dependency.patch b/remove-libattr-dependency.patch new file mode 100644 index 0000000..0c7a5a0 --- /dev/null +++ b/remove-libattr-dependency.patch @@ -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 + #include + #include +-#include ++#include + #include + #include + #include +-- +2.14.4 +