From f278df99455ee130a948d70ab110012bf60229c098c569cbf562f6b90e5a4c52 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Mon, 4 Mar 2024 13:08:38 +0000 Subject: [PATCH] Accepting request 1154678 from home:trenn:branches:Base:System - Binary is in /usr/sbin not /sbin (cmp with install to /usr below) (bsc#1220125) M udev-rule-path.patch OBS-URL: https://build.opensuse.org/request/show/1154678 OBS-URL: https://build.opensuse.org/package/show/Base:System/biosdevname?expand=0&rev=85 --- biosdevname-0.7.3.7.g495ab76.obscpio | 2 +- biosdevname.changes | 7 ++++ biosdevname.obsinfo | 1 - biosdevname.spec | 11 +++--- udev-rule-path.patch | 51 +++++++++++++++++++++++++--- 5 files changed, 60 insertions(+), 12 deletions(-) diff --git a/biosdevname-0.7.3.7.g495ab76.obscpio b/biosdevname-0.7.3.7.g495ab76.obscpio index 2060623..3a8ae73 100644 --- a/biosdevname-0.7.3.7.g495ab76.obscpio +++ b/biosdevname-0.7.3.7.g495ab76.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:914b1282c801e293b3477c970d3417a6c2a5f23aea988d75d4c2994471b06bb4 +oid sha256:b2864230c87704871cbe06fa468ab8eb8c585ec2f7ac36903229139df569e017 size 368651 diff --git a/biosdevname.changes b/biosdevname.changes index 024d9d9..92bc53a 100644 --- a/biosdevname.changes +++ b/biosdevname.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Feb 27 21:56:34 UTC 2024 - Thomas Renninger + +- Binary is in /usr/sbin not /sbin + (cmp with install to /usr below) (bsc#1220125) +M udev-rule-path.patch + ------------------------------------------------------------------- Fri Jul 9 07:38:43 UTC 2021 - Thomas Renninger diff --git a/biosdevname.obsinfo b/biosdevname.obsinfo index 7f70699..690cee9 100644 --- a/biosdevname.obsinfo +++ b/biosdevname.obsinfo @@ -2,4 +2,3 @@ name: biosdevname version: 0.7.3.7.g495ab76 mtime: 1599238290 commit: 495ab76e0d5f0eba83f9c86baf779a244ea1b60d - diff --git a/biosdevname.spec b/biosdevname.spec index fc13470..1ef05d9 100644 --- a/biosdevname.spec +++ b/biosdevname.spec @@ -1,7 +1,7 @@ # # spec file for package biosdevname # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,20 +32,18 @@ Patch4: biosdevname-pic.patch Patch5: biosdevname-dom0.patch BuildRequires: automake BuildRequires: pciutils-devel -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: sed BuildRequires: suse-module-tools BuildRequires: zlib-devel # to figure out how to name/location of the rules file BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(udev) -Requires(post): coreutils -Requires(postun):coreutils # for ownership of /usr/lib/udev/rules.d Requires: udev -BuildRequires: pkgconfig(udev) +Requires(post): coreutils +Requires(postun): coreutils Supplements: modalias(dmi:*svnDell*) -BuildRoot: %{_tmppath}/%{name}-%{version}-build # SMBIOS and PCI IRQ Routing Tables only exist on these arches. It's # also likely that other arches don't expect the PCI bus to be sorted # breadth-first, or of so, there haven't been any comments about that @@ -68,6 +66,7 @@ You can enable/disable usage of biosdevname with boot option %build sed -i -e 's#@@BIOSDEVNAME_RULEDEST@@#'%{_udevrulesdir}'/71-biosdevname.rules#' configure.ac +sed -i -e 's#@@BIOSDEVNAME_SBINDIR@@#'%{_sbindir}'#' configure.ac autoreconf -fi %configure \ --disable-rpath diff --git a/udev-rule-path.patch b/udev-rule-path.patch index fea7ef4..6eb1046 100644 --- a/udev-rule-path.patch +++ b/udev-rule-path.patch @@ -1,8 +1,8 @@ -Index: biosdevname-0.7.1/configure.ac +Index: biosdevname-0.7.3.7.g495ab76/configure.ac =================================================================== ---- biosdevname-0.7.1.orig/configure.ac -+++ biosdevname-0.7.1/configure.ac -@@ -66,20 +66,9 @@ AC_FUNC_STAT +--- biosdevname-0.7.3.7.g495ab76.orig/configure.ac ++++ biosdevname-0.7.3.7.g495ab76/configure.ac +@@ -66,27 +66,18 @@ AC_FUNC_STAT AC_FUNC_VPRINTF AC_CHECK_FUNCS([dup2 gettimeofday memset munmap select socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul]) @@ -22,7 +22,50 @@ Index: biosdevname-0.7.1/configure.ac -fi +# Only way to make this robust: Replace for each distro with the correct path +# /lib/udev/rules.d/71-biosdevname.rules ++SBINDIR=@@BIOSDEVNAME_SBINDIR@@ +RULEDEST=@@BIOSDEVNAME_RULEDEST@@ RULEDIR=$(dirname $RULEDEST) AC_SUBST(RULEDEST, $RULEDEST) AC_SUBST(RULEDIR, $RULEDIR) ++AC_SUBST(SBINDIR, $SBINDIR) + + echo "PACKAGE_NAME='$PACKAGE_NAME'" > version + echo "PACKAGE_VERSION='$PACKAGE_VERSION'" >> version + echo "PACKAGE_STRING='$PACKAGE_STRING'" >> version + +-AC_CONFIG_FILES([Makefile biosdevname.spec.fedora biosdevname.spec.suse src/bios_dev_name.h]) ++AC_CONFIG_FILES([Makefile biosdevname.spec.fedora biosdevname.spec.suse src/bios_dev_name.h biosdevname.rules]) + AC_OUTPUT +Index: biosdevname-0.7.3.7.g495ab76/biosdevname.rules.in +=================================================================== +--- biosdevname-0.7.3.7.g495ab76.orig/biosdevname.rules.in ++++ biosdevname-0.7.3.7.g495ab76/biosdevname.rules.in +@@ -22,6 +22,6 @@ LABEL="netdevicename_start" + + # using NAME= instead of setting INTERFACE_NAME, so that persistent + # names aren't generated for these devices, they are "named" on each boot. +-SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical --smbios 2.6 --nopirq -i %k", NAME="%c", OPTIONS+="string_escape=replace" ++SUBSYSTEMS=="pci", PROGRAM="@SBINDIR@/biosdevname --policy physical --smbios 2.6 --nopirq -i %k", NAME="%c", OPTIONS+="string_escape=replace" + + LABEL="netdevicename_end" +Index: biosdevname-0.7.3.7.g495ab76/Makefile.am +=================================================================== +--- biosdevname-0.7.3.7.g495ab76.orig/Makefile.am ++++ biosdevname-0.7.3.7.g495ab76/Makefile.am +@@ -2,14 +2,14 @@ AUTOMAKE_OPTIONS = subdir-objects + SUBDIRS = + EXTRA_DIST = + +-dist_noinst_DATA = biosdevname.rules.in biosdevname.spec.fedora biosdevname.spec.suse biosdevname.1 ++dist_noinst_DATA = biosdevname.rules biosdevname.spec.fedora biosdevname.spec.suse biosdevname.1 + + + + CLEANFILES = version src/bios_dev_name.h + install-data-local: + mkdir -p $(DESTDIR)@RULEDIR@ +- $(INSTALL_DATA) $(top_srcdir)/biosdevname.rules.in $(DESTDIR)@RULEDEST@ ++ $(INSTALL_DATA) $(top_srcdir)/biosdevname.rules $(DESTDIR)@RULEDEST@ + + uninstall-local: + rm -f $(DESTDIR)@RULEDEST@