Zypper and installing package dependencies

1,458 views
Skip to first unread message

Martin Simons

unread,
May 5, 2015, 9:11:05 AM5/5/15
to help-c...@googlegroups.com
Dear CFEngineer,

As you may know I am working on The CFengine Roadshow:
https://github.com/Webhuis/CFEngine-Roadshow/blob/cfgmgmtcamp2015/policies/masterfiles/roadshow_policies/mount_nfs_array.cf

The purpose of this initiative is to provide a multiple platform show case of complete working set of solutions for working servers. I just pushed git commit -m "OpenSuse-13.1 added".
It is work in progress and I am reorganizing the way in which I use my dynamic policies. The Jekins role for CentOS_7 is working though.

In my quest  for completeness I took up opensuse again, but zypper is causing me headaches. It looks like zypper is uncapable of resolving dependencies, it only reports dependencies and then stops:

2015-05-05T13:01:27+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat-lib'[0]: Q:zypper --non-interac ...:Problem: tomcat-lib-7.0.42-4.4.6.noarch requires tomcat-el-2.2-api = 7.0.42-4.4.6, but this requirement cannot be provided
2015-05-05T13:01:27+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat-lib'[0]: Q:zypper --non-interac ...:  uninstallable providers: tomcat-el-2_2-api-7.0.42-4.4.6.noarch[repo-update]

It reported the same for openjdk, but message disappeared. It does want to install the jdk:
webjen0196:/var/cfengine/dynamic-inputs-local # zypper install java-1_7_0-openjdk
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 at-spi2-atk-common at-spi2-atk-gtk2 at-spi2-core cantarell-fonts cups-libs gdk-pixbuf-lang gdk-pixbuf-query-loaders gnome-icon-theme gnome-icon-theme-extras gnome-icon-theme-symbolic gtk2-branding-openSUSE gtk2-data
  gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese gtk2-metatheme-adwaita gtk2-theming-engine-adwaita gtk2-tools gtk3-data gtk3-metatheme-adwaita gtk3-theming-engine-adwaita gtk3-tools hicolor-icon-theme
  hicolor-icon-theme-branding-openSUSE java-1_7_0-openjdk java-1_7_0-openjdk-headless lcms2 libFLAC8 libLLVM libX11-xcb1 libXcomposite1 libXcursor1 libXdamage1 libXevie1 libXfixes3 libXi6 libXrandr2 libXtst6 libXxf86vm1 libasound2 libatk-1_0-0 libatk-bridge-2_0-0 libatspi0
  libcairo-gobject2 libcairo2 libcolord2 libdrm2 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libebl1 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0 libgif6 libgraphite2-3 libgthread-2_0-0 libgtk-2_0-0 libgtk-3-0 libharfbuzz0 libjasper1 libjbig2 libjson0 liblcms2-2 libogg0
  libpango-1_0-0 libpciaccess0 libpixman-1-0 libpulse0 libsndfile1 libsoftokn3 libspeex1 libtiff5 libvorbis0 libvorbisenc2 libwayland-client0 libwayland-cursor0 libwayland-server0 libxcb-dri2-0 libxcb-glx0 libxcb-render0 libxcb-shm0 libxcb-xfixes0 libxkbcommon0
  metatheme-adwaita-common mozilla-nss mozilla-nss-certs pango-tools systemtap systemtap-runtime timezone-java

The following recommended packages were automatically selected:
  gdk-pixbuf-lang gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese systemtap

96 new packages to install.
Overall download size: 80.3 MiB. After the operation, additional 226.3 MiB will be used.
Continue? [y/n/? shows all options] (y)

Ideas?

Regards,
Martin.

Martin Simons

unread,
May 7, 2015, 5:06:49 AM5/7/15
to help-c...@googlegroups.com
Dear CFEngineer,

It is an opensuse minimal issue, not so pretty because it has been there for quite a while:
https://forums.opensuse.org/showthread.php/479195-installing-tomcat-on-minimal-server-install

Problem: tomcat-7.0.42-4.4.6.noarch requires tomcat-lib = 7.0.42-4.4.6,

but this requirement cannot be provided
  uninstallable providers: tomcat-lib-7.0.42-4.4.6.noarch[repo-update]
 Solution 1: deinstallation of
patterns-openSUSE-minimal_base-conflicts-13.1-13.6.1.x86_64

