wiki:PatchingDebs

Version 2 (modified by Samuli Seppänen, 12 years ago) (diff)

--

Introduction

The NSI script in openvpn-build repository makes use of EnvVarUpdate.nsh to append OpenVPN\bin to the system-wide PATH variable on Windows. When using default NSIS builds, PATH can't be longer than 1024 characters or OpenVPN install destroys it. To support longer PATHs you need rebuild makensis with larger NSIS_MAX_STRLEN.

Rebuilding NSIS on Ubuntu 12.04

Here we rebuild nsis and nsis-common Debian packages with custom configuration. First we need some tools:

$ apt-get update
$ apt-get install apt-src

Next fetch the NSIS sources:

$ apt-src install nsis

Next open nsis-2.46/debian/rules in a text editor and add NSIS_MAX_STRLEN=8192 to the suitable place:

SCONSOPTS_NSIS   := $(SCONSOPTS) NSIS_MAX_STRLEN=8192 SKIPUTILS=$(IGNORE_UTILS_NSIS) SKIPDOC=COPYING
SCONSOPTS_COMMON := $(SCONSOPTS) NSIS_MAX_STRLEN=8192 SKIPUTILS=$(IGNORE_UTILS_COMMON) SKIPDOC=COPYING

Now build the packages:

$ apt-src build nsis

Finally, install the customized packages using dpkg:

$ dpkg -i nsis_2.46-* nsis-common_2.46-*

If you now rebuild openvpn, the installer should support appending to long PATHs.

Attachments (2)

Download all attachments as: .zip