Initial Commit
- initial default booting image
This commit is contained in:
40
package/rpm/0001-fix-var-declare-in-label-error.patch
Normal file
40
package/rpm/0001-fix-var-declare-in-label-error.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From b960c0b43a080287a7c13533eeb2d9f288db1414 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Festi <ffesti@redhat.com>
|
||||
Date: Thu, 16 Mar 2023 19:05:04 +0100
|
||||
Subject: [PATCH] Fix compiler error on clang
|
||||
|
||||
Turns out variable declarations are not allowed after a label, even in
|
||||
C99. And while some compilers don't seem to care others do.
|
||||
|
||||
Moving the declaration of mayopen to the start of the function to avoid
|
||||
this problem.
|
||||
|
||||
Resolves: #2435
|
||||
|
||||
Upstream: b960c0b43a080287a7c13533eeb2d9f288db1414
|
||||
Signed-off-by: James Knight <james.d.knight@live.com>
|
||||
---
|
||||
lib/fsm.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/fsm.c b/lib/fsm.c
|
||||
index 5671ac642d..183293edb0 100644
|
||||
--- a/lib/fsm.c
|
||||
+++ b/lib/fsm.c
|
||||
@@ -879,6 +879,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
|
||||
int nodigest = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOFILEDIGEST) ? 1 : 0;
|
||||
int nofcaps = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCAPS) ? 1 : 0;
|
||||
int firstlinkfile = -1;
|
||||
+ int mayopen = 0;
|
||||
char *tid = NULL;
|
||||
struct filedata_s *fdata = xcalloc(fc, sizeof(*fdata));
|
||||
struct filedata_s *firstlink = NULL;
|
||||
@@ -1016,7 +1017,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
|
||||
|
||||
setmeta:
|
||||
/* Special files require path-based ops */
|
||||
- int mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
|
||||
+ mayopen = S_ISREG(fp->sb.st_mode) || S_ISDIR(fp->sb.st_mode);
|
||||
if (!rc && fd == -1 && mayopen) {
|
||||
int flags = O_RDONLY;
|
||||
/* Only follow safe symlinks, and never on temporary files */
|
||||
@@ -0,0 +1,58 @@
|
||||
From a0a937a454b2f82eae7ed3b4436614e64ef63e2d Mon Sep 17 00:00:00 2001
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Mon, 13 Mar 2023 12:41:11 +0200
|
||||
Subject: [PATCH] Use Python >= 3.2 compatible object hash slot type
|
||||
|
||||
Python 3.2 changed the object hash type to make them pointer-width on
|
||||
all platforms - an incompatible change but apparently 3.2 was early enough
|
||||
in the 3.x days for such changes: https://bugs.python.org/issue9778
|
||||
|
||||
The hash vs pointer size mismatch has quietly been there all along but
|
||||
clang >= 16 started treating this as an error, causing failed builds.
|
||||
The fix is easy and obvious enough, but this requires us to bump the
|
||||
minimum Python version from 3.1 to 3.2. Which thankfully is old enough that
|
||||
we can do without having to care or introduce build-time compatibility
|
||||
workarounds.
|
||||
|
||||
Suggested-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream: 45103f84764b2a293b068eb0f59456f553ec45d8
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
INSTALL | 4 ++--
|
||||
python/header-py.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/INSTALL b/INSTALL
|
||||
index 13d0d8a83..528c1e5c0 100644
|
||||
--- a/INSTALL
|
||||
+++ b/INSTALL
|
||||
@@ -66,8 +66,8 @@ These are available from
|
||||
http://www.bzip.org
|
||||
http://tukaani.org/xz/
|
||||
|
||||
-If you want to build the Python bindings to RPM library, it can be enabled
|
||||
-with --enable-python option to configure. You'll need to have Python >= 3.1
|
||||
+Python bindings to RPM library are built by default, but it can be disabled
|
||||
+with -DENABLE_PYTHON=OFF. You'll need to have Python >= 3.2
|
||||
runtime and C API development environment installed.
|
||||
Python is available from:
|
||||
http://www.python.org/
|
||||
diff --git a/python/header-py.c b/python/header-py.c
|
||||
index 0aed0c926..c15503f35 100644
|
||||
--- a/python/header-py.c
|
||||
+++ b/python/header-py.c
|
||||
@@ -316,9 +316,9 @@ static PyObject * hdr_dsOfHeader(PyObject * s)
|
||||
"(Oi)", s, RPMTAG_NEVR);
|
||||
}
|
||||
|
||||
-static long hdr_hash(PyObject * h)
|
||||
+static Py_hash_t hdr_hash(PyObject * h)
|
||||
{
|
||||
- return (long) h;
|
||||
+ return (Py_hash_t) h;
|
||||
}
|
||||
|
||||
static PyObject * hdr_reduce(hdrObject *s)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
26
package/rpm/0003-Fix-missing-basename-include-on-macOS.patch
Normal file
26
package/rpm/0003-Fix-missing-basename-include-on-macOS.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From f510770a214bd2e8144a39868c34cd568179599e Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Buckley <calvin@cmpct.info>
|
||||
Date: Tue, 11 Jul 2023 19:22:41 -0300
|
||||
Subject: [PATCH] Fix missing basename include on macOS
|
||||
|
||||
Upstream: b2e67642fd8cb64d8cb1cca9e759396c1c10807d
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
tools/rpmuncompress.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
|
||||
index bd4146d54..58ddf5683 100644
|
||||
--- a/tools/rpmuncompress.c
|
||||
+++ b/tools/rpmuncompress.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "system.h"
|
||||
|
||||
#include <popt.h>
|
||||
+#include <libgen.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
--
|
||||
2.49.0
|
||||
|
||||
36
package/rpm/Config.in
Normal file
36
package/rpm/Config.in
Normal file
@@ -0,0 +1,36 @@
|
||||
comment "rpm needs a toolchain w/ dynamic library, threads and lua >= 5.3"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
|
||||
|| !BR2_PACKAGE_LUA || BR2_PACKAGE_LUA_5_1
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
config BR2_PACKAGE_RPM
|
||||
bool "rpm"
|
||||
depends on !BR2_STATIC_LIBS # dlfcn.h
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
depends on BR2_PACKAGE_LUA && !BR2_PACKAGE_LUA_5_1
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
|
||||
select BR2_PACKAGE_FILE
|
||||
select BR2_PACKAGE_POPT
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
The RPM Package Manager (RPM).
|
||||
|
||||
http://www.rpm.org/
|
||||
|
||||
if BR2_PACKAGE_RPM
|
||||
|
||||
comment "rpm2archive support needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_RPM_RPM2ARCHIVE
|
||||
bool "rpm2archive command"
|
||||
default y
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_LIBARCHIVE
|
||||
help
|
||||
Enable rpm2archive
|
||||
|
||||
endif
|
||||
5
package/rpm/rpm.hash
Normal file
5
package/rpm/rpm.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From https://rpm.org/wiki/Releases/4.18.1.html
|
||||
sha256 37f3b42c0966941e2ad3f10fde3639824a6591d07197ba8fd0869ca0779e1f56 rpm-4.18.1.tar.bz2
|
||||
|
||||
# Hash for license file
|
||||
sha256 171d94d9f1641316bff7f157a903237dc69cdb5fca405fed8c832c76ed8370f9 COPYING
|
||||
125
package/rpm/rpm.mk
Normal file
125
package/rpm/rpm.mk
Normal file
@@ -0,0 +1,125 @@
|
||||
################################################################################
|
||||
#
|
||||
# rpm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RPM_VERSION_MAJOR = 4.18
|
||||
RPM_VERSION = $(RPM_VERSION_MAJOR).1
|
||||
RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
|
||||
RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
|
||||
RPM_DEPENDENCIES = \
|
||||
host-pkgconf \
|
||||
$(if $(BR2_PACKAGE_BZIP2),bzip2) \
|
||||
$(if $(BR2_PACKAGE_ELFUTILS),elfutils) \
|
||||
file \
|
||||
lua \
|
||||
popt \
|
||||
$(if $(BR2_PACKAGE_XZ),xz) \
|
||||
zlib \
|
||||
$(TARGET_NLS_DEPENDENCIES)
|
||||
RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
|
||||
RPM_LICENSE_FILES = COPYING
|
||||
RPM_CPE_ID_VENDOR = rpm
|
||||
RPM_SELINUX_MODULES = rpm
|
||||
|
||||
# Don't set --{dis,en}-openmp as upstream wants to abort the build if
|
||||
# --enable-openmp is provided and OpenMP is < 4.5:
|
||||
# https://github.com/rpm-software-management/rpm/pull/1433
|
||||
RPM_CONF_OPTS = \
|
||||
--disable-rpath \
|
||||
--with-gnu-ld \
|
||||
--without-fapolicyd \
|
||||
--without-fsverity \
|
||||
--without-imaevm
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
RPM_DEPENDENCIES += acl
|
||||
RPM_CONF_OPTS += --with-acl
|
||||
else
|
||||
RPM_CONF_OPTS += --without-acl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
||||
RPM_DEPENDENCIES += audit
|
||||
RPM_CONF_OPTS += --with-audit
|
||||
else
|
||||
RPM_CONF_OPTS += --without-audit
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS),y)
|
||||
RPM_DEPENDENCIES += dbus
|
||||
RPM_CONF_OPTS += --enable-plugins
|
||||
else
|
||||
RPM_CONF_OPTS += --disable-plugins
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
||||
RPM_DEPENDENCIES += libcap
|
||||
RPM_CONF_OPTS += --with-cap
|
||||
else
|
||||
RPM_CONF_OPTS += --without-cap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
RPM_DEPENDENCIES += libgcrypt
|
||||
RPM_CONF_OPTS += --with-crypto=libgcrypt
|
||||
else
|
||||
RPM_DEPENDENCIES += openssl
|
||||
RPM_CONF_OPTS += --with-crypto=openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
|
||||
RPM_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
|
||||
else
|
||||
RPM_CONF_OPTS += --without-libintl-prefix
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
RPM_DEPENDENCIES += libselinux
|
||||
RPM_CONF_OPTS += --with-selinux
|
||||
else
|
||||
RPM_CONF_OPTS += --without-selinux
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
RPM_DEPENDENCIES += python3
|
||||
RPM_CONF_OPTS += --enable-python
|
||||
else
|
||||
RPM_CONF_OPTS += --disable-python
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
RPM_DEPENDENCIES += readline
|
||||
RPM_CONF_OPTS += --with-readline
|
||||
else
|
||||
RPM_CONF_OPTS += --without-readline
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQLITE),y)
|
||||
RPM_DEPENDENCIES += sqlite
|
||||
RPM_CONF_OPTS += --enable-sqlite
|
||||
else
|
||||
RPM_CONF_OPTS += --disable-sqlite
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZSTD),y)
|
||||
RPM_DEPENDENCIES += zstd
|
||||
RPM_CONF_OPTS += --enable-zstd
|
||||
else
|
||||
RPM_CONF_OPTS += --disable-zstd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RPM_RPM2ARCHIVE),y)
|
||||
RPM_DEPENDENCIES += libarchive
|
||||
RPM_CONF_OPTS += --with-archive
|
||||
else
|
||||
RPM_CONF_OPTS += --without-archive
|
||||
endif
|
||||
|
||||
# ac_cv_prog_cc_c99: RPM uses non-standard GCC extensions (ex. `asm`).
|
||||
RPM_CONF_ENV = \
|
||||
ac_cv_prog_cc_c99='-std=gnu99' \
|
||||
LIBS=$(TARGET_NLS_LIBS)
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user