LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   slackware build script questions (http://www.linuxquestions.org/questions/slackware-14/slackware-build-script-questions-419777/)

gravityworks 02-26-2006 12:54 PM

slackware build script questions
 
Hi All :)

i've been playing around with transparency in kde,and decided to give it a try in xfce..thing is the xfce that's in current doesn't have transparency enabled,so i'm going to add that feature into patrick's build script..thing is do i have to invoke his build scripts as user,su to root or login as root..reason i ask is because i've read that they should be invoked as root..but the packages a get at linux packages and the packages you get from the slackware site are not owned by root..and if you built them as root they would be..So a bit confused about how all this is handled...if this has been brought up before(i did a search and couldn't find anything) then please direct me to that thread...


Thanks in Advance..

uselpa 02-26-2006 01:43 PM

You need to login as root or `su -` to root, otherwise `makepkg` will not be in your path.

dunric 02-26-2006 03:07 PM

Quote:

..but the packages a get at linux packages and the packages you get from the slackware site are not owned by root..and if you built them as root they would be..So a bit confused about how all this is handled...
  • important is contents of a package and all files are and have to be owned by root. Subdirectories for binaries have to be group-owned by bin.
  • SlackBuild scripts are designed to be built as root but you may in most cases build them under normal user but then you have to change manualy ownership to root or just use simply fakeroot tool.
Quote:

You need to login as root or `su -` to root, otherwise `makepkg` will not be in your path.
To have makagepkg in PATH you need not to su or log in as root. Just add /sbin with
Code:

export PATH=/sbin:${PATH}
f.E.

uselpa 02-26-2006 03:25 PM

from http://www.slackbook.org/html/packag...-packages.html:
Quote:

So what is a SlackBuild script? SlackBuild scripts are executable shell scripts that you run as root to configure, compile, and create Slackware packages.
Of course you can get around that, but all doc I have ever found on the subject recommends running SlackBuilds as root.

gravityworks 02-26-2006 08:19 PM

Thanks for the help uselpa and dunric it's all alot clearer to me..

Much appreciated :)

jong357 02-27-2006 01:38 PM

Quote:

Originally Posted by dunric
Subdirectories for binaries have to be group-owned by bin.

They don't have to be. That's just some really old standard that Pat can't seem to break the habbit of doing. If you look at your group file, root is a member of bin. No harm in chowning root.root on bin directories unless it's something like cups where your going to bork existing perms by doing so. For that reason alone, it's best not to mess with bin perms at all.

theoffset 02-27-2006 07:17 PM

Well, he seems to have tried to get away from his habbit...

Code:


# This is mostly a useless concept, but I'll keep with it for now...
chown root:bin $PKG/usr/bin/*

(taken from openldap-client.SlackBuild in Slackware-current)

MS3FGX 02-27-2006 08:02 PM

All I did to compile Composite support was recompile XFWM with the Composite option, make a package out of it with checkinstall, and install that over the original Slackware package.

I could send it to you if you want. Unless you are trying to learn, which is always good.

shepper 02-27-2006 08:37 PM

I was also looking at the xfce.Slackbuild script to see if it would be possible to add the --with-shutdown-style=sudo when compiling xfce4-session-4.2.3. The Slackware and Linuxpackages builds do not seem to respond as follows to allow user shudown.


Quote:

15. How do I enable the shutdown/reboot action in the session-manager logout dialog?

You have to allow the user(s) to execute $installdir/libexec/xfsm-shutdown-helper with sudo. Please install sudo, and refer to xfce4-session and sudo documentation.

user ALL=(ALL) NOPASSWD: /usr/libexec/xfsm-shutdown-helper
Can one just add the compile flag "--with-shutdown-style=sudo" in the SlackBuild script or do you need to tease out the xfce4-session-4.2.3 compile since it is the only option with this compile flag?

The other thing I noticed is the that Xfce source code comes in one giant tarball that contains all the listed packages. It looks like these previously were downloaded individually. I think the script could handle extracting the giant tarball and then the subsequent tarballs.

I am reading a book on shell scripting but am not to the level needed implement these proposed modifications.
I added the modifications on my own compile and they work well and because it is done through sudo I think it is relatively secure. I know KDE and Gnome(formerly) would allow users to shutdown. If it could be done it might be a good thing to submit to Pat V. to see if he wants to incorporate for the xfce build in the upcoming *.0 release.

gbonvehi 02-27-2006 08:42 PM

The changes that are explained on your quote referes to sudo configuration and not xfce itself. You've to edit /etc/sudoers file or use visudo (it's basically vi editing /etc/sudoers with some syntax checking) adding that line.
It's not good to allow anybody to shutdown the computer, and you've to change "user" to the correct user you want, that means, edit sudoers for each user, or make a special group. I don't think that would fit in a default installation.

shepper 02-27-2006 08:56 PM

I am not sure I explained myself well

Quote:

user ALL=(ALL) NOPASSWD: /usr/libexec/xfsm-shutdown-helper
is a cut and paste from my visudo except I edited my user name to "user"

When I had the appropriate line in visudo I would not get the reboot/shutdown options when I logged out of xfce with Slackware 10.2 or Linuxpackages(basically used Pats Slackbuild) xfce packages. I assumed that it was because "--with-shutdown-style=sudo" had not been invoked in the xfce4-session compile. If one can add xfsm-shutdown-helper in visudo and have the standard 10.2 Slackware package provide user shutdown then I must have made a syntax error in my visudo and basically compiled my own xfce desktop needlessly.

c.m.klaij 02-28-2006 04:08 AM

I guess you should add % in front of the line...

dunric 02-28-2006 10:28 AM

Quote:

Originally Posted by jong357
They don't have to be. That's just some really old standard that Pat can't seem to break the habbit of doing. If you look at your group file, root is a member of bin. No harm in chowning root.root on bin directories unless it's something like cups where your going to bork existing perms by doing so. For that reason alone, it's best not to mess with bin perms at all.

I should rather use word 'should' intead of 'have' because in this way is packaged whole Slackware. Chowning group to bin is recommended in Fosdem document about Slackware package system too. On the other hand I would agree this is mostly due to historical reasons and now it doesn't have of much importance.

gravityworks 03-01-2006 10:01 PM

Quote:

Originally Posted by MS3FGX
All I did to compile Composite support was recompile XFWM with the Composite option, make a package out of it with checkinstall, and install that over the original Slackware package.

I could send it to you if you want. Unless you are trying to learn, which is always good.


Hey thanks for the offer MS3FGX,appreciate it..but i already recompiled xfce with composite support..and yes learning is my main reason for messing with the slackbuilds..really want to get the hang of them..checkinstall is great( i use it alot) but i'd like to learn to roll my own..again thanks for the offer..


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