Go to file
2024-10-21 14:45:41 -07:00
01-unzip.sh typo fix 2024-10-15 17:37:55 -07:00
02-sqlite3.sh Check for configure script failure 2024-10-15 20:09:49 -07:00
03-libgpg-error.sh Check for configure script failure 2024-10-15 20:09:49 -07:00
04-libgcrypt.sh Check for configure script failure 2024-10-15 20:09:49 -07:00
05-popt.sh popt 2024-10-15 21:42:51 -07:00
06-icu.sh typo fix 2024-10-16 00:32:31 -07:00
07-libxml2.sh libxml2 2024-10-15 22:31:16 -07:00
08-lzo.sh LZO 2024-10-15 22:42:22 -07:00
09-nettle.sh Nettle 2024-10-15 23:24:35 -07:00
10-pcre2.sh pcre2 2024-10-15 23:40:23 -07:00
11-libarchive.sh libarchive 2024-10-15 23:50:24 -07:00
12-lua.sh lua 2024-10-16 00:54:01 -07:00
13-libassuan.sh libassuan 2024-10-16 03:10:57 -07:00
14-libksba.sh libksba 2024-10-16 03:23:55 -07:00
15-npth.sh npth 2024-10-16 03:41:18 -07:00
16-libuv.sh libuv/nghttp2 2024-10-16 14:02:51 -07:00
17-nghttp2.sh libuv/nghttp2 2024-10-16 14:02:51 -07:00
18-cmake.sh CMake 2024-10-16 14:26:34 -07:00
19-brotli.sh brotli 2024-10-16 15:45:24 -07:00
20-which.sh which 2024-10-16 15:59:28 -07:00
21-libseccomp.sh libseccomp 2024-10-16 16:24:05 -07:00
22-gnutls.sh GnuTLS 2024-10-16 16:57:11 -07:00
23-lmdb.sh LMDB 2024-10-16 17:20:08 -07:00
24-cyrus-sasl.sh Cyrus SASL 2024-10-16 17:49:13 -07:00
25-openldap.sh OpenLDAP 2024-10-16 18:25:39 -07:00
26-pinentry.sh pinentry 2024-10-16 19:04:18 -07:00
27-gnupg.sh oops 2024-10-16 18:51:58 -07:00
28-elfutils.sh bug fix 2024-10-16 22:09:24 -07:00
29-debugedit.sh debugedit 2024-10-16 22:26:11 -07:00
30-swig.sh swig and audit 2024-10-17 01:57:59 -07:00
31-audit.sh swig and audit 2024-10-17 01:57:59 -07:00
32-cpio.sh cpio 2024-10-18 03:34:01 -07:00
99-rpm.sh bug fix 2024-10-17 15:53:51 -07:00
LICENSE Initial commit 2024-10-15 16:33:59 -07:00
README.md cpio 2024-10-18 03:34:01 -07:00
THE-PLAN.md initial documentation 2024-10-15 17:32:01 -07:00
yjl-lfs-rpm-macros weak usergroup added 2024-10-21 14:45:41 -07:00

Building RPM in LFS 12.2

STATUS: Mostly complete. Issue still exists with creation of debug packages.

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.

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.

With dependencies through Lua built, RPM 4.18.2 builds in LFS 12.2 but there are still two needed components for a complete RPM environment:

  1. GnuPG (critical, needed to sign packages, important for package security)
  2. debugedit (critical, needed for debug packages)

Dependencies 13 through 27 build GnuPG. Dependencies 28 and 29 build debugedit.

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.

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 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.

RPM 4.20.0 still supports using libgcrypt for the hashes and there is an unsupported way to use their legacy OpenPGP parser for signatures, detailed at RPM PGP Legacy git repository. That is implemented in my build of RPM 4.20.0.

With RPM built, I successfully built and installed a noarch package (kernel ABI headers for GlibC) however when attempting to build a binary package (vim) I came across the following error:

RPM build errors:
    Empty %files file /home/rpmbuilder/rpmbuild/BUILD/vim-9.1.0774-build/vim-9.1.0774/debugfiles.list

Something still appears to be missing or incomplete. However it does work just fine if I disable the creation of the debug packages.

I am continuing with the bootstrapping for the time being.

The file 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.

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.

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.

Dependency One: UnZip

