Discussion:
trouble with slackpkg
Add Reply
Joe Rosevear
2020-09-12 08:43:30 UTC
Reply
Permalink
Hi, it seems I'm having trouble with slackpkg--or perhaps it is trouble
with makepkg.

I like to use "slackpkg clean-system" to see what extra packages I have
installed. Normally I just "cancel", or maybe I will remove one or
two, depending on my needs. Handy.

My trouble however happened when I used makepkg to make a package.
After installing it, it didn't show in the list made by "slackpkg
clean-system". This trouble seems, for me, to be repeatable. But it
also seems wrong.

Anybody have any tips for me?

-Joe
wgreenhouse
2020-09-12 13:56:06 UTC
Reply
Permalink
Post by Joe Rosevear
Hi, it seems I'm having trouble with slackpkg--or perhaps it is trouble
with makepkg.
I like to use "slackpkg clean-system" to see what extra packages I have
installed. Normally I just "cancel", or maybe I will remove one or
two, depending on my needs. Handy.
My trouble however happened when I used makepkg to make a package.
After installing it, it didn't show in the list made by "slackpkg
clean-system". This trouble seems, for me, to be repeatable. But it
also seems wrong.
Anybody have any tips for me?
-Joe
Did you customize the blacklist for slackpkg?
Joe Rosevear
2020-09-13 04:43:07 UTC
Reply
Permalink
Post by wgreenhouse
Post by Joe Rosevear
Hi, it seems I'm having trouble with slackpkg--or perhaps it is trouble
with makepkg.
I like to use "slackpkg clean-system" to see what extra packages I have
installed. Normally I just "cancel", or maybe I will remove one or
two, depending on my needs. Handy.
My trouble however happened when I used makepkg to make a package.
After installing it, it didn't show in the list made by "slackpkg
clean-system". This trouble seems, for me, to be repeatable. But it
also seems wrong.
Anybody have any tips for me?
-Joe
Did you customize the blacklist for slackpkg?
Thanks for asking--good idea. Not I did not, and I examined
/etc/slackpkg/blacklist just to be sure.

I used this invocation from inside a shell script:

echo n | (makepkg -l y "$env_scratch/genpak/burn/${pack_name}.tgz")

It makes the package successfully. I used it to make a seamonkey and a
firefox package. Then I installed them both. They work just fine, and
they appear in the list you get from "pkgtool, view". They just don't
show up when I run "slackpkg clean-system".
f6k
2020-09-13 07:54:48 UTC
Reply
Permalink
Post by Joe Rosevear
Thanks for asking--good idea. Not I did not, and I examined
/etc/slackpkg/blacklist just to be sure.
echo n | (makepkg -l y "$env_scratch/genpak/burn/${pack_name}.tgz")
It makes the package successfully. I used it to make a seamonkey and a
firefox package. Then I installed them both. They work just fine, and
they appear in the list you get from "pkgtool, view". They just don't
show up when I run "slackpkg clean-system".
can you see your package in /var/log/packages/? plus, slackpkg uses awk
to find and list the packages in that dir, maybe your package name wasn't
well formed? if i understand well, it supposed to look like
pgkname-version-arch-release (where release is a number).

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Joe Rosevear
2020-09-13 21:37:20 UTC
Reply
Permalink
Post by f6k
Post by Joe Rosevear
Thanks for asking--good idea. Not I did not, and I examined
/etc/slackpkg/blacklist just to be sure.
echo n | (makepkg -l y "$env_scratch/genpak/burn/${pack_name}.tgz")
It makes the package successfully. I used it to make a seamonkey and a
firefox package. Then I installed them both. They work just fine, and
they appear in the list you get from "pkgtool, view". They just don't
show up when I run "slackpkg clean-system".
can you see your package in /var/log/packages/? plus, slackpkg uses awk
to find and list the packages in that dir, maybe your package name wasn't
well formed? if i understand well, it supposed to look like
pgkname-version-arch-release (where release is a number).
-f6k
Thanks for your insight. Here, below, is an excerpt from `ls
/var/log/packages`:

mozilla-firefox-45.2.0esr-i586-1
mozilla-firefox-80.0

seamonkey-2.40-i586-1
seamonkey-2.53.3

I looked at other package names. I found an alien package in my
collection with this name:

chromium-60.0.3112.78-i586-1alien.txz

So threw away the old package file and made a new one:

