summaryrefslogtreecommitdiff
path: root/config/initializers/constants.rb
blob: fa6ed2ae480a48068acd55958a01cf239a4ae7fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# DownloadsController
VALID_RELEASE_ARCHES   = ['armv7h' , 'i686' , 'x86_64']
VALID_RELEASE_INITS    = ['openrc' , 'systemd'        ]
VALID_RELEASE_WMDES    = ['cli' , 'lxde' , 'talking'  ]
VALID_RELEASE_INSTALLS = ['complete' , 'netinstall'   ]
RELEASES_DIRNAME       = 'iso'
PREVIEWS_DIRNAME       = 'iso-nightly'
RELEASES_DIR           = "/srv/repo/main/#{RELEASES_DIRNAME}"
PREVIEWS_DIR           = "/srv/repo/http/#{PREVIEWS_DIRNAME}"
RELEASES_GLOB          = '/*/parabola-*image.img.sig'
PREVIEWS_GLOB          = '/*/parabola-*.sig'
SIGS_REGEX             = /.*\/([^\/]+\/parabola-.+).sig/
RELEASES_URL           = "https://redirector.parabola.nu/#{RELEASES_DIRNAME}"
PREVIEWS_URL           = "https://repo.parabola.nu/#{PREVIEWS_DIRNAME}"
DOWNLOADS_URL          = 'https://www.parabola.nu/download'
IMAGE_OPTIONS          =
[
  {
    :id      => :arch          ,
    :prompt  => 'Architecture' ,
    :default => 'x86_64'       ,
    :options =>
    [
      { :id => 'armv7h' , :label => 'armv7h' , :desc => "32-bit single-board computers" } ,
      { :id => 'i686'   , :label => 'i686'   , :desc => "32-bit desktops and laptops"   } ,
      { :id => 'x86_64' , :label => 'x86_64' , :desc => "64-bit desktops and laptops"   }
    ]
  } ,
  {
    :id      => :init         ,
    :prompt  => 'Init-System' ,
    :default => 'systemd'     ,
    :options =>
    [
      { :id => 'openrc'  , :label => 'OpenRC'  , :desc => "non-systemd init-system"   } ,
      { :id => 'systemd' , :label => 'SystemD' , :desc => "standard Arch init-system" }
    ]
  } ,
  {
    :id      => :wmde                   ,
    :prompt  => 'Graphical Environment' ,
    :default => 'lxde'                  ,
    :options =>
    [
      { :id => 'cli'     , :label => 'CLI'     , :desc => "command-line only"       } ,
      { :id => 'lxde'    , :label => 'LXDE'    , :desc => "graphical desktop"       } ,
      { :id => 'talking' , :label => 'Talking' , :desc => "TTS and braille enabled" }
    ]
  } ,
  {
    :id      => :install     ,
    :prompt  => 'Install'    ,
    :default => 'netinstall' ,
    :options =>
    [
      { :id => 'complete'   , :label => 'Complete'   , :desc => "fast install, online or offline" } ,
      { :id => 'netinstall' , :label => 'NetInstall' , :desc => "slow install, internet required" }
    ]
  }
]
MIRRORS =
[
  {
    :domain   => 'dotsrc.org'                              ,
    :isos_url => 'https://mirrors.dotsrc.org/parabola/iso' ,
    :location => 'Aalborg, Denmark'
  } ,
  {
    :domain   => 'cyberbits.eu'                             ,
    :isos_url => 'https://mirror.cyberbits.eu/parabola/iso' ,
    :location => 'Roubaix, France'
  } ,
  {
    :domain   => 'grapentin.org'                              ,
    :isos_url => 'https://mirror.grapentin.org/parabola/iso/' ,
    :location => 'Falkenstein, Germany'
  } ,
  {
    :domain   => 'isacdaavid.info'                       ,
    :isos_url => 'https://parabola.isacdaavid.info/iso/' ,
    :location => 'Amsterdam, Netherlands'
  } ,
  {
    :domain   => 'jeweet.net'                           ,
    :isos_url => 'https://jeweet.net/repo/parabola/iso' ,
    :location => 'Volendam, Netherlands'
  } ,
  {
    :domain   => 'uwaterloo.ca'                                    ,
    :isos_url => 'https://mirror.csclub.uwaterloo.ca/parabola/iso' ,
    :location => 'Toronto, Ontario'
  } ,
  {
    :domain   => 'yandex.ru'                                      ,
    :isos_url => 'https://mirror.yandex.ru/mirrors/parabola/iso/' ,
    :location => 'Moscow, Russian Federation'
  } ,
  {
    :domain   => 'infania.net'                                 ,
    :isos_url => 'https://ftpmirror1.infania.net/parabola/iso' ,
    :location => 'Borås, Sweden'
  } ,
  {
    :domain   => 'linux.pizza'                             ,
    :isos_url => 'https://mirror.linux.pizza/parabola/iso' ,
    :location => 'Skövde, Sweden'
  } ,
  {
    :domain   => 'acc.umu.se'                                     ,
    :isos_url => 'https://ftp.acc.umu.se/mirror/parabola.nu/iso/' ,
    :location => 'Umeå, Sweden'
  } ,
  {
    :domain   => 'fsf.org'                              ,
    :isos_url => 'https://mirror.fsf.org/parabola/iso/' ,
    :location => 'Boston, Massachusettes'
  } ,
  {
    :domain   => 'freedif.org'                              ,
    :isos_url => 'https://mirror.freedif.org/Parabola/iso/' ,
    :location => 'Ho Chi Minh City, Vietnam'
  }
]


# User cache for IRB
HACKERS = {}
if Rails.env == 'production'
  (`/usr/lib/parabola-hackers/meta-cat --group hackers`.split "\n").each do | hacker |
    hacker = hacker.split ','
    id     = hacker[0]
    login  = hacker[1]

    HACKERS[login] = (User.where :login => login).first
  end
end