variables 2.5 KB

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