mozilla-firefox-80.0-i586-1rs.tgz

where rs is short for "Rosevear Software". I removed the old package,
installed the new one and ran the same tests. Same problem.

Here is the new exerpt from `ls /var/log/packages`:

mozilla-firefox-45.2.0esr-i586-1
mozilla-firefox-80.0-i586-1rs

seamonkey-2.40-i586-1
seamonkey-2.53.3

So I'll do one more test. I installed the alien chromium package that I
named above. After installation it shows in the list made by "slackpkg
clean-system". The only thing I can think is that there is something
in the install script (I have no install script) or something that depends on
the place to which it is installed (I installed mine to /opt).

Help!

-Joe
f6k
2020-09-13 22:23:06 UTC
Reply
Permalink
Post by Joe Rosevear
Thanks for your insight. Here, below, is an excerpt from `ls
mozilla-firefox-45.2.0esr-i586-1
mozilla-firefox-80.0
seamonkey-2.40-i586-1
seamonkey-2.53.3
I looked at other package names. I found an alien package in my
chromium-60.0.3112.78-i586-1alien.txz
[snip]

ok, i think i understood. clean-system, basically, compare a list of
local packages installed and a list of all packages available by
default on slackware. slackpkg, for that operation, uses just the file
names (not the versions). i understand you compiled and makepkg
mozilla-firefox 80.0? so, slackpkg with clean-system, when searching
for packages to remove that are not part of the default system, will
see your version of mozilla-firefox as a default slackware package.
that's why you can't remove your mozilla-firefox 80.0 that way.

if you really need to remove your mozilla-firefox 80.0 version with
clean-system, you can still create a package with a different filename
like mozilla-firefox-sr-80.0-i586-1. so when slackpkg will run its
core function listpkgname it will find "mozilla-firefox-sr" which is
not part of the default slackware repository and will propose to remove
it.

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Joe Rosevear
2020-09-13 23:19:43 UTC
Reply
Permalink
Post by f6k
Post by Joe Rosevear
Thanks for your insight. Here, below, is an excerpt from `ls
mozilla-firefox-45.2.0esr-i586-1
mozilla-firefox-80.0
seamonkey-2.40-i586-1
seamonkey-2.53.3
I looked at other package names. I found an alien package in my
chromium-60.0.3112.78-i586-1alien.txz
[snip]
ok, i think i understood. clean-system, basically, compare a list of
local packages installed and a list of all packages available by
default on slackware. slackpkg, for that operation, uses just the file
names (not the versions). i understand you compiled and makepkg
mozilla-firefox 80.0? so, slackpkg with clean-system, when searching
for packages to remove that are not part of the default system, will
see your version of mozilla-firefox as a default slackware package.
that's why you can't remove your mozilla-firefox 80.0 that way.
if you really need to remove your mozilla-firefox 80.0 version with
clean-system, you can still create a package with a different filename
like mozilla-firefox-sr-80.0-i586-1. so when slackpkg will run its
core function listpkgname it will find "mozilla-firefox-sr" which is
not part of the default slackware repository and will propose to remove
it.
-f6k
That did it. Thank you!

-Joe
Jimmy Johnson
2020-09-15 06:59:35 UTC
Reply
Permalink
Post by Joe Rosevear
Hi, it seems I'm having trouble with slackpkg--or perhaps it is trouble
with makepkg.
I like to use "slackpkg clean-system" to see what extra packages I have
installed. Normally I just "cancel", or maybe I will remove one or
two, depending on my needs. Handy.
My trouble however happened when I used makepkg to make a package.
After installing it, it didn't show in the list made by "slackpkg
clean-system". This trouble seems, for me, to be repeatable. But it
also seems wrong.
Anybody have any tips for me?
I the description for "makepkg" it says it makes a "slackware compatible
package". Did you try "slackpkg search" for your package?
--
Jimmy Johnson

Slackware64 Current KDE4 - AMD A8-7600 - EXT4 at sda5
Registered Linux User #380263
Joe Rosevear
2020-09-15 08:41:28 UTC
Reply
Permalink
Post by Jimmy Johnson
Post by Joe Rosevear
Hi, it seems I'm having trouble with slackpkg--or perhaps it is trouble
with makepkg.
I like to use "slackpkg clean-system" to see what extra packages I have
installed. Normally I just "cancel", or maybe I will remove one or
two, depending on my needs. Handy.
My trouble however happened when I used makepkg to make a package.
After installing it, it didn't show in the list made by "slackpkg
clean-system". This trouble seems, for me, to be repeatable. But it
also seems wrong.
Anybody have any tips for me?
I the description for "makepkg" it says it makes a "slackware compatible
package". Did you try "slackpkg search" for your package?
?

