freedombone-image-vmdebootstrap 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/sh
  2. #
  3. # .---. . .
  4. # | | |
  5. # |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
  6. # | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
  7. # ' ' --' --' -' - -' ' ' -' -' -' ' - --'
  8. #
  9. # Freedom in the Cloud
  10. #
  11. # Apply patches to vmdebootstrap. Based on a script from freedom-maker
  12. #
  13. # License
  14. # =======
  15. #
  16. # This program is free software: you can redistribute it and/or modify
  17. # it under the terms of the GNU Affero General Public License as published by
  18. # the Free Software Foundation, either version 3 of the License, or
  19. # (at your option) any later version.
  20. #
  21. # This program is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. # GNU Affero General Public License for more details.
  25. #
  26. # You should have received a copy of the GNU Affero General Public License
  27. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  28. PROJECT_NAME='freedombone'
  29. export TEXTDOMAIN=${PROJECT_NAME}-image-vmdebootstrap
  30. export TEXTDOMAINDIR="/usr/share/locale"
  31. mkdir -p vendor
  32. if [ -d vendor/vmdebootstrap ] ; then
  33. (cd vendor/vmdebootstrap; git checkout .; git pull)
  34. else
  35. git clone git://git.liw.fi/vmdebootstrap vendor/vmdebootstrap
  36. fi
  37. if [ ! -d /usr/share/distro-info ]; then
  38. sudo mkdir -p /usr/share/distro-info
  39. cat <<EOF > /tmp/debian.csv
  40. version,codename,series,created,release,eol
  41. 1.1,Buzz,buzz,1993-08-16,1996-06-17,1997-06-05
  42. 1.2,Rex,rex,1996-06-17,1996-12-12,1998-06-05
  43. 1.3,Bo,bo,1996-12-12,1997-06-05,1999-03-09
  44. 2.0,Hamm,hamm,1997-06-05,1998-07-24,2000-03-09
  45. 2.1,Slink,slink,1998-07-24,1999-03-09,2000-10-30
  46. 2.2,Potato,potato,1999-03-09,2000-08-15,2003-07-30
  47. 3.0,Woody,woody,2000-08-15,2002-07-19,2006-06-30
  48. 3.1,Sarge,sarge,2002-07-19,2005-06-06,2008-03-30
  49. 4.0,Etch,etch,2005-06-06,2007-04-08,2010-02-15
  50. 5.0,Lenny,lenny,2007-04-08,2009-02-14,2012-02-06
  51. 6.0,Squeeze,squeeze,2009-02-14,2011-02-06,2014-05-31
  52. 7,Wheezy,wheezy,2011-02-06,2013-05-04
  53. 8,Jessie,jessie,2013-05-04,2015-04-25
  54. 9,Stretch,stretch,2015-04-25
  55. 10,Buster,buster,2018-07-01
  56. ,Sid,sid,1993-08-16
  57. ,Experimental,experimental,1993-08-16
  58. EOF
  59. sudo mv /tmp/debian.csv /usr/share/distro-info/
  60. fi
  61. cd vendor/vmdebootstrap
  62. git checkout tags/vmdebootstrap-0.8 -b tags/vmdebootstrap-0.8
  63. for f in ../../vendor-patches/vmdebootstrap/* ; do
  64. echo applying $(basename $f)
  65. patch -p1 < $f
  66. done