Skip to content

Commit

Permalink
refactor: MRF_GROUP changed DRV_GROUP==root.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzyjamroz committed Jan 30, 2024
1 parent e490696 commit 54afc73
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mrmShared/linux/dkms-rpm/50-mrf.rules.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# UDEV rule giving access to MRF device
KERNEL=="uio*", ATTR{name}=="mrf-pci", GROUP="@@MRF_GROUP@@", MODE="0660", RUN+="/bin/chmod g+rw %S%p/resource0 && /bin/logger UDEV rule giving access to MRF device %S%p"
KERNEL=="uio*", ATTR{name}=="mrf-pci", GROUP="@@DRV_GROUP@@", MODE="0660", RUN+="/bin/chmod g+rw %S%p/resource0 && /bin/logger UDEV rule giving access to MRF device %S%p"
3 changes: 2 additions & 1 deletion mrmShared/linux/dkms-rpm/CONFIG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Specify the group for the MRF driver user here

MRF_GROUP = mrf
# NOTE: group root can be adjusted by the configuration tool
DRV_GROUP = root
RPM_RELEASE = 1
DRV_NAME = mrf
RPM_NAME = mrfioc2-dkms
Expand Down
2 changes: 1 addition & 1 deletion mrmShared/linux/dkms-rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SED_SUBSTS =
SED_SUBSTS += s/@@DRV_VERSION@@/$(DRV_VERSION)/g;
SED_SUBSTS += s/@@DRV_NAME@@/$(DRV_NAME)/g;
SED_SUBSTS += s/@@RPM_VERSION@@/$(RPM_VERSION)/g;
SED_SUBSTS += s/@@MRF_GROUP@@/$(MRF_GROUP)/g;
SED_SUBSTS += s/@@DRV_GROUP@@/$(DRV_GROUP)/g;
SED_SUBSTS += s/@@RPM_RELEASE@@/$(RPM_RELEASE)/g;
SED_SUBSTS += s/@@ARCH@@/$(ARCH)/g;
SED_SUBSTS += s/@@RPM_NAME@@/$(RPM_NAME)/g;
Expand Down
4 changes: 2 additions & 2 deletions mrmShared/linux/dkms-rpm/mrf.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ install -m 0644 %{_curdir}/50-mrf.rules %{buildroot}%{udevdir}
%{udevdir}/50-mrf.rules

%post
groupadd -r @@MRF_GROUP@@ 2>&1 || :
# NOTE: group root groupadd -r @@DRV_GROUP@@ 2>&1 || :
dkms add -m %{kmod_name} -v %{version} --rpm_safe_upgrade
dkms build -m %{kmod_name} -v %{version}
dkms install -m %{kmod_name} -v %{version}
Expand All @@ -62,7 +62,7 @@ modprobe %{kmod_name}
modprobe -r %{kmod_name}
dkms remove --all -m %{kmod_name} -v %{version} --rpm_safe_upgrade --all ||:
%udev_rules_update
groupdel @@MRF_GROUP@@ 2>&1 || :
# NOTE: group root groupdel @@DRV_GROUP@@ 2>&1 || :

%postun
rmdir /usr/src/%{kmod_name}-%{version}
Expand Down

0 comments on commit 54afc73

Please sign in to comment.