I wasn't looking for a package. I was trying to understand the
behavior of "slackpkg clean-system". In particular, I was trying to
find a way to use "slackpkg clean-system" to show all installed
"foreign" packages--including my own.

f6k helped a bit by suggesting two tricks having to do with the names
that I give to my packages:

1. Use package-names that have all four parts:

name-version-arch-release

2. Use package-names that that unique "names" (where "name" is the
first part of the package-name). For example he suggested that I
make "mozilla-firefox" unique by adding something to it like this:

"mozilla-firefox-rs".

I didn't run very many tests, but I found (2) to be sufficient alone
for my mozilla-firefox package. I used this package-name successfully:

mozilla-firefox-rs-80.0

However, for the seamonkey package that I made (2) was not sufficient
to give the behavior I wanted. I needed to use (1) and (2) resulting
in this package-name:

seamonkey-rs-2.53.3-i686-1

Perhaps I have enough understanding to go forward, but not confidently.
I wish I had a better understanding or that the behavior of slackpkg
wasn't so mysterious. Perhaps the problem comes from the use of "-" in
an ambiguous way. It is both an allowed character in "name" and
separtor between the parts. That's my take on it anyway, I don't yet
understand the slackpkg code.

By the way, here is the reason I'm making Firefox and Seamonkey packages:
It is easy to do with a good script which wraps around makepkg, and
having a Slackware package for Firefox and Seamonkey makes them easier
to install and uninstall. There is a trend toward self-updating web
browsers. I guess I'm bucking it.

-Joe
f6k
2020-09-15 16:58:07 UTC
Reply
Permalink
Post by f6k
[snip]
Perhaps I have enough understanding to go forward, but not confidently.
I wish I had a better understanding or that the behavior of slackpkg
wasn't so mysterious. Perhaps the problem comes from the use of "-" in
an ambiguous way. It is both an allowed character in "name" and
separtor between the parts. That's my take on it anyway, I don't yet
understand the slackpkg code.
well, if i may, it isn't that much all mysterious :) you already know
that usr/sbin/slackpkg is basic shell script. if you look into it you
can see that it makes a call to usr/libexec/slackpkg/core-functions.sh.
you can grep those two files for `clean-system' and see exactly what it
is doing. something else might help you more: in a terminal launch
`sudo slackpkg clean-system' and stay at the screen when it ask you to
remove some packages (i mean you need to have at least one). let it
like that and open a new terminal. go (with root privileges) to
/tmp/slackpkg.XXXXXX (where XXXXXX are random letters). in it you'll
see various interesting things (like `lkpg', the local list of installed
packages and `spkg', the default list of packages, generated by
slackpkg). i'll let you browse all of this; hopefully you'll be able
to see exactly how it works :)
Post by f6k
It is easy to do with a good script which wraps around makepkg, and
having a Slackware package for Firefox and Seamonkey makes them easier
to install and uninstall. There is a trend toward self-updating web
browsers. I guess I'm bucking it.
i understand you want to install personal packages on slackware 14.2,
in particular some that are part of the official ones--for instance
mozilla-firefox--but with a version more up to date. do you use the
official SlackBuilds from slackware's repository and modify them
to achieve that?

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Joe Rosevear
2020-09-15 22:22:02 UTC
Reply
Permalink
Post by f6k
[snip]
well, if i may, it isn't that much all mysterious :) you already know
that usr/sbin/slackpkg is basic shell script. if you look into it you
can see that it makes a call to usr/libexec/slackpkg/core-functions.sh.
I did that.
Post by f6k
you can grep those two files for `clean-system' and see exactly what it
is doing.
I did that, but I don't understand awk or regular expressions well. It
will take me some time and testing to understand,
Post by f6k
something else might help you more: in a terminal launch
`sudo slackpkg clean-system' and stay at the screen when it ask you to
remove some packages (i mean you need to have at least one).
Can I use root instead of sudo? What do you mean by "stay at the
screen"?
Post by f6k
let it
like that and open a new terminal. go (with root privileges) to
/tmp/slackpkg.XXXXXX (where XXXXXX are random letters). in it you'll
see various interesting things (like `lkpg', the local list of installed
packages and `spkg', the default list of packages, generated by
slackpkg). i'll let you browse all of this; hopefully you'll be able
to see exactly how it works :)
I think I understand a little. I think you asking me to use (as root)
"slackpkg clean-system" to remove at least one package, then examine
/tmp/slackpkg.XXXXXX (a randomly generated file or dir name) to see
what is going on--looking in particular at lpkg (the local list of
installed packages) and spkg (the default list of packages).