If you remove the conflicting package, then the reward is:
'/default/tomcat/methods/'any'/default/packages/packages/'tomcat'[0]:
Q:zypper --non-interac ...:Overall download size: 3.6 MiB. After the
operation, additional 4.2 MiB will be used.
2015-05-06T14:02:45+0000     info:
/default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat'[0]:
Q:zypper --non-interac ...:Continue? [y/n/? shows all options] (y): y
2015-05-06T14:02:46+0000     info:
/default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat'[0]:
Q:zypper --non-interac ...:(1/2) Installing: tomcat-lib-7.0.42-4.4.6
[........error]
2015-05-06T14:02:46+0000     info:
/default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat'[0]:
Q:zypper --non-interac ...:Installation of tomcat-lib-7.0.42-4.4.6 failed:
2015-05-06T14:02:46+0000     info:
/default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat'[0]:
Q:zypper --non-interac ...:Error: Subprocess failed. Error: RPM failed:
error: unpacking of archive failed: cpio: lstat failed - Not a directory
2015-05-06T14:02:46+0000     info:

So effectively the platform is broken.

It boils down moving backi n time and revert to 11.4,.the latest know version willing to do the install. I have to try 13.2 to give suse this final chance, but I fear it will be the same. :-(

Only Debian minimal installs seem to be minimal, Red Hat and Suse minimal installs are not minimal at all. The even install wireless packages!

Regards,
Martin.

Op dinsdag 5 mei 2015 15:11:05 UTC+2 schreef Martin Simons:

Klaus Kaempf

unread,
May 7, 2015, 10:43:08 AM5/7/15
to Martin Simons, help-c...@googlegroups.com
Hi Martin,

* Martin Simons <mjcm....@gmail.com> [May 07. 2015 11:06]:
> Dear CFEngineer,
>
> It is an opensuse minimal issue, not so pretty because it has been there
> for quite a while:
> https://forums.opensuse.org/showthread.php/479195-installing-tomcat-on-minimal-server-install
>
> Problem: tomcat-7.0.42-4.4.6.noarch requires tomcat-lib = 7.0.42-4.4.6,
> but this requirement cannot be provided
> uninstallable providers: tomcat-lib-7.0.42-4.4.6.noarch[repo-update]
> Solution 1: deinstallation of
> patterns-openSUSE-minimal_base-conflicts-13.1-13.6.1.x86_64

well, you configured the system to be 'minimal' in YaST and this is
reflected by the patterns-openSUSE-minimal_base-conflicts package.

Installation of 'tomcat' conflicts (obviously ;-)) with the 'minimal'
requirement.


>
> If you remove the conflicting package, then the reward is:
[...]
> error: unpacking of archive failed: cpio: lstat failed - Not a directory

This looks like a packaging problem in tomcat.

>
> Only Debian minimal installs seem to be minimal, Red Hat and Suse minimal
> installs are not minimal at all. The even install wireless packages!

Yeah, there's an ongoing debate about what is 'minimal'. Ask three
people, get five answers. :-/

Here's a writeup I did last year about a truly minmal SLES 12
system. This should give you an idea ;-)


"The approach I took starts with the normal installation workflow in
YaST. Network and registration can be skipped as neither are needed
for the purpose.

In the installation settings page, click on 'Software' and de-select all
patterns. Then click on the 'Details...' button. Now go to 'Options'
and check 'Ignore Recommended Packages for Already Installed Packages'
[sic]

Although no patterns are selected at this time, the 'Installation
Summary' still shows many packages as selected, resulting in about
530MB in package size. Apparently de-selecting patterns does not
de-select packages.

Right-clicking on a package in the 'Installation Summary' list gives
an 'all in this list' option, which can be used to 'not install' all
remaining packages.
This leaves glibc and filesystem, both are enforced by YaST and the
only packages which cannot be skipped. YaST won't complain if you
leave a kernel or a bootloader out.

A truly minimal system can be installed by searching and selecting
the following packages:

kernel-default, grub2, syslinux + perl-Bootloader-YAML (bnc#885496),
zypper

This package selection is sufficient to boot, login, and run zypper in
the bash shell. Its about 350 MB in ~180 packages and 400MB on disk.

As a comparison, the 'minimal' pattern is twice this size (376 packages,
880MB on disk).

Zypper can now install a configuration management system which can be
used to bring up network and install the application stack."


Extra points for guessing the 'configuration management system' I'm
referring to in the last paragraph ;-)


Klaus
--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

Klaus Kaempf

