lfs-rpmify/README.md

341 lines
9.6 KiB
Markdown
Raw Permalink Normal View History

2024-10-16 08:32:01 +08:00
Building RPM in LFS 12.2
========================
2024-11-02 16:39:53 +08:00
__STATUS__: Complee
2024-10-18 07:30:35 +08:00
2024-10-16 08:32:01 +08:00
This git is for the scripts needed to build the dependencies for the RPM Package
Manager (RPM) within a LFS 12.2 system. This is Phase Three in `THE-PLAN.md`.
2024-10-17 19:36:54 +08:00
First I resolved the dependencies needed to build RPM 4.18.2 as I successfully
built and used RPM 4.18.1 on an LFS 11.3 system so I knew it was possible. Once
I had that building (but not installed) I resolved the dependencies needed to
build RPM 4.20.0 which is the current series.
2024-10-16 16:08:54 +08:00
2024-10-16 18:56:29 +08:00
With dependencies through Lua built, RPM 4.18.2 builds in LFS 12.2 but there are
2024-10-17 19:36:54 +08:00
still two needed components for a complete RPM environment:
2024-10-16 18:56:29 +08:00
1. GnuPG (critical, needed to sign packages, important for package security)
2. debugedit (critical, needed for debug packages)
2024-10-17 11:42:19 +08:00
Dependencies 13 through 27 build GnuPG.
2024-10-17 13:26:11 +08:00
Dependencies 28 and 29 build debugedit.
2024-10-16 18:56:29 +08:00
2024-10-17 19:36:54 +08:00
Some of the additional needed dependencies for RPM 4.20.0 (such as CMake) were
built as a result of building GnuPG, there was only one additional dependency
(audit) which itself had an unmet dependency (swig). Once those were built, I
was able to successfully build RPM 4.20.0.
2024-10-17 14:00:52 +08:00
2024-10-17 19:36:54 +08:00
RPM 4.20.0 does want to use rpm-sequoia for digests and OpenPGP however
rpm-sequoia requires Rust and Rust is a can of worms I just do not like.
Perhaps I am wrong not to like it, but I *really* do not like it. At this
2024-10-17 15:22:02 +08:00
point in time I have zero plans to ever include it in YJL (add-on repositories
of course can) as I just see no value in dealing with it.
2024-10-17 19:36:54 +08:00
RPM 4.20.0 still supports using libgcrypt for the hashes and there is an
2024-10-17 15:22:02 +08:00
unsupported way to use their legacy OpenPGP parser for signatures, detailed at
[RPM PGP Legacy](https://github.com/rpm-software-management/rpmpgp_legacy)
2024-10-18 04:16:54 +08:00
git repository. That is implemented in my build of RPM 4.20.0.
2024-10-17 19:36:54 +08:00
2024-10-18 07:30:35 +08:00
The file [`yjl-lfs-rpm-macros`](yjl-lfs-rpm-macros) should be installed as
`/etc/rpm/macros` for LFS/YJL with RPM. The biggest issue is RPM likes to use
`/lib64` and `/usr/lib64` on `x86_64` systems but LFS (and the YJL I am
building) does not. The macro file fixes that without needing to alter RPM
itself.
2024-10-17 19:36:54 +08:00
RPM Test Suite
--------------
RPM 4.18.2 requires `fakechroot` to run the test suite. That project appears to
be abandoned with the last release about four years ago, and no recent activity
in the project git repository.
2024-10-17 15:22:02 +08:00
2024-10-17 19:36:54 +08:00
RPM 4.20.0 requires either `podman` or `docker` to run the test suite. As I do
not (yet) have either available, I could not run the test suite.
2024-10-17 14:00:52 +08:00
2024-10-16 08:32:01 +08:00
Dependency One: UnZip
---------------------
Justification: Needed to build SQLite 3 (to unpack the documentation). No build
dependencies outside of LFS.
2024-10-16 08:36:01 +08:00
* Script: [`01-unzip.sh`](01-unzip.sh)
2024-10-16 09:36:20 +08:00
* Status: Script Works
Dependency Two: SQLite3
-----------------------
2024-10-17 08:49:13 +08:00
Justification: Needed to build RPM itself and for Cyrus SASL. Depends upon UnZip
for documentation.
2024-10-16 09:36:20 +08:00
* Script: [`02-sqlite3.sh`](02-sqlite3.sh)
2024-10-16 11:11:00 +08:00
* Status: Script Works
2024-10-16 10:04:52 +08:00
Dependency Three: libgpg-error
------------------------------
2024-10-17 10:04:18 +08:00
Justification: Needed to build libgcrypt, libassuan, libksba, and pinentry. No
build dependencies outside of LFS.
2024-10-16 10:04:52 +08:00
* Script: [`03-libgpg-error.sh`](03-libgpg-error.sh)
2024-10-16 11:11:00 +08:00
* Status: Script Works
2024-10-16 10:04:52 +08:00
2024-10-16 10:36:59 +08:00
Dependency Four: libgcrypt
--------------------------
2024-10-16 18:10:57 +08:00
Justification: Needed to build RPM itself and GnuPG. Depends upon libgpg-error.
2024-10-16 10:36:59 +08:00
* Script: [`04-libgcrypt.sh`](04-libgcrypt.sh)
2024-10-16 11:11:00 +08:00
* Status: Script Works
2024-10-16 10:36:59 +08:00
2024-10-16 12:42:51 +08:00
Dependency Five: popt
---------------------
Justification: Needed to build RPM itself. No build dependencies outside of LFS.
2024-10-16 10:04:52 +08:00
2024-10-16 12:42:51 +08:00
* Script: [`05-popt.sh`](05-popt.sh)
2024-10-16 13:19:15 +08:00
* Status: Script Works
2024-10-16 13:31:16 +08:00
Dependency Six: ICU
-------------------
2024-10-16 13:19:15 +08:00
2024-10-16 14:24:35 +08:00
Justification: Needed to build libxml2. No build dependencies outside of LFS.
2024-10-16 13:19:15 +08:00
* Script: [`06-icu.sh`](06-icu.sh)
2024-10-16 15:33:54 +08:00
* Status: Script Works
2024-10-16 13:31:16 +08:00
Dependency Seven: libxml2
-------------------------
2024-10-17 05:02:51 +08:00
Justification: Needed for libarchive and CMake. Depends on ICU.
2024-10-16 13:31:16 +08:00
* Script: [`07-libxml2.sh`](07-libxml2.sh)
2024-10-16 15:33:54 +08:00
* Status: Script Works
2024-10-16 13:31:16 +08:00
2024-10-16 13:42:22 +08:00
Dependency Eight: LZO
---------------------
2024-10-16 14:24:35 +08:00
Justification: Needed for libarchive. No build dependencies outside of LFS.
2024-10-16 13:42:22 +08:00
* Script: [`08-lzo.sh`](08-lzo.sh)
2024-10-16 15:33:54 +08:00
* Status: Script Works
2024-10-16 13:42:22 +08:00
2024-10-16 14:24:35 +08:00
Dependency Nine: nettle
-----------------------
Justification: Needed for libarchive. No build dependencies outside of LFS.
* Script: [`09-nettle.sh`](09-nettle.sh)
2024-10-16 15:33:54 +08:00
* Status: Script Works
2024-10-16 14:24:35 +08:00
2024-10-16 14:40:23 +08:00
Dependency Ten: pcre2
---------------------
Justification: Needed for libarchive. No build dependencies outside of LFS.
* Script: [`10-pcre2.sh`](10-pcre2.sh)
2024-10-16 15:33:54 +08:00
* Status: Script Works
2024-10-16 14:40:23 +08:00
2024-10-16 14:50:24 +08:00
Dependency Eleven: libarchive
-----------------------------
2024-10-16 13:31:16 +08:00
2024-10-17 05:26:34 +08:00
Justification: Needed to build RPM and CMake. Depends upon libxml2, LZO, Nettle,
and pcre2.
2024-10-16 14:50:24 +08:00
* Script: [`11-libarchive.sh`](11-libarchive.sh)
2024-10-16 15:33:54 +08:00
* Status: Script Works
2024-10-16 15:54:01 +08:00
Dependency Twelve: Lua
----------------------
2024-10-16 15:33:54 +08:00
2024-10-16 15:54:01 +08:00
Justification: Needed to build RPM. No build dependencies outside of LFS.
* Script: [`12-lua.sh`](12-lua.sh)
2024-10-16 18:10:57 +08:00
* Status: Script Works
Dependency Thirteen: libassuan
------------------------------
2024-10-17 10:04:18 +08:00
Justification: Needed to build pinentry and GnuPG. Requires libgpg-error.
2024-10-16 18:10:57 +08:00
* Script: [`13-libassuan.sh`](13-libassuan.sh)
2024-10-17 06:05:56 +08:00
* Status: Script Works
2024-10-16 18:10:57 +08:00
2024-10-16 18:23:55 +08:00
Dependency Fourteen: libksba
----------------------------
Justification: Needed to build GnuPG. Requires libgpg-error.
2024-10-16 18:10:57 +08:00
2024-10-16 18:23:55 +08:00
* Script: [`14-libksba.sh`](14-libksba.sh)
2024-10-17 06:05:56 +08:00
* Status: Script Works
2024-10-16 18:10:57 +08:00
2024-10-16 18:41:18 +08:00
Dependency Fifteen: npth
------------------------
2024-10-16 18:10:57 +08:00
2024-10-16 18:41:18 +08:00
Justification: Needed to build GnuPG. No dependencies outside of LFS.
* Script: [`15-npth.sh`](15-npth.sh)
2024-10-17 06:05:56 +08:00
* Status: Script Works
2024-10-17 05:02:51 +08:00
Dependency Sixteen: libuv
-------------------------
Justification: Needed to build CMake. No dependencies outside of LFS.
* Script: [`16-libuv.sh`](16-libuv.sh)
2024-10-17 06:05:56 +08:00
* Status: Script Works
2024-10-17 05:02:51 +08:00
Dependency Seventeen: nghttp2
-----------------------------
Justification: Needed to build CMake. Depends upon libxml2 to build.
* Script: [`17-nghttp2.sh`](17-nghttp2.sh)
2024-10-17 06:05:56 +08:00
* Status: Script Works
2024-10-17 05:26:34 +08:00
Dependency Eighteen: CMake
--------------------------
Justification: Needed by brotli and current RPM versions. Depends upon curl,
libarchive, libuv, and nghttp2.
* Script: [`18-cmake.sh`](18-cmake.sh)
2024-10-17 06:05:56 +08:00
* Status: Script Works
2024-10-17 05:26:34 +08:00
* Note: Rebuild once GCC Fortran available
2024-10-17 06:05:56 +08:00
2024-10-17 06:45:24 +08:00
Dependency Nineteen: brotli
---------------------------
2024-10-17 06:05:56 +08:00
2024-10-17 06:45:24 +08:00
Justification: Neded to build GnuTLS and beneficial to future rebuild of cURL.
Requires CMake to build.
* Script: [`19-brotli.sh`](19-brotli.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 06:45:24 +08:00
* Note: Python bindings NOT built
2024-10-17 06:59:28 +08:00
Dependency Twenty: which
------------------------
Justification: Needed for libseccomp test suite, and by *many* test suites and
scripts on a GNU/Linux system. No build dependencies outside of LFS.
* Script: [`20-which.sh`](20-which.sh)
2024-10-17 11:42:19 +08:00
* Stutus: Script Works
2024-10-17 06:59:28 +08:00
2024-10-17 07:24:05 +08:00
Dependency Twenty-One: libseccomp
---------------------------------
Justification: Needed for GnuTLS. Depends upon which.
* Script: [`21-libseccomp.sh`](21-libseccomp.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 07:24:05 +08:00
2024-10-17 07:57:11 +08:00
Dependency Twenty-Two: GnuTLS
-----------------------------
Justification: Needed for GnuPG. Also is the preferred TLS stack for YJL. Build
requires nettle, libunistring, libtasn1, p11-kit, brotli, libidn2, libseccomp.
Runtime requires make-ca.
* Script: [`22-gnutls.sh`](22-gnutls.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 07:57:11 +08:00
* Note: Note yet built with DANE support, or Trousers support.
2024-10-17 08:20:08 +08:00
Dependency Twenty-Three: LMDB
-----------------------------
Justification: Needed for Cyrus SASL. No build dependencies outside of LFS.
* Script: [`23-lmdb.sh`](23-lmdb.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 08:20:08 +08:00
2024-10-17 08:49:13 +08:00
Dependency Twenty-Four: Cyrus SASL
----------------------------------
Justification: Needed for OpenLDAP. Requires LMDB and SQLite3
* Script: [`24-cyrus-sasl.sh`](24-cyrus-sasl.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 08:49:13 +08:00
* Note: Does not install files needed to start the auth daemon
2024-10-17 09:25:39 +08:00
Dependency Twenty-Five: OpenLDAP
--------------------------------
Justification: Needed for GnuPG. Requires Cyrus SASL to build.
* Script: [`25-openldap.sh`](25-openldap.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 09:25:39 +08:00
* Note: Only installs client libraries, not the daemon
2024-10-17 10:04:18 +08:00
Dependency Twenty-Six: pinentry
-------------------------------
Justification: Runtime dependency of GnuPG. Requires libassuan and libgpg-error.
* Script: [`26-pinentry.sh`](26-pinentry.sh)
* Status: Script Works
* Note: GUI clients not built yet
2024-10-17 09:51:27 +08:00
Dependency Twenty-Seven: GnuPG
------------------------------
Justification: Needed for RPM signatures. Requires libassuan, libgcrypt,
libksba, npth, OpenLDAP, GnuTLS, and pinentry.
2024-10-17 06:59:28 +08:00
2024-10-17 09:51:27 +08:00
* Script: [`27-gnupg.sh`](27-gnupg.sh)
2024-10-17 11:42:19 +08:00
* Status: Script Works
2024-10-17 12:11:25 +08:00
Dependency Twenty-Eight: elfutils
---------------------------------
Justification: LFS already installs libelf from elfutils, but debugedit needs
libdw from elfutils as well.
* Script: [`28-elfutils.sh`](28-elfutils.sh)
2024-10-17 13:26:11 +08:00
* Status: Script Works
* Note: Binaries in `/usr/bin` installed with an `eu-` prefix.
Dependency Twenty-Nine: debugedit
---------------------------------
Justification: Required for RPM debuginfo packages. Build requires libelf and
libdw from elfutils.
* Script: [`29-debugedit.sh`](29-debugedit.sh)
2024-10-17 14:00:52 +08:00
* Status: Script Works
2024-10-17 13:26:11 +08:00
2024-10-17 16:57:59 +08:00
Dependency Thirty: swig
-----------------------
Justification: Required to build audit. Build requires pcre2.
* Script: [`30-swig.sh`](30-swig.sh)
2024-10-18 04:16:54 +08:00
* Status: Script Works
2024-10-17 16:57:59 +08:00
Dependency Thirty-One: audit
----------------------------
Justification: Required to build RPM 4.20.0 (current)
* Script: [`31-audit.sh`](31-audit.sh)
2024-10-18 04:16:54 +08:00
* Status: Script Works
2024-11-02 16:39:53 +08:00
* Note: \texttt{/var/log/auditd} needs to be manually created and the configure
switch in script needs to be updated for correct PID location, but it
works.
2024-10-17 16:57:59 +08:00
2024-10-18 18:34:01 +08:00
Dependency Thirty-Two: cpio
---------------------------
Justification: RPM run-time dependency.
* Script: [`32-cpio.sh`](32-cpio.sh)
* Status: Script Works
2024-10-17 13:26:11 +08:00
2024-10-18 04:16:54 +08:00
Build RPM 4.20.0
----------------
* Script: [`99-rpm.sh`](99-rpm.sh)
* Status: Script Works