I think this will make sense after I try it--thanks for the valuable
info.
Post by f6k
Post by Joe Rosevear
It is easy to do with a good script which wraps around makepkg, and
having a Slackware package for Firefox and Seamonkey makes them easier
to install and uninstall. There is a trend toward self-updating web
browsers. I guess I'm bucking it.
i understand you want to install personal packages on slackware 14.2,
in particular some that are part of the official ones--for instance
mozilla-firefox--but with a version more up to date. do you use the
official SlackBuilds from slackware's repository and modify them
to achieve that?
No. I did not compile, and I did not use SlackBuilds. I also have no
makepkg install scripts. I simply downloaded and unpacked pre-compiled
tarballs for Firefox and Seamonkey. I got them from

Firefox:

https://www.mozilla.org/en-US/firefox/

Seamonkey:

https://www.seamonkey-project.org/releases/

Then I used a script that I made (called genpak, a wrapper for makepkg)
to make a slackware package from the "business" dirs of each of them:

Here are script invocations that I used:

Firefox:

genpak /mnt/joresorc/software/pre-compiled/slackpkgs/mozilla-firefox-rs-80.0/firefox /opt/mozilla-firefox-rs-80.0 - mozilla-firefox-rs-80.0 /.

Seamonkey:

genpak /mnt/joresorc/software/pre-compiled/slackpkgs/seamonkey-rs-2.53.3/seamonkey /opt/seamonkey-rs-2.53.3 - seamonkey-rs-2.53.3-i686-1 /.

These invocations show where the "business" dirs are and also show the
dirs to which the packages will be installed, the names given to the
packages, and the locations of the slack-desc files.

genpak has five arguments:

$1 Path to the "business" dir from which I wish to make the
package.

$2 Path to the dir to which the package that is made will be
installed.

$3 Not used in my examples.

$4 Name given to the package that is made.

$5 My code looks for the slack-desc in "$1$5".

Note that I am breaking tradition by not putting the executables in
a dir called bin. Also I have not put them in a dir that is in
PATH. Apparently the programmers designed the code to "just run"
from wherever it is unpacked. I have taken it one step further by
making a package from the unpacked tarballs but otherwise I am using
the code pretty much as the programmers intended. (Before I made
the packages I changed the unpacked contents to root:root to prevent
updates. And I made files slack-desc.txt in each of the dirs named
by $1.)

So to invoke the installed code use "/opt/fox&" and "/opt/sea&"
where fox and sea are:

/opt/fox -> /opt/mozilla-firefox-rs-80.0/firefox
/opt/sea -> /opt/seamonkey-rs-2.53.3/seamonkey

-Joe
f6k
2020-09-16 08:44:07 UTC
Reply
Permalink
[ snip ]
I think I understand a little. I think you asking me to use (as root)
"slackpkg clean-system" to remove at least one package, then examine
/tmp/slackpkg.XXXXXX (a randomly generated file or dir name) to see
what is going on--looking in particular at lpkg (the local list of
installed packages) and spkg (the default list of packages).
whoa, i'm so sorry. my english was that bad, right? fortunately you
deciphered what i was trying to say.
I think this will make sense after I try it--thanks for the valuable
info.
i hope so!
[ snip ]
i understand you want to install personal packages on slackware 14.2,
in particular some that are part of the official ones--for instance
mozilla-firefox--but with a version more up to date. do you use the
official SlackBuilds from slackware's repository and modify them
to achieve that?
No. I did not compile, and I did not use SlackBuilds. I also have no
makepkg install scripts. I simply downloaded and unpacked pre-compiled
tarballs for Firefox and Seamonkey. I got them from
[ snip ]
i never managed to make myself my own tools for that. i'm just using
SlackBuilds--some i made myself (rare) and some i take from various
sources (i generally modify them, sometimes even heavily). the only
program i installed from download/unpack was the last version of
Calibre working with Qt4 (version 1.48 iirc?). it lived in /opt/ too
and i just added a PATH variable for it in my ~/.profile to access the
binaries without pain. i've never even tried to make a package of it.
then the great AlienBOB made a marvelous package for slackware 14.2 of
the last version of calibre with all deps included, and i'm using it
now.

