Re: kernel module fs permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2004-09-11 at 20:39, Arjan van de Ven wrote:
> On Sat, 2004-09-11 at 19:09, Ville Skyttä wrote:
> > Is there another reason besides rpm automagic stripping (+ laziness or
> > something like that in not resetting to 644 in the specfile later) for
> > all *.ko to be executable by root (mode 744) in the kernel package?

[Apologies, this sounded more foul than it was supposed to...]

> well..... the stripping happens during the final rpmbuild stage; I don't
> have scripts running after that, it's pure RPM itself from that point on

You can always "reset" the attributes using %attr in %files.  One
solution would be to create a file list during the "find" in
BuildKernel(), and use that later on, something like this (definitely
incomplete and buggy, but just to throw in the idea):

  rm %{name}-%{version}-%{release}.files
  for file in find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f ; do
    chmod u+x $file
    echo $file | sed "s|^$RPM_BUILD_ROOT|%attr(644,root,root) |" \
      >> %{name}-%{version}-%{release}.files
  done
  # Add similar stuff to handle dirs and files other than "*.ko" in 
  # $RPM_BUILD_ROOT/lib/modules/$KernelVer here

  [...]

  %files -f %{name}-%{version}.files

> but other than the strip-to-file there is no reason indeed

Ok, thanks for the confirmation.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux