Ignore:
Timestamp:
2015-01-28T17:17:30+13:00 (9 years ago)
Author:
Jeremy Symon
Message:

Addded ReadMe files containing setup instructions for all package managers

Location:
main/trunk/package-kits/linux/repos
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/package-kits/linux/repos/apt

    r29691 r29697  
    2626        mkdir -p $conf || exit 1
    2727        echo
    28         if test -f $base/gpg.key.id; then
    29             keyid=$(cat $base/gpg.key.id)
    30         else
    31             gpg --list-keys
    32             echo "Enter the keyid of the GPG key to use:"
    33             while test -z $keyid; do
    34                 echo -n "> "
    35                 read keyid
    36             done
    37             echo $keyid > $base/gpg.key.id
    38             echo
    39         fi
     28        keyid=$(get_gpg)
    4029        echo "Making reprepro distributions file"
    4130        echo "\
     
    5342ask-passphrase" | write $conf/options
    5443        echo
    55         echo "Making sources.list file"
    56         echo "deb http://$domain/repos/apt $codename main" | write "$repos/apt/sources.list"
     44        echo "Making ReadMe file"
     45        echo "\
     46$setup_cmd_instruction
     47
     48  echo 'deb http://$domain/repos/apt $codename main' > /etc/apt/sources.list.d/greenstone.list
     49  curl -L 'http://$domain/repos/gpg.key' | apt-key add -
     50  apt-get update
     51
     52$install_cmd_instruction
     53
     54  sudo apt-get install greenstone
     55" > $repos/apt/ReadMe
    5756        ;;
    5857    add)
  • main/trunk/package-kits/linux/repos/conf.sh

    r29690 r29697  
    77base=$(dirname $0)
    88repos=$base/repos
     9setup_cmd_instruction="To use this repository, run the following commands in a terminal as root:"
     10install_cmd_instruction="You should now be able to install greenstone packages with:"
    911
    1012y() {
     
    3537    fi
    3638}
     39
     40get_gpg() {
     41    if test -f $base/gpg.key.id; then
     42        keyid=$(cat $base/gpg.key.id)
     43    else
     44        gpg --list-keys >&2
     45        echo "Enter the keyid of the GPG key to use:" >&2
     46        while test -z $keyid; do
     47            echo -n "> " >&2
     48            read keyid
     49        done
     50        echo $keyid > $base/gpg.key.id
     51        echo >&2
     52    fi
     53    echo $keyid
     54}
  • main/trunk/package-kits/linux/repos/pacman

    r29691 r29697  
    2424            mkdir -p $repos/arch/$arch || exit 1
    2525        done
    26         echo "Making readme file"
     26        echo
     27        keyid=$(get_gpg)
     28        echo "Making ReadMe file"
    2729        echo "\
    28 To use this repository:
     30$setup_cmd_instruction
    2931
    30 1. Add the following section to your pacman.conf:
     32  (
     33  echo '[$label]'
     34  echo 'Server = http://$domain/repos/arch/\$arch'
     35  ) >> /etc/pacman.conf
     36  curl -L 'http://$domain/repos/gpg.key' | pacman-key -a -
     37  pacman-key -f $keyid
     38  pacman-key --lsign-key $keyid
     39  pacman -Syu
    3140
    32   [$label]
    33   Server = http://$domain/repos/arch/\$arch
     41$install_cmd_instruction
    3442
    35 2. Import the $label GPG public key:
    36 
    37   wget http://$domain/repos/gpg.key -O ${label}.key
    38   sudo pacman-key -a ${label}.key
    39   sudo pacman-key -f <keyid>
    40   sudo pacman-key --lsign-key <keyid>
    41 
    42 To find the <keyid>, you can run
    43 
    44   sudo pacman-key -l
    45 
    46 And find the key with uid '$origin'.
    47 It should be at the bottom, as it was just added
    48 
    49 2.1. If you don't want to import the $label GPG key, you can just prepend the
    50 following to your pacman.conf:
    51 
    52   [SigLevel = Optional]
    53 
    54 This will disable signature checking, allowing you to install packages
    55 without ensuring they originated with the Greenstone Team." > $repos/arch/readme
     43  sudo pacman -S greenstone
     44" > $repos/arch/ReadMe
    5645        ;;
    5746    add)
    58         if test -f $base/gpg.key.id; then
    59             keyid=$(cat $base/gpg.key.id)
    60         else
    61             gpg --list-keys
    62             echo "Enter the keyid of the GPG key to use:"
    63             while test -z $keyid; do
    64                 echo -n "> "
    65                 read keyid
    66             done
    67             echo $keyid > $base/gpg.key.id
    68             echo
    69         fi
     47        keyid=$(get_gpg)
    7048        repo_add_check
    7149        shift
  • main/trunk/package-kits/linux/repos/rpm

    r29692 r29697  
    2828            mkdir -p $repos/rpm/$arch || exit 1
    2929        done
    30         echo "Making repo file"
     30        echo "Making ReadMe file"
    3131        echo "\
    32 [$label]
    33 name=$origin
    34 baseurl=http://$domain/repos/rpm/\$basearch
    35 enabled=1
    36 gpgcheck=1
    37 gpgkey=http://$domain/repos/gpg.key" > "$repos/rpm/${label}.repo"
     32$setup_cmd_instruction
     33
     34  (
     35  echo '[$label]'
     36  echo 'name=$origin'
     37  echo 'baseurl=http://$domain/repos/rpm/\$basearch'
     38  echo 'enabled=1'
     39  echo 'gpgcheck=1'
     40  echo 'gpgkey=http://$domain/repos/gpg.key'
     41  ) > /etc/yum.repos.d/greenstone.repo
     42
     43$install_cmd_instruction
     44
     45  sudo yum install greenstone
     46" > $repos/rpm/ReadMe
    3847        ;;
    3948    add)
    40         if test -f $base/gpg.key.id; then
    41             keyid=$(cat $base/gpg.key.id)
    42         else
    43             gpg --list-keys
    44             echo "Enter the keyid of the GPG key to use:"
    45             while test -z $keyid; do
    46                 echo -n "> "
    47                 read keyid
    48             done
    49             echo $keyid > $base/gpg.key.id
    50             echo
    51         fi
     49        keyid=$(get_gpg)
    5250        createrepo_check
    5351        shift
Note: See TracChangeset for help on using the changeset viewer.