Blame
| dc8f3f | Samuli Seppänen | 2025-02-11 11:22:41 | 1 | # How can I build a binary RPM package for my specific Linux platform? |
| 2 | ||||
| 6bc30a | Samuli Seppänen | 2025-02-11 11:24:01 | 3 | **NOTE: this article may contain outdated information which may not be applicable with modern versions of RPM build tools.** |
| 65931f | Samuli Seppänen | 2025-02-11 11:23:37 | 4 | |
| dc8f3f | Samuli Seppänen | 2025-02-11 11:22:41 | 5 | Building an OpenVPN binary RPM package requires these RPM prerequisites: |
| 6 | ||||
| 7 | - **openssl** |
|||
| 8 | - **openssl-devel** |
|||
| 9 | - **lzo** |
|||
| 10 | - **lzo-devel** |
|||
| 11 | ||||
| 12 | The **openssl** package is almost always installed by default on Linux distributions. The **openssl-devel** package is almost always available on Linux distributions, but is sometimes not installed by default. The **lzo** and **lzo-devel** packages are usually included in more recent Linux distributions but must be installed manually. See the [Dag Wieers](http://dag.wieers.com/rpm/packages/lzo/) site for a comprehensive set of LZO RPMs for Red Hat and Fedora. |
|||
| 13 | ||||
| 14 | Once the prerequisite binary RPMs are in place, building an OpenVPN binary RPM is quite straightforward: |
|||
| 15 | ||||
| 16 | ``` |
|||
| 17 | rpmbuild -tb [OpenVPN .tar.gz file] |
|||
| 18 | ``` |
|||
| 19 | ||||
| 20 | You will see a lot of lines of output as **rpmbuild** compiles OpenVPN, but check near the end of the output for a line which looks like this: |
|||
| 21 | ||||
| 22 | ``` |
|||
| 23 | Wrote: /usr/src/packages/RPMS/i586/openvpn-2.0_rc18-1.i586.rpm |
|||
| 24 | ``` |
|||
| 25 | ||||
| 26 | This tells you where **rpmbuild** wrote the binary RPM file. Now, use: |
|||
| 27 | ||||
| 28 | ``` |
|||
| 29 | rpm -ivh [OpenVPN .rpm file] |
|||
| 30 | ``` |
|||
| 31 | ||||
| 32 | to do a fresh install of OpenVPN, or |
|||
| 33 | ||||
| 34 | ``` |
|||
| 35 | rpm -Uvh [OpenVPN .rpm file] |
|||
| 36 | ``` |
|||
| 37 | ||||
| 38 | to upgrade an existing installation. |
