1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN"
2 "http://www.w3.org/TR/REC-html40/loose.dtd">
4 <META NAME=
"GENERATOR" CONTENT=
"TtH 2.67">
8 <title> store-extra: Useful Store admin and config applications
</title>
10 <H1 align=
"center">store-extra: Useful Store admin and config applications
</H1>
12 <H3 align=center
>Petter Reinholdtsen
< pere@td.org.uit.no
> </H3>
14 <H3 align=center
>2000-
06-
27 </H3>
17 <H2><A NAME=
"tth_sEc1">
18 1</A> Introduction
</H2>
21 The
<tt>store-extra
</tt> Store application is my collection of useful
22 Store admin and config scripts which is not part of the Store base
23 (
<tt>perl-internal
</tt>). Most of it used to be part of smaller
24 applications, but I decided to collect it into one application
28 This is the collection of what used to be
<tt>store-pere
</tt>,
<tt>
29 env-config
</tt>,
<tt>mime-config
</tt>,
<tt>emacs-info
</tt>,
<tt>build-all
</tt> and
30 some scripts from NTNUs
<tt>emacs
</tt> application.
33 I did not write all these scripts. I have lost track of all the
34 authors, but some of them were written by Espen Skoglund, Bjørn
35 Stabell, Arne H. Juul, and more. If your credit is missing here,
39 <H2><A NAME=
"tth_sEc2">
40 2</A> Compiling new applications and versions
</H2>
43 The build-all scripts provides the simplest way to compile new
44 programs in store. It works best with source using GNU autoconf and
45 Perl modules. It has limited support for X imake source and normal
46 makefiles. If the application fails to compile using build-all, the
47 original method described in the original Store documentation must be
51 When everything works as it should, this sequence would give a
52 compiled version of a new application:
57 <li> Make new application subdirectory in
<tt>/store/store/
<master
>/
</tt>.
61 <li> Fetch source and update
<tt>registration
</tt> with source location.
62 FTP sites are better then HTTP sites. Replace version number with
63 <tt>$version
</tt> to allow automatic detection of new versions.
69 echo 'Source: ftp://ftp.gnu.org/pub/gnu/gcc-${version}.tar.gz'
>> registration
75 <li> Unpack source in application subdirectory. Rename source
76 subdirectory to
<tt>src-
<version
></tt>.
80 <li> Check source to find out if there is a
<tt>configure
</tt> script
81 (=buildtype GNU) or a
<tt>Makefile.PL
</tt> file (=buildtype pm). If
82 not, build-all is likely to fail.
86 <li> Create a file
<tt>buildinfo
</tt> in the applicatio subdirectory
89 with the information required to get build-all to compile this
90 application. The absolute minimum file contains
<tt>appname
</tt>,
<tt>
91 version
</tt> and
<tt>buildtype
</tt>.
105 <li> Run
<tt>build-all [archs]
</tt> in application subdirectory and
106 check the current compile status in the files
<tt>out.
<arch
></tt> to
107 find out if everything works as planned.
113 tail -f out.
<arch
>
119 <li> If this was a perl module, run
<tt>pm-touch-compiled
</tt> to make
120 sure platform dependent subdirectories are properly marked in Store.
124 <li> Check content of ver-
<version
> to make sure everything looks OK.
128 <li> Run
<tt>chkapp
</tt> to make sure everything went OK.,
<tt>
129 register
</tt> to insert and update the info on the application and to
134 <li> Run
<tt>linkup
</tt> and test if the program is working.
137 </OL> <H2><A NAME=
"tth_sEc3">
138 3</A> Common environment settings
</H2>
141 Two files are generated with the common environment settings,
<tt>
142 /store/etc/src.sh
</tt> and
<tt>/store/etc/src.csh
</tt>. One file for the
143 Bourne shell family (sh, ksh, zsh, bash, etc) and one for the C shell
144 family (csh, tcsh). These files are generated by
<tt>
145 /store/etc/internal/make-env.pl
</tt> based on the content in
<tt>
146 /store/etc/ENV/ENV-*
</tt>. They are regenerate every time the nightly
147 commands are being run.
150 The format is quite simple, with '#' as the comment marker, and the
151 fields in the env lines being
152 'username;group;priority;type;variable=content.
159 # Set path, check if directories exists.
160 *:*:
1:p:PATH=/store/gnu/bin:/store/opt/*/bin
161 *:*:
2:p:PATH=/store/bin:/store/sbin
162 !
0:*:
5:p:PATH=/usr/games
164 # Include in path without checking for the directories
165 *:*:
1:n:XFILESEARCHPATH=/store/lib/X11/app-defaults/%N
166 *:*:
9:n:XFILESEARCHPATH=/usr/local/lib/X11/%L/app-defaults/%N
174 Username and group must be '*' or user or group id number. '!'
175 negates the test. In the example, this make sure user root (
0) do not
176 get /usr/games as part of the PATH.
179 The path environment type 'p' and 'n' will remove duplicate entries,
180 and only keep the highest priority entry. The single entry
181 environment 's' will only keep the highest priority entry. The
182 priorities is sorted as perl strings, '
12' having lower priority then
186 The 'p' env type content might use filename globbing, as shown with
187 <tt>/store/opt/*/bin
</tt>.
190 If you are installing an application which requires special
191 environment settings, the best way to handle this is to use a small
192 shell wrapper to set the environment and then call the program.
193 Renaming the binaries from
<tt>file
</tt> to
<tt>file.exe
</tt> and making a
194 new shell script
<tt>file
</tt> which sets the environment is the best
195 way. Only when this is no option, you should use the
196 etc/ENV/ENV-application files. I suggest naming the files en ENV/
197 after the application they belong to, i.e ENV-netscape for netscape
198 env settings and ENV-less for less env settings.
201 <H2><A NAME=
"tth_sEc4">
202 4</A> MIME mailcap files
</H2>
205 When installing MIME content handlers, one wants to make them
206 automatically available in mail programs and web browsers. This is
207 done by placing a file in
<tt>/store/etc/mailcaps/
</tt>. The files are
208 named
<tt>mailca-
<app
>-
<priority
></tt>, and looks like normal MIME
215 audio/x-mpeg; /store/bin/mpg123 %s;
219 Based on these files, a list of MIME content handlers are generated
220 into
<tt>/store/etc/mailcap
</tt> by
<tt>
221 /store/etc/internal/make-mailcap.pl
</tt>. The priorities are sorted as
225 <H2><A NAME=
"tth_sEc5">
226 5</A> Emacs info and default.el files
</H2>
229 <H3><A NAME=
"tth_sEc5.1">
230 5.1</A> Emacs info directory
</H3>
233 All emacs info files should be installed in
<tt>/store/info/
</tt>. These
234 files can (and probably should) be compressed with
<tt>gzip
</tt>. Based
235 on the content of this subdirectory, a emacs info directory file (
<tt>
236 /store/info/dir
</tt>) is generated by
<tt>
237 /store/etc/internal/make-emacs-dir.pl
</tt>. This program requires a
238 section like this in the info files:
244 INFO-DIR-SECTION Programming
246 * Cpp: (cpp). The GNU C preprocessor.
251 All emacs info and texinfo files should have a section like this. If
252 it is missing, send a patch to the author. When working with .texi
253 files, a section like this will make sure the resulting info files
254 will be included in the info/dir file:
260 @dircategory Programming
262 * Cpp: (cpp). The GNU C preprocessor.
267 <H3><A NAME=
"tth_sEc5.2">
268 5.2</A> Emacs default.el
</H3>
271 Generates
<tt>/store/lib/emacs/site-lisp/default.el
</tt> and
<tt>
272 /store/share/emacs/site-lisp/default.el
</tt> from
<tt>default.el-
<app
></tt>
273 in the same directory.
276 <H2><A NAME=
"tth_sEc6">
277 6</A> Netscape plugins
</H2>
280 To make sure Netscape finds the installed plugins, they must be
281 installed in a common directory, and environment
<tt>
282 NPX_PLUGIN_PATH
</tt> must be set to point to this directory. The
283 environment should be set in a wrapper shell to make sure it is always
284 set when netscape is running.
287 I propose using
<tt>/store/opt/ns-plugins/
</tt> as this common directory.
288 I suggest naming the Netscape plugin applications with prefix '
<tt>
289 nsp-
</tt>', to make it easier to track the different netscape plugins
293 <H2><A NAME=
"tth_sEc7">
294 7</A> GIMP plugins
</H2>
297 [I do not know enough about gimp to make a suggestion here.]
300 <H2><A NAME=
"tth_sEc8">
301 8</A> List of recently installed applications
</H2>
304 To make it easier for the users to keep track of the applications
305 available in /store, the script
<tt>/store/etc/internal/news.pl
</tt>
306 generates UNIX news files in
<tt>/store/news
</tt>. These files can then
307 be accessed by news(
1) to get a list of recently installed
311 <H2><A NAME=
"tth_sEc9">
312 9</A> Various tools
</H2>
318 check-libtool-libs.pl findold.pl nightly-fix-suid.pl sourcewatch.pl
319 chkapps.pl fix-docdirs.pl prognews.pl usage.pl
320 collectusage.pl showusage.pl vusage.pl
323 compare-linktrees store-app-dependson
326 <H2><A NAME=
"tth_sEc10">
327 10</A> Build-all - parallel multiplatform autocompile
</H2>
330 The buildall system consist of the following configuration files:
335 <br>\~{}store/etc/master.conf Site specific configuration (information about master store
340 <br>\~{}store/etc/buildhosts The list Store architectures to compile for, and the hosts to
341 compile the application for this architecture.
345 <br>\$appdir/buildinfo The application specific information, located in the
346 application master directory.
349 </UL>The following programs are part of buildall:
354 <br>/store/bin/build-all The program called when starting to compile. This must be run
355 in the application master directory.
359 <br>/store/etc/internal/buildsubs Script called by build-all to do the work required.
363 <br>/store/bin/pm-touch-compiled Perl module compile support script.
367 <br>/store/etc/internal/etc/pm-a-by-a Mapping mellom store-arkitektur og Perl5 arkitekturnavn
370 </UL> <H3><A NAME=
"tth_sEc10.1">
371 10.1</A> buildinfo variables
</H3>
378 Store documentation, http://www.pvv.org/
~arnej/store/storedoc.html
381 Automatisk kompilering av Store-programmer på alle plattformer
384 ==============================================================
387 Petter Reinholdtsen
<pere@td.org.uit.no
>,
1999-
07-
27
390 IT-avdelingen bruker et system kalt 'build-all' hentet fra NTNU for
391 dette. Når det virker går kompilering mye raskere enn før. Når det
392 ikke virker gjøres kompilering som før. Kopi av NTNUs buildinfo filer
393 ligger i store-applikasjon build-all/ntnu-buildinfo/
396 For å autokompilere for flere arkitekturer lager du et /bin/sh script
397 'buildinfo' i applikasjonskatalogen på master, parallelt med fila
398 'registration', for å sette endel variabler. Deretter kjører du
399 'build-all'. Hvis alt gikk bra, har du etter en stund kompilert opp
400 applikasjonen for alle plattformer. Sjekk out.* for å se hvordan det
401 går med bygging av applikasjonen.
404 Når kompileringen er ferdig på alle plattformer (siste linje i out.*
405 er "...done"), så kjøres chkapp og register på vanlig måte.
408 Eksempelfil for GNU configure programmer:
416 Eksempelfil for Perl5 moduler:
419 appname=Net-Netmask.pm
424 Følgende variabler kan settes:
428 Navn på applikasjonen som skal genereres, dvs katalognavnet i
429 Master Store. Må settes, ingen default.
431 Versjon på applikasjonen som skal genereres. Må settes, ingen
434 Hvordan kompilering av applikasjonen skal gjøres. Må settes,
435 ingen default. Følgende er støttet:
439 GNU GNU Autoconf oppsett
440 pm Perl5 module, dvs applikasjon med 'Makefile.PL'
441 make ???. Forutsetter at konfigurering allerede er gjort.
445 Kan være blank. Default er '/store'.
447 Kan være blank. Parameter til configure for buildtype GNU.
448 Default er '-prefix=$prefix'.
450 Kan være blank, da brukes confstring eller standard for buildtype
451 GNU ('./configure $confstring').
453 Kan være blank. Parameter til make. Default er intet
456 Kan være blank. Parameter til make for a installere
457 applikasjonen. Default for X er 'install install.man', for
461 Kan være blank. Liste over applikasjoner som linkes henholdsvis
462 ned og opp fra linktreet før og etter installasjon.
463 Space-separert liste.
465 Kan være blank. Kommando som kjøres etter postinst på
466 maskinen er installasjonen ble gjennomført.
468 Liste over applikasjoner som skal linkes opp før kompilering.
469 Formatet er 'app versjon store', og flere applikasjoner skilles
470 med skråstrek(/). Eksempel:
471 linkupthis='glib
1.2.2/gtk
1.2.2'
473 Kan være blank. Hvilken kommando som brukes for å kjøre
474 kommandoer på andre maskiner. Default er 'ssh -x'.
476 Kan være blank. Nive-nivå for 'configure'- og
477 'make'-kommendoene. Default er 'nice -
15'
479 Kan være blank. Timeout-verdi for postinst. Default er
25.
482 Tilgjengelige shell-variabler i confcmd og postpostinstcmds:
485 SARCH Store-arkitektur
486 PMA Perl5 arkitekturnavn (for pm buildtype)
489 Buildall-systemet består av følgende filer:
493 Oppstart-scriptet som kjøres fra master-dir for applikasjonen
494 /store/etc/internal/buildsubs
495 Skriptet som gjør jobben
496 /store/etc/internal/etc/pm-a-by-a
497 Mapping mellom store-arkitektur og Perl5 arkitekturnavn
499 Liste over hvilke maskiner de forskjellige arkitekturene
501 $HOME/etc/master.conf
502 Informasjon om master-store.
504 Informasjon om applikasjonen som skal kompileres
508 <p><hr><small>File translated from
509 T
<sub><font size=
"-1">E
</font></sub>X
510 by
<a href=
"http://hutchinson.belmont.ma.us/tth/">
511 T
<sub><font size=
"-1">T
</font></sub>H
</a>,
512 version
2.67.
<br>On
4 Oct
2000,
18:
36.
</small>