I am trying to build RPM from src.rpm for docker in fedora. I got the src.rpm package from here: http://koji.fedoraproject.org/koji/buildinfo?buildID=610523
I am following this guide: http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch11s03.html
Now,as soon as I ran rpmbuild, I get the following error:
[peeyush@localhost ~]$ rpmbuild --rebuild docker-io-1.5.0-1.fc21.src.rpm
Installing docker-io-1.5.0-1.fc21.src.rpm
error: Failed build dependencies:
btrfs-progs-devel is needed by docker-io-1.5.0-1.fc21.x86_64
device-mapper-devel is needed by docker-io-1.5.0-1.fc21.x86_64
glibc-static is needed by docker-io-1.5.0-1.fc21.x86_64
go-md2man is needed by docker-io-1.5.0-1.fc21.x86_64
golang(code.google.com/p/go.net/websocket) is needed by docker-io-1.5.0-1.fc21.x86_64
golang(code.google.com/p/gosqlite/sqlite3) is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/Sirupsen/logrus) >= 0.6.0 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/coreos/go-systemd/activation) >= 2-1 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/docker/libtrust) >= 0-0.2 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/docker/libtrust/trustgraph) >= 0-0.2 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/godbus/dbus) is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/gorilla/mux) >= 0-0.13 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/kr/pty) >= 0-0.19 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/syndtr/gocapability/capability) >= 0-0.7 is needed by docker-io-1.5.0-1.fc21.x86_64
golang(github.com/tchap/go-patricia/patricia) is needed by docker-io-1.5.0-1.fc21.x86_64
The interesting part is, I already have golang installed:
[peeyush@localhost ~]$ rpm -q golang
golang-1.3.3-1.fc21.x86_64
Please help me figure out what is the issue here? Or could you please tell me if there is any other way to build the docker RPM.
First, if your goal is simply to install a newer version of the Docker package, consider:
# yum --enablerepo=updates-testing install docker-io
Which at the moment will get you docker-io.x86_64 0:1.5.0-2.fc21
.
You need to install all the required dependencies before you are able to build the package. You can manually inspect the source RPM using rpm -q
:
$ rpm -qp --requires docker-io-1.5.0-1.fc21.src.rpm
btrfs-progs-devel
device-mapper-devel
glibc-static
go-md2man
golang >= 1.2.1-3
golang >= 1.3.3
golang(code.google.com/p/go.net/websocket)
golang(code.google.com/p/gosqlite/sqlite3)
golang(github.com/Sirupsen/logrus) >= 0.6.0
golang(github.com/coreos/go-systemd/activation) >= 2-1
golang(github.com/docker/libtrust) >= 0-0.2
golang(github.com/docker/libtrust/trustgraph) >= 0-0.2
golang(github.com/godbus/dbus)
golang(github.com/gorilla/mux) >= 0-0.13
golang(github.com/kr/pty) >= 0-0.19
golang(github.com/syndtr/gocapability/capability) >= 0-0.7
golang(github.com/tchap/go-patricia/patricia)
pkgconfig(systemd)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
You can manually install those requirements, making sure that you meet
the version requirements, or you can automate the process using the
yum-builddep
command, which is available in the yum-utils
package:
$ sudo yum-builddep docker-io-1.5.0-1.fc21.src.rpm
Which will probably tell you:
[...]
Error: No Package found for golang(github.com/docker/libtrust) >= 0-0.2
Error: No Package found for golang(github.com/docker/libtrust/trustgraph) >= 0-0.2
This is because the package you are trying to build relies on packages
that have not yet been released. They are in the updates-testing
repository, so you can run:
$ sudo yum-builddep --enablerepo=updates-testing \
docker-io-1.5.0-1.fc21.src.rpm
And this will install all the requirements.