so for me the explanation of how you manage things is very interesting.
thank you for sharing it. and, again, sorry for my poor english...

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Joe Rosevear
2020-09-17 22:09:24 UTC
Reply
Permalink
Post by f6k
[ snip ]
I think I understand a little. I think you asking me to use (as root)
"slackpkg clean-system" to remove at least one package, then examine
/tmp/slackpkg.XXXXXX (a randomly generated file or dir name) to see
what is going on--looking in particular at lpkg (the local list of
installed packages) and spkg (the default list of packages).
whoa, i'm so sorry. my english was that bad, right? fortunately you
deciphered what i was trying to say.
Not entirely. I tend to read in a literal way, instead of reading
"between the lines". If I had some background in the subject of if I
had taken the time to try it, perhaps I wouldn't have asked for
clarification.
Post by f6k
[snip]
i never managed to make myself my own tools for that. i'm just using
SlackBuilds--some i made myself (rare) and some i take from various
sources (i generally modify them, sometimes even heavily). the only
program i installed from download/unpack was the last version of
Calibre working with Qt4 (version 1.48 iirc?). it lived in /opt/ too
and i just added a PATH variable for it in my ~/.profile to access the
binaries without pain. i've never even tried to make a package of it.
then the great AlienBOB made a marvelous package for slackware 14.2 of
the last version of calibre with all deps included, and i'm using it
now.
so for me the explanation of how you manage things is very interesting.
thank you for sharing it. and, again, sorry for my poor english...
No worries. I'm glad you found my explanations interesting. I like to
make tools from scripts and functions. In fact, I have a project on
SourceForge called sam-kernel (short for SAM Kernel and Application)
which makes a whole dumpster-load of my tools available from the command
line. SAM is itself a tool which provides a text-based menu interface
to other tools. This explanation is a little weak, but it might make
sense if you tried it. Anyway, genpak is (or will be after I make an
update to SourceForge) a part of the sam-kernel download.

Or not. Sorry for the self-promotion. But seriously, let me know if you are
interested in genpak. I could post it here to the Usenet. It's about
two dozen lines of Bash.

Thanks again for your help and insights.

(If you need it the URL for SAM is:

https://sourceforge.net/projects/sam-kernel

Once genpak is included in the download... to go to the genpak menu:

<Install SAM to $sam_root>
$sam_root/bsam-start "pkg_tool; genpak" )