Justification: Needed to build SQLite 3 (to unpack the documentation). No build dependencies outside of LFS.

Dependency Two: SQLite3

Justification: Needed to build RPM itself and for Cyrus SASL. Depends upon UnZip for documentation.

Dependency Three: libgpg-error

Justification: Needed to build libgcrypt, libassuan, libksba, and pinentry. No build dependencies outside of LFS.

Dependency Four: libgcrypt

Justification: Needed to build RPM itself and GnuPG. Depends upon libgpg-error.

Dependency Five: popt

Justification: Needed to build RPM itself. No build dependencies outside of LFS.

Dependency Six: ICU

Justification: Needed to build libxml2. No build dependencies outside of LFS.

Dependency Seven: libxml2

Justification: Needed for libarchive and CMake. Depends on ICU.

Dependency Eight: LZO

Justification: Needed for libarchive. No build dependencies outside of LFS.

Dependency Nine: nettle

Justification: Needed for libarchive. No build dependencies outside of LFS.

Dependency Ten: pcre2

Justification: Needed for libarchive. No build dependencies outside of LFS.

Dependency Eleven: libarchive

Justification: Needed to build RPM and CMake. Depends upon libxml2, LZO, Nettle, and pcre2.

Dependency Twelve: Lua

Justification: Needed to build RPM. No build dependencies outside of LFS.

Dependency Thirteen: libassuan

Justification: Needed to build pinentry and GnuPG. Requires libgpg-error.

Dependency Fourteen: libksba

Justification: Needed to build GnuPG. Requires libgpg-error.

Dependency Fifteen: npth

Justification: Needed to build GnuPG. No dependencies outside of LFS.

Dependency Sixteen: libuv

Justification: Needed to build CMake. No dependencies outside of LFS.

Dependency Seventeen: nghttp2

Justification: Needed to build CMake. Depends upon libxml2 to build.

Dependency Eighteen: CMake

Justification: Needed by brotli and current RPM versions. Depends upon curl, libarchive, libuv, and nghttp2.

  • Script: 18-cmake.sh
  • Status: Script Works
  • Note: Rebuild once GCC Fortran available

Dependency Nineteen: brotli

Justification: Neded to build GnuTLS and beneficial to future rebuild of cURL. Requires CMake to build.

  • Script: 19-brotli.sh
  • Status: Script Works
  • Note: Python bindings NOT built

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.

Dependency Twenty-One: libseccomp

Justification: Needed for GnuTLS. Depends upon which.

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
  • Status: Script Works
  • Note: Note yet built with DANE support, or Trousers support.

Dependency Twenty-Three: LMDB

Justification: Needed for Cyrus SASL. No build dependencies outside of LFS.

Dependency Twenty-Four: Cyrus SASL

Justification: Needed for OpenLDAP. Requires LMDB and SQLite3

  • Script: 24-cyrus-sasl.sh
  • Status: Script Works
  • Note: Does not install files needed to start the auth daemon

Dependency Twenty-Five: OpenLDAP

Justification: Needed for GnuPG. Requires Cyrus SASL to build.

  • Script: 25-openldap.sh
  • Status: Script Works
  • Note: Only installs client libraries, not the daemon

Dependency Twenty-Six: pinentry

Justification: Runtime dependency of GnuPG. Requires libassuan and libgpg-error.

  • Script: 26-pinentry.sh
  • Status: Script Works
  • Note: GUI clients not built yet

Dependency Twenty-Seven: GnuPG

Justification: Needed for RPM signatures. Requires libassuan, libgcrypt, libksba, npth, OpenLDAP, GnuTLS, and pinentry.

Dependency Twenty-Eight: elfutils

Justification: LFS already installs libelf from elfutils, but debugedit needs libdw from elfutils as well.

  • Script: 28-elfutils.sh
  • 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.

Dependency Thirty: swig

Justification: Required to build audit. Build requires pcre2.

Dependency Thirty-One: audit

Justification: Required to build RPM 4.20.0 (current)

  • Script: 31-audit.sh
  • Status: Script Works
  • Note: Did not try starting the service

Dependency Thirty-Two: cpio

Justification: RPM run-time dependency.

Build RPM 4.20.0

  • Script: 99-rpm.sh
  • Status: Script Works
  • Note: Something is still missing related to debug packages.