unread,
May 7, 2015, 10:45:30 AM5/7/15
to Martin Simons, help-c...@googlegroups.com
* Martin Simons <mjcm....@gmail.com> [May 05. 2015 15:11]:
>
> In my quest for completeness I took up opensuse again, but zypper is
> causing me headaches. It looks like zypper is uncapable of resolving
> dependencies, it only reports dependencies and then stops:

zypper is not able to find a solution.

>
> 2015-05-05T13:01:27+0000 info:
> /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'tomcat-lib'[0]:
> Q:zypper --non-interac ...:Problem: tomcat-lib-7.0.42-4.4.6.noarch requires
> tomcat-el-2.2-api = 7.0.42-4.4.6, but this requirement cannot be provided

So the problem is installing tomcat-el-2.2-api. Try to install it on
its own to see why zypper thinks its uninstallable.

Martin Simons

unread,
May 8, 2015, 9:23:04 AM5/8/15
to help-c...@googlegroups.com, mjcm....@gmail.com
Dear Klaus,

Thank you for your elaborated answer. I hoped for an answer by a Suse expert, which you obviously are.

KK> well, you configured the system to be 'minimal' in YaST and this is reflected by the patterns-openSUSE-minimal_base-conflicts package.

The machines I am installing are all VM's and I did not configure the system with Yast, I did the opensuse minimal NET install. This is as close as I could get to the zero touch Debian netinstall with a preseed file or the CentOS kickstart install. both are pretty minimal and fast.

What would in your opinion be the best and fastest way to spin up a minimal opensuse box, minimal in the sense that a VM always has a network stack (makes sense), no wireless of course (makes no sense), no NSA SELinux, no firewall and in no way NetworkManager.

KK> Installation of 'tomcat' conflicts (obviously ;-)) with the 'minimal' requirement.

I respectfully disagree, for two reasons.
1. We are living in a world of managed servers.
You can dispute how they should be managed, e.g. by Suse Manager or Red Hat Satallite, which is not enough and that is why Red Hat bring Puppet in. This way of management is management of the software stack from the platform suppliers perspective, a sort of Microsoft Update mechanism. The better option would be managing the entire system by CFEngine, including software to be installed, updated or uninstalled like NetworkManager. :-)
2. CFEngine users want to manage the entire software stack and want to keep the software stack to its bare minimum.
The are good reasons to have servers that have as few software installed as possible, both from the perspective of resources and security. Servers have several purposes, roles if you will, and the software stack on the box is defined by the role. So it is up to the CFEngineer to define the software needed for a virtual tomcat server, no need to install all sorts of "just in case I might need it" software. The CFEngineer would configure SELinux and a firewall depending on the context the machine is in.

KK> This looks like a packaging problem in tomcat.

Tomcat has a dependency tomcat-lib-7.0.42-4.4.6.noarch that down the line conflicts with patterns-openSUSE-minimal_base-conflicts-13.1-13.6.1.x86_6. The only solution was to remove this package, but this breaks the system. A cpio lstat error on a directory is the result. This problem was introduced in opensuse version 12 and to my knowledge still exists.

KK> Here's a writeup I did last year about a truly minmal SLES 12 system. This should give you an idea ;-)

Thank you for this write up, I will give it a try.

Suppose you want to spin up 1,000 boxes in a datacenter, like Bas van der Vlies does for SurfSara on a regular basis. You do not want to go over a manual install in those situations. Why do Suse not have an automated (minimal) install with preseed or kickstart?

I am looking forward to your answers.

Best regards,
Martin.

Op donderdag 7 mei 2015 16:43:08 UTC+2 schreef Klaus Kaempf:

Klaus Kaempf

unread,
May 11, 2015, 3:19:28 AM5/11/15
to Martin Simons, help-c...@googlegroups.com
Hi Martin,

* Martin Simons <mjcm....@gmail.com> [May 08. 2015 15:23]:
>
> The machines I am installing are all VM's and I did not configure the
> system with Yast, I did the opensuse minimal NET install.

so you choose 'minimal' according to the openSUSE release manager.
Which, obviously, is different from your 'minimal'. ;-)

>
> What would in your opinion be the best and fastest way to spin up a minimal
> opensuse box, minimal in the sense that a VM always has a network stack
> (makes sense), no wireless of course (makes no sense), no NSA SELinux, no
> firewall and in no way NetworkManager.

Create an AutoYaST (aka SUSE 'kickstart') profile with the exact package
set you need. It's hard to give specific advise here since e.g. my
understanding of 'network stack' would only include 'ifconfig' and
'dhcp-client'. Others might want a more sophisticated setup and want
'wicked', the SUSE network setup daemon.

>
> KK> Installation of 'tomcat' conflicts (obviously ;-)) with the 'minimal'
> requirement.
>
> I respectfully disagree, for two reasons.
> 1. We are living in a world of managed servers.

Agreed. For you this means 'tomcat' and 'java', for others this means
'apache' and 'ruby on rails'. There are a zillion possibilities.

> 2. CFEngine users want to manage the entire software stack and want to keep
> the software stack to its bare minimum.

I totally agree and that's exactly the approach I outlined with my
'minimal' setup. Removal of all 'pattern*' packages would be a
prerequisite for this.


>
> Tomcat has a dependency tomcat-lib-7.0.42-4.4.6.noarch that down the line
> conflicts with patterns-openSUSE-minimal_base-conflicts-13.1-13.6.1.x86_6.
> The only solution was to remove this package, but this breaks the system.

Removal of "patterns-openSUSE-minimal_base-conflicts" wouldn't break
the system but only the openSUSE-notion of 'minimal'.

> A cpio lstat error on a directory is the result. This problem was
> introduced in opensuse version 12 and to my knowledge still exists.

tomcat-lib installs cleanly on openSUSE 13.2, the latest release as of
today. So it seems to be fixed meanwhile.

I should be noted that support of Java and Java packages isn't very
good in openSUSE, there's just not much community interest.

>
> Suppose you want to spin up 1,000 boxes in a datacenter, like Bas van der
> Vlies does for SurfSara on a regular basis. You do not want to go over a
> manual install in those situations. Why do Suse not have an automated
> (minimal) install with preseed or kickstart?

You would use AutoYaST for this. Start the installation with YaST,
follow my approach for a truly 'minimal' system, and check the 'Create
AutoYaST profile' checkbox on the last screen of the YaST workflow.

Another alternative is Kiwi (https://en.opensuse.org/Portal:KIWI) to
create an VM image. That's probably the best solution to spin up 1,000
boxes in a datacenter.

Hth,

Martin Simons

unread,
May 23, 2015, 1:33:15 PM5/23/15
to help-c...@googlegroups.com, mjcm....@gmail.com
Dear Klaus,

The minimal opensuse 13.2 install I tried using your SLES12 description was broken, so I did a full install of opensuse13.2 through Yast.

Java like you indicated seems not to be supported too well, I get a new error:
015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...:
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...:Problem: tomcat-7.0.55-2.5.noarch requires jakarta-commons-logging, but this requirement cannot be provided
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...:  uninstallable providers: apache-commons-logging-1.1.3-7.1.3.noarch[openSUSE-13.2-0]
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...: Solution 1: deinstallation of patterns-openSUSE-minimal_base-conflicts-20141007-2.1.x86_64
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...: Solution 2: do not install tomcat-7.0.55-2.5.noarch
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...: Solution 3: do not install tomcat-7.0.55-2.5.noarch
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...: Solution 4: break tomcat-7.0.55-2.5.noarch by ignoring some of its dependencies
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...:
2015-05-23T17:11:54+0000     info: /default/autorun/methods/'autorun'/default/roadshow/methods/''/default/webjen/methods/'any'/default/tomcat/methods/'any'/default/packages/packages/'java-1_7_0-openjdk'[0]: Q:zypper --non-interac ...:Choose from above solutions by number or cancel [1/2/3/4/c] (c): c

Should I try another java?

Best regards,
Martin.


Op maandag 11 mei 2015 09:19:28 UTC+2 schreef Klaus Kaempf:

Klaus Kaempf

unread,
Jun 8, 2015, 5:15:36 AM6/8/15
to Martin Simons, help-c...@googlegroups.com
* Martin Simons <mjcm....@gmail.com> [May 23. 2015 19:33]:
> Dear Klaus,
>
> The minimal opensuse 13.2 install I tried using your SLES12 description was
> broken

Broken in what way ?

> , so I did a full install of opensuse13.2 through Yast.
>
> Java like you indicated seems not to be supported too well, I get a new
> error:

Actually it's not a new error, it's still the old 'tomcat is not
considered minimal' problem.

Do a "zypper rm patterns-openSUSE-minimal_base-conflicts" before
trying to install tomcat.


Klaus
--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg)
Reply all
Reply to author
Forward
0 new messages