variables 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # -*- mode:sh -*-
  2. umask 022
  3. unset CDPATH
  4. GZIP='--rsyncable --no-name' ; export GZIP
  5. export lockdir=${lockdir:-${base}/lock/}
  6. export logdir=${logdir:-${base}/log/cron/}
  7. declare -r bindir=${base}/bin
  8. declare -r queuedir=${base}/queue/
  9. declare -r scriptdir=${base}/scripts
  10. declare -r dbdir=${base}/database/ # debian
  11. declare -r exportdir=${base}/export/
  12. declare -r extoverridedir=${scriptdir}/external-overrides
  13. declare -r ftpdir=${base}/ftp
  14. declare -r indices=${ftpdir}/indices
  15. declare -r mirrordir=${base}/mirror/
  16. declare -r accepted=${queuedir}/accepted/
  17. declare -r newstage=${queuedir}/newstage/
  18. declare -r scriptsdir=${masterdir}/scripts/debian/
  19. stagedir=${lockdir}/stages
  20. declare -r unchecked=${queuedir}/unchecked/
  21. declare -r public=/srv/${functionname%%-*}.debian.org
  22. declare -r webdir=${public}/web # not in use on security
  23. declare -r exportpublic=${public}/rsync/export/
  24. declare -r overridedir=${scriptdir}/override # debian
  25. declare -r disembargo=$queuedir/unchecked-disembargo/ # from debian-security
  26. declare -r done=$queuedir/done/ # from debian-security
  27. TMPDIR=${base}/tmp
  28. PATH=${masterdir}:${PATH}
  29. # By default, add no timestamps to stage logs
  30. TIMESTAMP=false
  31. declare -r HOSTNAME=$(hostname -s)
  32. # where do we want mails to go? For example log entries made with error()
  33. case ${HOSTNAME} in
  34. fasolo|seger|coccia)
  35. # Yay, ftpmaster
  36. MAILTO=${MAILTO:-"ftpmaster@debian.org"}
  37. ;;
  38. *)
  39. # Not our ftpmaster host
  40. MAILTO=${MAILTO:-"root"}
  41. ;;
  42. esac
  43. if [[ ${ARG:-none} != deploy ]]; then
  44. declare -r archs=$(dak admin a list | tr '\n' ' ')
  45. # Set the database variables
  46. eval $(dak admin config db-shell)
  47. fi
  48. ########################################################################
  49. # Lockfiles used by different parts of our scripts
  50. # Various lockfiles used by multiple cron scripts
  51. # The main dinstall lock
  52. declare -r LOCK_DAILY="${lockdir}/daily.lock"
  53. # Lock unchecked queue processing
  54. declare -r LOCK_UNCHECKED="${lockdir}/unchecked.lock"
  55. # This file is simply used to indicate to britney whether or not
  56. # the Packages file updates completed sucessfully. It's not a lock
  57. # from our point of view
  58. declare -r LOCK_BRITNEY="$lockdir/britney.lock"
  59. # Lock buildd updates
  60. declare -r LOCK_BUILDD="$lockdir/buildd.lock"
  61. # Lock changelog updates
  62. declare -r LOCK_CHANGELOG="$lockdir/changelog.lock"
  63. # If this file exists we exit immediately after the currently running
  64. # function is done
  65. declare -r LOCK_STOP="${lockdir}/archive.stop"
  66. # Lock for deploying new code
  67. declare -r LOCK_DEPLOY=${LOCK_DEPLOY:-"${lockdir}/deploy"}