Re: /tmp folders and files dleteable?
"Bradley D. Thornton" <[email protected]>
| Newsgroups | gmane.linux.slackware |
|---|---|
| Organization | NorthTech Computer |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
On 03/13/2012 02:28 PM, Insomniac wrote:
> Hi folks,
>
> Say I download from the SlackBuilds repository some app.
Actually, you only download the SlackBuild tarball from there. The app
you download from the upstream developer via the link provided.
Without getting into bumping versions or anything, Let me explain how I
typically like to set things up. Since I'm mentioning this it would be
kewl to hear what deviations from the stock SBo that others have adopted
too ;)
I work a lot with NIS and other environments where it just makes sense
to have shared resources that are available to many machines as local,
and even for one off boxes I tend to do the same for convenience sake.
# mkdir -p /usr/local/packages
# mkdir -p /usr/local/slackbuilds
Now, take a look into any *.Slackbuild file and locate the following
section. Note that I've already made the affecting changes that will
take advantage of our new package repo area.
<code>
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/usr/local/packages}
</code>
The $OUTPUT var is pointing to my new packages repo.
I take advantage of this by:
<code>
# cd //usr/local/slackbuilds
# wget http://slackbuilds.org/slackbuilds/13.37/network/icecat.tar.gz
# tar zxvf icecat.tar.gz
# cd icecat
# wget http://ftp.gnu.org/gnu/gnuzilla/10.0/icecat-10.0.tar.xz
</code>
Now we make the aforementioned changes to to $OUTPUT in
icecat.SlackBuild and then build it, install it, and run it...
<code>
# ./icecat.SlackBuild
# cd ../../packages
# install icecat*
# exit
$ icecat &
</code>
I don't generally have a reason to keep the source, but I do like to
keep the slackbuilds, and then if a new version of software I want comes
out before SlackBuilds.org updates it, I simply download the new source,
change the version in the SlackBuild, and voila!
So to get rid of that extra clutter, you just whack /tmp/*
You can even delete the source tarball from
/usr/local/slackbuilds/icecat/ too and just leave the SlackBuild there
since it's only a few bytes and might be more convenient to just keep it
in case of a manual upgrade like I mentioned above.
Since a bunch of machines mount the same /usr/local, we now have a nice
tidy little package repo to keep our packages which can be installed on
any machine in the NIS domain.
Let's take this one step further. We'll use sbopkg this time:
<code>
# cd /usr/local/packages # there is no SBo for sbopkg ;)
# wget http://sbopkg.googlecode.com/files/sbopkg-0.35.0-noarch-1_cng.tgz
# installpkg sbopkg*
</code>
Now we change our target like we did for each and every single SBo
before, but we only need to do it once in the config file this time.
After that, all packages will live in /usr/local/packages from now on :)
on line 10 of /etc/sbopkg/sbopkg.conf, change the target as follows...
<code>
export OUTPUT=${OUTPUT:-/usr/local/packages}
</code>
Now run sbopkg, sync with the SlackBuilds.org repo, and exit back to the
shell.
The last thing left to do is install icecat and run it, so let's do that:
<code>
# sbopkg -i icecat
# exit
$ icecat &
</code>
One last thing. You're going to see deps listed, and after you install a
bunch of apps you're going to wonder if you installed one of those
already or not, or you may even want to check a version real quick...
<code>
$ ls -la /var/log/packages |grep icecat
</code>
Well, I hope that helps! Enjoy :)
Kindest regards,
- --
Bradley D. Thornton
Manager Network Services
NorthTech Computer
TEL: +1.310.388.9469 (US)
TEL: +44.203.318.2755 (UK)
TEL: +41.43.508.05.10 (CH)
http://NorthTech.US
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Find this cert at x-hkp://pool.sks-keyservers.net
iQEcBAEBAwAGBQJPYFGtAAoJEE1wgkIhr9j3i8UH/2xcIHHOj3tw3hBZ8ntI3XaZ
prhCBa79BMJaZFgtUXAFmpp+iV3XfEYthylJPJmmlLYrwK44afbM4YDvbF24TUHJ
uFaIENcyOMJuBZNS3qeoOzXtsR1X9hHcxk7d5OyA1J9yuNy5qvjMhrmDvclboh8u
KMuzNqddhXUx4EyHkhgfN9YCAb0Ko7lbSMZtIGtZaTOqE+WgRb0CsphBNikIA8j+
/ZApuxfyiYjIb8EH3nahsCq7LjaSkMX3E7VMQoAL9dfhWh/u6Xdf0T5UU1p84wqG
P0sMFa0ikOgmP3rKiUZLQ2yXRl6vzh/e7lCZ+91J+/3uGpekJ1Dy2H3cdYoZt7k=
=yM//
-----END PGP SIGNATURE-----