-Joe
f6k
2020-09-18 07:48:14 UTC
Reply
Permalink
Post by Joe Rosevear
Post by f6k
whoa, i'm so sorry. my english was that bad, right? fortunately you
deciphered what i was trying to say.
Not entirely. I tend to read in a literal way, instead of reading
"between the lines". If I had some background in the subject of if I
had taken the time to try it, perhaps I wouldn't have asked for
clarification.
i've read again my part, and... well, it was poorly written hah. but
it's kind from you, thank you :)
Post by Joe Rosevear
Post by f6k
so for me the explanation of how you manage things is very interesting.
thank you for sharing it. and, again, sorry for my poor english...
No worries. I'm glad you found my explanations interesting. I like to
make tools from scripts and functions. In fact, I have a project on
SourceForge called sam-kernel (short for SAM Kernel and Application)
which makes a whole dumpster-load of my tools available from the command
line. SAM is itself a tool which provides a text-based menu interface
to other tools. This explanation is a little weak, but it might make
sense if you tried it. Anyway, genpak is (or will be after I make an
update to SourceForge) a part of the sam-kernel download.
Or not. Sorry for the self-promotion. But seriously, let me know if
you are interested in genpak. I could post it here to the Usenet.
It's about two dozen lines of Bash.
Thanks again for your help and insights.
https://sourceforge.net/projects/sam-kernel
<Install SAM to $sam_root>
$sam_root/bsam-start "pkg_tool; genpak" )
i've downloaded it. 125Mo!! i wasn't expecting that! it will take
time for me to dig in! i'm in the GUIDE lines for now. as you said,
it quite differs from traditional software :) thanks for the link.

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Joe Rosevear
2020-09-19 05:08:51 UTC
Reply
Permalink
Post by f6k
Post by Joe Rosevear
Post by f6k
whoa, i'm so sorry. my english was that bad, right? fortunately you
deciphered what i was trying to say.
Not entirely. I tend to read in a literal way, instead of reading
"between the lines". If I had some background in the subject of if I
had taken the time to try it, perhaps I wouldn't have asked for
clarification.
i've read again my part, and... well, it was poorly written hah. but
it's kind from you, thank you :)
Post by Joe Rosevear
Post by f6k
so for me the explanation of how you manage things is very interesting.
thank you for sharing it. and, again, sorry for my poor english...
No worries. I'm glad you found my explanations interesting. I like to
make tools from scripts and functions. In fact, I have a project on
SourceForge called sam-kernel (short for SAM Kernel and Application)
which makes a whole dumpster-load of my tools available from the command
line. SAM is itself a tool which provides a text-based menu interface
to other tools. This explanation is a little weak, but it might make
sense if you tried it. Anyway, genpak is (or will be after I make an
update to SourceForge) a part of the sam-kernel download.
Or not. Sorry for the self-promotion. But seriously, let me know if
you are interested in genpak. I could post it here to the Usenet.
It's about two dozen lines of Bash.
Thanks again for your help and insights.
https://sourceforge.net/projects/sam-kernel
<Install SAM to $sam_root>
$sam_root/bsam-start "pkg_tool; genpak" )
i've downloaded it. 125Mo!! i wasn't expecting that! it will take
time for me to dig in! i'm in the GUIDE lines for now. as you said,
it quite differs from traditional software :) thanks for the link.
I downloaded sam-kernel myself just now so I could take a look at what
you have gotten yourself into! I think it should work OK for you. It
isn't too out of date, although I have made updates since then that I
haven't yet uploaded.

If you get around to trying the example I gave above, you will need to
do it differently with the version that you have. What you have does,
in fact, include genpak, but the instructions I gave are for the
current version of SAM which I haven't yet uploaded.

Instead do this:

<Install SAM to $sam_root>
$sam_root/begin
$sam_root/bstart "pkg_tool; genpak"

As you can see the version you have needs an extra step
($sam_root/begin), and it uses bstart instead of bsam-start.
$sam_root/begin prepares for the running of bstart. There is a
discussion of the use of bstart in file $sam_root/GUIDE.

bsam-start basically combines steps for ease of use, but it isn't
included in your version.

Also, I should explain that there really is a variable "sam_root". It is
defined and exported for you when you run $sam_root/begin. Therefore
you want to invoke SAM like this:

<path to SAM>/begin

Which is what I meant. Sorry, if my lazy syntax was confusing.

Have fun, and know that you are truly a trail blazer for trying SAM. I
have used it for years, and it has perhaps been downloaded from
SourceForge hundreds of times (if you trust the figures), but you are
the first person to tell me that you have tried it.

You made my day! I wish you success!

-Joe
f6k
2020-09-19 09:49:46 UTC
Reply
Permalink
Post by Joe Rosevear
<Install SAM to $sam_root>
$sam_root/begin
$sam_root/bstart "pkg_tool; genpak"
As you can see the version you have needs an extra step
($sam_root/begin), and it uses bstart instead of bsam-start.
$sam_root/begin prepares for the running of bstart. There is a
discussion of the use of bstart in file $sam_root/GUIDE.
yes i've got it from the GUIDE which is very clear on that point.
Post by Joe Rosevear
bsam-start basically combines steps for ease of use, but it isn't
included in your version.
Also, I should explain that there really is a variable "sam_root". It is
defined and exported for you when you run $sam_root/begin. Therefore
<path to SAM>/begin
Which is what I meant. Sorry, if my lazy syntax was confusing.
yes i got it right. the GUIDE says it's good to look at begin and
bstart to see the differences; which i did!
Post by Joe Rosevear
Have fun, and know that you are truly a trail blazer for trying SAM. I
have used it for years, and it has perhaps been downloaded from
SourceForge hundreds of times (if you trust the figures), but you are
the first person to tell me that you have tried it.
well it is fun, yes. and what i really find interesting is how it is
different from my everyday workflow on my computer.

