LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-25-2015, 11:58 PM   #76
Hannes Worst
Member
 
Registered: Jul 2008
Location: Tilburg, The Netherlands
Distribution: Void Linux, Slackware, Devuan
Posts: 179

Rep: Reputation: 122Reputation: 122

It would have been a car with a funny walk ...
 
Old 01-26-2015, 01:20 AM   #77
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by ivandi View Post
A few years for sure. But two weeks ago SBo reminded me again that I can't trust it. Not a big deal, a simple libxrandr gui called zarfy. I stumbled upon it in a hurry and quickly built the package. It worked on the system where it was built but didn't work on the test machine. Running the slackbuild as user showed that it was trying to mkdir /usr/share/zarfy instead of /tmp/SBo/package-zarfy/usr/share/zarfy resulting in a broken package.

As I said not a big deal but obviously nothing changed on SBo.

Cheers
I agree that the advice from SBo , and possible others, to run slackbuilds as root is very properly problematic and needs to be rethought.
but with a look at FAQ 11, I have heavily doubts that this happens.

using fakeroot the package developer would have noticed the /usr/share/zarfy problem on his machine

I also do not like to run sbopkg, because it builds as root.
this is not good, it is wrong, it should only install as root and build as user using fakeroot.

I often wonder about Slackware people, arguing security , knowing their system, .. and then run buildscripts as root
and its not that I mean do not trust, I mean that problems happen, bugs exist, things can go wrong..., therefore it is conceptionally a very bad thing to run build scripts as root.
 
Old 01-26-2015, 03:34 AM   #78
solarfields
Senior Member
 
Registered: Feb 2006
Location: slackalaxy.com
Distribution: Slackware, CRUX
Posts: 1,456

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
obviously nothing changed on SBo
did you contact the maintainer or at least post at the SBo mailing lists about the problems you had?
 
Old 01-26-2015, 05:13 AM   #79
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by a4z View Post
I often wonder about Slackware people, arguing security , knowing their system, .. and then run buildscripts as root
and its not that I mean do not trust, I mean that problems happen, bugs exist, things can go wrong..., therefore it is conceptionally a very bad thing to run build scripts as root.
These are problems that hit every distribution at some point. I have yet to see a distribution that does not install kernel sources into /usr/src, with /usr/src owned by root, so that you have to built a kernel as root, unless you change the ownerships manually, though building a kernel as root is strongly discouraged by kernel developers.
 
Old 01-26-2015, 05:26 AM   #80
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,920

Rep: Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038
Quote:
Originally Posted by a4z View Post
I often wonder about Slackware people, arguing security , knowing their system, .. and then run buildscripts as root and its not that I mean do not trust, I mean that problems happen, bugs exist, things can go wrong..., therefore it is conceptionally a very bad thing to run build scripts as root.
You're absolutely right. Running slackbuilds as root on your live systems isn't the best idea. However, there are mitigation approaches:

One is having a VM set aside for building your packages whose filesystem gets reset after each build, and I suspect folks like Eric who build a lot of stuff will probably do something like that.


Alternatively, but a little more work, I run my buildscripts as 'build'. I only use the slackbuilds as a reference when writing them. I have a wrapper around 'makepkg' I named 'buildpkg': it does all the man-page handling, stripping of binaries, and other bits that are common to most slackbuilds, and then runs makepkg. Instead of running 'makepkg' my buildscript calls 'buildpkg' which raises its own permissions via sudo.

"But, what about things that need special permissions/actions that only root can do?" I hear you ask. Well, I comment them out of the makefiles and I defer them to the doinst.sh that gets run at install time, but very few packages need anything like this; most just build as is.
 
Old 01-26-2015, 05:39 AM   #81
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by TobiSGD View Post
These are problems that hit every distribution at some point. I have yet to see a distribution that does not install kernel sources into /usr/src, with /usr/src owned by root, so that you have to built a kernel as root, unless you change the ownerships manually, though building a kernel as root is strongly discouraged by kernel developers.
it is also known that it is not good to focus on one special exception, or may there be 2, and generalize/apply therefore problematic behaviour to all components i a system.

and no, most distributions do not require you to be root for building packages, in fact they point to the fact that you should not be root for building packages.
 
Old 01-26-2015, 06:03 AM   #82
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,920

Rep: Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038Reputation: 5038
Quote:
Originally Posted by TobiSGD View Post
These are problems that hit every distribution at some point. I have yet to see a distribution that does not install kernel sources into /usr/src, with /usr/src owned by root, so that you have to built a kernel as root, unless you change the ownerships manually, though building a kernel as root is strongly discouraged by kernel developers.
You can build a kernel as a non-root user even with /usr/src owned by root and readonly. The make O= option is there for that and it's what I do. Just make sure you install pristine src (make mrproper'd) and keep it that way. I wish all distro would start doing this (slackware included).
 
