Scientific Linux

SL is a Linux release put together by various labs and universities around the world. It's primary purpose is to reduce duplicated effort of the labs, and to have a common install base for the various experimentors.

The base SL distribution is basically Enterprise Linux, recompiled from source.

Our main goal for the base distribution is to have everything compatible with Enterprise, with only a few minor additions or changes. An example of of items that were added are Pine, and OpenAFS.

Our secondary goal is to allow easy customization for a site, without disturbing the Scientific Linux base. The various labs are able to add their own modifications to their own site areas. By the magic of scripts, and the anaconda installer, each site is be able to create their own distributions with minimal effort. Or, if a users wishes, they can simply install the base SL release.

 

Costruzione di una site distribution (SICR)

La distribuzione Scientific Linux è provvista di una serie di README files che consentono facilmente di costruire una distribuzione secondo le proprie necessità.

La descrizione di come questo sia avvenuto per la distribuzione SICR viene data alternando porzioni dei diversi README files al log dei vari passi effettuati sulla macchina che fa da repository per il SICR: l'host scientific.roma1.infn.it.

Le parti scritte in blu riportano esattamente quanto contenuto nei vari README files; le parti scritte in grigio sono sezioni del log della procedura seguita per ottenere una distribuzione Scientific Linux SICR.
Il sito ufficiale della distribuzione Scientific Linux è disponibile all'indirizzo http://www.scientificlinux.org.

 

Nella sezione Documentation --> How To sono reperibili le istruzioni per effettuare un mirror locale della distribuzione completa.

 


How To Mirror

