Skip to content

Commit

Permalink
Install 70-persistent-ipoib.rules into docs instead of /etc
Browse files Browse the repository at this point in the history
This rdma-core Debian package ships the udev rule
`70-persistent-ipoib.rules` and installs it under `/etc/udev/rules.d`,
which is reserved for user-installed files.

Install `70-persistent-ipoib.rules` into `/usr/share/doc/rdma-core`
instead of `/etc/udev/rules.d` and document to copy this file into
`/etc/udev/rules.d` before editing.

Bug-Debian: https://bugs.debian.org/958385
Signed-off-by: Benjamin Drung <[email protected]>
  • Loading branch information
bdrung committed Sep 27, 2022
1 parent 0e1577b commit b9ddb7f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 16 deletions.
1 change: 0 additions & 1 deletion buildlib/centos6.spec
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ rm -rf %{buildroot}/%{my_unitdir}/
%config %{_sysconfdir}/libibverbs.d/*
%config %{_sysconfdir}/rdma/modules/*
%{perl_vendorlib}/IBswcountlimits.pm
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
%config(noreplace) %{_sysconfdir}/infiniband-diags/error_thresholds
%config(noreplace) %{_sysconfdir}/infiniband-diags/ibdiag.conf
%{_sysconfdir}/modprobe.d/*
2 changes: 1 addition & 1 deletion debian/rdma-core.install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ etc/rdma/modules/iwpmd.conf
etc/rdma/modules/opa.conf
etc/rdma/modules/rdma.conf
etc/rdma/modules/roce.conf
etc/udev/rules.d/70-persistent-ipoib.rules
lib/systemd/system/iwpmd.service
lib/systemd/system/rdma-hw.target
lib/systemd/system/[email protected]
Expand All @@ -24,6 +23,7 @@ lib/udev/rules.d/90-rdma-umad.rules
usr/lib/truescale-serdes.cmds
usr/sbin/iwpmd
usr/sbin/rdma-ndd
usr/share/doc/rdma-core/70-persistent-ipoib.rules
usr/share/doc/rdma-core/MAINTAINERS
usr/share/doc/rdma-core/README.md
usr/share/doc/rdma-core/rxe.md
Expand Down
3 changes: 0 additions & 3 deletions debian/rdma-core.lintian-overrides
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ rdma-core: obsolete-command-in-modprobe.d-file install [etc/modprobe.d/truescale
# The rdma-ndd service is started by udev.
rdma-core: systemd-service-file-missing-install-key [lib/systemd/system/iwpmd.service]
rdma-core: systemd-service-file-missing-install-key [lib/systemd/system/rdma-ndd.service]
# Example/documentary udev rules file
rdma-core: udev-rule-in-etc [etc/udev/rules.d/70-persistent-ipoib.rules]
# For lintian < 2.115.2
rdma-core: obsolete-command-in-modprobe.d-file etc/modprobe.d/truescale.conf install
rdma-core: udev-rule-in-etc etc/udev/rules.d/70-persistent-ipoib.rules
7 changes: 3 additions & 4 deletions kernel-boot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ install(FILES "rdma-umad.rules"
RENAME "90-rdma-umad.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")

# This file is intended to be customized by the user, so it is installed in
# /etc/
install(FILES "persistent-ipoib.rules"
rdma_subst_install(FILES "persistent-ipoib.rules.in"
RENAME "70-persistent-ipoib.rules"
DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d")
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This is a sample udev rules file that demonstrates how to get udev to
# set the name of IPoIB interfaces to whatever you wish. There is a
# 16 character limit on network device names.
# set the name of IPoIB interfaces to whatever you wish. Copy this file
# into @CMAKE_INSTALL_SYSCONFDIR@/udev/rules.d before editing it! There is a 16 character limit
# on network device names.
#
# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the
# ATTR{address} match must start with ?* and only reference the last 8
Expand Down
3 changes: 1 addition & 2 deletions redhat/rdma-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ mkdir -p %{buildroot}/%{_sysconfdir}/rdma
# Red Hat specific glue
%global dracutlibdir %{_prefix}/lib/dracut
%global sysmodprobedir %{_prefix}/lib/modprobe.d
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d
mkdir -p %{buildroot}%{_libexecdir}
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/05rdma
Expand Down Expand Up @@ -390,6 +389,7 @@ fi
%files
%dir %{_sysconfdir}/rdma
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/70-persistent-ipoib.rules
%doc %{_docdir}/%{name}/README.md
%doc %{_docdir}/%{name}/rxe.md
%doc %{_docdir}/%{name}/udev.md
Expand All @@ -400,7 +400,6 @@ fi
%config(noreplace) %{_sysconfdir}/rdma/modules/opa.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/rdma.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/roce.conf
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
%dir %{_sysconfdir}/modprobe.d
%config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf
%config(noreplace) %{_sysconfdir}/modprobe.d/truescale.conf
Expand Down
4 changes: 1 addition & 3 deletions suse/rdma-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,8 @@ done
%dir %{_sysconfdir}/rdma/modules
%dir %{_docdir}/%{name}-%{version}
%dir %{_udevrulesdir}
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
%dir %{_modprobedir}
%doc %{_docdir}/%{name}-%{version}/70-persistent-ipoib.rules
%doc %{_docdir}/%{name}-%{version}/README.md
%doc %{_docdir}/%{name}-%{version}/udev.md
%config(noreplace) %{_sysconfdir}/rdma/mlx4.conf
Expand All @@ -615,7 +614,6 @@ done
%{_modprobedir}/mlx4.conf
%endif
%{_modprobedir}/truescale.conf
%config(noreplace) %{_sysconfdir}/udev/rules.d/70-persistent-ipoib.rules
%{_unitdir}/rdma-hw.target
%{_unitdir}/[email protected]
%dir %{dracutlibdir}
Expand Down

0 comments on commit b9ddb7f

Please sign in to comment.