Compare commits

..

No commits in common. "rawhide" and "f42" have entirely different histories.

12 changed files with 154 additions and 70 deletions

View file

@ -1 +0,0 @@
1

View file

@ -15,7 +15,7 @@
%bcond_without zstd
Name: kmod
Version: 34.2
Version: 33
Release: 3%{?dist}
Summary: Linux kernel module management utilities
@ -77,9 +77,9 @@ BuildRequires: zlib-devel
%if %{with xz}
BuildRequires: xz-devel
%endif
BuildRequires: scdoc gtk-doc
BuildRequires: scdoc
BuildRequires: openssl-devel
BuildRequires: make automake libtool
BuildRequires: make automake
%if %{with zstd}
BuildRequires: libzstd-devel
%endif
@ -125,7 +125,6 @@ applications that wish to load or unload Linux kernel modules.
%autosetup -p1
%build
autoreconf --install
%configure \
--with-openssl \
%if %{with zlib}
@ -150,6 +149,13 @@ popd
find %{buildroot} -type f -name "*.la" -delete
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
for i in modprobe modinfo insmod rmmod depmod lsmod; do
# kmod now installs the links into bindir by itself
rm $RPM_BUILD_ROOT%{_bindir}/$i
ln -sf --relative $RPM_BUILD_ROOT%{_bindir}/kmod $RPM_BUILD_ROOT%{_sbindir}/$i
done
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
@ -177,8 +183,6 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
%{_sbindir}/weak-modules
%endif
%{_datadir}/bash-completion/
%{_datadir}/fish/vendor_functions.d/*
%{_datadir}/zsh/site-functions/*
%if %{with dist_conf}
%{_sysconfdir}/depmod.d/dist.conf
%endif
@ -199,25 +203,6 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
%{_libdir}/libkmod.so
%changelog
* Wed Aug 13 2025 Zamir SUN <zsun@fedoraproject.org> - 34.2-3
- Rebuild to switch gating to TMT.
- Resolves: rhbz#2382934
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 34.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Mar 31 2025 Josh Boyer <jwboyer@fedoraproject.org> - 34.2-1
- New upstream v34.2
- Resolves: rhbz#2355680
* Sat Mar 08 2025 Josh Boyer <jwboyer@fedoraproject.org> - 34.1-1
- New upstream v34.1
- Resolves: rhbz#2350269
* Mon Feb 24 2025 Josh Boyer <jwboyer@fedoraproject.org>
- New upstream v34
- Resolves: rhbz#2347049
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 33-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (kmod-34.2.tar.xz) = 0e095c45ad61a6c61ce1ad61b9aa10cf5040e688b749f9a933b0e7d12de493c58027a5068b459cbbce05576fc564a22b83a3dbef1e6511b2a3e27034c88afd33
SHA512 (kmod-33.tar.xz) = 32d79d0bb7e89012f18458d4e88325f8e19a7dba6e1d5cff01aec3e618d1757b0f7c119735bf38d02e0d056a14273fd7522fca7c61a4d12a3ea5854bb662fff8

46
tests/libkmod/Makefile Normal file
View file

@ -0,0 +1,46 @@
# SPDX-License-Identifier: LGPL-2.1+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/libkmod
# Description: Test if libkmod working ok
# Author: Susant Sahani<susant@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/libkmod
export TESTVERSION=1.0
OBJS = test-libkmod.c
CFLAG = -Wall -g3
CC = gcc
LIBS = -lkmod -lcmocka
test-libkmod:${OBJ}
${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS}
run: test-libkmod
./runtest.sh
clean:
-rm -f test-libkmod
.c.o:
${CC} ${CFLAGS} ${INCLUDES} -c $<
CC = gcc
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Susant Sahani<susant@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test libkmod works ok" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: libkmod" >> $(METADATA)
@echo "Requires: libkmod libkmod-devel" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -Fedora 29" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -1,3 +0,0 @@
test: bash ./runtest.sh
framework: beakerlib
duration: 15m

View file

@ -1,14 +0,0 @@
[General]
name=libkmod gating test
owner=Susant Sahani <susant@redhat.com>
description=libkmod gating test
license=GPLv2
confidential=no
destructive=no
[restraint]
entry_point=./runtest.sh
max_time=15m
use_pty=false
dependencies=gcc,make,libcmocka-devel,kmod-devel

View file

@ -18,7 +18,6 @@ rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertExists "$IPIP"
rlRun "gcc -o test-libkmod test-libkmod.c -lkmod -lcmocka"
rlRun "cp test-libkmod /usr/bin/"
rlPhaseEnd

View file

@ -1,10 +0,0 @@
prepare:
how: install
package:
- libcmocka-devel
- make
- gcc
discover:
how: fmf
execute:
how: tmt

79
tests/sanity/Makefile Normal file
View file

@ -0,0 +1,79 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of general/kmod/sanity
# Description: kmod test
#
# 2016-07-31
# Author: Chunyu Hu <chuhu@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TENV=_env
ifeq ($(PKG_TOP_DIR),)
export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \
[ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
export _TOP_DIR := $(shell p=$$PWD; while :; do \
[ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
-include $(PKG_TOP_DIR)/env.mk
endif
include $(TENV)
ifeq ($(_TOP_DIR),)
_TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE)
endif
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(TENV) $(METADATA) _env runtest.sh Makefile PURPOSE lib.sh
.PHONY: all install download clean
run: $(FILES) build
( set +o posix; . /usr/bin/rhts_environment.sh; \
. /usr/share/beakerlib/beakerlib.sh; \
. runtest.sh )
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -fr *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Chunyu Hu <chuhu@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: kmod kernel module check from kernel modules tools">> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 1h" >> $(METADATA)
@echo "RunFor: kernel" >> $(METADATA)
@echo "Requires: kernel" >> $(METADATA)
@echo "Requires: sysstat perf trace-cmd" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME) python rpm wget" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -1,12 +0,0 @@
[General]
name=kmod gating test
owner=Ziqian SUN <zsun@redhat.com>
description=kmod gating test
license=GPLv2
confidential=no
destructive=no
[restraint]
entry_point=./runtest.sh
max_time=15m
use_pty=false

View file

@ -1,3 +0,0 @@
test: bash ./runtest.sh
framework: beakerlib
duration: 15m

18
tests/tests.yml Normal file
View file

@ -0,0 +1,18 @@
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-beakerlib
tests:
- sanity
- libkmod
required_packages:
- kernel
- perf
- sysstat
- trace-cmd
- kmod
- kmod-devel
- gcc
- libcmocka
- libcmocka-devel