LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2007, 04:24 PM   #1
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
rpmbuild and file attributes: uid, gid


This is my first try at building rpms. I am using Centos5.

I am trying to create an rpm for some bash scripts
and I want to give different group ids to different
scripts as a method to control which users can use
which scripts. (Is there a better way?)

Script permissions and ownership should be a combination of
0755 root:root
0750 root:foo
0750 root:bar
0750 rootther

I *am* able to build an rpm and it looks good in the
/var/tmp/blah-0.5/ directory, but after installing
on the target system, every script is root:root.
The foo, bar, and other groups exist on both the
build system and the target system.

This (and more, of course) is in my spec file:

Buildroot: %{_tmppath}/%{name}2-%{version}-%{release}-build

%prep
%setup -q

%build
make all

%install
make DESTDIR=%buildroot/ install

The make install is where the permissions and ownership
are set using ${INSTALL} ...

Why does it not show up right after 'rpm -i blah-blah'?

Also, how can I get around building this rpm as root,
since my 'make install' needs root privileges?

Thanks for any help.
 
Old 10-30-2007, 05:32 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
Install fedora-rpmdevtools and redhat-rpm-config rpms and you can build the rpms from your home directory. Even using rpmbuild to build a tar file with a spec file in it will automatically be built in your home directory. Read up on the two to configure your home directory to have a similar directory structure as in /usr/src/redhat. If I remember you run the command ' fedora-buildrpmtree ' to make ~/rpmbuild in your home directory.

Brian
 
Old 10-31-2007, 09:54 AM   #3
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Original Poster
Rep: Reputation: 30
I can already build rpms in my home directory, the problem
arises due to the specific file group ids I'm trying to
set. Running rpmbuild as non-root fails during the
make DESTDIR=%buildroot/ install phase.
 
Old 11-01-2007, 06:28 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
Never had any problems running rpmbuild as a user. Not sure what to do from here.

Brian
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is uid and gid rmanocha Linux - Software 9 08-19-2008 12:03 AM
uid,gid from proc sanjaykhuntia Linux - Enterprise 1 10-28-2007 08:50 PM
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 12:39 PM
How do i find all the set UID/GID file on my current system Linux_interest Linux - Newbie 1 09-13-2004 11:09 AM
changing uid, gid zeke1955 Linux - General 4 01-10-2004 12:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration