diff options
-rwxr-xr-x | scripts/date-reset.sh | 3 | ||||
-rwxr-xr-x | scripts/dev-init.sh | 81 | ||||
-rwxr-xr-x | scripts/install.sh | 14 | ||||
-rwxr-xr-x | scripts/jar-compare.sh | 25 | ||||
-rwxr-xr-x | scripts/noise.sh | 5 | ||||
-rwxr-xr-x | scripts/pki-nuke.sh | 1 |
6 files changed, 100 insertions, 29 deletions
diff --git a/scripts/date-reset.sh b/scripts/date-reset.sh new file mode 100755 index 0000000..7b49ec1 --- /dev/null +++ b/scripts/date-reset.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +timedatectl set-ntp true --adjust-system-clock diff --git a/scripts/dev-init.sh b/scripts/dev-init.sh index 049578a..5c91060 100755 --- a/scripts/dev-init.sh +++ b/scripts/dev-init.sh @@ -3,32 +3,80 @@ useradd dirsrv -d /usr/share/dirsrv useradd pkiuser -d /usr/share/pki -# development -yum install -y\ - git +# source control +yum install -y \ + git \ + git-svn -# build -yum-builddep --skip-broken ../../pki/specs/pki-core.spec -yum install -y --skip-broken\ - gcc-c++\ - rpm-build\ - createrepo +# build dependencies +yum-builddep -y ../../pki/specs/pki-core.spec +yum-builddep -y ../../pki/specs/pki-console.spec + +# build tools +yum install -y --nogpgcheck \ + cmake \ + gcc-c++ \ + rpm-build \ + fedpkg \ + fedora-packager \ + createrepo \ + idm-console-framework + +# C dependencies +yum install -y --nogpgcheck \ + apr-util-devel httpd-devel pcre-devel svrcore-devel zlib-devel + +# C & Python dependencies +yum install -y --nogpgcheck \ + python-nss \ + policycoreutils-python \ + pylint \ + python-devel \ + python-flake8 \ + python-ldap \ + python-sphinx \ + python3-devel \ + python3-flake8 \ + python3-nss \ + python3-pyldap + +# Java dependencies +yum install -y --nogpgcheck \ + java-1.8.0-openjdk-devel \ + junit \ + apache-commons-cli \ + apache-commons-codec \ + apache-commons-io \ + jakarta-commons-httpclient \ + javassist \ + jboss-annotations-1.2-api \ + jboss-jaxrs-2.0-api \ + jboss-logging \ + net-tools \ + nuxwdog-client-java \ + resteasy-atom-provider \ + resteasy-client \ + resteasy-core \ + resteasy-jackson-provider \ + resteasy-jaxb-provider \ + slf4j \ + slf4j-jdk14 \ + tomcatjss \ + velocity \ + xalan-j2 \ + xerces-j2 # test -yum install -y --skip-broken\ +yum install -y --nogpgcheck\ 389-ds-base # obsolete -#yum install -y\ +#dnf install -y\ # kdiff3\ -# cmake\ # gcc\ # mock\ -# java-devel\ # ldapjdk\ # idm-console-framework\ -# apache-commons-cli\ -# apache-commons-codec\ # httpcomponents-client\ # httpcomponents-core\ # nspr-devel\ @@ -42,11 +90,8 @@ yum install -y --skip-broken\ # selinux-policy-devel\ # 389-ds-base\ # java-1.7.0-openjdk\ -# junit\ # jss\ -# javassist\ # jettison\ -# resteasy\ # tomcatjss\ # perl-File-Slurp\ # perl-XML-LibXML\ diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 0000000..155c9eb --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,14 @@ +#!/bin/sh -x + +SRC_DIR=`cd ../.. ; pwd`/pki +BUILD_DIR=~/build/pki +BUILDROOT=~/buildroot/pki + +cd $BUILD_DIR + +rm -rf $BUILDROOT +mkdir -p $BUILDROOT + +make install \ + DESTDIR=$BUILDROOT/pki-core-10.3.0-0.2.fc22.x86_64 \ + 'INSTALL=install -p' diff --git a/scripts/jar-compare.sh b/scripts/jar-compare.sh index a9cacdb..bc3ea9f 100755 --- a/scripts/jar-compare.sh +++ b/scripts/jar-compare.sh @@ -1,13 +1,16 @@ #!/bin/sh -old=$1 -new=$2 -tmp=$3 - -for file in `cd $old ; ls` -do - echo ===== $file ===== - jar tf $old/$file | sort > $tmp/$file.old - jar tf $new/$file | sort > $tmp/$file.new - diff $tmp/$file.old $tmp/$file.new | tee $tmp/$file.diff -done +file=$1 +old=$2 +new=$3 + +echo "#### Comparing $file..." +jar tvf $old/$file | awk '{print $8;}' | grep -v "/$" | sort > /tmp/$file.old +jar tvf $new/$file | awk '{print $8;}' | grep -v "/$" | sort > /tmp/$file.new + +# cat /tmp/$file.old +# echo "=====" +# cat /tmp/$file.new +# echo "=====" + +diff /tmp/$file.old /tmp/$file.new diff --git a/scripts/noise.sh b/scripts/noise.sh new file mode 100755 index 0000000..9b93b66 --- /dev/null +++ b/scripts/noise.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +openssl rand -out noise.bin 2048 + +#dd if=/dev/urandom of=noise.bin bs=2048 count=1 diff --git a/scripts/pki-nuke.sh b/scripts/pki-nuke.sh index 582154d..8638018 100755 --- a/scripts/pki-nuke.sh +++ b/scripts/pki-nuke.sh @@ -19,4 +19,5 @@ rm -rf /etc/sysconfig/$INSTANCE_NAME rm -rf /etc/sysconfig/pki/tomcat/$INSTANCE_NAME rm -rf /var/lib/pki/$INSTANCE_NAME rm -rf /var/log/pki/$INSTANCE_NAME +rm -rf /var/log/pki/pki-*.log rm -rf $HOME/.dogtag/$INSTANCE_NAME |