Skip to content

Instantly share code, notes, and snippets.

@higebu
Last active August 19, 2017 15:04
Show Gist options
  • Save higebu/139c786fab3c88113d54eef16b462655 to your computer and use it in GitHub Desktop.
Save higebu/139c786fab3c88113d54eef16b462655 to your computer and use it in GitHub Desktop.
build vyatta-strongswan
#!/bin/bash
# rm -f ../*.deb
# sudo mk-build-deps -i -r -t 'apt-get --no-install-recommends -yq' debian/control
# dpkg-buildpackage -b -us -uc -tc
DIST=squeeze
BASE_IMAGE=/var/cache/pbuilder/$DIST.tgz
DEBIAN_MIRROR=http://archive.debian.org/debian/
# Import Squeeze Stable Release Key
sudo gpg --no-default-keyring \
--keyring /usr/share/keyrings/debian-archive-keyring.gpg \
--keyserver pgpkeys.mit.edu \
--recv-key 64481591B98321F9
# Create base chroot image
sudo EXTRAPACKAGES="apt-utils automake" pbuilder create --distribution $DIST \
--mirror $DEBIAN_MIRROR \
--debootstrapopts "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg" \
--basetgz $BASE_IMAGE
# Build package
pdebuild --use-pdebuild-internal --debbuildopts "-b -us -uc -tc" -- --basetgz $BASE_IMAGE
# Packages are created in /var/cache/pbuilder/result/
@higebu
Copy link
Author

higebu commented Aug 19, 2017

vyos@vyos:~$ sudo dpkg -l | grep strongswan
ii  libstrongswan                      4.5.2-1.1-bpo60+vyos1+helium4   strongSwan utility and crypto library
ii  strongswan                         4.5.2-1.1-bpo60+vyos1+helium4   IPsec VPN solution metapackage
ii  strongswan-ikev1                   4.5.2-1.1-bpo60+vyos1+helium4   strongSwan Internet Key Exchange (v1) daemon
ii  strongswan-ikev2                   4.5.2-1.1-bpo60+vyos1+helium4   strongSwan Internet Key Exchange (v2) daemon
ii  strongswan-starter                 4.5.2-1.1-bpo60+vyos1+helium4   strongSwan daemon starter and configuration file parser

@higebu
Copy link
Author

higebu commented Aug 19, 2017

vyos@vyos:~$ sudo dpkg -i pkgs/*.deb
(Reading database ... 38737 files and directories currently installed.)
Preparing to replace libstrongswan 4.5.2-1.1-bpo60+vyos1+helium4 (using .../libstrongswan_4.5.2-1.1-bpo60+vyos1+helium5_amd64.deb) ...
Unpacking replacement libstrongswan ...
Preparing to replace strongswan-ikev1 4.5.2-1.1-bpo60+vyos1+helium4 (using .../strongswan-ikev1_4.5.2-1.1-bpo60+vyos1+helium5_amd64.deb) ...
Unpacking replacement strongswan-ikev1 ...
Preparing to replace strongswan-ikev2 4.5.2-1.1-bpo60+vyos1+helium4 (using .../strongswan-ikev2_4.5.2-1.1-bpo60+vyos1+helium5_amd64.deb) ...
Unpacking replacement strongswan-ikev2 ...
Preparing to replace strongswan-starter 4.5.2-1.1-bpo60+vyos1+helium4 (using .../strongswan-starter_4.5.2-1.1-bpo60+vyos1+helium5_amd64.deb) ...
Stopping strongSwan IPsec failed: starter is not running
Unpacking replacement strongswan-starter ...
Preparing to replace strongswan 4.5.2-1.1-bpo60+vyos1+helium4 (using .../strongswan_4.5.2-1.1-bpo60+vyos1+helium5_all.deb) ...
Unpacking replacement strongswan ...
Setting up libstrongswan (4.5.2-1.1-bpo60+vyos1+helium5) ...
Setting up strongswan-starter (4.5.2-1.1-bpo60+vyos1+helium5) ...
Disabling opportunistic encryption (OE) in config file ... already disabled
Restarting strongswan IPsec services: ipsecStopping strongSwan IPsec failed: starter is not running
Starting strongSwan 4.5.2 IPsec [starter]...
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/xfrm/xfrm_algo.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/key/af_key.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/ipv4/ah4.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/ipv4/esp4.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/xfrm/xfrm_ipcomp.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/ipv4/ipcomp.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/ipv4/tunnel4.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/ipv4/xfrm4_tunnel.ko
insmod /lib/modules/3.13.11-1-amd64-vyos/kernel/net/xfrm/xfrm_user.ko
.
Starting strongSwan 4.5.2 IPsec [starter]...
pluto is already running (/var/run/pluto.pid exists) -- skipping pluto start
charon is already running (/var/run/charon.pid exists) -- skipping charon start
starter is already running (/var/run/starter.pid exists) -- no fork done
Setting up strongswan-ikev1 (4.5.2-1.1-bpo60+vyos1+helium5) ...
Processing triggers for man-db ...
Setting up strongswan-ikev2 (4.5.2-1.1-bpo60+vyos1+helium5) ...
Setting up strongswan (4.5.2-1.1-bpo60+vyos1+helium5) ...

@higebu
Copy link
Author

higebu commented Aug 19, 2017

vyos@vyos:~$ sudo dpkg -l | grep strongswan
ii  libstrongswan                      4.5.2-1.1-bpo60+vyos1+helium5   strongSwan utility and crypto library
ii  strongswan                         4.5.2-1.1-bpo60+vyos1+helium5   IPsec VPN solution metapackage
ii  strongswan-ikev1                   4.5.2-1.1-bpo60+vyos1+helium5   strongSwan Internet Key Exchange (v1) daemon
ii  strongswan-ikev2                   4.5.2-1.1-bpo60+vyos1+helium5   strongSwan Internet Key Exchange (v2) daemon
ii  strongswan-starter                 4.5.2-1.1-bpo60+vyos1+helium5   strongSwan daemon starter and configuration file parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment