#!/bin/sh
# This script should be launched from the place where the index.html will
# be generated
# This is where the main index.html should be seen at
URL="http://debian.lipn.fr"
# This is the title of the index.html
TITLE="Debian repositories hosted at LIPN"
# This is the name of the keyring package. If none does exist, set to ''
# A file by the name $KEYRING.key (or $KEYRING.$dist.key) should exist in
# the toplevel directory. If $KEYRING.$dist.key does exist, it takes precedence
# over $KEYRING.key
# This keyring file should contain the signatures
KEYRING="lipn-archive-keyring"
# This string will be echo'ed after the key description
MOREDETAILS="This key is used only for this purpose and should be signed by key 38D092B4 (you can find some details here)."
# This is added to URL to link to the top of the repository
DEBIANARCHIVEURL="debian"
# This is the file path to reach the top of the repository.
DEBIANARCHIVEPATH="debian"
# This is at the footer
CONTACT="Please contact Jean-Christophe Dubacq if you find any problem with these pages.
Page generated by this program."
# This is specific distribution information
DISTINFO="lenny:
This distribution may also contain packages that compile only for lenny-backports. In this case, you will need to use backports (esp. debhelper) from Debian backports.
" # LICENSE FOR this file # ================================ # This notice is a simplified BSD license. # Copyright 2010 Jean-Christophe Dubacq. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # THIS SOFTWARE IS PROVIDED BY JEAN-CHRISTOPHE DUBACQ ``AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JEAN-CHRISTOPHE DUBACQ OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # The views and conclusions contained in the software and documentation # are those of the authors and should not be interpreted as representing # official policies, either expressed or implied, of Jean-Christophe Dubacq. header_html() { cat << EOF EOF TITLE=$(echo "$TITLE"|recode utf8..html) echo "Home. Regenerated $(date +on\ %Y-%m-%d\ at\ %H:%M). $CONTACT
" echo '' echo '' } boilerplate() { if [ -f "${KEYRING}-${dist}.key" ]; then KR="${KEYRING}-${dist}" else if [ -f "${KEYRING}.key" ]; then KR="${KEYRING}" else return fi fi # extract info from key GNUPGHOME=txt/gpg.$KR [ -d $GNUPGHOME ] || mkdir $GNUPGHOME chmod 700 $GNUPGHOME export GNUPGHOME [ -f $GNUPGHOME/pubring.gpg ] || gpg --quiet --no-options --batch --import "${KR}.key" 2>&1 KEYS=$(gpg --list-keys --with-colons|grep ^pub|cut -f5 -d:) OWNER=$(gpg --list-keys --with-colons|grep ^pub|cut -f10 -d:|sed -e 's/[ ]*$//g') LONGFINGERPRINT=$(gpg --list-keys --with-colons|grep ^pub|cut -f5 -d:) echo "All these packages are signed with a gpg key. The key ID (${LONGFINGERPRINT}) corresponds to the hosting provider (${OWNER}). ${MOREDETAILS}
if apt-get update gives you warning about an unverified key such as NO_PUBKEY ${LONGFINGERPRINT}, you can get it with (for example):
gpg --keyserver wwwkeys.eu.pgp.net --recv-key ${LONGFINGERPRINT}"
echo "gpg --export --armor ${LONGFINGERPRINT} | sudo apt-key add -"
echo "Another possibility is to download the key file from this server and to type sudo apt-key add ${KR}.key.
Note that you should really read the documentation about apt-key and gpg if you are concerned (and you should) by security and you do not understand what you do with the two lines above.
" echo "You should also install the $KR package from this repository, but you will run into the chicken-and-egg problem if you skip the above indications.
" echo "You can examine the pool.
" if [ ! -d "${DEBIANARCHIVEPATH}/dists/$dist" ]; then cat << EOFThis distribution is empty for all architectures!
You can find information about this release. Please refer to it as such (for architectures $NORMALARCHES):
" echo "deb $URL $dist $DistComponents" TREATSOURCE=0 if [ -n "$(echo $DistArchitectures|grep source)" ]; then TREATSOURCE=1 echo "deb-src $URL $dist $DistComponents" fi echo "" if [ $(echo "$DISTINFO"|grep ^$dist: |wc -l) -gt 0 ]; then echo "$DISTINFO"|grep ^$dist:|cut -f2- -d: fi for component in $DistComponents; do treat_component done touch txt/notsourceless_${dist} (cut -f1 -d% txt/list.binary_$dist|LANG=C sort -u;cat txt/notsourceless_${dist} txt/notsourceless_${dist})|LANG=C sort| uniq -u > txt/sourceless_${dist} if [ $(stat -c%s "txt/sourceless_${dist}") -gt 0 ]; then echo '
" cat txt/binary%${version}.txt |sed -ne '/^Description:/,/^[^ ]/ b lab' -e 'd' -e ':lab' -e '/^[^ ]/ d' -e 's/^ [.]$/<\/p>
/g' -e 'p' echo "