i'll take an analogy to explain. i recently found myself browsing the
N-Wheeled Vehicules Museum on douglas-self.com[1]. i'm not much into
cars myself but, like everyone else, i know what is a car because, you
know, i see them everyday since i'm born. and a car *is* a car, and
look like one, because... well, you know, it's a car! a "box", four
wheels, the best way to make them, my friend! but with that page i
came to realize cars could have been very different. i'm amazed for
instance by the 3-wheels and 5-wheels cars. but we all have 4-wheels
now because, somehow, someone, some industry, made some choices. and
because of that i take now for granted that a car is a box with
4-wheels to be a "car".

[1]: http://www.douglas-self.com/MUSEUM/TRANSPORT/nwheelcar/nwheelcar.htm

yeah, what a dumb epiphany right? i know i look like an idiot but my
point is that, because i'm not much into cars, i never even tried to
imagine how they could be different.

conversely, i'm a computer guy and i like to interact with them. i
tried many many windows managers, many desktop managers, to see how
other OS/culture/etc. do things. inspired by 9plan, NEXTSTEP, Apple,
some that came out of the blue; tiled, windowed, in 3D; you name it, i
probably tried it.

and when it comes to CLI, it's more difficult to find something
"different" since i'm always using UNIX/DOS related systems. for
instance, i never used (and probably never will) DOMAIN/OS but i know i
could find my way in it. recently i made some slackware archeology,
booting in qemu slackware-1.01 with linux 0.99pl12. it's fun, things
smells old enough, thank you, but the interaction with the system
doesn't differ much from what i'm used to on my slackware 14.2.
obviously, it's still UNIX-ish.

again my point is, i know that somehow, someone, some industry made
some choices which result in a specific way of using my machine. and i
find it interesting that SAM is some kind of a layer, on top of that,
that allow me to see how we could do (or could have done) things
differently. i mean you use coreutils, scripts, menus, mailcap, etc.,
but the interaction with the system is quite different. and for me,
that's where the fun is, and that's why i tried it :)
Post by Joe Rosevear
You made my day! I wish you success!
love; success-to-you-too; regards; bye; bye

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Joe Rosevear
2020-09-25 01:45:59 UTC
Reply
Permalink
Post by f6k
[snip]
yes i got it right. the GUIDE says it's good to look at begin and
bstart to see the differences; which i did!
Post by Joe Rosevear
Have fun, and know that you are truly a trail blazer for trying SAM. I
have used it for years, and it has perhaps been downloaded from
SourceForge hundreds of times (if you trust the figures), but you are
the first person to tell me that you have tried it.
well it is fun, yes. and what i really find interesting is how it is
different from my everyday workflow on my computer.
i'll take an analogy to explain. i recently found myself browsing the
N-Wheeled Vehicules Museum on douglas-self.com[1]. i'm not much into
cars myself but, like everyone else, i know what is a car because, you
know, i see them everyday since i'm born. and a car *is* a car, and
look like one, because... well, you know, it's a car! a "box", four
wheels, the best way to make them, my friend! but with that page i
came to realize cars could have been very different. i'm amazed for
instance by the 3-wheels and 5-wheels cars. but we all have 4-wheels
now because, somehow, someone, some industry, made some choices. and
because of that i take now for granted that a car is a box with
4-wheels to be a "car".
[1]: http://www.douglas-self.com/MUSEUM/TRANSPORT/nwheelcar/nwheelcar.htm
yeah, what a dumb epiphany right? i know i look like an idiot but my
point is that, because i'm not much into cars, i never even tried to
imagine how they could be different.
conversely, i'm a computer guy and i like to interact with them. i
tried many many windows managers, many desktop managers, to see how
other OS/culture/etc. do things. inspired by 9plan, NEXTSTEP, Apple,
some that came out of the blue; tiled, windowed, in 3D; you name it, i
probably tried it.
and when it comes to CLI, it's more difficult to find something
"different" since i'm always using UNIX/DOS related systems. for
instance, i never used (and probably never will) DOMAIN/OS but i know i
could find my way in it. recently i made some slackware archeology,
booting in qemu slackware-1.01 with linux 0.99pl12. it's fun, things
smells old enough, thank you, but the interaction with the system
doesn't differ much from what i'm used to on my slackware 14.2.
obviously, it's still UNIX-ish.
again my point is, i know that somehow, someone, some industry made
some choices which result in a specific way of using my machine. and i
find it interesting that SAM is some kind of a layer, on top of that,
that allow me to see how we could do (or could have done) things
differently. i mean you use coreutils, scripts, menus, mailcap, etc.,
but the interaction with the system is quite different.
On close examination you will see that all I have done (in summary) is:

