upg fakeroot kmod

This commit is contained in:
joborun linux 2024-08-14 17:30:55 +03:00
parent 12b5ad8a8f
commit bee99b4dc5
8 changed files with 252 additions and 47 deletions

View file

@ -0,0 +1,36 @@
From 2660e24756d2b89064b8879e4a376a2063c546e7 Mon Sep 17 00:00:00 2001
From: Clint Adams <clint@debian.org>
Date: Sun, 11 Aug 2024 17:35:58 -0400
Subject: Cast uint8_t pointers. closes: #1074365.
---
communicate.c | 2 +-
faked.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/communicate.c b/communicate.c
index 56eba7a..580ce63 100644
--- a/communicate.c
+++ b/communicate.c
@@ -576,7 +576,7 @@ void send_get_fakem(struct fake_msg *buf)
&fm,
sizeof(fm)-sizeof(fm.mtype),0,0);
- ptr = &fm;
+ ptr = (uint8_t *)&fm;
for (k=0; k<16; k++) {
magic_candidate = *(uint32_t*)&ptr[k];
if (magic_candidate == FAKEROOT_MAGIC_LE || magic_candidate == FAKEROOT_MAGIC_BE) {
diff --git a/faked.c b/faked.c
index 6212a58..d6e1b50 100644
--- a/faked.c
+++ b/faked.c
@@ -1089,7 +1089,7 @@ void get_msg()
do {
r=msgrcv(msg_get,&fm,sizeof(struct fake_msg_buf),0,0);
- ptr = &fm;
+ ptr = (uint8_t *)&fm;
for (k=0; k<16; k++) {
magic_candidate = *(uint32_t*)&ptr[k];
if (magic_candidate == FAKEROOT_MAGIC_LE || magic_candidate == FAKEROOT_MAGIC_BE) {

View file

@ -6,7 +6,7 @@
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=fakeroot
pkgver=1.35
pkgver=1.35.1
pkgrel=01
pkgdesc='Tool for simulating superuser privileges w/o systemd'
url='https://tracker.debian.org/pkg/fakeroot'
@ -15,7 +15,14 @@ install=fakeroot.install
depends=('glibc' 'filesystem' 'sed' 'util-linux' 'sh')
makedepends=('po4a')
checkdepends=('sharutils')
source=("https://deb.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.gz")
source=("https://deb.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.gz"
'0001-Cast-uint8_t-pointers.patch')
prepare() {
cd "${pkgname}-${pkgver}"
patch -Np1 < ../0001-Cast-uint8_t-pointers.patch
}
build() {
cd $pkgname-$pkgver
@ -38,6 +45,7 @@ check() {
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -dm0755 "$pkgdir/usr/lib/ld.so.conf.d/"
@ -45,7 +53,6 @@ package() {
# install README for sysv/tcp usage
install -Dm0644 README "$pkgdir/usr/share/doc/$pkgname/README"
}
#---- arch license gpg-key & sha256sums ----
@ -54,7 +61,8 @@ arch=(x86_64)
license=('GPL')
sha256sums=(e5a427b4ab1eb4a2158b3312547a4155aede58735cd5c2910421988834b440a4) # fakeroot_1.35.orig.tar.gz
sha256sums=(6a0de53b2de05277d4e6d4a884eb0de7a8ad467b82c07a6f8f2f6a629e655fdc # fakeroot_1.35.1.orig.tar.gz
a4afc930e4ee49925a31373f1d4f4d986e7554353e9429b64f9423575f4fbbc8) # 0001-Cast-uint8_t-pointers.patch
## 2b22d8054e2946f4ec3d66d872399eaa39aedbbd7660f879dcde2c4f12a815b9 fakeroot-1.35-01-x86_64.pkg.tar.lz
## 66f023241392bab5f9906c8a40724ad2ca4366ffdecee2c35feebcf059c0dd9d fakeroot-1.35.1-01-x86_64.pkg.tar.lz

View file

@ -3,7 +3,7 @@
# Contributor: Jochem Kossen <j.kossen@home.nl>
pkgname=fakeroot
pkgver=1.35
pkgver=1.35.1
pkgrel=1
pkgdesc='Tool for simulating superuser privileges'
arch=('x86_64')
@ -13,11 +13,19 @@ install=fakeroot.install
depends=('glibc' 'filesystem' 'sed' 'util-linux' 'sh')
makedepends=('systemd' 'po4a')
checkdepends=('sharutils')
source=("https://deb.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.gz")
sha256sums=('e5a427b4ab1eb4a2158b3312547a4155aede58735cd5c2910421988834b440a4')
source=("https://deb.debian.org/debian/pool/main/f/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz"
'0001-Cast-uint8_t-pointers.patch')
sha256sums=('6a0de53b2de05277d4e6d4a884eb0de7a8ad467b82c07a6f8f2f6a629e655fdc'
'a4afc930e4ee49925a31373f1d4f4d986e7554353e9429b64f9423575f4fbbc8')
prepare() {
cd "${pkgname}-${pkgver}"
patch -Np1 < ../0001-Cast-uint8_t-pointers.patch
}
build() {
cd $pkgname-$pkgver
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr \
--libdir=/usr/lib/libfakeroot \
@ -31,17 +39,19 @@ build() {
}
check() {
cd $pkgname-$pkgver
cd "${pkgname}-${pkgver}"
make check
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
cd "${pkgname}-${pkgver}"
install -dm0755 "$pkgdir/usr/lib/ld.so.conf.d/"
echo '/usr/lib/libfakeroot' > "$pkgdir/usr/lib/ld.so.conf.d/fakeroot.conf"
make DESTDIR="${pkgdir}" install
install -dm0755 "${pkgdir}/usr/lib/ld.so.conf.d/"
echo '/usr/lib/libfakeroot' > "${pkgdir}/usr/lib/ld.so.conf.d/fakeroot.conf"
# install README for sysv/tcp usage
install -Dm0644 README "$pkgdir/usr/share/doc/$pkgname/README"
install -Dm0644 README "${pkgdir}/usr/share/doc/${pkgname}/README"
}

116
fakeroot/configure vendored Normal file
View file

@ -0,0 +1,116 @@
`configure' configures fakeroot 1.35.1 to adapt to many kinds of systems.
Usage: src/fakeroot-1.35.1/configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/fakeroot]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
shared library versioning (aka "SONAME") variant to
provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-ipc[=IPCTYPE] method of IPC to use: either sysv (default) or tcp
--with-dbformat[=DBFORMAT]
database format to use: either inode (default) or
path
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <clint@debian.org>.

View file

@ -0,0 +1,13 @@
diff --git a/testsuite/test-user.c b/testsuite/test-user.c
index 97a4747..a7ba90e 100644
--- a/testsuite/test-user.c
+++ b/testsuite/test-user.c
@@ -16,7 +16,7 @@
#include "testsuite.h"
#define TEST_USER_ROOTFS TESTSUITE_ROOTFS "test-user/"
-#define TEST_USER_KERNEL_DIR TEST_USER_ROOTFS "lib/modules/4.4.4/"
+#define TEST_USER_KERNEL_DIR TEST_USER_ROOTFS "usr/lib/modules/4.4.4/"
static const char *const test_user_config_paths[] = {
TEST_USER_ROOTFS "etc/modprobe.d",

View file

@ -6,35 +6,38 @@
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=kmod
pkgver=32
pkgver=33
pkgrel=01
pkgdesc="Linux kernel module management tools and library"
url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'
depends=('glibc' 'zlib' 'openssl' 'xz')
checkdepends=('linux-lts-headers' 'libelf')
makedepends=('scdoc')
checkdepends=('linux-headers' 'libelf')
#options=('strip' 'debug')
options=(strip)
provides=('module-init-tools=3.16' 'libkmod.so') conflicts=('module-init-tools')
provides=('module-init-tools=3.16' 'libkmod.so')
conflicts=('module-init-tools')
replaces=('module-init-tools')
source=("https://www.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign}
# '0001-master.patch'
'0001-test-user-path.patch'
'depmod-search.conf'
'depmod.hook'
'depmod.script')
prepare() {
cd "$pkgname-$pkgver"
# patch -Np1 < ../0001-master.patch
patch -Np1 < ../0001-test-user-path.patch
}
build() {
cd "$pkgname-$pkgver"
./configure \
--sysconfdir=/etc \
--with-module-directory=/usr/lib/modules \
--with-xz \
--with-zlib \
--without-zstd \
--with-openssl
make
@ -70,27 +73,34 @@ package() {
# done
# install depmod.d file for search/ dir
install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
install -Dm0644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
# hook
install -Dm644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook"
install -Dm755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod"
install -Dm0644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook"
install -Dm0755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL2')
license=('LGPL-2.1-or-later' 'GPL-2.0-or-later')
validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi
sha256sums=(630ed0d92275a88cb9a7bf68f5700e911fdadaf02e051cf2e4680ff8480bd492 # kmod-32.tar.xz
6d724cf54e7101651e6963e59cafcee79cae8bbc24946138debb222d5a399fd6 # kmod-32.tar.sign
# 99a02347c809307675a9a643ec34704ec5289b754d53dd4d319b32849b299c60 # 0001-master.patch
md5sums=('c451c4aa61521adbe8af147f498046f8'
'SKIP'
'0360aff69475ebf35b1e85eac2602708'
'dd62cbf62bd8f212f51ef8c43bec9a77'
'e179ace75721e92b04b2e145b69dab29'
'b00253ca0d4ebfb2414e4596597bdebd')
sha256sums=(dc768b3155172091f56dc69430b5481f2d76ecd9ccb54ead8c2540dbcf5ea9bc # kmod-33.tar.xz
e958b88d3d43ae2f73f3753e7e20a8eb07d2fba3a8145576a2a82796b318fbb0 # kmod-33.tar.sign
1297d45ba9cabb88edecebdbf4431b7b384bbab976d117d5ef1f44988a04895d # 0001-test-user-path.patch
1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8 # depmod-search.conf
c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1 # depmod.hook
d2cd04a09feba30e1376144a8110ec7521892acb0940c3c4ba459aeecf0452ed) # depmod.script
## d51e12a0243d442e8878911bc7b120471eb3b034be0e8032b43a1bebea76d7d6 kmod-32-01-x86_64.pkg.tar.lz
## cf292522138b964aba38e582875ca4a58118042a83070ed0d6cf0ed62cc12015 kmod-33-01-x86_64.pkg.tar.lz

View file

@ -1,39 +1,50 @@
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=kmod
pkgver=32
pkgver=33
pkgrel=1
pkgdesc="Linux kernel module management tools and library"
arch=('x86_64')
url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'
license=('GPL2')
license=('LGPL-2.1-or-later' 'GPL-2.0-or-later')
depends=('glibc' 'zlib' 'openssl' 'xz' 'zstd')
makedepends=('scdoc')
checkdepends=('linux-headers' 'libelf')
options=('strip')
provides=('module-init-tools=3.16' 'libkmod.so')
conflicts=('module-init-tools')
replaces=('module-init-tools')
validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi
source=("https://www.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign}
source=("https://www.kernel.org/pub/linux/utils/kernel/${pkgname}/${pkgname}-${pkgver}.tar."{xz,sign}
'0001-test-user-path.patch'
'depmod-search.conf'
'depmod.hook'
'depmod.script')
md5sums=('1046fda48766fae905f83150d12eec78'
md5sums=('c451c4aa61521adbe8af147f498046f8'
'SKIP'
'0360aff69475ebf35b1e85eac2602708'
'dd62cbf62bd8f212f51ef8c43bec9a77'
'e179ace75721e92b04b2e145b69dab29'
'b00253ca0d4ebfb2414e4596597bdebd')
sha256sums=('630ed0d92275a88cb9a7bf68f5700e911fdadaf02e051cf2e4680ff8480bd492'
sha256sums=('dc768b3155172091f56dc69430b5481f2d76ecd9ccb54ead8c2540dbcf5ea9bc'
'SKIP'
'1297d45ba9cabb88edecebdbf4431b7b384bbab976d117d5ef1f44988a04895d'
'1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8'
'c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1'
'd2cd04a09feba30e1376144a8110ec7521892acb0940c3c4ba459aeecf0452ed')
prepare() {
cd "${pkgname}-${pkgver}"
patch -Np1 < ../0001-test-user-path.patch
}
build() {
cd "$pkgname-$pkgver"
cd "${pkgname}-${pkgver}"
./configure \
--sysconfdir=/etc \
--sysconfdir='/etc' \
--with-module-directory='/usr/lib/modules' \
--with-xz \
--with-zlib \
--with-zstd \
@ -50,29 +61,29 @@ check() {
# modules will never be loaded by tests.
local kdirs=(/usr/lib/modules/*/build/Makefile)
if [[ ! -f ${kdirs[0]} ]]; then
if [[ ! -f "${kdirs[0]}" ]]; then
printf '==> Unable to find kernel headers to build modules for tests\n' >&2
return 1
fi
local kver kdir=${kdirs[0]%/Makefile}
IFS=/ read _ _ _ kver _ <<<"$kdir"
local kver kdir="${kdirs[0]%/Makefile}"
IFS=/ read _ _ _ kver _ <<<"${kdir}"
make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver"
make -C "${pkgname}-${pkgver}" check KDIR="${kdir}" KVER="${kver}"
}
package() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
make -C "${pkgname}-${pkgver}" DESTDIR="${pkgdir}" install
# extra directories
install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d
install -dm0755 "${pkgdir}"/{etc,usr/lib}/{depmod,modprobe}.d
# install depmod.d file for search/ dir
install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
install -Dm0644 "${srcdir}/depmod-search.conf" "${pkgdir}/usr/lib/depmod.d/search.conf"
# hook
install -Dm644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook"
install -Dm755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod"
install -Dm0644 "${srcdir}/depmod.hook" "${pkgdir}/usr/share/libalpm/hooks/60-depmod.hook"
install -Dm0755 "${srcdir}/depmod.script" "${pkgdir}/usr/share/libalpm/scripts/depmod"
}
# vim: ft=sh syn=sh et

View file

@ -1,5 +1,6 @@
linux-lts-headers
linux-headers
automake
autoconf
scdoc