Discussion:
[blfs-support] Common post install commands
Waleed Hamra via blfs-support
2018-08-31 20:06:26 UTC
Permalink
Greetings guys;

What are some common post install commands I should know about?
For instance, I know that if a package installs a .desktop file, I
should run "update-desktop-database" to update the cache. For some
programs there's gtk-update-icon-cache, though I don't really know when
I need to run that, I just run after every gtk package.

I had some problems with akonadi earlier, and after some debugging, I
noticed it outputting something about some mail mime types being
invalid, so I ran update-mime-database, and that solved it.

Anything else I should be aware about? I ask since everything is
installed using a DESTDIR method, so if make install is expected to fix
some of this stuff, it's not.

Thanks a lot for any pointers.

Waleed Hamra
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information pa
Ken Moffat via blfs-support
2018-08-31 20:44:05 UTC
Permalink
Post by Waleed Hamra via blfs-support
Greetings guys;
What are some common post install commands I should know about?
For instance, I know that if a package installs a .desktop file, I should
run "update-desktop-database" to update the cache. For some programs there's
gtk-update-icon-cache, though I don't really know when I need to run that, I
just run after every gtk package.
I had some problems with akonadi earlier, and after some debugging, I
noticed it outputting something about some mail mime types being invalid, so
I ran update-mime-database, and that solved it.
Anything else I should be aware about? I ask since everything is installed
using a DESTDIR method, so if make install is expected to fix some of this
stuff, it's not.
Thanks a lot for any pointers.
Waleed Hamra
The two examples you give do not need to be done frequently and are
nothing to do with using DESTDIR-style installs. In my
own scripts I build in an order which gives me a series of
more-usable desktops, in which I then run the next script.

For me, I only run gtk-update-icon-cache after a script which
includes gimp and some pdf viewers, and also if I build (sysv)
gnome, or gnumeric - and I run it at the end of those build, not
per-package.

For update-desktop-database my use is similar.

Both might be needed if adding packages for other desktop
environments, but again I think that runing before trying to use
them (or trying without, and then closing the app if it fails and
then running them) is the way to go.

More generally, for libraries ldconfig needs to be run. Most
packages run it, but a few do not. But for DESTDIR installs you
always need to run it after the real install.

