LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 05-19-2013, 05:09 AM   #1
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Rep: Reputation: 2
building slackware packages: optimum file structure


edit: tues 2am GMT+10
I'm opening this up again since it is still attracting some great contributions.

1. Please, could people share their thoughts on:
- the best way to structure one's file system before starting to download tar balls and making a mess everywhere.

Facing Mount Slack. Man pages are sheer rock walls where one is looking for a gentle track.

I'm still at base-camp guys and I need a little help in getting my spike boots on, oxygen-mask adjusted and other survival gear sorted before I start the first leg of the ascent.

(I know i will have to come to terms with my distaste for man pages, eventually, but in the meantime I need to pick people's brains just to get the first stage of the climb pegged out)

Thanks in anticipation,
Tex

Last edited by textillis; 05-20-2013 at 10:59 AM. Reason: Reopening thread due to continued interest & changed focus
 
Old 05-19-2013, 05:21 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
Answering 2 as 1 is more personal choice than anything else

root doesn't actually care about the file ownership so if your downloading stuff as a normal user and then doing things with those files as root the only problems will be new files created by root.

root can open and modify files owned by other users even when the permissions say otherwise, the modifications will also not result in changes to those permissions.

The only gotcha in this scenario will be with files created by root as they will have root.root as the owner, however a quick chown can fix that, assuming that you even need to access those files as a normal user.
 
1 members found this post helpful.
Old 05-19-2013, 05:28 AM   #3
jstg
Member
 
Registered: Apr 2006
Distribution: Slackware
Posts: 37

Rep: Reputation: 22
You could look at this and this. It's more about different ways to set up for working with SlackBuilds but it's easy enough to adapt to your own needs. If nothing else it should give you some ideas.
 
1 members found this post helpful.
Old 05-19-2013, 05:35 AM   #4
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Thanks Wild and jstg!
So, as to Q1., would somethingg like:

home/tex/slackware be okay, with "tex" being me as user?

edit: or perhaps /home/slackware, cutting "tex" out of the tree, putting them rather on root's home directory?

And, if so, is slackware then the directory into which i expand the dloaded tar and/or gz files?

Last edited by textillis; 05-19-2013 at 05:44 AM.
 
Old 05-19-2013, 05:51 AM   #5
jstg
Member
 
Registered: Apr 2006
Distribution: Slackware
Posts: 37

Rep: Reputation: 22
I do /home/jstg/slackware/

And then under my slackware directory I have a directory for SlackBuilds that I build from slackbuilds.org. Anything that I build that isn't a SlackBuild goes in it's own directory.

/home/jstg/slackware/slackbuilds

or

/home/jstg/slackware/name_of_package_to_be_built

But that is just the way I do it. I can still do all of the ./configure and make as my own user then switch to root to build the packages.
 
1 members found this post helpful.
Old 05-19-2013, 05:58 AM   #6
edorig
Member
 
Registered: Apr 2013
Location: France
Distribution: Slackware; Scientific Linux
Posts: 106

Rep: Reputation: Disabled
Quote:
Originally Posted by textillis View Post
1. Please, could people share their thoughts on:
- the best way to structure one's file system before starting to download tar balls and making a mess everywhere.

2. An important associated question:
- when creating such a file structure, how do I make sure that it is owned by both me and root?
Tex
Usually, you need 3 partitions to hold a Linux operating system on a workstation.
/ that receives the operating system proper (kernel, executables, libraries, documentation etc...) typically 10 Gb for a workstation.
/home that will receive the user files.
a swap partition (twice your RAM in size: bigger is normally useless).
/ and /home will have to be mounted at boot time (entries in /etc/fstab).

You can create a single large / partition instead of / and /home, but it is not practical when you upgrade the system since it will force you to restore the user files from backups. Concerning the filesystems you can use,
you have the choice between ext3/4, jfs, xfs and btrfs. I would not recommend btrfs as it is still an experimental filesystem. ext3/4 is the standard linux journaling filesystem. It is very reliable and supported by all Linux distributions.jfs is another journaling filesystem provided by IBM and used on AIX. It is said to be less demanding in terms of CPU power. xfs is a third journaling filesystem provided by SGI and used on Irix. It demands more memory, but is good for large files. One inconvenient is that you can only enlarge xfs partitions, but you
can't shrink them. A common inconvenient of jfs and xfs is that they are not all supported by all Linux distributions. In particular, RedHat Linux and its derivatives (CentOS, Scientific Linux) only support xfs in
the 64-bit version. If for some reason you have to replace Slackware with one of those distros, you will be forced
to reinstall /home from backups if you used jfs or xfs. For that reason, I would recommend you to use ext4 or ext3
for your / and /home unless you have some special needs to work with very large files or spare your CPU power. In that case use xfs or jfs for /home and leave / as ext3/4.

/ and /home are owned by root. You add users with the adduser command. A directory owned by the user will be created under /home. root can access any file on the system, so there is no need to add root as owner. If you
need finer control on file access, you may use ACLs (supported on ext3/4, jfs and xfs).

If you are going to use linux on flash devices, you should not use any journaling filesystem (jfs,xfs,ext3/4). Flash devices die after a rather small number of writes compared to magnetic devices so you don't want Linux
to write constantly to a journal file. A simple option is to use ext2 format on these devices, or if you don't
need to preserve permissions, user and group, vfat. There are also some optimized filesystems for those devices (yaffs, etc...).

If you are thinking of a server configuration, you should add a /tmp and a /var partition. These partitions must be sufficiently large not to get filled by the normal operation of your server. Again, the choice of xfs, jfs or ext3/4 depends on your particular needs.
 
1 members found this post helpful.
Old 05-19-2013, 06:04 AM   #7
edorig
Member
 
Registered: Apr 2013
Location: France
Distribution: Slackware; Scientific Linux
Posts: 106

Rep: Reputation: Disabled
Sorry for that stupid answer. I understood that you wanted help to organize your filesystem prior to installing
Slackware not that you only wanted to create a directory to build packages.
 
1 members found this post helpful.
Old 05-19-2013, 06:13 AM   #8
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by jstg View Post
I do /home/jstg/slackware/

And then under my slackware directory I have a directory for SlackBuilds that I build from slackbuilds.org. Anything that I build that isn't a SlackBuild goes in it's own directory.

/home/jstg/slackware/slackbuilds

or

/home/jstg/slackware/name_of_package_to_be_built

But that is just the way I do it. I can still do all of the ./configure and make as my own user then switch to root to build the packages.
Perfect. Thanks friend.
Tex
 
Old 05-19-2013, 06:14 AM   #9
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by edorig View Post
Sorry for that stupid answer. I understood that you wanted help to organize your filesystem prior to installing
Slackware not that you only wanted to create a directory to build packages.
Please, no need to apologize!
This is great stuff!

Very, very helpful.

Thanks big time,
Tex
 
Old 05-19-2013, 06:20 AM   #10
jstg
Member
 
Registered: Apr 2006
Distribution: Slackware
Posts: 37

Rep: Reputation: 22
I'd definately look into sbopkg and slackbuilds.org if you haven't already. It's a wonderful resource.

It makes building and installing packages simple and easy to keep track of.
 
1 members found this post helpful.
Old 05-19-2013, 06:35 AM   #11
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
I think most of us use some variant on:
Code:
.
|-- packages
|   |-- conky-1.9.0-x86_64-1_local.tgz
|   |-- dmenu-4.5.gazl1-x86_64-1_local.txz
|   |-- dvdauthor-0.7.1-x86_64-1_local.tgz
|   |-- dwm-6.0.gazl5-x86_64-1_local.txz
|   |-- ...etc.
|   `-- xvidcore-1.3.2-x86_64-1_local.txz
`-- source
    |-- conky.SBo
    |   |-- README
    |   |-- conky-1.9.0.tar.bz2
    |   |-- conky.SlackBuild
    |   |-- conky.info
    |   |-- doinst.sh
    |   `-- slack-desc
    |-- dmenu
    |   |-- dmenu-4.5.gazl1.tar.gz
    |   |-- dmenu.SlackBuild
    |   `-- slack-desc
    |-- dvdauthor.SBo
    |   |-- README
    |   |-- dvdauthor-0.7.1.tar.gz
    |   |-- dvdauthor.SlackBuild
    |   |-- dvdauthor.info
    |   `-- slack-desc
    |-- dwm
    |   |-- dwm-6.0.gazl5.tar.gz
    |   |-- dwm.SlackBuild
    |   `-- slack-desc
    .etc
Where you locate the top of this directory structure is entirely down to your own preferences. I used to use /root/build until I moved it all into its own filesystem under /local.

I've been contemplating adding a ./distfiles/ directory the way that the *bsd guys do and moving the tarballs out of the build directories: the idea being that I could then put all the build directories themselves under a revision control system such as mercurial or git without the tarballs getting in the way, but as yet I haven't done so.

Last edited by GazL; 05-19-2013 at 06:40 AM.
 
1 members found this post helpful.
Old 05-19-2013, 07:22 AM   #12
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by GazL View Post
I think most of us use some variant on:
Code:
.
|-- packages
|   |-- conky-1.9.0-x86_64-1_local.tgz
|   |-- dmenu-4.5.gazl1-x86_64-1_local.txz
|   |-- dvdauthor-0.7.1-x86_64-1_local.tgz
|   |-- dwm-6.0.gazl5-x86_64-1_local.txz
|   |-- ...etc.
|   `-- xvidcore-1.3.2-x86_64-1_local.txz
`-- source
    |-- conky.SBo
    |   |-- README
    |   |-- conky-1.9.0.tar.bz2
    |   |-- conky.SlackBuild
    |   |-- conky.info
    |   |-- doinst.sh
    |   `-- slack-desc
    |-- dmenu
    |   |-- dmenu-4.5.gazl1.tar.gz
    |   |-- dmenu.SlackBuild
    |   `-- slack-desc
    |-- dvdauthor.SBo
    |   |-- README
    |   |-- dvdauthor-0.7.1.tar.gz
    |   |-- dvdauthor.SlackBuild
    |   |-- dvdauthor.info
    |   `-- slack-desc
    |-- dwm
    |   |-- dwm-6.0.gazl5.tar.gz
    |   |-- dwm.SlackBuild
    |   `-- slack-desc
    .etc
Where you locate the top of this directory structure is entirely down to your own preferences. I used to use /root/build until I moved it all into its own filesystem under /local.

I've been contemplating adding a ./distfiles/ directory the way that the *bsd guys do and moving the tarballs out of the build directories: the idea being that I could then put all the build directories themselves under a revision control system such as mercurial or git without the tarballs getting in the way, but as yet I haven't done so.
Thanks Gaz; this is some meat to chew on.
Tex
(incidentally: what is the hidden directory /.etc doing down the bottom there?)

Last edited by textillis; 05-19-2013 at 07:24 AM.
 
Old 05-19-2013, 09:07 AM   #13
torimus
Member
 
Registered: Apr 2013
Distribution: Slackware
Posts: 81

Rep: Reputation: Disabled
You've probably already read about it in FAQs but I would like to point out direct installation of software, ie. not with the Slackware's package system called pkgtools, is strongly discouraged. Even compiling/building as root is recommend to avoid and use tools like fakeroot or set non-standard privileges manually.
To the good practices also belongs creating a dedicated user account for the purpose of building packages only.

sbopkg (the last time I did tested it) requires root account to create packages which I find a bit unfortunate. Hope the dev will discover fakeroot someday.
 
1 members found this post helpful.
Old 05-19-2013, 09:27 AM   #14
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by torimus View Post
You've probably already read about it in FAQs but I would like to point out direct installation of software, ie. not with the Slackware's package system called pkgtools, is strongly discouraged. Even compiling/building as root is recommend to avoid and use tools like fakeroot or set non-standard privileges manually.
To the good practices also belongs creating a dedicated user account for the purpose of building packages only.

sbopkg (the last time I did tested it) requires root account to create packages which I find a bit unfortunate. Hope the dev will discover fakeroot someday.
Point noted. Thanks. For the moment though, I'm trying to work out why I can't make the following an executable:

i give the commmand: chmod +* <*.SlackBuild>

and it returns no error message, but then when I check the directory, I see no yellow, nor any * marking the file as executable.

here is the output:

Code:
root@tickles:/home/tex/slackware/packages/source/libisoburn/libisoburn# chmod +x libisoburn.SlackBuild
root@tickles:/home/tex/slackware/packages/source/libisoburn/libisoburn# dir
README	libisoburn.SlackBuild  libisoburn.info	slack-desc
Can you spot what is wrong with this?
Thanks if you can,
Tex
 
Old 05-19-2013, 10:47 AM   #15
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 561
Blog Entries: 2

Rep: Reputation: 73
There doesn't seem to be much point to having anybody but root own the SlackBuild files. You can still read them as an ordinary user but you need to be root to run the SlackBuild and to install the resulting package.

With that in mind, I have a directory structure called "/home/slackbuilds" and each SlackBuild application has its own sub-directory (all owned by root of course).
 
1 members found this post helpful.
  


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
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 09:18 AM
Moving packages - linux command structure bookie Linux - Newbie 7 07-09-2007 03:47 PM
Building Slackware packages web_spy_der Slackware - Installation 3 09-07-2006 09:10 AM
properly building slackware packages blazemonger Slackware 1 05-11-2006 08:44 AM
Building your own slackware packages CrEsPo Slackware 19 06-07-2005 10:48 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration