LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   What is the standard practice for %defattr in spec files when packaging RPMS? (http://www.linuxquestions.org/questions/linux-software-2/what-is-the-standard-practice-for-defattr-in-spec-files-when-packaging-rpms-4175428034/)

aafc 09-19-2012 02:06 PM

What is the standard practice for %defattr in spec files when packaging RPMS?
 
I am packaging a bunch of software using RPM.

Is it a good idea to specifically use '755' (which are the permissions I want for my software on my system) as opposed to '-' in the %defattr section of the spec files?

I am asking because I had '-', but I got 700 for some of my installed packages as opposed to the 755 I was expecting. Thus, I am under the impression that explicitly stating the permission is more reliable. What do you think ?

unSpawn 09-20-2012 07:18 AM

I'm wondering if it has to do with your umask at the time of building?
Mine's set to 027 and I have never had permission problems after building RPMs.
I only set perms if I need something specific.

aafc 09-20-2012 11:18 AM

That seems to make the most sense. I guess the question now becomes: "How does RPM use the umask to determine the default permission when using '-' for %defattr, and when does this get applied".

I'm going to try to test this myself. If someone already has the answer that would be great.


All times are GMT -5. The time now is 09:04 AM.