From patchwork Wed Nov 15 13:41:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roberto Sassu X-Patchwork-Id: 10059403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 92038604D4 for ; Wed, 15 Nov 2017 13:42:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81F452A001 for ; Wed, 15 Nov 2017 13:42:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7703F29D59; Wed, 15 Nov 2017 13:42:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A02D29FFE for ; Wed, 15 Nov 2017 13:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932408AbdKONmj (ORCPT ); Wed, 15 Nov 2017 08:42:39 -0500 Received: from lhrrgout.huawei.com ([194.213.3.17]:44161 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932232AbdKONmi (ORCPT ); Wed, 15 Nov 2017 08:42:38 -0500 Received: from lhreml708-cah.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 284283232343E; Wed, 15 Nov 2017 13:42:34 +0000 (GMT) Received: from localhost.localdomain (10.204.65.254) by smtpsuk.huawei.com (10.201.108.49) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 15 Nov 2017 13:42:27 +0000 From: Roberto Sassu To: CC: , , Roberto Sassu Subject: [USER SPACE][RFC][PATCH 5/5] digest-list-tools: package Date: Wed, 15 Nov 2017 14:41:27 +0100 Message-ID: <20171115134127.20423-1-roberto.sassu@huawei.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Originating-IP: [10.204.65.254] X-CFilter-Loop: Reflected Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds package-specific files. Signed-off-by: Roberto Sassu --- .gitignore | 28 ++++++++++++++++++++++++++++ AUTHORS | 10 ++++++++++ CHANGES | 3 +++ LICENSE | 3 +++ Makefile.am | 9 +++++++++ configure.ac | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/Makefile.am | 3 +++ include/Makefile.am | 6 ++++++ lib/Makefile.am | 12 ++++++++++++ scripts/Makefile.am | 1 + src/Makefile.am | 9 +++++++++ 11 files changed, 134 insertions(+) create mode 100644 .gitignore create mode 100644 AUTHORS create mode 100644 CHANGES create mode 100644 LICENSE create mode 100644 Makefile.am create mode 100644 configure.ac create mode 100644 docs/Makefile.am create mode 100644 include/Makefile.am create mode 100644 lib/Makefile.am create mode 100644 scripts/Makefile.am create mode 100644 src/Makefile.am diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f8d990 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +*.o +src/gen_digest_lists +src/verify_digest_lists +*Makefile.in +*Makefile + +ar-lib +config.h +config.h.in +configure.scan +stamp-h1 +aclocal.m4 +autom4te.cache/ +compile +config.log +config.status +config.sub +config.guess +configure +depcomp +install-sh +missing +libtool +ltmain.sh +*/.deps/ +*/.libs/ +*.lo +*.la diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..a83669f --- /dev/null +++ b/AUTHORS @@ -0,0 +1,10 @@ +Roberto Sassu, Huawei Technologies Duesseldorf GmbH + +Copyright (C) 2017 Huawei Technologies Duesseldorf GmbH + +All rights reserved. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, version 2 of the +License. diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..5580d89 --- /dev/null +++ b/CHANGES @@ -0,0 +1,3 @@ +2017-11-15 Roberto Sassu + version 0.1 + * first public release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..efe1bf0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,3 @@ +A copy of the GPL 2 license can be retrieved from: + +https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..f62a6ff --- /dev/null +++ b/Makefile.am @@ -0,0 +1,9 @@ +SUBDIRS = docs \ + lib \ + scripts \ + src + +EXTRA_DIST = AUTHORS \ + CHANGES + +dist_pkgdata_DATA = README diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..34244ab --- /dev/null +++ b/configure.ac @@ -0,0 +1,50 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([digest-list-tools], [0.1], [roberto.sassu@huawei.com]) +AC_CONFIG_HEADERS([config.h]) +CFLAGS="$CFLAGS -Wall" + +AM_INIT_AUTOMAKE([-Wall foreign]) +AM_PROG_AR +AC_PROG_CC +LT_INIT + +# Checks for programs. +AC_PROG_CXX +AC_PROG_AWK +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_RANLIB + +# Checks for libraries. +AC_CHECK_LIB([crypto], [SHA256_Init]) +AC_CHECK_LIB([rpm], [headerGetEntry]) +AC_CHECK_LIB([rpmio], [Fopen]) + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT32_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_CHECK_FUNCS([ftruncate memset munmap strstr]) + +AC_CONFIG_FILES([Makefile + docs/Makefile + include/Makefile + lib/Makefile + src/Makefile + scripts/Makefile]) +AC_OUTPUT diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 0000000..5b1c1a2 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,3 @@ +dist_pkgdata_DATA = gen_digest_lists.txt \ + setup_ima_digest_list.txt \ + verify_digest_lists.txt diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..a807be0 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,6 @@ +noinst_HEADERS = kernel_lib.h \ + kernel_ima.h \ + compact_list.h \ + rpm.h \ + metadata.h \ + lib.h diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..3472a06 --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,12 @@ +lib_LTLIBRARIES = libdigestlists.la + +libdigestlists_la_LIBADD = -lcrypto -lrpm -lrpmio + +libdigestlists_la_CFLAGS = -I$(top_srcdir)/include + +libdigestlists_la_SOURCES = kernel_lib.c \ + kernel_ima.c \ + compact_list.c \ + rpm.c \ + metadata.c \ + lib.c diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 0000000..468d768 --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1 @@ +bin_SCRIPTS = setup_ima_digest_list diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..3446e3d --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,9 @@ +bin_PROGRAMS = gen_digest_lists verify_digest_lists + +gen_digest_lists_CFLAGS = -I$(top_srcdir)/include +gen_digest_lists_LDADD = $(top_srcdir)/lib/libdigestlists.la -lcrypto -lrpm -lrpmio +gen_digest_lists_SOURCES = gen_digest_lists.c + +verify_digest_lists_CFLAGS = -I$(top_srcdir)/include +verify_digest_lists_LDADD = $(top_srcdir)/lib/libdigestlists.la -lcrypto -lrpm -lrpmio +verify_digest_lists_SOURCES = verify_digest_lists.c