Skip to content

Instantly share code, notes, and snippets.

@northrup
Created March 30, 2016 22:10
Show Gist options
  • Save northrup/80e23527641de66f1bf794b49f00898e to your computer and use it in GitHub Desktop.
Save northrup/80e23527641de66f1bf794b49f00898e to your computer and use it in GitHub Desktop.
openldap-openssl-jessie
!/bin/bash
# vagrant box add jessie https://downloads.sourceforge.net/project/vagrantboxjessie/debian80.box
# vagrant init jessie
# vagrant up
# vagrant ssh -- -A
# sudo su -
# wget --no-check-certificate -qO - https://gist.githubusercontent.com/jameswhite/5ef1524e5d99904a0e65/raw/jessie | bash > jessie.out 2>&1
apt-get update
####
# OpenLDAP
####
[ ! -d /opt/local/pkg/openldap ] && mkdir -p /opt/local/pkg/openldap
[ ! -d /opt/local/src/openldap/2.4.42-2+b2 ] && mkdir -p /opt/local/src/openldap/2.4.42-2+b2
(
cd /opt/local/src/openldap/2.4.42-2+b2
wget http://debian.gtisc.gatech.edu/debian/pool/main/o/openldap/openldap_2.4.42+dfsg-2.dsc
wget http://debian.gtisc.gatech.edu/debian/pool/main/o/openldap/openldap_2.4.42+dfsg.orig.tar.gz
wget http://debian.gtisc.gatech.edu/debian/pool/main/o/openldap/openldap_2.4.42+dfsg-2.debian.tar.xz
dpkg-source -x openldap_2.4.42+dfsg-2.dsc
)
(cd /opt/local/src/openldap/2.4.42-2+b2/openldap-2.4.42+dfsg/; dpkg-checkbuilddeps 2>&1 | grep "Unmet build dependencies:")
env DEBIAN_FRONTEND=noninteractive \
apt-get install -y --force-yes \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
debhelper dh-autoreconf heimdal-multidev \
libdb5.3-dev libssl-dev libltdl-dev libltdl-dev \
libsasl2-dev libslp-dev libwrap0-dev nettle-dev \
po-debconf unixodbc-dev pkg-config libperl-dev| tee build-deps
# Build that stuff
(cd /opt/local/src/openldap/2.4.42-2+b2/openldap-2.4.42+dfsg; debian/rules binary)
(mv /opt/local/src/openldap/2.4.42-2+b2/*.deb /opt/local/pkg/openldap)
# Reverse the Tomcat Patch
(interdiff ./debian/patches/tomcat7-build-fix.diff /dev/null > ./debian/patches/tomcat7-build-redo.diff)
(patch ./base/server/tomcat7/src/com/netscape/cms/tomcat/ProxyRealm.java ./debian/patches/tomcat7-build-redo.diff)
# Install that stuff
(
cd /opt/local/pkg/openldap/
dpkg -i openldap*
dpkg -i slap*
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment