summaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
Diffstat (limited to 'manual')
-rwxr-xr-xmanual/generic/linux/openssl-centos.sh66
-rw-r--r--manual/generic/linux/openssl-centos.yaml39
2 files changed, 105 insertions, 0 deletions
diff --git a/manual/generic/linux/openssl-centos.sh b/manual/generic/linux/openssl-centos.sh
new file mode 100755
index 0000000..b7d4de7
--- /dev/null
+++ b/manual/generic/linux/openssl-centos.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# you should NOT be root
+# run following steps on CentOS as user
+sudo yum -y update
+# build dependencies
+sudo yum -y install autoconf automake binutils bison flex gcc gcc-c++ gettext \
+ libtool sed make patch pkgconfig redhat-rpm-config rpm-build \
+ diffutils coreutils glibc-static
+
+# sslverify=0 to be enabled in all repo files
+# to work with yumdownloader --source
+REPO_FILES="/etc/yum.repos.d/"
+# shellcheck disable=SC2044
+for FILE in $(find "${REPO_FILES}"); do
+ sudo sed -i -e 's/sslverify=1/sslverify=0/g' "${FILE}"
+done
+sudo yum -y clean all
+
+# install openssl dependencies
+sudo yum -y install perl openssl-devel krb5-devel zlib-devel
+
+mkdir -p "${HOME}"/rpmbuild/BUILD
+mkdir -p "${HOME}"/rpmbuild/RPMS
+mkdir -p "${HOME}"/rpmbuild/SOURCES
+mkdir -p "${HOME}"/rpmbuild/SPECS
+mkdir -p "${HOME}"/rpmbuild/SRPMS
+
+echo "%_topdir %(echo $HOME)/rpmbuild" > ~/.rpmmacros
+
+# shellcheck disable=SC2164
+cd "${HOME}"
+# build and install lksctp-tools
+sudo yumdownloader --source lksctp-tools
+
+# get version and release of lksctp-tools
+SCTP_VERSION=$(sudo yum info lksctp-tools | grep Version | head -1| awk '{print $3}')
+SCTP_RELEASE=$(sudo yum info lksctp-tools | grep Release | head -1| awk '{print $3}')
+
+rpmbuild --recompile lksctp-tools-"${SCTP_VERSION}""-""${SCTP_RELEASE}".src.rpm
+# shellcheck disable=SC2164
+cd "${HOME}""/rpmbuild/BUILD/lksctp-tools-""${SCTP_VERSION}"/
+sudo make install
+
+# shellcheck disable=SC2164
+cd "${HOME}"
+sudo yumdownloader --source openssl
+
+# get version and release of openssl
+SSL_VERSION=$(sudo yum info openssl | grep Version | awk '{print $3}')
+SSL_RELEASE=$(sudo yum info openssl | grep Release | awk '{print $3}')
+# run below step, you could see list of dependencies not met and exit
+rpmbuild --rebuild openssl-"${SSL_VERSION}""-""${SSL_RELEASE}".src.rpm
+
+# shellcheck disable=SC2164
+cd "${HOME}"/rpmbuild/SPECS/
+
+sed -i -e 's/BuildRequires: lksctp-tools-devel/# BuildRequires: lksctp-tools-devel/g' openssl.spec
+# build will start from this command
+rpmbuild -ba openssl.spec
+
+# shellcheck disable=SC2164
+cd "${HOME}""/rpmbuild/BUILD/openssl-""${SSL_VERSION}"/
+make
+sudo make install
+make tests
diff --git a/manual/generic/linux/openssl-centos.yaml b/manual/generic/linux/openssl-centos.yaml
new file mode 100644
index 0000000..f73ed7b
--- /dev/null
+++ b/manual/generic/linux/openssl-centos.yaml
@@ -0,0 +1,39 @@
+metadata:
+ name: openssl-centos
+ format: "Manual Test Definition 1.0"
+ description: "OpenSSL is an open source project that provides a robust,
+ commercial-grade, and full-featured toolkit for the Transport Layer
+ Security (TLS) and Secure Sockets Layer (SSL) protocols.
+ It is also a general-purpose cryptography library
+ ref: https://www.openssl.org"
+ maintainer:
+ - naresh.kamboju@linaro.org
+ os:
+ - centos
+ - fedora
+ scope:
+ - functional
+ devices:
+ - d02
+ - d03
+ - d05
+ - overdrive
+ environment:
+ - manual-test
+
+run:
+ steps:
+ - login as root and edit sudoers file
+ - setup wheel group users without a password
+ - uncomment this line "%wheel ALL=(ALL) NOPASSWD: ALL"
+ - sudoedit /etc/sudoers
+ - save and exit
+ - logout and login as normal user ex: linaro
+ - ensure linaro user exit and belong to wheel group
+ - run openssl-centos.sh
+ - ./openssl-centos.sh
+ - run takes around 10 minutes
+
+ expected:
+ - all tests should pass
+ - if any openssl test fails please report bugs