(estratto del file https://www.scientificlinux.org/documentation/howto/mirror)

 

Different ways to mirror Scientific Linux

 

Via ftp

ftp is the prefered way that we would like people to mirror Scientific Linux. We have found that while wget is quite good, lftp has many features that make it preferable.

Some of the functions that I like is the ability to use a script, parallel downloads, and being able to put the processes into the background easily.

Below are two sample config files that demonstrate some of different ways to do the mirroring.


download.background

 

set ftp:list-options -a 
open linux21:/linux/scientific/30rolling
lcd /export/linux/scientific/30rolling
mirror --delete --exclude sites/FNAL --exclude sites/EDGE &
open linux21:/linux/scientific/301 
lcd /export/linux/scientific/301
mirror --delete --exclude sites/FNAL --exclude sites/EDGE &

quit

 

 

 

scientific# lftp

lftp> set ftp:list-options -a

 

lftp> open ftp.scientificlinux.org:/linux/scientific/302/i386

cd ok, cwd=/linux/scientific/302/i386

lftp> lcd /distrib/scientific/302/i386

lcd ok, local cwd=/distrib/scientific/302/i386

 

lftp> mirror -v --delete --exclude sites/Fermi

Transferring file `.discinfò

Transferring file `READMè

Transferring file `RELEASE-NOTES.html'

Making symbolic link `SL.releasenotè to `SL.documentation/current'

Making directory `RHupdates'

Transferring file `RHupdates/anaconda'

 

... omissis ...

 

Transferring file `sites/example/isolinux/syslinux.cfg'

Transferring file `sites/example/isolinux/vmlinuz'

Total: 90 directories, 4633 files, 710 symlinks

New: 4633 files, 710 symlinks

lftp> close

lftp> quit

scientific#
 

 

 

Sul server scientific.roma1.infn.it è ora disponibile tutto l'albero della distribuzione Scientific Linux 3.0.3. Nel nostro caso la radice dell'albero è /distrib/scientific/303/i386/.

Nella sottodirectory ./sites/example/build/documentation alcuni README files descrivono come procedere ulteriormente.

 

 

#file README.steps

(disponibile anche in 

ftp://ftp.scientificlinux.org/linux/scientific/303/i386/sites/example/build/documentation/README.steps)

 

Definitions used in this document.

        where <default> is the default directory of the base RPMS.

        where <sitename> is your sitename which is the directory under sites/ .

        where <tree> is the directory where <default>/ exists

 

        In this example it is /mnt/src/sl30rolling/i386/

        Note that it must be a full path name.

-----------------------------------------------------------------------------

Steps for making your own site customization

-----------------------------------------------------------------------------

Prereqs

-------

 

Note that the steps outlined here must be executed on a system which has Scientific Linux (SL) with the anaconda and anaconda-runtime rpms installed.

The "Development Tools" group must have been installed if you wish to build your own rpms.

 

STEPS

-----

 

In this example we will use

 

        new site "newsite" so $SITE is "newsite".

        <tree> is in /mnt/src/sl30rolling/i386/ and is defined as $TREE

        <default> is SL and is defined as $DEFAULT

 

        DEFAULT=SL

        SITE=newsite

        TREE=/mnt/src/sl30rolling/i386/

 

cd $TREE

mkdir sites/newsite                        # Create new site area

cd sites/example

find . -print | cpio -pvdum ../newsite     # copy over example area as a start

 

 
scientific# pwd
/root
scientific# cat .scientific303
# environment per costruzione/modifica distribuzioni
# Scientific Linux 303 sicr
DEFAULT=SL
SITE=sicr
TREE=/distrib/scientific/303/i386/
scientific#
 
scientific# source .scientific303
scientific# echo $DEFAULT $SITE $TREE
SL sicr /distrib/scientific/303/i386/
 
scientific# cd $TREE
scientific# pwd
/distrib/scientific/303/i386
scientific# mkdir sites/$SITE
scientific# ls -l sites
total 16
drwxr-xr-x   13 root     4096 Sep 29 17:50 example
drwxr-xr-x    2 root     4096 Nov 25 17:30 sicr
scientific#
 
scientific# cd sites/example
scientific# find . -print | cpio -pvdum ../sicr
../sicr/./README
../sicr/./RHupdates
../sicr/./RHupdates/iw
../sicr/./RHupdates/pixmaps
 
... omissis ...
 
../sicr/./isolinux/splash.lss
../sicr/./isolinux/syslinux.cfg
../sicr/./isolinux/vmlinuz
410500 blocks
scientific#
 

 

cd ../newsite/Updates

 

    <add and remove RPMS in "Updates" to customize as you want>

 

    For the rpms you want to change install the SRPM and then make changes

    as necessary in /usr/src/redhat/SPECS/. You should change the version

    string so as to distinguish it from the original.

 

    Some rpms that you might want to change are

 

        yum-conf

 

            so to point to your local yum repository

 

        example-release

 

            to contain your own release name. This will change the name of this

            rpm and will require you to change the example-release entry in

            ../base/comps* so the installer will find the right rpm.

            To install the SRPM for example-release so that you can modify it

            for your needs.

 

                rpm -iv $TREE/sites/example/SRPMS/example-release*

 

            The spec file after installing will be in

            /usr/src/redhat/SPECS/example-release.spec. It is easiest to copy

            this spec file as newsite-release.spec and modify that. Then rebuild

            your new release rpm with

 

                rpmbuild -ba /usr/src/redhat/SPECS/newsite-release.spec

 

            The new newsite-release rpm will be in /usr/src/redhat/RPMS/i386/

scientific# cd $TREE/sites
scientific# pwd
/distrib/scientific/303/i386/sites
scientific#
scientific# rpm -iv example/SRPMS/example-release-303-9.2.src.rpm
warning: example/SRPMS/example-release-303-9.2.src.rpm: V3 DSA signature: NOKEY, key ID 82fd17b2
example-release-303-9.2
scientific#
scientific# cd /usr/src/redhat/SPECS/
scientific# cp example-release.spec sicr-release.spec
scientific# vi sicr-release.spec
scientific#
scientific# diff example-release.spec sicr-release.spec
4,5c4,5
< %define builtin_release_name "Example Linux"
< %define builtin_release_variant SL
---
> %define builtin_release_name "sicr Linux"
> %define builtin_release_variant SLs1
7c7
< %define builtin_release_codename example
---
> %define builtin_release_codename sicr
9c9
< %define builtin_release_shortname example
---
> %define builtin_release_shortname sicr
scientific#
cientific# cd /usr/src/redhat/SOURCES
scientific#
scientific# gunzip -c generic-release-SL-3.0.3.tar.gz| tar -xf -
scientific# ls -l
total 300
drwxr-xr-x    2 root     4096 Sep 13 17:17 generic-release-SL-3.0.3
-rw-r--r--    1 root   110621 Sep 13 17:19 generic-release-SL-3.0.3.tar.gz
scientific# mv generic-release-SL-3.0.3 generic-release-SLs1-3.0.3
scientific# tar -cf generic-release-SLs1-3.0.3.tar generic-release-SLs1-3.0.3
scientific# gzip generic-release-SLs1-3.0.3.tar
scientific# ls -l
total 416
-rw-r--r--    1 root   110621 Sep 13 17:19 generic-release-SL-3.0.3.tar.gz
drwxr-xr-x    2 root     4096 Sep 13 17:17 generic-release-SLs1-3.0.3
-rw-r--r--    1 root   110671 Nov 26 13:14 generic-release-SLs1-3.0.3.tar.gz
scientific#
scientific# cd /usr/src/redhat
scientific# scientific# rpmbuild -ba /usr/src/redhat/SPECS/sicr-release.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.59071
+ umask 022
 
... omissis ...
 
Wrote: /usr/src/redhat/SRPMS/sicr-release-303-9.2.src.rpm
Wrote: /usr/src/redhat/RPMS/noarch/sicr-release-303-9.2.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.59071
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd generic-release-SLs1-3.0.3
+ rm -rf /var/tmp/redhat-release-root
+ exit 0
scientific#
scientific# ls -l RPMS/noarch
total 208
-rw-r--r--    1 root   114877 Nov 26 13:17 sicr-release-303-9.2.noarch.rpm
scientific#
scientific# cd /distrib/scientific/303/i386/sites/sicr
scientific# cp /usr/src/redhat/RPMS/noarch/sicr-release-303-9.2.noarch.rpm Updates/.
 

 

        anaconda-images

 

           This rpm contains the graphics used during the install. See

            README.images for info on what could/should be changed.

 

        anaconda-help

 

            This rpm contains the "help" info on the left side of the gui installer

            screen. You might want to change the "SL" to be your site name.

 

cd ../base

 

    <modify "comps.xml.main" to include added RPMS and other site

    customizations, The one included here is the same as what is in SL itself,

    with sl-release changed to example-release>

 

modify "scripts/comps.site.spec"

 

    Change the "example" entries at the beginning to be your site

    Also make sure that basedir is what your base directory really is

 

sh scripts/cp.comps.xml.main.sh

 

 

scientific# cd $TREE/sites/${SITE}/base

scientific# pwd

/distrib/scientific/303/i386/sites/sicr/base

scientific#

 

scientific# cp -p comps.xml.main comps.xml.main.orig

scientific# grep -v "xml\:lang" comps.xml.main.orig > comps.xml.main

scientific# cp -p comps.xml.main comps.xml.main.default

 

scientific# vi comps.xml.main

scientific# diff comps.xml.main.default comps.xml.main

58,59c58,59

< <!-- CJS changed to example-release -->

<       <packagereq type="mandatory">example-release</packagereq>

---

> <!-- anzel - changed to sicr-release -->

>       <packagereq type="mandatory">sicr-release</packagereq>

161a162,163

 

... omissis ...

 

<         <subcategory>admin-tools</subcategory>

1933d1917

<         <subcategory>printing</subcategory>

scientific#

 

scientific# cp -p scripts/comps.site.spec scripts/comps.site.spec.orig

scientific# vi scripts/comps.site.spec

scientific# diff scripts/comps.site.spec.orig scripts/comps.site.spec

3,5c3,5

< %define compsversion 302

< %define site example

< %define treedir /mnt/src/scientific/30rolling

---

> %define compsversion 303

> %define site sicr

> %define treedir /distrib/scientific/303

scientific#

 

scientific# sh scripts/cp.comps.xml.main.sh

Going to copy /distrib/scientific/303/i386/sites/sicr/base/comps.xml.main over as comps.xml now, press return if ok

Saving old comps.xml as oldcomps/comps.xml

 

... omissis ...

 

+ cd /usr/src/redhat/BUILD

+ rm -rf /var/tmp/comps-i386-root

+ exit 0

`/usr/src/redhat/RPMS/i386/comps-sicr.303-0.20041126.i386.rpm' -> `/distrib/scientific/303/i386/sites/sicr/base/comps.rpm'

scientific#

 

 

cd ../build/isolinux

 

    <modify files in "build/isolinux" as described in "build/isolinux/README"

    NOTE that this is <tree>/sites/$SITE/build/isolinux and NOT

    <tree>/isolinux/ >

 

cd ../scripts

 

    <modify "locations.include" to fix TREE= and SITE= to be

    TREE=<where ever your tree is located>        # In our case it is already ok.

    SITE=newsite

    change --product string in build.release.site.sh>

 

modify rpmdb-example.spec.in

 

    < cp rpmdb-example.spec.in rpmdb-newsite.spec.in>

    < modify rpmdb-newsite.spec.in to have your newsite in it instead of example>

 

 

scientific# cd $TREE/sites/${SITE}/build/isolinux

scientific# pwd

/distrib/scientific/303/i386/sites/sicr/build/isolinux

scientific#

scientific#

scientific# ls -l

-rw-r--r--    1 root         457 Nov 26 16:27 boot.msg

-r-xr-xr-x    1 root         487 Nov 26 16:29 isolinux.cfg

-rw-r--r--    1 root        1450 Jun  8  2004 README

-rw-r--r--    1 root        4340 Mar  3  2004 splash.lss

-r-xr-xr-x    1 root         633 Sep 27 21:10 syslinux.cfg

scientific# cat README

DME

The following files should be customized so as to not confuse your site

customizations with this default example. See /usr/share/syslinux* for

more info on syslinux/isolinux.

 

boot.msg

        Change references to "Scientifc Linux" to what ever you want.

isolinux.cfg

        Change lines containing "site=example" with "site=sitename"

        where sitename is your sitename

        Change lines with url's to match your environment

        Used on boot.iso

syslinux.cfg

        Change lines containing "site=example" with "site=sitename"

        where sitename is your sitename

        Change lines with url's to match your environment

        Used on install floppy image -- bootdisk.img

scientific# vi isolinux.cfg

scientific# vi syslinux.cfg

scientific#

 

scientific# cd ../scripts

scientific# vi locations.include

      RELEASEDIR=/distrib/scientific/303/

      SITE=sicr

      VERSION=303

      PRODUCT="SICR Scientific Linux"

 

scientific# vi build.release.site.sh

      --product "Scientific Linux (sicr)

 

scientific#

scientific# cp rpmdb-example.spec.in rpmdb-sicr.spec.in

scientific# diff rpmdb-example.spec.in rpmdb-sicr.spec.in

13c13

< %define rpmdbname           example

---

> %define rpmdbname           sicr

16c16

< %define rpmdbtree           /mnt/src/scientific/30rolling

---

> %define rpmdbtree           /distrib/scientific/303

scientific#

 

 

sh make.updates.img.sh      # Need to do whenever you change contents of

                            # $TREE/sites/$SITE/RHupdates/

 

sh build.hdlist.site.sh     # Run this whenever you change contents of

                            # $TREE/sites/$SITE/Updates/

 

sh build.release.site.sh    # Only need to run this when changing installer

                            # kernel , but at least 1 time

 

<now test install with images in "$TREE/sites/$SITE/images/">

 

 

scientific# pwd

/distrib/scientific/303/i386/sites/sicr/build/scripts

scientific#

 

scientific# sh make.updates.img.sh

TREE is /distrib/scientific/303//i386

SITE is sicr

SITEDIR is sites/sicr

DEFAULT is SL

IMAGESIZE IS 77

INODES is 16

77+0 records in

77+0 records out

mke2fs 1.32 (09-Nov-2002)

/tmp/rhupdates/./iw

/tmp/rhupdates/./pixmaps

/tmp/rhupdates/./pixmaps/splash.png

/tmp/rhupdates/./pixmaps/comps

/tmp/rhupdates/./textw

102 blocks

Filesystem        1K-blocks      Used Available Use% Mounted on

/tmp/updates.img         70        57        13  82% /tmp/rhupdates

Filesystem         Inodes   IUsed   IFree IUse% Mounted on

/tmp/updates.img       16      15       1   94% /tmp/rhupdates

`/tmp/updates.img' -> `/distrib/scientific/303//i386/sites/sicr/base/updates.img'

scientific#

 

scientific# sh build.hdlist.site.sh

TREE is /distrib/scientific/303//i386

SITE is sicr

SITEDIR is sites/sicr

DEFAULT is SL

Running genhdlist now

You may see messages about duplicate packages. You should verify

that these packages are really ones you have replaced compared

to /distrib/scientific/303//i386/SL/RPMS

Your ../../base/pkgorder is out of date, making a new one

This will take quite a long time

Running genhdlist again, since we just make a new ../../base/pkgorder

scientific#

 

scientific# sh build.release.site.sh

TREE is /distrib/scientific/303//i386

SITE is sicr

SITEDIR is sites/sicr

DEFAULT is SL

warning: /distrib/scientific/303/i386/SL/RPMS/anaconda-runtime-9.1.3-3.4.SL.i386.rpm: V3 DSA signature: NOKEY, key ID a70

48f8d

Running buildinstall...

/distrib/scientific/303/i386/buildinstall.tree.9315 /distrib/scientific/303/i386/sites/sicr/build/scripts

 

... omissis ...

 

Building stage2.img

200411261712

Scientific Linux (sicr)

303

SL

sicr

sites

Running mkcramfs  /tmp/treedir.9331/instimage /tmp/instimage.img.18336

Wrote /distrib/scientific/303/i386/sites/sicr/base/stage2.img (62700k)

Writing .discinfo file

timestamp not specified; using the current time

scientific#

 

 

while <not_right_yet>

 

    <add and remove RPMS in "$TREE/sites/$SITE/Updates" to customize as you want>

 

    <run $TREE/sites/$SITE/build/scripts/build.hdlist.site.sh after each

    batch of changes>

 

    <modify $TREE/sites/$SITE/base/comps.xml.main and run

    $TREE/sites/$SITE/base/scripts/cp.comps.xml.main.sh when you want to move

    these changes over as your "real comps.xml">

 

    <test with install images in $TREE/sites/$SITE/images/, only need to

    rebuild these when installer kernel changes or anaconda rpms change

    and you want to include those changes

    Note that anaconda python script changes can be placed in

    $TREE/sites/$SITE/RHupdates/ , this makes testing easier, they do

    NOT have to be put in the anaconda rpms unless that is what you want>

 

end

 

    <After you are happy. There are a few scripts that should be run that

    create a rpm that contain info about all the other rpms. This is why

    it should be done at the end. It does not hurt to run it more it

    just takes time.>

 

cd $TREE/$ARCH/sites/newsite/build/scripts

make.rpmdb-site.sh

 

 

scientific# pwd

/distrib/scientific/303/i386/sites/sicr/build/scripts

scientific#

 

scientific# ./make.rpmdb-site.sh

TREE is /distrib/scientific/303//i386

SITE is sicr

SITEDIR is sites/sicr

DEFAULT is SL

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.816

+ umask 022

 

... omissis ...

 

Wrote: /usr/src/redhat/SRPMS/rpmdb-sicr-303-0.20041129.src.rpm

Wrote: /usr/src/redhat/RPMS/i386/rpmdb-sicr-303-0.20041129.i386.rpm

Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.50600

+ umask 022

+ cd /usr/src/redhat/BUILD

+ rm -rf /var/tmp/rpmdb-sicr-303-0.20041129-root

+ exit 0

rm: cannot lstat `../../Updates/rpmdb-sicr*.i386.rpm': No such file or directory

`/usr/src/redhat/RPMS/i386/rpmdb-sicr-303-0.20041129.i386.rpm' -> `../../Updates/rpmdb-sicr-303-0.20041129.i386.rpm'

TREE is /distrib/scientific/303//i386

SITE is sicr

SITEDIR is sites/sicr

DEFAULT is SL

Running genhdlist now

You may see messages about duplicate packages. You should verify

that these packages are really ones you have replaced compared

to /distrib/scientific/303//i386/SL/RPMS

Your ../../base/pkgorder is out of date, making a new one

This will take quite a long time

Running genhdlist again, since we just make a new ../../base/pkgorder

scientific#

 

 

    <I have also included a script to make cd isos. The created isos are

    placed in $TREE/$ARCH/sites/newsite/iso/. Verify that you have at

    least 650MB x 4 disk space free there.>

 

cd buildisoimages

make.cdisos.sh

 

    <I have created a script that will build everything. It asks if you

    want to build install images and cd iso images. It calls all the

    other scripts and thus makes sure that all things have been built.

    It is located in

 

        $TREE/$ARCH/sites/newsite/build/scripts

 

    make.everything.sh

 

scientific# cd $TREE/$ARCH/sites/sicr/build/scripts

scientific# pwd

/distrib/scientific/303/i386/sites/sicr/build/scripts

scientific#

 

scientific# ./make.everything.sh

TREE is /distrib/scientific/303//i386

SITE is sicr

SITEDIR is sites/sicr

DEFAULT is SL

Do you want to build new install images? y or n

y

Do you want to build cd iso images? y or n

y

You indicated you wanted to make new install images, making them now.

Your new install images will be in ../../images/

Creating hdlist now

 

... omissis ...

 

  84.98% done, estimate finish Mon Nov 29 13:01:21 2004

  90.64% done, estimate finish Mon Nov 29 13:01:19 2004

  96.31% done, estimate finish Mon Nov 29 13:01:21 2004

Total translation table size: 0

Total rockridge attributes bytes: 14761

Total directory bytes: 45056

Path table size(bytes): 254

Done with: The File(s)                   Block(s)    88044

Writing:    Ending Padblock              Start Block 88116

Done with:  Ending Padblock              Block(s)    150

Max brk space used 21000

88266 extents written (172 MB)

implanting md5sum in disc4 now

Inserting md5sum into iso image...

md5 = 3a6091862961214646ac753952a3413a

Setting supported flag to 0

Making md5sums now, this will take a while

scientific#

 

 

     >

 

If you have any questions about this procedure please send me email.

 

Sul server scientific.roma1.infn.it è ora disponibile la nuova distribuzione Scientific Linux 3.0.3. sicr.

 

Ultima operazione da compiere è la creazione di un link logico, come di seguito descritto:

 

 

scientific# cd /distrib/scientific/303/i386/

scientific#

 

scientific# ln -s sites/sicr sicr

scientific#

 

 

 

 

Last update: 11 gennaio 2005

Daniela Anzellotti