Changeset 29697
- Timestamp:
- 2015-01-28T17:17:30+13:00 (8 years ago)
- Location:
- main/trunk/package-kits/linux/repos
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/package-kits/linux/repos/apt
r29691 r29697 26 26 mkdir -p $conf || exit 1 27 27 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) 40 29 echo "Making reprepro distributions file" 41 30 echo "\ … … 53 42 ask-passphrase" | write $conf/options 54 43 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 57 56 ;; 58 57 add) -
main/trunk/package-kits/linux/repos/conf.sh
r29690 r29697 7 7 base=$(dirname $0) 8 8 repos=$base/repos 9 setup_cmd_instruction="To use this repository, run the following commands in a terminal as root:" 10 install_cmd_instruction="You should now be able to install greenstone packages with:" 9 11 10 12 y() { … … 35 37 fi 36 38 } 39 40 get_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 24 24 mkdir -p $repos/arch/$arch || exit 1 25 25 done 26 echo "Making readme file" 26 echo 27 keyid=$(get_gpg) 28 echo "Making ReadMe file" 27 29 echo "\ 28 To use this repository: 30 $setup_cmd_instruction 29 31 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 31 40 32 [$label] 33 Server = http://$domain/repos/arch/\$arch 41 $install_cmd_instruction 34 42 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 56 45 ;; 57 46 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) 70 48 repo_add_check 71 49 shift -
main/trunk/package-kits/linux/repos/rpm
r29692 r29697 28 28 mkdir -p $repos/rpm/$arch || exit 1 29 29 done 30 echo "Making repofile"30 echo "Making ReadMe file" 31 31 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 38 47 ;; 39 48 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) 52 50 createrepo_check 53 51 shift
Note:
See TracChangeset
for help on using the changeset viewer.