Bug 1631969 - opam missing dependencies: patch and unzip
Summary: opam missing dependencies: patch and unzip
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: opam
Version: 28
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ben Rosser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-22 16:33 UTC by Randy Barlow
Modified: 2018-11-03 01:47 UTC (History)
1 user (show)

Fixed In Version: opam-2.0.0-0.12.rc.fc29 opam-2.0.0-0.12.rc.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-03 00:01:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Randy Barlow 2018-09-22 16:33:59 UTC
Description of problem:
opam init fails on a clean install due to missing patch and unzip executables:

$ sudo docker run -it --rm registry.fedoraproject.org/fedora:28 /bin/bash
[root@f0fd94163a0c /]# dnf install -y opam
Fedora 28 - x86_64 - Updates                                                                                                                                                       4.5 MB/s |  24 MB     00:05    
Fedora 28 - x86_64                                                                                                                                                                 8.1 MB/s |  60 MB     00:07    
Last metadata expiration check: 0:00:06 ago on Sat Sep 22 16:32:15 2018.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                              Arch                                         Version                                                     Repository                                     Size
===================================================================================================================================================================================================================
Installing:
 opam                                                 x86_64                                       2.0.0-0.7.beta6.fc28                                        updates                                       2.1 M
Installing dependencies:
 bzip2                                                x86_64                                       1.0.6-26.fc28                                               fedora                                         59 k
 libstdc++                                            x86_64                                       8.1.1-5.fc28                                                updates                                       487 k
 opam-installer                                       x86_64                                       2.0.0-0.7.beta6.fc28                                        updates                                       964 k

Transaction Summary
===================================================================================================================================================================================================================
Install  4 Packages

Total download size: 3.5 M
Installed size: 12 M
Downloading Packages:
(1/4): bzip2-1.0.6-26.fc28.x86_64.rpm                                                                                                                                              297 kB/s |  59 kB     00:00    
(2/4): opam-installer-2.0.0-0.7.beta6.fc28.x86_64.rpm                                                                                                                              1.4 MB/s | 964 kB     00:00    
(3/4): opam-2.0.0-0.7.beta6.fc28.x86_64.rpm                                                                                                                                        2.6 MB/s | 2.1 MB     00:00    
(4/4): libstdc++-8.1.1-5.fc28.x86_64.rpm                                                                                                                                           803 kB/s | 487 kB     00:00    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              3.1 MB/s | 3.5 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                           1/1 
  Installing       : libstdc++-8.1.1-5.fc28.x86_64                                                                                                                                                             1/4 
  Running scriptlet: libstdc++-8.1.1-5.fc28.x86_64                                                                                                                                                             1/4 
  Installing       : bzip2-1.0.6-26.fc28.x86_64                                                                                                                                                                2/4 
  Installing       : opam-installer-2.0.0-0.7.beta6.fc28.x86_64                                                                                                                                                3/4 
  Installing       : opam-2.0.0-0.7.beta6.fc28.x86_64                                                                                                                                                          4/4 
  Running scriptlet: opam-2.0.0-0.7.beta6.fc28.x86_64                                                                                                                                                          4/4 
  Verifying        : opam-2.0.0-0.7.beta6.fc28.x86_64                                                                                                                                                          1/4 
  Verifying        : opam-installer-2.0.0-0.7.beta6.fc28.x86_64                                                                                                                                                2/4 
  Verifying        : bzip2-1.0.6-26.fc28.x86_64                                                                                                                                                                3/4 
  Verifying        : libstdc++-8.1.1-5.fc28.x86_64                                                                                                                                                             4/4 

Installed:
  opam.x86_64 2.0.0-0.7.beta6.fc28                    bzip2.x86_64 1.0.6-26.fc28                    libstdc++.x86_64 8.1.1-5.fc28                    opam-installer.x86_64 2.0.0-0.7.beta6.fc28                   

Complete!
[root@f0fd94163a0c /]# opam init
[WARNING] Running as root is not recommended
[NOTE] Will configure from built-in defaults.
Checking for available remotes: none.
  - you won't be able to use rsync and local repositories unless you install the rsync command on your system.
  - you won't be able to use git repositories unless you install the git command on your system.
  - you won't be able to use mercurial repositories unless you install the hg command on your system.
  - you won't be able to use darcs repositories unless you install the darcs command on your system.

[WARNING] Recommended dependencies -- most packages rely on these:
            - make
            - m4
            - cc

[ERROR] Missing dependencies -- the following commands are required for opam to operate:
          - patch
          - unzip


Version-Release number of selected component (if applicable):
opam-2.0.0-0.7.beta6.fc28.x86_64

Comment 1 Ben Rosser 2018-09-22 18:11:08 UTC
Thanks for the report! I'll quickly fix this and rebuild for all branches.

Comment 2 Fedora Update System 2018-09-22 18:45:56 UTC
opam-2.0.0-0.10.rc.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-fa12a4f7fa

Comment 3 Fedora Update System 2018-09-22 19:23:51 UTC
opam-2.0.0-0.10.rc.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-38b4ada890

Comment 4 Fedora Update System 2018-09-22 19:35:33 UTC
opam-2.0.0-0.8.beta6.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0df3d13a6a

Comment 5 Fedora Update System 2018-09-23 19:47:54 UTC
opam-2.0.0-0.8.beta6.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0df3d13a6a

Comment 6 Fedora Update System 2018-09-23 20:41:19 UTC
opam-2.0.0-0.10.rc.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-fa12a4f7fa

Comment 7 Fedora Update System 2018-09-23 21:39:23 UTC
opam-2.0.0-0.10.rc.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-38b4ada890

Comment 8 Randy Barlow 2018-09-28 03:49:16 UTC
Hi Ben!

I tested the updates, and it looks like opam init also wants gcc. In addition to the updates, I also tested the Rawhide version, which seemed to want bubblewrap as well:

[WARNING] Running as root is not recommended
[NOTE] Will configure from built-in defaults.
Checking for available remotes: none.
  - you won't be able to use rsync and local repositories unless you install the rsync command on your
    system.
  - you won't be able to use git repositories unless you install the git command on your system.
  - you won't be able to use mercurial repositories unless you install the hg command on your system.
  - you won't be able to use darcs repositories unless you install the darcs command on your system.

[WARNING] Recommended dependencies -- most packages rely on these:
  - make
  - m4
  - cc
[ERROR] Missing dependencies -- the following commands are required for opam to operate:
  - bwrap: Sandboxing tool bwrap was not found. You should install 'bubblewrap'. See
    http://opam.ocaml.org/doc/2.0/FAQ.html#Why-opam-asks-me-to-install-bwrap.

Comment 9 Ben Rosser 2018-10-02 15:48:18 UTC
Hi Randy,

Thanks for testing!

I'll rebuild with an added requires: gcc, and add one for bubblewrap on Rawhide as well.

Maybe this (running "opam init" and making sure it gets set up properly on a clean installation) is something that would be useful to do using a CI test?

Comment 10 Randy Barlow 2018-10-02 17:40:34 UTC
(In reply to Ben Rosser from comment #9)
> Maybe this (running "opam init" and making sure it gets set up properly on a
> clean installation) is something that would be useful to do using a CI test?

That does sound like a great candidate for a test, good idea!

Comment 11 Fedora Update System 2018-10-02 18:31:55 UTC
opam-2.0.0-0.11.rc.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e955f1ed22

Comment 12 Fedora Update System 2018-10-02 19:06:24 UTC
opam-2.0.0-0.11.rc.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-02138cc2e2

Comment 13 Fedora Update System 2018-10-02 19:21:01 UTC
opam-2.0.0-0.9.beta6.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b6bcc7ad5c

Comment 14 Fedora Update System 2018-10-02 21:19:01 UTC
opam-2.0.0-0.11.rc.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e955f1ed22

Comment 15 Fedora Update System 2018-10-03 15:01:56 UTC
opam-2.0.0-0.11.rc.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-02138cc2e2

Comment 16 Fedora Update System 2018-10-03 15:42:01 UTC
opam-2.0.0-0.9.beta6.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-b6bcc7ad5c

Comment 17 Randy Barlow 2018-10-08 22:41:58 UTC
When I run it in Rawhide, it seems like it fails though I'm not sure it's ok to run bubblewrap inside docker, so I'm not sure my test is valid:

#=== ERROR while compiling ocaml-base-compiler.4.07.1 =========================#
# context     2.0.0 | linux/x86_64 |  | https://opam.ocaml.org#da96e33f
# path        ~/.opam/default/.opam-switch/build/ocaml-base-compiler.4.07.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix /root/.opam/default -with-debug-runtime                                                                                                
# exit-code   1
# env-file    /tmp/opam-xxx-74/ocaml-base-compiler-74-f0f09f.env
# output-file /tmp/opam-xxx-74/ocaml-base-compiler-74-f0f09f.out
### output ###
# bwrap: Creating new namespace failed: Operation not permitted

If that command works for you in not-docker, I think we can ignore it.

Comment 18 Ben Rosser 2018-10-24 14:28:41 UTC
Hi Randy,

I'm sorry for the delay here! I haven't had time to really dig into this...

I'm currently rebuilding opam in Rawhide (and then in F29 + F28) with added requires: on make and m4-- I quickly checked this in a clean mock chroot, and that seemed to be enough to get opam init working on F29 and F28. Hopefully there's not something else that I'm missing. :)

I'm also currently setting up a Rawhide VM to see if the bubblewrap stuff works.

There seems to be some discussion of bubblewrap+docker in opam here-- it sounds like it can be made to work:

https://github.com/ocaml/infrastructure/wiki/Containers#package-sandboxing

Comment 19 Fedora Update System 2018-10-24 15:10:24 UTC
opam-2.0.0-0.12.rc.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7d1a5918bc

Comment 20 Fedora Update System 2018-10-24 17:15:56 UTC
opam-2.0.0-0.12.rc.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7dad99f84b

Comment 21 Fedora Update System 2018-10-25 15:37:31 UTC
opam-2.0.0-0.12.rc.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-7d1a5918bc

Comment 22 Fedora Update System 2018-10-25 22:35:35 UTC
opam-2.0.0-0.12.rc.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-7dad99f84b

Comment 23 Fedora Update System 2018-11-03 00:01:04 UTC
opam-2.0.0-0.12.rc.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2018-11-03 01:47:14 UTC
opam-2.0.0-0.12.rc.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.