pisilocalayar.patch.old 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. diff -Nuar a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py
  2. --- a/src/modules/localecfg/main.py 2017-12-20 12:22:06.000000000 +0300
  3. +++ b/src/modules/localecfg/main.py 2017-12-26 21:20:05.000000000 +0300
  4. @@ -83,7 +83,7 @@
  5. locale_conf_path = os.path.join(install_path, "etc/locale.conf")
  6. with open(locale_conf_path, "w") as lcf:
  7. for k, v in locale_conf.items():
  8. - lcf.write("{!s}={!s}\n".format(k, v))
  9. + lcf.write("{!s}\n".format(v))
  10. # write /etc/default/locale if /etc/default exists and is a dir
  11. etc_default_path = os.path.join(install_path, "etc/default")
  12. diff -Nuar a/src/modules/mudur/main.py b/src/modules/mudur/main.py
  13. --- a/src/modules/mudur/main.py 1970-01-01 02:00:00.000000000 +0200
  14. +++ b/src/modules/mudur/main.py 2017-11-25 06:15:16.000000000 +0300
  15. @@ -0,0 +1,64 @@
  16. +#!/usr/bin/env python3
  17. +# -*- coding: utf-8 -*-
  18. +#
  19. +# === This file is part of Calamares - <http://github.com/calamares> ===
  20. +#
  21. +# Copyright 2014, Anke Boersma <demm@kaosx.us>
  22. +# Copyright 2015, Philip Müller <philm@manjaro.org>
  23. +#
  24. +# Calamares is free software: you can redistribute it and/or modify
  25. +# it under the terms of the GNU General Public License as published by
  26. +# the Free Software Foundation, either version 3 of the License, or
  27. +# (at your option) any later version.
  28. +#
  29. +# Calamares is distributed in the hope that it will be useful,
  30. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. +# GNU General Public License for more details.
  33. +#
  34. +# You should have received a copy of the GNU General Public License
  35. +# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
  36. +
  37. +import os
  38. +import shutil
  39. +
  40. +import libcalamares
  41. +
  42. +
  43. +
  44. +def run():
  45. +
  46. + install_path = libcalamares.globalstorage.value("rootMountPoint")
  47. +
  48. +
  49. + path = os.path.join(install_path, "etc/locale.conf")
  50. +
  51. + mloc = open(path,"r")
  52. +
  53. + languages = mloc.readline(2)
  54. +
  55. +
  56. + mudur_file_path = os.path.join(install_path, "etc/conf.d/mudur")
  57. + lines = []
  58. + for l in open(mudur_file_path, "r").readlines():
  59. + if l.strip().startswith('language=') or l.strip().startswith('# language='):
  60. + if languages == "pt":
  61. + l = 'language="pt_BR"\n'
  62. + else:
  63. + l = 'language="%s"\n' % languages
  64. + lines.append(l)
  65. +
  66. + open(mudur_file_path, "w").writelines(lines)
  67. +
  68. + if os.path.exists(os.path.join(install_path, "etc/sudoers")):
  69. + os.unlink(os.path.join(install_path, "etc/sudoers"))
  70. +
  71. +
  72. + source = os.path.join(install_path, "etc/sudoers.orig")
  73. + target = os.path.join(install_path, "etc/sudoers")
  74. +
  75. + shutil.copy(source, target)
  76. +
  77. + libcalamares.utils.target_env_call(['chmod', '440', '/etc/sudoers'])
  78. +
  79. + return None
  80. diff -Nuar a/src/modules/mudur/module.desc b/src/modules/mudur/module.desc
  81. --- a/src/modules/mudur/module.desc 1970-01-01 02:00:00.000000000 +0200
  82. +++ b/src/modules/mudur/module.desc 2016-05-09 14:24:30.000000000 +0300
  83. @@ -0,0 +1,5 @@
  84. +---
  85. +type: "job"
  86. +name: "mudur"
  87. +interface: "python"
  88. +script: "main.py"
  89. diff -Nuar a/src/modules/sil/main.py b/src/modules/sil/main.py
  90. --- a/src/modules/sil/main.py 1970-01-01 02:00:00.000000000 +0200
  91. +++ b/src/modules/sil/main.py 2017-12-31 15:05:16.622215846 +0300
  92. @@ -0,0 +1,53 @@
  93. +#!/usr/bin/env python3
  94. +# -*- coding: utf-8 -*-
  95. +#
  96. +# === This file is part of Calamares - <http://github.com/calamares> ===
  97. +#
  98. +# Copyright 2014, Anke Boersma <demm@kaosx.us>
  99. +# Copyright 2015, Philip Müller <philm@manjaro.org>
  100. +#
  101. +# Calamares is free software: you can redistribute it and/or modify
  102. +# it under the terms of the GNU General Public License as published by
  103. +# the Free Software Foundation, either version 3 of the License, or
  104. +# (at your option) any later version.
  105. +#
  106. +# Calamares is distributed in the hope that it will be useful,
  107. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  108. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  109. +# GNU General Public License for more details.
  110. +#
  111. +# You should have received a copy of the GNU General Public License
  112. +# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
  113. +
  114. +import os
  115. +import shutil
  116. +
  117. +import libcalamares
  118. +
  119. +
  120. +
  121. +
  122. +def run():
  123. +
  124. + install_path = libcalamares.globalstorage.value("rootMountPoint")
  125. +
  126. +
  127. + path = os.path.join(install_path, "etc/calamares")
  128. + if os.path.exists(path):
  129. + shutil.rmtree(path)
  130. + path1 = os.path.join(install_path, "usr/lib/calamares")
  131. + if os.path.exists(path1):
  132. + shutil.rmtree(path1)
  133. + path2 = os.path.join(install_path, "usr/bin/calamares")
  134. + if os.path.exists(path2):
  135. + os.remove(path2)
  136. + path3 = os.path.join(install_path, "usr/share/man/man8/calamares.8")
  137. + if os.path.exists(path3):
  138. + os.remove(path3)
  139. + path4 = os.path.join(install_path, "usr/share/applications/calamares.desktop")
  140. + if os.path.exists(path4):
  141. + os.remove(path4)
  142. + path5 = os.path.join(install_path, "usr/share/calamares")
  143. + if os.path.exists(path5):
  144. + shutil.rmtree(path5)
  145. + return None
  146. diff -Nuar a/src/modules/sil/module.desc b/src/modules/sil/module.desc
  147. --- a/src/modules/sil/module.desc 1970-01-01 02:00:00.000000000 +0200
  148. +++ b/src/modules/sil/module.desc 2017-12-26 21:21:52.000000000 +0300
  149. @@ -0,0 +1,5 @@
  150. +---
  151. +type: "job"
  152. +name: "sil"
  153. +interface: "python"
  154. +script: "main.py"