[SOLVED] building slackware packages: optimum file structure
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't know what "chmod +* <*.SlackBuild>" could mean. To make a file executable type either "chmod +x <*.SlackBuild>" or "chmod 755 <*.SlackBuild>"
EDIT. Maybe you meant chmod +rwxXst. That would be an overkill, doesn't make sense to set both x and X bits in the same command, and s and t are not needed.
Last edited by Didier Spaier; 05-19-2013 at 12:02 PM.
I don't know what "chmod +* <*.SlackBuild>" could mean. To make a file executable type either "chmod +x <*.SlackBuild>" or "chmod 755 <*.SlackBuild>"
EDIT. Maybe you meant chmod +rwxXst. That would be an overkill, doesn't make sense to set both x and X bits in the same command, and s and t are not needed.
Merci beaucoup pour l'explication; c'est gentil de vous m'avoir repondu.
(I love French but can't get accents on my keyboard, not yet at least)
I do my builds completely in an single krusader instance (I hate Dolphin! Been using krusader at least 5 or 6 years minimum).
I have a dir for the 'building' of packages, a dir for keeping the 'built_srcs' (a holdover thing from when I was stuck with dialup only, not necessary really with anything faster), and a dir for the finished/built packages called 'installed'.
I open up the konsole from the bottom-half of krusader and 'su -' to get to root control there.
I download the build package to my 'build' dir and in krusader I right-click on it to extract the tarball in that dir (I've bad carpal tunnel so I cannot touch-type and being a two-finger typist it's way, way too slow looking up and down from keyboard to monitor just to type 'tar -xvf' etc when it's just as fast and easy for me with the mouse and krusader).
I now have a dir with all the components needed for the build of a particular package. Download the source tarball into the extracted dir in 'build'.
Click on the extracted package dir and in krusader the konsole prompt automatically follows the working directory.
Do 'ls' and then type in konsole './package_name' and let it build.
When it's done, I have /tmp/package_name.txz ready to install. I simply double-click on the '/tmp/package_name.txz to highlight it to klipper, type in 'installpkg then click to paste, hit enter and it's installed.
Next, I simply type in 'mv (click to paste again) /home/me/installed' and all my built packages are in one single dir on my home partition where I own them and don't have to become root to do anything with them - other than install them again if need be.
This is my way that I learned to do through experimenting and which I've stuck with now for over a year or so (I've only been using Slackware for a year plus, used to be a SuSE user for 11 or so years). It's fast (for me, heh), simple (again, for me), and is easy to backup to a bd-r to have in an emergency. Hopefully this is something you were also hoping to see/read/try and not just a waste of everyone's time.
Irgun, this is most excellent and I thank you very much.
As it happens, I am not a fan of KDE and don't have it on my install of Slack.
However, I am very new to all this, so, just to let you know:
I am so desperate to "get a leg up" as far as configuring my system is concerned (and, at the core of that, finding a way I can safely build up some favorite programs that don't come with slack, like Geogebra, for instance) that I am considering geting KDE back and having a play along the lines you suggest.
Whatever the outcome, please know that your post was in no way "a waste of [my] time"
cheers,
Tex
PS very cool setup
Quote:
Originally Posted by irgunII
I do my builds completely in an single krusader instance (I hate Dolphin! Been using krusader at least 5 or 6 years minimum).
I have a dir for the 'building' of packages, a dir for keeping the 'built_srcs' (a holdover thing from when I was stuck with dialup only, not necessary really with anything faster), and a dir for the finished/built packages called 'installed'.
I open up the konsole from the bottom-half of krusader and 'su -' to get to root control there.
I download the build package to my 'build' dir and in krusader I right-click on it to extract the tarball in that dir (I've bad carpal tunnel so I cannot touch-type and being a two-finger typist it's way, way too slow looking up and down from keyboard to monitor just to type 'tar -xvf' etc when it's just as fast and easy for me with the mouse and krusader).
I now have a dir with all the components needed for the build of a particular package. Download the source tarball into the extracted dir in 'build'.
Click on the extracted package dir and in krusader the konsole prompt automatically follows the working directory.
Do 'ls' and then type in konsole './package_name' and let it build.
When it's done, I have /tmp/package_name.txz ready to install. I simply double-click on the '/tmp/package_name.txz to highlight it to klipper, type in 'installpkg then click to paste, hit enter and it's installed.
Next, I simply type in 'mv (click to paste again) /home/me/installed' and all my built packages are in one single dir on my home partition where I own them and don't have to become root to do anything with them - other than install them again if need be.
This is my way that I learned to do through experimenting and which I've stuck with now for over a year or so (I've only been using Slackware for a year plus, used to be a SuSE user for 11 or so years). It's fast (for me, heh), simple (again, for me), and is easy to backup to a bd-r to have in an emergency. Hopefully this is something you were also hoping to see/read/try and not just a waste of everyone's time.
(I love French but can't get accents on my keyboard, not yet at least)Tex
Yes you can!
In fact you can even type every character you want on your keyoard.
You just have to:
(1) know the UTF-8 code of the character you want to reproduce (four hexadecimal digits)
(2) type and hold together Ctrl+Shift+u => this will output an underlined "u", telling you that your keyboard just entered in UTF-8 mode
(3) release these three keys
(4) type the four hexadecimal digits
(5) press Enter
Let's take an example. On this page I see that the UTF-8 code for the Euro symbol is "20ac" so if you type Ctrl+Shift+u (release the keys) 20ac [Enter] you get: €
Tip: if you type in your Slackware system:
Code:
cat /usr/share/i18n/charmaps/UTF-8.gz|gunzip|less
you will see a list of characters with their UTF-8 encoding (left column) and their name (right column).
You can navigate in the list with the down and up arrows, just type "q" to quit when you are done.
Last edited by Didier Spaier; 05-20-2013 at 10:03 AM.
I'll also throw in a suggestion of installing slackware into a chroot and then building your packages in the chroot to prevent stuff getting polluted in your main environment. I have done this for years and it has served me well.
I'll also thrown in a suggestion of installing slackware into a chroot and then building your packages in the chroot to prevent stuff getting polluted in your main environment. I have done this for years and it has served me well.
Thanks Chess.
I'm filing away all these suggestions so as to open them up and look into them 2mro and in coming days.
Just had a quick read of man chroot; seems like the way to go.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
OK, here's a monkey wrench in the works...
I long ago developed rules for file systems, mostly based upon AT&T Unix System V Release 3 supplemented by Release 4 (SVR4 is the usual abbreviation for that).
Yes, I am well aware that Linux is Not Unix (as in GNU is Not Unix) but Slackware, in particular, is sorta-kinda the most like SVR4 of the Linux distributions and I have, for some 12+ years (don't remember exactly) set up my mounted file systems like this:
root 10-20 G (used to be 10, now 20 looks better)
/home 20 G
/usr/local 20 G
/opt 20 G
/var/lib/psql 150 G (that's a little overkill)
/var/lib/mysql 50 G (so's that)
/var/lib/virtual 100 G
/spares 100 G
Now, those are all mounted file systems on one or more drives and, of course, you may or may not need a large PostgreSQL partition or a largish MySQL partition bu I do.
/usr/local looks like this:
Code:
tree -L 1 /usr/local
/usr/local
|-- bin
|-- cvsroot
|-- doc
|-- etc
|-- games
|-- include
|-- info
|-- lib
|-- lib64
|-- lost+found
|-- man
|-- openils
|-- opt
|-- packages
|-- patches
|-- sbin
|-- share
|-- src
|-- tmp
|-- usr
`-- var
Look familiar? Ought to: it's a duplicate of the system tree (mostly).
When I build software, be it SlackBuilds, non-SlackBuild source or whatever, it gets built in /usr/local/packages/src; e.g.,
For some reason, SlackBuilds seem to want to install in the root tree -- which I just flat do not like, I want locally-added software in the /usr/local tree (that's what it's there for) or, in the case of things like LibreOffice, in /opt (optional software). I tend to edit the SlackBuild files so that things do install in /usr/local (which is a pain in the butt to do most of the time). That keeps church and state separate and distinct.
I'm running four servers, two 64-bit and two 32-bit (the 32-bit boxes are data base servers, no window managers, administered with SSH from my main work station). There are all kept up to date with patches, there are all kept at Slackware stable; I don't do fiddling with kernel or any of that sort of thing; the patches are all kept in /usr/local/patches.
When a new release of Slackware comes along, it's really easy to do a clean install (takes about 20 minutes per box) -- because there is nothing in the root tree that is not on the distribution DVD (that's why the root can be 10 G -- you start adding stuff the root tree and you'll need 20 G).
As you step through the installation where you're adding file systems, you just format root but don't format any of the other partitions and you haven't lost everything that was there. 99-44/100% of the time, everything just works. You copy /etc off to, in my case, /spares and you get back in business real quick by merging the saved /etc with the newly installed /etc. I'm serious, 20 minutes from start to running server, configured the way I need it to be (and no recovering add-on stuff).
The virtual partition is where Win7 lives (I have to have it, so I hold my nose and keep it up to date every Patch Tuesday but otherwise it sits there unused). It's also where I play with Linux every now and again but not all that often. If you think about what a royal pain in the ass it is to install Win7 (then sit for house while it does a couple of hundred critical updates, you'll know why it's a separate partition).
Is there any problem with /usr/local? Nope, works just fine, already in your PATH environment, no problem. Over the long haul, you do not want to build stuff in your home directory and you do not want to run virtual machines from your home directory. Trust me on this, it'll byte you in the butt someday.
Hey Tron,
Thanks heaps for a thorough and engaging response.
I hope this attracts some divergent opinion.
It is wayyyy past where I'm at (if you look at my emended initial post you will understand why I say this) but I am determined to keep reading and doing and learning, so that, soon, the stuff you have offered will become a real matter of choice for me.
In the meantime, as i say, I hope the posts keep coming: I find it a fundamentally interesting question (it is almost tautological to observe: you know, like: laying in the foundations of a system or a structure; planting a tree; laying out lines of development; setting plumb and line for the first line of bricks and then building up the corners etc)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.