1. Implemented a stack of environments.

2. Made tools which push and pop environments to and from the stack
in such a way that the concept of a "synthetic shell" emerges.

3. Made tools which change the prompt and PATH in such a way that
the concept of a "dir as a menu" emgerges. That menu includes
executables in the dir as well as functions defined by files
"<name>.sam".
Post by f6k
and for me,
that's where the fun is, and that's why i tried it :)
Post by Joe Rosevear
You made my day! I wish you success!
love; success-to-you-too; regards; bye; bye
-f6k
Thank you for your interesting reply, and forgive me for me lapse.

At first I didn't know what to say. I was surprised at first that you
put SAM in the category of "a different way to use the CLI." So I
thought about it for a few days, and decided that you are absolutely
right.

To me SAM is just Bash. Bash in all its glory. To me the only thing
that makes SAM different is its recursive nature--I have made command
line tools that help one to make, use and document command line tools.
It is perhaps radical in that sense. And the syntax that results from
this is, yes, very different.

I don't think about it much, because it has become familiar to me, but
some examples will reveal SAM's nature:


1. To backup a flashdrive to a loop device file using ddrescue
initially, and rsync for subsequent backups:

/mnt/200810aa2/begin
backup
mount /dev/<target device> /mnt/zip
cd /mnt/zip
dd_back /dev/<flash drive device>


2. To print my (starter) grocery list in preparation for deciding
what I need to get from the store:

/mnt/200810aa2/begin
pdata; shop_lst; either; prn_lst


3. To listen to WFMU on Internet radio using Audacious in the Fvwm
X-Windows manager:

startx

<Left-click on the Fvwm desktop and choose from the menu "My
Buttons", and then choose from the sub-menu "/mnt/200810aa2/begin">

<At the SAM prompt of the resulting xterm...>
bound /mnt/joresorc/radio
wfmu

4. To record my time when at work:

<start Fvwm and SAM as shown in (3)>

<At the SAM prompt of the resulting xterm...>
bound /mnt/joresorc/fmenu
iftask hours

<openoffice4 -calc runs and opens a spreadsheet. It displays data
which includes the current state of the hours I have already entered
tallied by task (columns) and time task was begun (rows). To add or
change data, press "ctrl+q" to leave openoffice4, then enter...>
y

<Enter data as needed in the JOE editor session that opens in each
of three xterms (they have different uses) that open in
succession--exiting from one opens the next. After the last one the
spreadsheet opens again. When done respond with a "n" instead of a
"y".>

Perhaps what this shows about SAM is that it is flexible, powerful, and
useful, if not somewhat tedious to implement. (If you like to write
Bash, then the tedium is a plus!) Also revealed here is the great range
of possible applications for SAM.

So, yes, SAM does perhaps belong in a museum, but not placed there and
then forgotten.

-Joe
f6k
2020-09-25 18:31:31 UTC
Reply
Permalink
Post by Joe Rosevear
At first I didn't know what to say. I was surprised at first that you
put SAM in the category of "a different way to use the CLI." So I
thought about it for a few days, and decided that you are absolutely
right.
To me SAM is just Bash. Bash in all its glory. To me the only thing
that makes SAM different is its recursive nature--I have made command
line tools that help one to make, use and document command line tools.
It is perhaps radical in that sense. And the syntax that results from
this is, yes, very different.
yes, it was maybe not clear in my reply. but this is what i meant when
i said that it's all about scripts, environment, etc. it's bash,
clearly. but you adapted it in a way that i /feel/ like using SAM
gives me a different way of using CLI. it was purely from a simple
user point of view. and the examples you gave later demonstrate this.
that's why i used windows manager to explain my point: it's still
icons, mouse, windows and bars, but the UX feeling is different since
it is organized differently from one to the other.
Post by Joe Rosevear
So, yes, SAM does perhaps belong in a museum, but not placed there and
then forgotten.
hah, i don't think it belongs to a museum! on the contrary even!

-f6k
--
~{,_,"> indignus LabRat - ftp://shl.huld.re
Loading...