OpenSUSE

From Segfault
Jump to: navigation, search

Postinstall

Static network configuration

$ cat /etc/sysconfig/network/ifcfg-eth0
STARTMODE=onboot
BOOTPROTO=static
IPADDR=10.0.0.3
NETMASK=255.255.255.0
 
$ cat /etc/sysconfig/network/routes
default 10.0.0.1 - -
 
$ grep ^NETCONFIG_DNS_STATIC /etc/sysconfig/network/config
NETCONFIG_DNS_STATIC_SEARCHLIST="example.com"
NETCONFIG_DNS_STATIC_SERVERS="10.0.0.1"
 
$ cat /etc/HOSTNAME
suse

We also might want to disable those link-local addresses:[1]

$ grep LINKLOCAL_INTERFACES /etc/sysconfig/network/config 
# LINKLOCAL_INTERFACES=...

Restart networking:

$ service network restart

Note: when using DHCP, the machine's hostname might get overwritten by the response from the DHCP server. Set DHCLIENT_SET_HOSTNAME in /etc/sysconfig/network/dhcp to "no" to disable this behaviour.

Packages

Remove unused packages:

zypper remove command-not-found libreoffice* gimp* cups openoffice* ghostscript* ispell*

Install missing packages:

zypper install  bash-completion cachefilesd checksec checkpolicy dkms ecryptfs-utils git iftop iotop iperf ksh less lm_sensors lsof man-db mlocate moreutils mpg321 ncurses-devel openssh-clients powertop pv rdesktop screen sharutils strace sysstat yum-changelog

For desktop systems:

b43-fwcutter firefox flash-plugin gedit gnome-keyring libreoffice-writer mozilla-https-everywhere mozilla-noscript openssh-askpass pidgin-otr thunderbird thunderbird-enigmail vlc xfce4-datetime-plugin xfce4-eyes xfce4-netload-plugin xfce4-sensors-plugin xfce4-systemload-plugin xfce4-volumed xfce4-weather-plugin xfce4-xfswitch-plugin


Disable unused services:

for i in alsasound avahi-daemon avahi-dnsconfd bluez-coldplug cpufreq cups irq_balancer fbset kbd \
         mcelog nscd smartd splash splash_early vboxadd haldaemon SuSEfirewall2_setup SuSEfirewall2_init; do 
   chkconfig $i off
done

Missing /usr/share/zoneinfo

Apparently, /usr/share/zoneinfo is missing from a (minimal) openSUSE installation and Zypper does not know how to provide it:

$ zypper what-provides /usr/share/zoneinfo
No providers of '/usr/share/zoneinfo' found.

Or:

$ zypper install /usr/share/zoneinfo
'/usr/share/zoneinfo' not found in package names. Trying capabilities.
No provider of '/usr/share/zoneinfo' found.

Luckily rpm.pbone.net had the answer, we needed to install the timezone package:

$ zypper install timezone
$ rpm -ql timezone | grep -m1 share/zoneinfo 
/usr/share/zoneinfo

Updating

zypper refresh
zypper update

Upgrading

First we need to update our current repository:

zypper refresh
zypper update

Now we're ready to upgrade to the new release

VER=12.2
zypper modifyrepo --all --disable --no-refresh
zypper addrepo --refresh --name "openSUSE-$VER-OSS"            http://download.opensuse.org/distribution/$VER/repo/oss/     repo-$VER-oss
zypper addrepo --refresh --name "openSUSE-$VER-non-OSS"        http://download.opensuse.org/distribution/$VER/repo/non-oss/ repo-$VER-non-oss
zypper addrepo --refresh --name "openSUSE-$VER-Update"         http://download.opensuse.org/update/$VER/                    repo-$VER-update
zypper addrepo --refresh --name "openSUSE-$VER-Update-non-OSS" http://download.opensuse.org/update/$VER-non-oss/            repo-$VER-update-non-oss

Now the configured repositories should look somewhat like this:

$ zypper repos --uri --show-enabled-only
# | Alias                    | Name                         | Enabled | Refresh | URI
1 | repo-12.2-oss            | openSUSE-12.2-OSS            | Yes     | Yes     | http://download.opensuse.org/distribution/12.2/repo/oss/             
2 | repo-12.2-non-oss        | openSUSE-12.2-Non-OSS        | Yes     | Yes     | http://download.opensuse.org/distribution/12.2/repo/non-oss/         
3 | repo-12.2-update         | openSUSE-12.2-Update         | Yes     | Yes     | http://download.opensuse.org/update/12.2/
4 | repo-12.2-update-non-oss | openSUSE-12.2-Update-non-OSS | Yes     | Yes     | http://download.opensuse.org/update/12.2-non-oss/

Now the actual upgrade can begin:

zypper refresh
zypper dist-upgrade --download-in-advance

Repositories

Adding or removing custom repositories:[2] can be done via Zypper too. Let's say we want to add the home:plater:atop repository in an openSUSE Tumbleweed installation:

  • Go to https://build.opensuse.org/package/binaries/home:plater/atop?repository=openSUSE_Tumbleweed
  • Click on the "Go to download repository" link to get the repository URL
zypper addrepo -f http://download.opensuse.org/repositories/home:plater/atop/openSUSE_Tumbleweed plater
zypper refresh

Now the packages in that repository can be installed:

$ zypper search --repo plater | grep -wc package
603

Bugs

libzypp.so.1439: cannot open shared object file

During an upgrade to Tumbleweed, the Zypper command barfed with:[3]

$ zypper lr --details
zypper: error while loading shared libraries: libzypp.so.1439: cannot open shared object file:

And, in yast:

Internal error. Please report a bug report with logs.
Details: component cannot import namespace 'Pkg'
Caller: /usr/lib64/ruby/vendor_ruby/2.1.0/yast/yast.rb:162:in `import_pure'

The solution was to install the latest zypper packages manually:

rpm --upgrade http://download.opensuse.org/distribution/leap/42.1/repo/oss/suse/x86_64/libsolv-tools-0.6.14-1.1.x86_64.rpm
rpm --upgrade http://download.opensuse.org/distribution/leap/42.1/repo/oss/suse/x86_64/libzypp-15.19.5-1.1.x86_64.rpm
rpm --upgrade http://download.opensuse.org/distribution/leap/42.1/repo/oss/suse/x86_64/zypper-1.12.23-1.1.x86_64.rpm

Links

References