Compare commits

...
Sign in to create a new pull request.

17 commits

Author SHA1 Message Date
Fedora Release Engineering
3040a1ab62 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:17:54 +00:00
Fedora Release Engineering
f55864a1f7 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 13:43:29 +00:00
Fedora Release Engineering
c60be5c9c6 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 19:17:34 +00:00
Fedora Release Engineering
6cced1dddb Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-23 01:36:21 +00:00
Fedora Release Engineering
4d72d4a0a0 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 15:25:39 +00:00
Fedora Release Engineering
8a164edf7b Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 15:38:33 +00:00
David King
0e76f949f5 Use SPDX for license field (#2222111) 2023-07-12 08:56:24 +01:00
Fedora Release Engineering
f1962ae89e Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 23:50:44 +00:00
Fedora Release Engineering
277eb03c29 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 22:55:07 +00:00
Fedora Release Engineering
f08b5b77f9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 23:12:32 +00:00
Václav Kadlčík
49bd09387e Do not use a kernel rebuild as a gating test
baseos-qe.koji-build.scratch-build.validation is a scratch kernel
build test. While it is important for components like gcc, it's
probably an overkill for chrpath, not to mention the testing time.
2021-08-17 16:32:44 +00:00
Fedora Release Engineering
b78b15efc7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 19:26:54 +00:00
Fedora Release Engineering
ce205db50b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 14:29:41 +00:00
Sergey Kolosov
cdf95941c7 Introduce CI gating 2021-04-13 08:50:17 +02:00
Fedora Release Engineering
dd25fbba00 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 01:57:20 +00:00
Tom Stellard
6c65a6bce2 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-17 03:32:11 +00:00
Jeff Law
d6e71149bd Use autosetup and enable testsuite 2020-12-14 10:09:24 -07:00
9 changed files with 429 additions and 5 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

View file

@ -1,13 +1,14 @@
Name: chrpath
Version: 0.16
Release: 13%{?dist}
Release: 26%{?dist}
Summary: Modify rpath of compiled programs
License: GPL+
License: GPL-2.0-or-later
URL: https://chrpath.alioth.debian.org/
Source0: https://alioth.debian.org/frs/download.php/file/3979/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: make
%description
@ -16,16 +17,17 @@ compiled programs. Currently, only removing and modifying the rpath
is supported.
%prep
%setup -q
%autosetup -p1
%build
%configure
%make_build
%check
make check
%install
make install DESTDIR=%{buildroot} INSTALL="install -p"
%make_install
rm -fr %{buildroot}/usr/doc
@ -38,6 +40,45 @@ rm -fr %{buildroot}/usr/doc
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 12 2023 David King <amigadave@amigadave.com> - 0.16-20
- Use SPDX for license field (#2222111)
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 14 2020 Jeff Law <law@redhat.com> - 0.16-14
- Use autosetup and enable testsuite
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

19
gating.yaml Normal file
View file

@ -0,0 +1,19 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

6
plans/ci.fmf Normal file
View file

@ -0,0 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
directory: tests
execute:
how: beakerlib

View file

@ -0,0 +1,68 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/chrpath/Regression/internal-tests
# Description: internal-tests
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/chrpath/Regression/internal-tests
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE testsuite.patch
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: internal-tests" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: chrpath" >> $(METADATA)
@echo "Requires: chrpath" >> $(METADATA)
@echo "Requires: rpm-build" >> $(METADATA)
@echo "Requires: gcc libgcc glibc-devel" >> $(METADATA)
@echo "Requires: libgcc.i686 glibc-devel.i686" >> $(METADATA)
@echo "Requires: libgcc.s390 glibc-devel.s390" >> $(METADATA)
@echo "Requires: libgcc.ppc glibc-devel.ppc" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /tools/chrpath/Regression/internal-tests
Description: internal-tests
Author: Martin Cermak <mcermak@redhat.com>

View file

@ -0,0 +1,22 @@
summary: internal-tests
description: ''
contact: Martin Cermak <mcermak@redhat.com>
component:
- chrpath
test: ./runtest.sh
framework: beakerlib
recommend:
- chrpath
- rpm-build
- gcc
- libgcc
- glibc-devel
- libgcc.i686
- glibc-devel.i686
- libgcc.s390
- glibc-devel.s390
- libgcc.ppc
- glibc-devel.ppc
duration: 30m
extra-summary: /tools/chrpath/Regression/internal-tests
extra-task: /tools/chrpath/Regression/internal-tests

View file

@ -0,0 +1,85 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/chrpath/Regression/internal-tests
# Description: internal-tests
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
CMD='chrpath'
BIN=$(which --skip-alias $CMD)
PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
export PACKAGE
ORIGWD=$(pwd)
# To test the compat arch stuff, we need the compat arch compiler capability.
# Ideally the test harness should install it, since respective 32/31 bit runtime
# requirements (libgcc, glibc-devel) are mentioned as requirements in the Makefile
# but just in case that would fail, we'll try to fix this now at the test run time.
if arch | egrep -q '(x86_64|ppc64|s390x)'; then
b='-m32'
arch | grep s390x && b='-m31'
echo "int main() { return 0; }" | gcc -m32 -xc -o /dev/null - || \
yum -y install --setopt=multilib_policy=all libgcc glibc-devel
fi
rlJournalStart
rlPhaseStartSetup
rlRun "TMPD=$(mktemp -d)"
rlRun "pushd $TMPD"
rlFetchSrcForInstalled $PACKAGE
rlRun "rpm --define='_topdir $TMPD' -Uvh *src.rpm"
rlRun "rpmbuild --define='_topdir $TMPD' -bc SPECS/${CMD}.spec"
rlPhaseEnd
rlPhaseStartTest
rlRun "pushd BUILD/$CMD-*"
# Some CI systems complain about "C compiler cannot create executables"
# Not really sure what's going on there, thus printing the config.log:
rlRun "cat config.log"
# To run the testsuite for compat arch, we need to patch the testsuite
# per https://bugzilla.redhat.com/show_bug.cgi?id=1271380#c25. But just
# in case the patch wouldn't apply, we'll first run the unpatched tests
# so that we have at least some results and then try to patch and rerun.
rlRun "make check"
RUN_SEC_ARCH="false"
RHEL_VERSION=$(rpm --eval %{rhel})
[[ $RHEL_VERSION -ge 7 ]] && arch | egrep -q '(x86_64|ppc64)' && RUN_SEC_ARCH="true"
[[ $RHEL_VERSION -eq 7 ]] && arch | egrep -q '(s390x)' && RUN_SEC_ARCH="true"
if [ "$RUN_SEC_ARCH" = "true" ]; then
rlRun "patch -p1 < $ORIGWD/testsuite.patch"
rlRun "make check"
fi
rlRun "popd"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TMPD"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,179 @@
diff --git a/testsuite/Makefile b/testsuite/Makefile
index b8d295f..dc23da2 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -457,7 +457,7 @@ uninstall-am:
prog: prog.c
- $(CC) $(RPATH) -o $@ $<
+ $(CC) $(RPATH) $(MYFLAGS) -o $@ $<
check: $(CHRPATH)
$(srcdir)/runtest.sh
diff --git a/testsuite/runtest.sh b/testsuite/runtest.sh
index f913bc5..f6e7807 100755
--- a/testsuite/runtest.sh
+++ b/testsuite/runtest.sh
@@ -6,77 +6,90 @@ CHRPATH=../chrpath
retval=0
-rm prog
-make prog
-
-if $CHRPATH -h ; then
- echo "success: chrpath -h worked."
-else
- echo "error: chrpath -h failed."
- retval=1
-fi
-
-if $CHRPATH -v ; then
- echo "success: chrpath -v worked."
-else
- echo "error: chrpath -v failed."
- retval=1
-fi
-
-if $CHRPATH $0 ; then
- echo "error: chrpath on /bin/sh script worked."
- retval=1
-else
- echo "success: chrpath on /bin/sh script failed."
-fi
-
-if $CHRPATH non-existant-file ; then
- echo "error: chrpath on non-existant file worked."
- retval=1
-else
- echo "success: chrpath on non-existant file failed."
-fi
-
-if $CHRPATH -l prog | grep -q 'R.*PATH=.*/usr/local/lib' ; then
- echo "success: chrpath listed current rpath."
-else
- echo "error: chrpath unable to list current rpath."
- retval=1
-fi
-
-$CHRPATH -r '/usr/lib' prog > /dev/null
-
-if $CHRPATH -l prog | grep -q 'R.*PATH=/usr/lib' ; then
- echo "success: chrpath changed rpath."
-else
- echo "error: chrpath unable to change rpath."
- retval=1
-fi
-
-# I wish inserting a larger path would work, but it doesn't yet
-if $CHRPATH -r '/usr/lib:/usr/local/lib' prog > /dev/null ; then
- echo "success: chrpath changed rpath to larger path."
-else
- echo "error: chrpath unable to change rpath to larger path."
-fi
-
-$CHRPATH -c prog > /dev/null
-
-if $CHRPATH -l prog | grep -q 'RUNPATH=/usr/lib' ; then
- echo "success: chrpath converted rpath to runpath."
-else
- # Not all archs support runpath, ie not a fatal error
- echo "warning: chrpath unable to convert rpath to runpath."
-fi
-
-$CHRPATH -d prog > /dev/null
-
-if $CHRPATH -l prog | grep -q 'no rpath or runpath tag found' ; then
- echo "success: chrpath removed rpath and runpath successfully."
-else
- echo "error: chrpath unable to remove rpath or runpath."
- retval=1
-fi
+function do_test() {
+ rm prog
+ make prog
+
+ if $CHRPATH -h ; then
+ echo "success: chrpath -h worked."
+ else
+ echo "error: chrpath -h failed."
+ retval=1
+ fi
+
+ if $CHRPATH -v ; then
+ echo "success: chrpath -v worked."
+ else
+ echo "error: chrpath -v failed."
+ retval=1
+ fi
+
+ if $CHRPATH $0 ; then
+ echo "error: chrpath on /bin/sh script worked."
+ retval=1
+ else
+ echo "success: chrpath on /bin/sh script failed."
+ fi
+
+ if $CHRPATH non-existant-file ; then
+ echo "error: chrpath on non-existant file worked."
+ retval=1
+ else
+ echo "success: chrpath on non-existant file failed."
+ fi
+
+ if $CHRPATH -l prog | grep -q 'R.*PATH=.*/usr/local/lib' ; then
+ echo "success: chrpath listed current rpath."
+ else
+ echo "error: chrpath unable to list current rpath."
+ retval=1
+ fi
+
+ $CHRPATH -r '/usr/lib' prog > /dev/null
+
+ if $CHRPATH -l prog | grep -q 'R.*PATH=/usr/lib' ; then
+ echo "success: chrpath changed rpath."
+ else
+ echo "error: chrpath unable to change rpath."
+ retval=1
+ fi
+
+ # I wish inserting a larger path would work, but it doesn't yet
+ if $CHRPATH -r '/usr/lib:/usr/local/lib' prog > /dev/null ; then
+ echo "success: chrpath changed rpath to larger path."
+ else
+ echo "error: chrpath unable to change rpath to larger path."
+ fi
+
+ $CHRPATH -c prog > /dev/null
+
+ if $CHRPATH -l prog | grep -q 'RUNPATH=/usr/lib' ; then
+ echo "success: chrpath converted rpath to runpath."
+ else
+ # Not all archs support runpath, ie not a fatal error
+ echo "warning: chrpath unable to convert rpath to runpath."
+ fi
+
+ $CHRPATH -d prog > /dev/null
+
+ if $CHRPATH -l prog | grep -q 'no rpath or runpath tag found' ; then
+ echo "success: chrpath removed rpath and runpath successfully."
+ else
+ echo "error: chrpath unable to remove rpath or runpath."
+ retval=1
+ fi
+}
+
+# Run the base arch tests
+unset MYFLAGS
+do_test
+
+# Optionally run the compat arch tests
+MYFLAGS=""
+uname -m | egrep -q '^(x86_64|ppc64)$' && MYFLAGS="-m32"
+uname -m | grep -q '^s390x$' && MYFLAGS="-m31"
+export MYFLAGS
+test -z $MYFLAGS || do_test
exit $retval