LCG Grid Deployment - gLite Pre Production Services - PPS-CERN Admin Procedures

APT repository

How to set up an apt repository (you need to be root and have tomcat)

Web server.

You need a web server (tomcat)

Directory structure

You must create a directory structure there e.g. for release 1.3 (a dir per release being the idea)


which would contain the following dirs

RPMS.externals RPMS.Release1.3 RPMS.SA1

The dirs RPMS.externals RPMS.Release1.3 are the glite ones, and as such contains exactly the same rpms (obtained by wgetting them), whereas RPMS.SA1 (or whatever name you decide to go for) would contain specific rpms that you may want to have in your apt repository, and that are not present in externals and Release1.3 (in this dir we used to put those rpms which were required in our base system in order to meet all the dependencies of glite).

Create the repository

Once this is done you need to "create" the repository, e.g. in the example above you would do (as root)

genbasedir --progress --flat /usr/local/apache2/htdocs/APT_REP/glite/i386/1.3 externals Release1.3 SA1

The repository is now ready (a base dir is created as a consequence with the repository information in there)

Using the repository

When using the repository you just need to create in /etc/apt/sources.list.d/ a file (e.g. glite.list) containing the following information (again referring to the example above)

rpm glite/i386/1.3 externals Release1.3 SA1

after which you just need to update the information by launching

apt-get update (followed perhaps by apt-get check as well). Notice that the http address would be your http address for the preproduction, and this must be made available somewhere (hopefully in a readily accessible way so that people do not use the glite one instead).

Quick fix

Whenever a quick fix is released you just need to wget the changes and rerun the genbasedir command to rebuild the repository.

Disk space problems

In case you run into problems with the disk space, the dir 1.3 in


can just be a link to another location (say var).

Multiple repositories

You can think of mirroring your own rep so that if one is down the other will be available.

How to create an rpm (say a meta package) in case there is the need for that

Have a look at (very well described)

Local user

Create a local user (e.g. aptmgr). Always build the rpms as this local user so you do not affect the whole system by mistake

Directory structure

For example

ls rpm_1.1/ BUILD sa1_depepndencies_ui SPECS RPMS SRPMS sa1_depepndencies SOURCES tmp

where the directory SPECS contains the various spec files.

Spec file

As an example of a spec file

%define name GLITE_WN %define version 1.1 %define release 1 %define _tmppath /home/aptmgr/rpm/tmp

Summary: WN metapackage for glite V1.1 Name: %{name} Version: %{version} Release: %{release} License: GPL Requires: glite-wn-config >= 1.1.2 4Suite perl-DateManip perl-HTML-Parser perl-H TML-Tagset perl-libwww-perl perl-libxml-enno perl-Parse-Yapp perl-URI perl-XML-E ncoding perl-XML-Parser PyXML

Group: SA1 Source0: %{name}.tar.gz : %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildRoot: %{_tmppath}/%{name}-buildroot


%prep %setup -q -c


%install rm -rf $RPM_BUILD_ROOT

%clean rm -rf $RPM_BUILD_ROOT

%files %defattr(-,root,root,-) %doc

%changelog * Fri Apr 29 2005 <> - Initial build.

Building the rpm

The command to launch once the dir structure and the spec file are ready is

rpmbuild -ba mypackage.spec

-- Main.ausai - 14 Sep 2005

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2006-04-07 - DianaBosio
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LCG All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback