blob: 57075fc23aae39317143c5a524738117886666f4 (
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
|
#!/bin/bash
#================
# FILE : config.sh
#----------------
# PROJECT : OpenSuSE KIWI Image System
# COPYRIGHT : (c) 2013 SUSE LLC
# :
# AUTHOR : Robert Schweikert <rjschwei@suse.com>
# :
# BELONGS TO : Operating System images
# :
# DESCRIPTION : configuration script for SUSE based
# : operating systems
# :
# :
# STATUS : BETA
#----------------
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$kiwi_iname]..."
#======================================
# Setup baseproduct link
#--------------------------------------
suseSetupProduct
#======================================
# SuSEconfig
#--------------------------------------
suseConfig
#======================================
# Import repositories' keys
#--------------------------------------
suseImportBuildKey
#======================================
# Umount kernel filesystems
#--------------------------------------
baseCleanMount
#======================================
# Add repositories
#--------------------------------------
case $( arch ) in
x86_64 ) echo "Adding repos for x86_64"
zypper ar --refresh -K \
http://download.opensuse.org/distribution/leap/42.3/repo/oss/suse/ "OSS"
zypper ar --refresh -K \
http://download.opensuse.org/update/leap/42.3/oss/ "OSS Update"
zypper ar --refresh -K \
http://download.opensuse.org/distribution/leap/42.3/repo/non-oss/suse/ "NON OSS"
zypper ar --refresh -K \
http://download.opensuse.org/update/leap/42.3/non-oss/ "NON OSS Update"
;;
aarch64 ) echo "Adding repo for aarch64"
zypper ar --refresh -K \
http://download.opensuse.org/ports/aarch64/distribution/leap/42.3/repo/oss/ "OSS"
zypper ar --refresh -K \
http://download.opensuse.org/ports/aarch64/distribution/leap/42.3/repo/oss/ "OSS Update"
;;
ppc64le ) echo "Adding repo for ppc64le"
zypper ar --refresh -K \
http://download.opensuse.org/ports/ppc/distribution/leap/42.3/repo/oss/ "OSS"
zypper ar --refresh -K \
http://download.opensuse.org/ports/update/42.3/oss/ "OSS Update"
;;
* ) echo "No repos for $arch"
;;
esac
#======================================
# Disable recommends
#--------------------------------------
sed -i 's/.*solver.onlyRequires.*/solver.onlyRequires = true/g' /etc/zypp/zypp.conf
#======================================
# Remove locale files
#--------------------------------------
(cd /usr/share/locale && find -name '*.mo' | xargs rm)
# Remove zypp uuid (bsc#1098535)
rm -f /var/lib/zypp/AnonymousUniqueId
# Systemd generates this in %post, remove it
rm -f /etc/machine-id
# DS, this is called before 'delete' configured in 'config.xml'. So, we can't clean if removing from there
rpm -e --nodeps dbus-1 dracut fipscheck libfipscheck1 kbd kmod kmod-compat pinentry pkg-config exim \
udev systemd systemd-sysvinit logrotate device-mapper libcryptsetup4 libdb-4_8 \
cracklib cracklib-dict-full libcrack2 pam pam-config shadow util-linux aaa_base netcfg \
ca-certificates openSUSE-build-key dirmngr perl-base insserv-compat \
gpg2 openssl libncurses6 file file-magic libmagic1 libsolv-tools suse-module-tools \
libzypp zypper rpm
find . -name *.rpmsave -delete
rm -rf /var/lib/rpm
exit 0
|