Old 01-26-2015, 07:15 AM   #83
ivandi
Member
 
Registered: Jul 2009
Location: Québec, Canada
Distribution: CRUX, Debian
Posts: 528

Rep: Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866
Quote:
Originally Posted by solarfields View Post
did you contact the maintainer or at least post at the SBo mailing lists about the problems you had?
Nope. Didn't have time to follow the entire bug reporting process.

And this
Quote:
Don't bother whining about "security issues" or such from building as root. If you don't trust us to check the scripts for malicious activity, then please move along.
doesn't encourage users to report bugs anyway.


Cheers
 
Old 01-26-2015, 07:27 AM   #84
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,077

Rep: Reputation: Disabled
Quote:
Originally Posted by ivandi View Post
Didn't have time to follow the entire bug reporting process.
So you have enough time to post in this thread your complaints about the quality of the SlackBuilds that you use, but not enough to help volunteers enhance that quality? Why don't you just make all the work yourself then?

Quote:
And this
Quote:
Don't bother whining about "security issues" or such from building as root. If you don't trust us to check the scripts for malicious activity, then please move along.
doesn't encourage users to report bugs anyway.
I fail to see why.

Cheers

Last edited by Didier Spaier; 01-26-2015 at 07:35 AM.
 
Old 01-26-2015, 07:33 AM   #85
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Didier Spaier View Post
I fail to see why.
Because it basically says: We don't make mistakes. Never!
 
Old 01-26-2015, 07:44 AM   #86
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,077

Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
Because it basically says: We don't make mistakes. Never!
No, it just says: we carefully checked that there will be no security issues triggered by SlackBuild's execution.

Of course a wrongdoing of the SlackBuild stays possible, but I've never heard of such a case for a SlackBuild provided by http://slackbuilds.org, and the user is allowed to check the SlackBuild before running it.

Then something can go wrong and a security issue appear after installation of the package.

But then, the user is not prevented to make a last check, just examining the package's content (including possibly nasty doinst.sh) before installing it.

Last edited by Didier Spaier; 01-26-2015 at 07:56 AM. Reason: Post rewritten
 
Old 01-26-2015, 07:52 AM   #87
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Didier Spaier View Post
No, it just says: we carefully checked that there will be no security issues.

Of course despite these checks something can go wrong and a security issue appear.

But then, the user is not prevented to make a last check, just examining the package's content (including possibly nasty doinst.sh) before installing it.
What about the users that use Slackbuilds (possibly with sbopkg), but aren't able (possibly because they don't know about scripting and the pitfalls) to spot those mistakes that possibly shoot down your whole system. When this happens (and we all are human, so this is a when, not an if) do you tell them "Hey, you should have checked that!"?
The question is: When it is possible to build packages as unprivileged user, why build as root and why downplaying the potential consequences with statements like the one quoted above?
 
Old 01-26-2015, 08:30 AM   #88
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,383

Rep: Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763
Quote:
When it is possible to build packages as unprivileged user, why build as root and why downplaying the potential consequences with statements like the one quoted above?
When you build a package with a Slackbuild script from SBo, the package is built in /tmp/SBo and the final package is stored in /tmp. There is no risk until you install the package, which requires root privileges. Having root privileges when building the package is necessary for some Slackbuilds e.g ffmpeg
 
Old 01-26-2015, 09:00 AM   #89
solarfields
Senior Member
 
Registered: Feb 2006
Location: slackalaxy.com
Distribution: Slackware, CRUX
Posts: 1,456

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
doesn't encourage users to report bugs anyway.
oh, come on man!
 
Old 01-26-2015, 09:10 AM   #90
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by allend View Post
When you build a package with a Slackbuild script from SBo, the package should be built in /tmp/SBo unless there is a bug in the script and the final package is stored in /tmp.
Fixed that for you.
 
  


Reply



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
Indie Royale "Back To School Bundle" includes "Swords and Solders" dugan Linux - News 0 09-15-2012 05:23 PM
Slack 11 Konqueror: "System:/" shows no icons. How do I get them back MonctonJohn Slackware 0 02-04-2008 07:24 PM
K3b: - Howto re-dock "Directories" and "Contents" windows back into the main window? hagies Linux - Software 4 04-26-2006 08:38 AM
"You always go back to Slack" (ramble) webfiend Slackware 5 07-18-2002 02:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:06 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
Open Source Consulting | Domain Registration