For mime types, I occasionally get files opening by default in a
wrong application - particularly on downloads, but soemtimes texlive
has picked up an odd application for opening a PDF, e.g. when
running texdoc (I don't use file managers). In such case:

xdg-mime query filetype /path/to /filename.typ

and, depending on the results

xdg-mime query default [specify the filetype, e.g. application/pdf]

and

xdg-mime default [applicationname filetype]

Thanks for the question - I've now remembered what files were giving
me problems, some example sony ARW raw files defaulted to opening in
the gimp (if I didn't spot this and change to download) when I
clicked on the html download option. Unfortunately, the filetype is
shown as 'image/tiff' which normally I _do_ want to open in the
gimp.

ĸen
--
Also Spuke Zerothruster
(Finnegans Wake)
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscrib
Waleed Hamra via blfs-support
2018-09-01 13:46:59 UTC
Permalink
Post by Ken Moffat via blfs-support
Post by Waleed Hamra via blfs-support
Greetings guys;
What are some common post install commands I should know about?
For instance, I know that if a package installs a .desktop file, I should
run "update-desktop-database" to update the cache. For some programs there's
gtk-update-icon-cache, though I don't really know when I need to run that, I
just run after every gtk package.
I had some problems with akonadi earlier, and after some debugging, I
noticed it outputting something about some mail mime types being invalid, so
I ran update-mime-database, and that solved it.
Anything else I should be aware about? I ask since everything is installed
using a DESTDIR method, so if make install is expected to fix some of this
stuff, it's not.
Thanks a lot for any pointers.
Waleed Hamra
The two examples you give do not need to be done frequently and are
nothing to do with using DESTDIR-style installs. In my
own scripts I build in an order which gives me a series of
more-usable desktops, in which I then run the next script.
For me, I only run gtk-update-icon-cache after a script which
includes gimp and some pdf viewers, and also if I build (sysv)
gnome, or gnumeric - and I run it at the end of those build, not
per-package.
For update-desktop-database my use is similar.
Both might be needed if adding packages for other desktop
environments, but again I think that runing before trying to use
them (or trying without, and then closing the app if it fails and
then running them) is the way to go.
More generally, for libraries ldconfig needs to be run. Most
packages run it, but a few do not. But for DESTDIR installs you
always need to run it after the real install.
For mime types, I occasionally get files opening by default in a
wrong application - particularly on downloads, but soemtimes texlive
has picked up an odd application for opening a PDF, e.g. when
xdg-mime query filetype /path/to /filename.typ
and, depending on the results
xdg-mime query default [specify the filetype, e.g. application/pdf]
and
xdg-mime default [applicationname filetype]
Thanks for the question - I've now remembered what files were giving
me problems, some example sony ARW raw files defaulted to opening in
the gimp (if I didn't spot this and change to download) when I
clicked on the html download option. Unfortunately, the filetype is
shown as 'image/tiff' which normally I _do_ want to open in the
gimp.
ĸen
Thanks a lot for all this information. Much appreciated.

Regards
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/fa
Thomas Trepl via blfs-support
2018-08-31 21:52:42 UTC
Permalink
Am Freitag, den 31.08.2018, 23:06 +0300 schrieb Waleed Hamra via blfs-
Post by Waleed Hamra via blfs-support
Greetings guys;
What are some common post install commands I should know about?
For instance, I know that if a package installs a .desktop file, I
should run "update-desktop-database" to update the cache. For some
programs there's gtk-update-icon-cache, though I don't really know when
I need to run that, I just run after every gtk package.
I had some problems with akonadi earlier, and after some debugging, I
noticed it outputting something about some mail mime types being
invalid, so I ran update-mime-database, and that solved it.
Anything else I should be aware about? I ask since everything is
installed using a DESTDIR method, so if make install is expected to fix
some of this stuff, it's not.
Thanks a lot for any pointers.
Waleed Hamra
You allready found the two most used tools to run. After installing
fonts, you may think about "fc-cache". 'info -d <dir>' maybe another
one. Ken mentioned ldconfig for each package which does something with
libraries.

More generally spoken, the DESTDIR-method is pretty fine as long as you
take in account that sometimes the sequence of the instructions needs
to be changed. I assume you do DESTDIR to provide binary packages for
other machines than the building machine - which is IMHO the only
reason DESTDIR makes sense.
For instance, when building a daemon, the first instructions are to
create some user/groups (e.g. apache for httpd or postfix/postdrop for
postfix, etc). The users are most of the time not required for build
time (one exception is fcron), it is required when you do the install
of the DESTDIR-binary. So in this case, build postgres on machine A,
tar it up, unpack it on B and create the user/group on B (plus doing
some chown+chmod) and run the initdb stuff (what if a database is
allready there?). For user/groups its obvious, failures to create them
are reported mostly very quick. It becomes a bit more tricky when it
comes to special file-/directory-permissions. All that stuff needs to
be done on the target machine (B) - so at a very different time.
And watch out for configuration files which might exist on B allready.
Don't overwrite them, work changes into them.

--
Thomas
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information pag
Ken Moffat via blfs-support
2018-08-31 23:34:51 UTC
Permalink
Post by Thomas Trepl via blfs-support
More generally spoken, the DESTDIR-method is pretty fine as long as you
take in account that sometimes the sequence of the instructions needs
to be changed. I assume you do DESTDIR to provide binary packages for
other machines than the building machine - which is IMHO the only
reason DESTDIR makes sense.
Not at all: it lets you see exactly what is going to be installed.
e.g. When building a new package, or new version:

Does a package really need --disable-static, or are no static libs
installed ?

How much space does the install take ?

Of course, not all packages support DESTDIR, some Python modules and
Qt packages need a different magic word. Also one or two others,
and sometmes you still need to be root to run it.

Some editors document these things in the xml, which is only handy
when you come to make the edit : by that point I (hope to) know what
I'm going to put in the book. When I remember, I usually put these
things in the wiki. For Python modules using setup.py, --root
/some/dir usually works.

ĸen
--
Also Spuke Zerothruster
(Finnegans Wake)
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above inform
Thomas Trepl via blfs-support
2018-09-01 07:29:05 UTC
Permalink
Am Samstag, den 01.09.2018, 00:34 +0100 schrieb Ken Moffat via blfs-
On Fri, Aug 31, 2018 at 11:52:42PM +0200, Thomas Trepl via blfs-
Post by Thomas Trepl via blfs-support
More generally spoken, the DESTDIR-method is pretty fine as long as you
take in account that sometimes the sequence of the instructions needs
to be changed. I assume you do DESTDIR to provide binary packages for
other machines than the building machine - which is IMHO the only
reason DESTDIR makes sense.
Not at all: it lets you see exactly what is going to be installed.
Does a package really need --disable-static, or are no static libs
installed ?
How much space does the install take ?
Totally agree from an editor's point of view. My scripts do report
those data automatically - its exactly this method where they get the
data from.
Of course, not all packages support DESTDIR, some Python modules and
Qt packages need a different magic word. Also one or two others,
and sometmes you still need to be root to run it.
Some editors document these things in the xml, which is only handy
when you come to make the edit : by that point I (hope to) know what
I'm going to put in the book. When I remember, I usually put these
things in the wiki. For Python modules using setup.py, --root
/some/dir usually works.
It would be great if the book could show a little marker, a little
green button or so, at the wiki-link if there is really a page
existing. I think this could help to get the wiki more in mind but it
would mean to access tracs database while rendering the book. Don't
know if xsltproc supports calling external functions.

--
Thomas
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above in
Paul Rogers via blfs-support
2018-09-01 22:27:39 UTC
Permalink
Post by Waleed Hamra via blfs-support
What are some common post install commands I should know about?
- initialize your MTA: exim, postfix, or (shudder) sendmail
- initialize your SVN/GIT repositories
- ldconfig (my boot scripts run it every time--it's cheap)
- mandb (& cron.weekly)
- updatedb (ditto)
- update security certificates (monthly?)
- strip symbols again, unless you're into running the debugger
- "internal" firewall, certainly. Your router firewall will allow
almost anything. Don't forget about outbound as well as inbound--you don't want to let ET phone home! I have strong opinions about having a very tight "internal" firewall on every system--if something nails one box on your LAN, you don't need to have everything else wide-open to everything!
- nmap, along those same lines.
--
Paul Rogers
***@fastmail.fm
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL :-)
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above informati
Loading...