We had a release of Debian Policy near the beginning of last month but there hasn’t been much activity since then. Please consider writing or reviewing patches for some of these bugs.
Consensus has been reached and help is needed to write a patch
#273093 document interactions of multiple clashing package diversions
#314808 Web applications should use /usr/share/package, not /usr/share/doc/…
#425523 Describe error unwind when unpacking a package fails
#452393 Clarify difference between required and important priorities
#556015 Clarify requirements for linked doc directories
#578597 Recommend usage of dpkg-buildflags to initialize CFLAGS and al.
#582109 document triggers where appropriate
#685506 copyright-format: new Files-Excluded field
#757760 please document build profiles
#759316 Document the use of /etc/default for cron jobs
#761219 document versioned Provides
Wording proposed, awaiting review from anyone and/or seconds by DDs
#582109 document triggers where appropriate
#737796 copyright-format: support Files: paragraph with both abbreviated na…
#756835 Extension of the syntax of the Packages-List field.
#786470 [copyright-format] Add an optional “License-Grant” field
#835451 Building as root should be discouraged
#846970 Proposal for a Build-Indep-Architecture: control file field
#864615 please update version of posix standard for scripts (section 10.4)
#897217 Vcs-Hg should support -b too
Merged for the next release
#896749 footnote of 3.3 lists deprecated alioth mailinglist URL
Introduction
I wanted to set up my own apt repository to distribute packages to my own computers. This repository must be PGP-signed, but I want to use my regular PGP key rather than a PGP key stored on the server, because I don’t want to trust my server with root access to my laptop.
Further, I want to be able to add to my repo while offline, rather than dputting .changes files to my server.
The standard tools, mini-dinstall and reprepro, are designed to be executed on the same machine that will serve the apt repository. To satisfy the above, though, I need to be able to execute the repository generator offline, on my laptop.
Two new features of git-annex, git-annex-export and v6 repositories, can allow us to execute the repository generator offline and then copy the contents of the repository to the server in an efficient way.
(v6 repositories are not production-ready but the data in this repo is replaceable: I backup the reprepro config files, and the packages can be regenerated from the (d)git repositories containing the source packages.)
Schematic instructions
This should be enough to get you going if you have some experience with git-annex and reprepro.
In the following, athena
is a host I can ssh to. On that host,
I assume that Apache is set up to serve /srv/debian
as the apt
repository, with .htaccess rules to deny access to the conf/
and
db/
subdirectories and to enable the following of symlinks.
apt-get install git-annex reprepro
git init
a new git repository on laptop.- Create
conf/distributions
,conf/options
,conf/do-sync.sh
and.gitattributes
per below. - Create other files such as README, sample foo.list, etc. if desired.
git add
the various plain text files we just created and commit.git annex init --version=6
.- Add an origin remote,
git config remote.origin.annex-ignore true
andgit push -u origin master git-annex
. I.e. store repository metadata somewhere. git config --local annex.thin true
to save disc space.git config --local annex.addunlocked true
so that reprepro can modify files.- Tell git-annex about the /srv/debian directory on athena:
git annex initremote athena type=rsync rsyncurl=athena:/srv/debian autoenable=true exporttree=yes encryption=none
- Tell git-annex that the /srv/debian directory on athena should
track the contents of the master branch:
git annex export --fast --to=athena --tracking master
- Now you can
reprepro include foo.changes
,reprepro export
and git annex should do the rest: thedo-sync.sh
script callsgit annex sync
and gitannex knows that it should export the repo to /srv/debian on athena when told to sync.
Files
conf/distributions
is an exercise for the reader – this is standard
reprepro stuff.
conf/options
:
endhook do-sync.sh
conf/do-sync.sh
:
#!/bin/sh
git annex add
git annex sync --content
.gitattributes
:
* annex.largefiles=anything
conf/* annex.largefiles=nothing
README annex.largefiles=nothing
\.gitattributes annex.largefiles=nothing
These git attributes tell git-annex to annex all files except the plain text config files, which are just added to git.
Bugs
I’m not sure whether these are fixable in git-annex-export, or not. Both can be worked around with hacks/scripts on the server.
reprepro exportsymlinks
won’t work to create suite symlinks: git-annex-export will create plain files instead of symlinks.git-annex-exports exports non-annexed files in git, such as README, as readable only by their owner.