summaryrefslogtreecommitdiffstats
path: root/config/auto_inst.cfg.pl
blob: 7a889ed6da551bf38f8d62e149defe1a2a686d6c (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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#!/usr/bin/perl -cw
# 
# You should check the syntax of this file before using it in an auto-install.
# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file
# (note the '#!/usr/bin/perl -cw' on the first line).

my $distro_theme = 'Default';
my $distro_release = 'Default';
my $distro_config = lc($distro_release);

my @desktops = split(/\|/, $ENV{DRAKLIVE_DESKTOP});
my $has_plasma5 = member('PLASMA5', @desktops);
my $has_gnome = member('GNOME', @desktops);
my $has_xfce = member('xfce4', @desktops);
my $has_lxde = member('LXDE', @desktops);
my $has_enlightenment = member('Enlightenment', @desktops);

$o = {
       'media' => [
           {
               type => 'media_cfg',
               url => 'drakx://media',
               selected_names => join(',',
                                      'Core Release', 'Core Updates',
                                      'Nonfree Release', 'Nonfree Updates',
                                  ),
           },
           if_($ENV{DRAKLIVE_ADDITIONAL_REPOSITORY}, 
               { type => 'media', url => $ENV{DRAKLIVE_ADDITIONAL_REPOSITORY} },
           ),
       ],
       'rpmsrate_flags_chosen' => {
           LIVE => 1,
           (map { ("CAT_$_" => 1) } (
               # office
               qw(OFFICE SPELLCHECK PIM ARCHIVING PRINTER),
               # multimedia
               qw(AUDIO VIDEO GRAPHICS),
               # internet
               qw(NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT),
               qw(NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS),
               # network
               qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE),
               qw(NETWORKING_REMOTE_ACCESS_SERVER),
               # config
               qw(CONFIG),
               # console
               qw(EDITORS TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS),
               # system
               qw(SYSTEM MINIMAL_DOCS X ACCESSIBILITY THEMES),
               if_($has_plasma5, qw(PLASMA5)),
               if_($has_gnome, qw(GNOME)),
               if_($has_xfce, qw(XFCE)),
               if_($has_lxde, qw(LXDE)),
               if_($has_enlightenment, qw(E17)),
           )),
       },
       # so that rpmsrate flags are really used
       'compssListLevel' => 5, # default from install_steps_interactive
       'skipped_packages' => [

	    # i586 arch specific
	    if_($ENV{DRAKLIVE_ARCH} eq 'i586',
		'/^kernel-desktop-/', '/^vboxadditions-kernel-4\.6\.3-desktop-/',
		'/^libatlas3-/',
	    ),

            # x86_64 arch specific
            if_($ENV{DRAKLIVE_ARCH} eq 'x86_64',
                '/^lib64atlas3-/',
            ),

            # block core stuff
            '/^kernel-server-/', '/^vboxadditions-kernel-4\.6\.3-server-/', # no server kernels
            'grub', 'lilo', # no legacy bootloaders, we default to grub2

	    # no devel packages on live media
	    'glibc-devel', 'gdb', 'gcc', 'dkms',
	    'empathy', # pulls devel stuff

	    # theese fonts adds 20-30 sec delay / font on initial execution of
	    # fontconfig cache wich is _way_ too painful on live boot (mga#17223)
	    'fonts-otf-source-han', '/^google-noto/',

           # shipped in live nonfree
	   '/^broadcom-wl-/',
           'broadcom-bcma-config', 'broadcom-ssb-config',

	    # huge deps
	    'denemo', # pulls in lilypond and texlive
	    'virtuoso-opensource', # not needed on live media
            'mono', # bloat

	    # old stuff
	    'aspell', 'aspell-en',
	    'asihpi-firmware', 'hdsploader', 'mixartloader', 'pcxhrloader', 'usx2yloader', 'vxloader',
            'drakfax', 'efax', 'rxvt',
            'nspluginwrapper','nspluginwrapper-i386', # not needed anymore (mga #2001)

    	    # broken stuff
            'audacity', 'xguest', 'apper',

            # not wanted
            'al-anvar', #  (mga #9752)
            'mate-polkit',

            #- no distribution license
            'flash-player-plugin',

            # Gnome specific stuff
            if_($has_gnome,
        	'beagle', 'inkscape',
        	'bluedevil', #- bluez-pin provide
        	'pinentry-qt4', #- qt4 app
        	'/noatun/', #- prefer amarok
            ),

            # Plasma specific stuff
            if_($has_plasma5,
            ),
       ],

       'default_packages' => [
            if_($has_plasma5, "$distro_config-plasma5-config"),
            if_($has_lxde, "mageia-lxde-config-$distro_release"),
            if_($has_xfce, "mageia-xfce-config-$distro_release"),

	    # try to protect base packages from rpmlib/urpmi cascade bug
	    'basesystem', 'x11-server-common','x11-driver-video', 'x11-driver-input',
	    'x11-driver-video-vboxvideo',
	    
	    # utils wanted
	    'mc', 'btrfs-progs', 'shorewall-ipv6', 'parted', 'glxinfo', 'patch',
	    'bind-utils', 'mdadm', 'dmraid', 'usbutils', # we want lsusb
	    'shared-mime-info', # needed for .desktop files to work atleast in gnome
	    'vim-enhanced', # full ediitor

	    'bluez-firmware', # missed firmware

	    # mageia specific
	    'mageiawelcome', # nice helper app
	    'mageia-doc-mcc-en', # some nice docs

            # Gnome specific stuff
            if_($has_gnome,
        	'task-gnome', 'gdm', # sometimes gets nuked during build
        	'gnome-shell', 'caribou', 'caribou-gtk3', 'brasero', 'gparted', 'gnome-classic-session', 'hexchat',
            ),

            # Plasma specific stuff
            if_($has_plasma5,
        	'task-plasma5', 'sddm', # sometimes gets nuked during build
            ),
       ],

       'preferred_packages' => join(',', $has_plasma5 ? 'sddm' : 'gdm'),
       'meta_class' => 'desktop',
       'desktop' => first(@desktops),
       if_($ENV{DRAKLIVE_DEFAULT_USER}, 'autologin' => $ENV{DRAKLIVE_DEFAULT_USER}),
       # explicitely specify the security level, so that environment of the build machine doesn't take precedence
       'security' => 1,
       'useSupermount' => 'magicdev',
       'users' => [
		    if_($ENV{DRAKLIVE_DEFAULT_USER}, {
		      'icon' => 'default',
		      'realname' => '',
		      'uid' => '',
		      'groups' => [],
		      'name' => $ENV{DRAKLIVE_DEFAULT_USER},
		      'shell' => '/bin/bash',
		      'gid' => ''
		    }),
		  ],
       'locale' => {
                     'country' => 'US',
                     'IM' => undef,
                     'lang' => 'en_US',
                     'langs' => +{
                         $ENV{DRAKLIVE_REGION} eq 'all' ? (all => 1) : (map { $_ => 1 } split(':', $ENV{DRAKLIVE_LANGS}))
                      },
                     'utf8' => 1
                   },
       'authentication' => {
			     'shadow' => 1,
			     'local' => 1,
			     'blowfish' => 1
			   },
       'superuser' => {
			'pw' => '',
			'realname' => 'root',
			'uid' => '0',
			'shell' => '/bin/bash',
			'home' => '/root',
			'gid' => '0'
		      },
       'keyboard' => {
		       'GRP_TOGGLE' => '',
		       'KBCHARSET' => 'C',
		       'KEYBOARD' => 'us',
		       'KEYTABLE' => 'us'
		     },
       'timezone' => {
		       'ntp' => undef,
		       'timezone' => 'America/New_York',
		       'UTC' => 1
		     },
       'X' => { disabled => 1 }, #- disable auto-configuration that may install unwanted packages
       'match_all_hardware' => 1,
       'excludedocs' => 0,
       'postInstall' => join(";",
			     # systemd boots by default to multiuser.target (old init 3), so change to graphical (old init 5)
                             "ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target",
                             # have inittab match systemd defaulting to init 5
                             "perl -pi -e 's/^id:3:initdefault:/id:5:initdefault:/' '/etc/inittab'",
                             #- FIXME: in any::set_autologin, unlink if gdm/sddm conf file and binary exist
                             if_($has_xfce || $has_lxde, "rm -f /etc/sysconfig/autologin"),
                         ),
       'autoExitInstall' => 1,
       'keep_unrequested_dependencies' => 0,
     };

my $old = \&install::pkgs::empty_packages;
undef *install::pkgs::empty_packages;
*install::pkgs::empty_packages = sub {
    my $packages = &$old;
    $packages->{debug_URPM} = sub { log::l("XXX: $_[0]") };
    $packages;
};