Page 1 of 1

gradm Makefile

PostPosted: Mon Dec 08, 2014 10:12 am
by Remoddy
Hello!

I compiled gradm and tried to install it with checkinstall, which is a program that runs "make install", looks for files that are created and puts them into a .deb/.rpm package. But "make install" of gradm starts "udevadm trigger", which I believe causes creation of "uevent" files in /sys, those are get packaged too and it makes the package unusable (it's fixed by commenting out "udevadm trigger" execution in the Makefile).

I'd like to ask what is the purpose of "udevadm trigger" in the "install" target. And actually what is the purpose of creating the device node and udev rules too, as device is present on grsec kernels anyway.

Code: Select all
   @if [ -z "`cut -d" " -f3 /proc/mounts | grep "^devfs"`" ] ; then \
      rm -f $(DESTDIR)/dev/grsec ; \
      if [ ! -e $(DESTDIR)/dev/grsec ] ; then \
         mkdir -p $(DESTDIR)/dev ; \
         $(MKNOD) -m 0622 $(DESTDIR)/dev/grsec c 1 13 ; \
      fi \
   fi
   @if [ -d $(DESTDIR)/etc/udev/rules.d ] ; then \
      echo "ACTION!=\"add|change\", GOTO=\"permissions_end\"" > $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
      echo "KERNEL==\"grsec\",          MODE=\"0622\"" >> $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
      echo "LABEL=\"permissions_end\"" >> $(DESTDIR)/etc/udev/rules.d/80-grsec.rules ; \
   fi
   @if [ -f $(DESTDIR)/sbin/udevadm ] ; then \
      $(DESTDIR)/sbin/udevadm trigger --action=change ; \
   fi