Metapackages and Apt Repository¶
Building Metapackages¶
On the advice of John Stumpo, we have moved from equivs to debuild for package
creation. A basic metapackage is very easy to create under this system, but we
still aren’t really documenting them properly. All of our metapackages are in
the source package
/afs/acm.jhu.edu/group/admins/metapackages/jhuacm-metapackages
; any file you
might want to edit will be found in the debian
subdirectory.
Creating Packages:¶
To create a new metapackage, just open the control file and add new Package
,
Architecture
, Depends
, and Description
stanzas, plus others
appropriate to the package.
Building Packages:¶
Running the build.sh
script in the debian
directory will build all
packages and log the output to buildlog.txt
. Your package will be built in
the top metapackages
directory. Do remember to update the version number in
changelog
, though, otherwise reprepro (see below) will be sad.
Once built, you could just run dpkg -i $PACKAGE.deb
but you probably
want to add your packages to our apt repository.
Apt Repository¶
To simplify the installation of the metapackages, we’ve created an apt repository, served out of a mirrors volume (and also available via the web): file:///afs/acm.jhu.edu/mirror/jhuacm/repos/debian .
The repository is currently maintained using Reprepro (see Debian wiki
documentation at https://wiki.debian.org/SettingUpSignedAptRepositoryWithReprepro).
I set up the GPG keys on Magellan; they should be exported into please-do-
not-read-… (I think I did this but I may have exported the wrong key).
You can log into magellan and descend into the root of the debian repository
and run reprepro
commands (though you will need to use the -b flag). For
example, to add a new package:
reprepro includedeb jessie /afs/acm.jhu.edu/group/admins/metapackages/$PACKAGE_NAME/*.deb
To add all metapackages in the jhuacm-metapackages
directory, just run
updateDeb.sh
in /afs/acm.jhu.edu/mirror/.jhuacm/repos/debian
with your
admin hat on. This will do the right thing. If you want to add a metapackage
located somewhere else, copy the first command in that script and adjust
accordingly.
The mirrors are served across the web at http://mirrors.acm.jhu.edu/jhuacm/repos/debian.
Installing the Repository:¶
We provide a sources.list file for debian-jessie. You can install it using the following commands (ran as root):
wget -O - http://mirrors.acm.jhu.edu/jhuacm/repos/debian/jhuacm.gpg.key |apt-key add -
wget -P /etc/apt/sources.list.d http://mirrors.acm.jhu.edu/jhuacm/repos/debian/jhuacm.list
Then run an apt-get update.
For debian versions that aren’t jessie, just change “jessie” in jhuacm.list to whatever the right thing is.