freedombone-image-vmdebootstrap 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #!/bin/sh
  2. # _____ _ _
  3. # | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
  4. # | __| _| -_| -_| . | . | | . | . | | -_|
  5. # |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
  6. #
  7. # Freedom in the Cloud
  8. #
  9. # Apply patches to vmdebootstrap. Based on a script from freedom-maker
  10. #
  11. # License
  12. # =======
  13. #
  14. # This program is free software: you can redistribute it and/or modify
  15. # it under the terms of the GNU Affero General Public License as published by
  16. # the Free Software Foundation, either version 3 of the License, or
  17. # (at your option) any later version.
  18. #
  19. # This program is distributed in the hope that it will be useful,
  20. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. # GNU Affero General Public License for more details.
  23. #
  24. # You should have received a copy of the GNU Affero General Public License
  25. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  26. PROJECT_NAME='freedombone'
  27. export TEXTDOMAIN=${PROJECT_NAME}-image-vmdebootstrap
  28. export TEXTDOMAINDIR="/usr/share/locale"
  29. VMDEBOOTSTRAP_REPO="https://github.com/bashrc/vmdebootstrap"
  30. VMDEBOOTSTRAP_BRANCH="bashrc/${PROJECT_NAME}"
  31. mkdir -p vendor
  32. if [ -d vendor/vmdebootstrap ] ; then
  33. (cd vendor/vmdebootstrap || exit 246824624; git checkout .; git pull)
  34. else
  35. git clone $VMDEBOOTSTRAP_REPO vendor/vmdebootstrap
  36. fi
  37. if [ ! -d /usr/share/distro-info ]; then
  38. sudo mkdir -p /usr/share/distro-info
  39. fi
  40. if [ ! -f /usr/share/distro-info/debian.csv ]; then
  41. sudo mkdir -p /usr/share/distro-info
  42. cat <<EOF > /tmp/debian.csv
  43. version,codename,series,created,release,eol
  44. 1.1,Buzz,buzz,1993-08-16,1996-06-17,1997-06-05
  45. 1.2,Rex,rex,1996-06-17,1996-12-12,1998-06-05
  46. 1.3,Bo,bo,1996-12-12,1997-06-05,1999-03-09
  47. 2.0,Hamm,hamm,1997-06-05,1998-07-24,2000-03-09
  48. 2.1,Slink,slink,1998-07-24,1999-03-09,2000-10-30
  49. 2.2,Potato,potato,1999-03-09,2000-08-15,2003-07-30
  50. 3.0,Woody,woody,2000-08-15,2002-07-19,2006-06-30
  51. 3.1,Sarge,sarge,2002-07-19,2005-06-06,2008-03-30
  52. 4.0,Etch,etch,2005-06-06,2007-04-08,2010-02-15
  53. 5.0,Lenny,lenny,2007-04-08,2009-02-14,2012-02-06
  54. 6.0,Squeeze,squeeze,2009-02-14,2011-02-06,2014-05-31
  55. 7,Wheezy,wheezy,2011-02-06,2013-05-04
  56. 8,Jessie,jessie,2013-05-04,2015-04-25
  57. 9,Stretch,stretch,2015-04-25
  58. 10,Buster,buster,2018-07-01
  59. ,Sid,sid,1993-08-16
  60. ,Experimental,experimental,1993-08-16
  61. EOF
  62. sudo mv /tmp/debian.csv /usr/share/distro-info/
  63. fi
  64. if [ ! -f /usr/share/distro-info/ubuntu.csv ]; then
  65. cat <<EOF > /tmp/ubuntu.csv
  66. version,codename,series,created,release,eol,eol-server
  67. 4.10,Warty Warthog,warty,2004-03-05,2004-10-20,2006-04-30
  68. 5.04,Hoary Hedgehog,hoary,2004-10-20,2005-04-08,2006-10-31
  69. 5.10,Breezy Badger,breezy,2005-04-08,2005-10-12,2007-04-13
  70. 6.06 LTS,Dapper Drake,dapper,2005-10-12,2006-06-01,2009-07-14,2011-06-01
  71. 6.10,Edgy Eft,edgy,2006-06-01,2006-10-26,2008-04-25
  72. 7.04,Feisty Fawn,feisty,2006-10-26,2007-04-19,2008-10-19
  73. 7.10,Gutsy Gibbon,gutsy,2007-04-19,2007-10-18,2009-04-18
  74. 8.04 LTS,Hardy Heron,hardy,2007-10-18,2008-04-24,2011-05-12,2013-05-09
  75. 8.10,Intrepid Ibex,intrepid,2008-04-24,2008-10-30,2010-04-30
  76. 9.04,Jaunty Jackalope,jaunty,2008-10-30,2009-04-23,2010-10-23
  77. 9.10,Karmic Koala,karmic,2009-04-23,2009-10-29,2011-04-29
  78. 10.04 LTS,Lucid Lynx,lucid,2009-10-29,2010-04-29,2013-05-09,2015-04-29
  79. 10.10,Maverick Meerkat,maverick,2010-04-29,2010-10-10,2012-04-10
  80. 11.04,Natty Narwhal,natty,2010-10-10,2011-04-28,2012-10-28
  81. 11.10,Oneiric Ocelot,oneiric,2011-04-28,2011-10-13,2013-05-09
  82. 12.04 LTS,Precise Pangolin,precise,2011-10-13,2012-04-26,2017-04-26
  83. 12.10,Quantal Quetzal,quantal,2012-04-26,2012-10-18,2014-05-16
  84. 13.04,Raring Ringtail,raring,2012-10-18,2013-04-25,2014-01-27
  85. 13.10,Saucy Salamander,saucy,2013-04-25,2013-10-17,2014-07-17
  86. 14.04 LTS,Trusty Tahr,trusty,2013-10-17,2014-04-17,2019-04-17
  87. 14.10,Utopic Unicorn,utopic,2014-04-17,2014-10-23,2015-07-23
  88. 15.04,Vivid Vervet,vivid,2014-10-23,2015-04-23,2016-01-23
  89. 15.10,Wily Werewolf,wily,2015-04-23,2015-10-22,2016-07-22
  90. 16.04 LTS,Xenial Xerus,xenial,2015-10-22,2016-04-21,2021-04-21
  91. 16.10,Yakkety Yak,yakkety,2016-04-21,2016-10-20,2017-07-20
  92. EOF
  93. sudo mv /tmp/ubuntu.csv /usr/share/distro-info/
  94. fi
  95. cd vendor/vmdebootstrap || exit 2648726446
  96. git checkout $VMDEBOOTSTRAP_BRANCH