LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Compiling: permissions, ownership of files ... (https://www.linuxquestions.org/questions/slackware-14/compiling-permissions-ownership-of-files-608582/)

JosephS 12-22-2007 12:10 PM

Compiling: permissions, ownership of files ...
 
Using slackware 12

I've been studying how to make packages at linuxpackages .net and a few other
articles I found searching the net. I still have questions:

1. What needs to be the ownership and permissions of files in the package,
and how should I compile a program to ensure this?
For example I noticed some files in /usr/bin were owned by the group bin.

2. How do I chose the architecture when making a program; which should I use
for Slackware12?


3. I found this in "How to make packages" at linuxpackages.net:
Can someone explain this?
Quote:

Ok now that we have the package all tidy in /work/builds lets go ahead and
make it. One mistake most folks make is not ensuring the build folder is owned
by root and has the correct perms. Remember this will be the root of the file
system the package is installed on. The best thing is to type chown root.root
. and chmod 755 . from inside the /work/builds directory. Next type "makepkg
name-version-arch-build.tgz" this will create a package based on what is in
that directory.
Thanks.

TSquaredF 12-22-2007 01:04 PM

1) Changing ownership of all files to root:root prior to compilation is standard.
2) Most packages are made with CFLAGS="-O2 -march=i486 -mtune=i686", although you could change march to i686, depending on your hardware.
3) The paragraph tells you to chown the entire package tree to root:root & to chmod it to 755. See Shilo's script (below) for another chmod option.
There are several resources available besides those at linuxpackages. In fact, the linuxpackages scripts are not the same as the standard scripts, so they may not be the best ones to learn from. Check out:
http://www.slackwiki.org/Writing_A_SlackBuild_Script
Slackbuilds.org/ faqs, howtos, etc.
There is also a thread here that has some good information in it.
Good luck,
Bill


All times are GMT -5. The time now is 07:03 AM.