lsm5 pushed to docker (f22). "built docker @lsm5/fedora commit#a53a6e6 (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Jun 1 18:57:16 UTC 2015
From 81fb0e4290c4ecd08d8a0249a7211e2651baf780 Mon Sep 17 00:00:00 2001
From: Lokesh Mandvekar <lsm5 at fedoraproject.org>
Date: Mon, 1 Jun 2015 18:56:10 +0000
Subject: built docker @lsm5/fedora commit#a53a6e6
NVR: docker-1.7.0-1.gita53a6e6.fc22
- modify docker-selinux condition
Signed-off-by: Lokesh Mandvekar <lsm5 at fedoraproject.org>
diff --git a/.gitignore b/.gitignore
index aea075c..d9783d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/docker-0591dce.tar.gz
/docker-selinux-d74079c.tar.gz
/docker-9d26a07.tar.gz
+/docker-a53a6e6.tar.gz
diff --git a/Fixed-push-of-unqualified-registry.patch b/Fixed-push-of-unqualified-registry.patch
deleted file mode 100644
index 3d3f132..0000000
--- a/Fixed-push-of-unqualified-registry.patch
+++ /dev/null
@@ -1,298 +0,0 @@
-From 0d3577e545a067205fc92070064875a52361d0a5 Mon Sep 17 00:00:00 2001
-From: Michal Minar <miminar at redhat.com>
-Date: Mon, 4 May 2015 17:39:31 +0200
-Subject: [PATCH] Fixed push of unqualified registry
-
-Local image with unqualified name had to be fully qualified before a
-push to default registry.
-
-Moved check for official repository to daemon side because client
-doesn't know which registry is the default.
-
-Signed-off-by: Michal Minar <miminar at redhat.com>
----
- api/client/commands.go | 13 ---
- graph/push.go | 30 +++++-
- integration-cli/docker_cli_push_test.go | 156 ++++++++++++++++++++++++++------
- 3 files changed, 156 insertions(+), 43 deletions(-)
-
-diff --git a/api/client/commands.go b/api/client/commands.go
-index f145fc4..5099dba 100644
---- a/api/client/commands.go
-+++ b/api/client/commands.go
-@@ -1311,19 +1311,6 @@ func (cli *DockerCli) CmdPush(args ...string) error {
- if err != nil {
- return err
- }
-- // Resolve the Auth config relevant for this server
-- authConfig := cli.configFile.ResolveAuthConfig(repoInfo.Index)
-- // If we're not using a custom registry, we know the restrictions
-- // applied to repository names and can warn the user in advance.
-- // Custom repositories can have different rules, and we must also
-- // allow pushing by image ID.
-- if repoInfo.Official {
-- username := authConfig.Username
-- if username == "" {
-- username = "<user>"
-- }
-- return fmt.Errorf("You cannot push a \"root\" repository. Please rename your repository to <user>/<repo> (ex: %s/%s)", username, repoInfo.LocalName)
-- }
-
- v := url.Values{}
- v.Set("tag", tag)
-diff --git a/graph/push.go b/graph/push.go
-index f61fb43..fa348cd 100644
---- a/graph/push.go
-+++ b/graph/push.go
-@@ -494,6 +494,7 @@ func (s *TagStore) CmdPush(job *engine.Job) engine.Status {
- sf = utils.NewStreamFormatter(job.GetenvBool("json"))
- authConfig = ®istry.AuthConfig{}
- metaHeaders map[string][]string
-+ localRepo Repository
- )
-
- // Resolve the Repository name from fqn to RepositoryInfo
-@@ -513,6 +514,23 @@ func (s *TagStore) CmdPush(job *engine.Job) engine.Status {
- log.Infof("Push of %s to official registry has been forced", localName)
- }
-
-+ // If we're not using a custom registry, we know the restrictions
-+ // applied to repository names and can warn the user in advance.
-+ // Custom repositories can have different rules, and we must also
-+ // allow pushing by image ID.
-+ if repoInfo.Official {
-+ username := authConfig.Username
-+ if username == "" {
-+ username = "<user>"
-+ }
-+ name := localName
-+ parts := strings.Split(repoInfo.LocalName, "/")
-+ if len(parts) > 0 {
-+ name = parts[len(parts)-1]
-+ }
-+ return job.Errorf("You cannot push a \"root\" repository. Please rename your repository to <user>/<repo> (ex: %s/%s)", username, name)
-+ }
-+
- if _, err := s.poolAdd("push", repoInfo.LocalName); err != nil {
- return job.Error(err)
- }
-@@ -533,10 +551,14 @@ func (s *TagStore) CmdPush(job *engine.Job) engine.Status {
- reposLen = len(s.Repositories[repoInfo.LocalName])
- }
- job.Stdout.Write(sf.FormatStatus("", "The push refers to a repository [%s] (len: %d)", repoInfo.CanonicalName, reposLen))
-- // If it fails, try to get the repository
-- localRepo, exists := s.Repositories[repoInfo.LocalName]
-- if !exists {
-- return job.Errorf("Repository does not exist: %s", repoInfo.LocalName)
-+ matching := s.getRepositoryList(localName)
-+ for _, namedRepo := range matching {
-+ for _, localRepo = range namedRepo {
-+ break
-+ }
-+ }
-+ if localRepo == nil {
-+ return job.Errorf("Repository does not exist: %s", localName)
- }
-
- if repoInfo.Index.Official || endpoint.Version == registry.APIVersion2 {
-diff --git a/integration-cli/docker_cli_push_test.go b/integration-cli/docker_cli_push_test.go
-index a84e298..87821c0 100644
---- a/integration-cli/docker_cli_push_test.go
-+++ b/integration-cli/docker_cli_push_test.go
-@@ -7,6 +7,7 @@ import (
- "io/ioutil"
- "os"
- "os/exec"
-+ "regexp"
- "strings"
- "testing"
- "time"
-@@ -14,6 +15,11 @@ import (
- "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar"
- )
-
-+const (
-+ confirmText = "want to push to public registry? [y/n]"
-+ farewellText = "nothing pushed."
-+)
-+
- // pulling an image from the central registry should work
- func TestPushBusyboxImage(t *testing.T) {
- defer setupRegistry(t)()
-@@ -159,11 +165,34 @@ func TestPushEmptyLayer(t *testing.T) {
- logDone("push - empty layer config to private registry")
- }
-
-+func readConfirmText(t *testing.T, out *bufio.Reader) {
-+ done := make(chan struct{})
-+ go func() {
-+ line, err := out.ReadBytes(']')
-+ if err != nil {
-+ t.Fatalf("Failed to read a confirmation text for a push: %v", err)
-+ }
-+ if !strings.HasSuffix(strings.ToLower(string(line)), confirmText) {
-+ t.Fatalf("Expected confirmation text %q, not: %q", confirmText, line)
-+ }
-+ buf := make([]byte, 4)
-+ n, err := out.Read(buf)
-+ if err != nil {
-+ t.Fatalf("Failed to read confirmation text for a push: %v", err)
-+ }
-+ if n > 2 || n < 1 || buf[0] != ':' {
-+ t.Fatalf("Got unexpected line ending: %q", string(buf))
-+ }
-+ close(done)
-+ }()
-+ select {
-+ case <-done:
-+ case <-time.After(4 * time.Second):
-+ t.Fatalf("Timeout while waiting on confirmation text.")
-+ }
-+}
-+
- func TestPushToPublicRegistry(t *testing.T) {
-- const (
-- confirmText = "want to push to public registry? [y/n]"
-- farewellText = "nothing pushed."
-- )
- repoName := "docker.io/dockercli/busybox"
- // tag the image to upload it to the private registry
- tagCmd := exec.Command(dockerBinary, "tag", "busybox", repoName)
-@@ -193,33 +222,16 @@ func TestPushToPublicRegistry(t *testing.T) {
-
- outReader := bufio.NewReader(stdout)
-
-- readConfirmText := func(out *bufio.Reader) {
-- line, err := out.ReadBytes(']')
-- if err != nil {
-- t.Fatalf("Failed to read a confirmation text for a push: %v", err)
-- }
-- if !strings.HasSuffix(strings.ToLower(string(line)), confirmText) {
-- t.Fatalf("Expected confirmation text %q, not: %q", confirmText, line)
-- }
-- buf := make([]byte, 4)
-- n, err := out.Read(buf)
-- if err != nil {
-- t.Fatalf("Failed to read confirmation text for a push: %v", err)
-- }
-- if n > 2 || n < 1 || buf[0] != ':' {
-- t.Fatalf("Got unexpected line ending: %q", string(buf))
-- }
-- }
-- readConfirmText(outReader)
-+ readConfirmText(t, outReader)
-
- stdin.Write([]byte("\n"))
-- readConfirmText(outReader)
-+ readConfirmText(t, outReader)
- stdin.Write([]byte(" \n"))
-- readConfirmText(outReader)
-+ readConfirmText(t, outReader)
- stdin.Write([]byte("foo\n"))
-- readConfirmText(outReader)
-+ readConfirmText(t, outReader)
- stdin.Write([]byte("no\n"))
-- readConfirmText(outReader)
-+ readConfirmText(t, outReader)
- if sayNo {
- stdin.Write([]byte(" n \n"))
- } else {
-@@ -282,3 +294,95 @@ func TestPushToPublicRegistry(t *testing.T) {
-
- logDone("push - to public registry")
- }
-+
-+func TestPushToAdditionalRegistry(t *testing.T) {
-+ reg := setupAndGetRegistryAt(t, privateRegistryURLs[0])
-+ defer reg.Close()
-+ d := NewDaemon(t)
-+ if err := d.StartWithBusybox("--add-registry=" + reg.url); err != nil {
-+ t.Fatalf("We should have been able to start the daemon with passing add-registry=%s: %v", reg.url, err)
-+ }
-+ defer d.Stop()
-+
-+ busyboxId := d.getAndTestImageEntry(t, 1, "busybox", "").id
-+
-+ // push busybox to additional registry as "library/busybox" and remove all local images
-+ if out, err := d.Cmd("tag", "busybox", "library/busybox"); err != nil {
-+ t.Fatalf("Failed to tag image %s: error %v, output %q", "busybox", err, out)
-+ }
-+ if out, err := d.Cmd("push", "library/busybox"); err != nil {
-+ t.Fatalf("Failed to push image library/busybox: error %v, output %q", err, out)
-+ }
-+ toRemove := []string{"busybox", "library/busybox"}
-+ if out, err := d.Cmd("rmi", toRemove...); err != nil {
-+ t.Fatalf("Failed to remove images %v: %v, output: %s", toRemove, err, out)
-+ }
-+ d.getAndTestImageEntry(t, 0, "", "")
-+
-+ // pull it from additional registry
-+ if _, err := d.Cmd("pull", "library/busybox"); err != nil {
-+ t.Fatalf("We should have been able to pull library/busybox from %q: %v", reg.url, err)
-+ }
-+ d.getAndTestImageEntry(t, 1, reg.url+"/library/busybox", busyboxId)
-+
-+ logDone("push - to additional registry")
-+}
-+
-+func TestPushOfficialImage(t *testing.T) {
-+ var reErr = regexp.MustCompile(`rename your repository to[^:]*:\s*<user>/busybox\b`)
-+
-+ // push busybox to public registry as "library/busybox"
-+ cmd := exec.Command(dockerBinary, "push", "library/busybox")
-+ stdin, err := cmd.StdinPipe()
-+ if err != nil {
-+ t.Fatalf("Failed to get stdin pipe for process: %v", err)
-+ }
-+ stdout, err := cmd.StdoutPipe()
-+ if err != nil {
-+ t.Fatalf("Failed to get stdout pipe for process: %v", err)
-+ }
-+ stderr, err := cmd.StderrPipe()
-+ if err != nil {
-+ t.Fatalf("Failed to get stderr pipe for process: %v", err)
-+ }
-+ if err := cmd.Start(); err != nil {
-+ t.Fatalf("Failed to start pushing to public registry: %v", err)
-+ }
-+ outReader := bufio.NewReader(stdout)
-+ readConfirmText(t, outReader)
-+ stdin.Write([]byte{'Y', '\n'})
-+
-+ errReader := bufio.NewReader(stderr)
-+ line, isPrefix, err := errReader.ReadLine()
-+ if err != nil {
-+ t.Fatalf("Failed to read farewell: %v", err)
-+ }
-+ if isPrefix {
-+ t.Errorf("Got unexpectedly long output.")
-+ }
-+ if !reErr.Match(line) {
-+ t.Errorf("Got unexpected output %q", line)
-+ }
-+ if line, _, err = outReader.ReadLine(); err != io.EOF {
-+ t.Errorf("Expected EOF, not: %q", line)
-+ }
-+ for ; err != io.EOF; line, _, err = errReader.ReadLine() {
-+ t.Errorf("Expected no message on stderr, got: %q", string(line))
-+ }
-+
-+ // Wait for command to finish with short timeout.
-+ finish := make(chan struct{})
-+ go func() {
-+ if err := cmd.Wait(); err == nil {
-+ t.Error("Push command should have failed.")
-+ }
-+ close(finish)
-+ }()
-+ select {
-+ case <-finish:
-+ case <-time.After(1 * time.Second):
-+ t.Fatalf("Docker push failed to exit.")
-+ }
-+
-+ logDone("push - official image")
-+}
---
-2.1.0
-
diff --git a/docker.spec b/docker.spec
index aa05fa7..0c8feb3 100644
--- a/docker.spec
+++ b/docker.spec
@@ -12,15 +12,20 @@
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
# docker stuff (prefix with d_)
-%global d_commit 9d26a0759b0724947c8c3a0859ac6a7919b6ab6b
+%global d_commit a53a6e6a7828e74554c7fd57673bf4e4b06c396f
%global d_shortcommit %(c=%{d_commit}; echo ${c:0:7})
-%global tar_import_path code.google.com/p/go/src/pkg/archive/tar
+#%global tar_import_path code.google.com/p/go/src/pkg/archive/tar
-%if 0%{?fedora} >= 23
+# docker-selinux conditional
+%if 0%{?fedora} >= 22 || 0%{?centos} >= 7 || 0%{?rhel} >= 7
+%global with_selinux 1
+%endif
+
+%if 0%{?with_selinux}
# docker-selinux stuff (prefix with ds_ for version/release etc.)
# Some bits borrowed from the openstack-selinux package
-%global ds_commit d74079c1a67f17051c9bc12ee7df0ec361509fb6
+%global ds_commit 4421e0d80866b4b03f6a16c5b6bfabdf4c8bfa7c
%global ds_shortcommit %(c=%{ds_commit}; echo ${c:0:7})
%global selinuxtype targeted
%global moduletype services
@@ -36,27 +41,26 @@
# Version of SELinux we were using
%global selinux_policyver 3.13.1-119
-%endif
+%endif # with_selinux
Name: %{repo}
-Version: 1.6.0
-Release: 3.git%{d_shortcommit}%{?dist}
+Version: 1.7.0
+Release: 1.git%{d_shortcommit}%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
URL: http://www.%{repo}.com
ExclusiveArch: x86_64 %{arm}
-# Branch used: https://github.com/rhatdan/docker/commits/fedora-1.6
-Source0: https://github.com/rhatdan/%{repo}/archive/%{d_commit}/%{repo}-%{d_shortcommit}.tar.gz
+# Branch used: https://github.com/lsm5/docker/commits/fedora-1.7
+Source0: https://github.com/lsm5/%{repo}/archive/%{d_commit}/%{repo}-%{d_shortcommit}.tar.gz
Source1: %{repo}.service
Source2: %{repo}.sysconfig
Source3: %{repo}-storage.sysconfig
Source4: %{repo}-logrotate.sh
Source5: README.%{repo}-logrotate
Source6: %{repo}-network.sysconfig
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
Source7: https://github.com/fedora-cloud/%{repo}-selinux/archive/%{ds_commit}/%{repo}-selinux-%{ds_shortcommit}.tar.gz
-%endif
-Patch0: Fixed-push-of-unqualified-registry.patch
+%endif # with_selinux
BuildRequires: glibc-static
BuildRequires: golang >= 1.3.3
BuildRequires: go-md2man
@@ -70,10 +74,10 @@ Requires: device-mapper-libs >= 1.02.90-1
%endif
# RE: rhbz#1195804 - ensure min NVR for selinux-policy
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
Requires: selinux-policy >= 3.13.1-114
Requires(pre): %{repo}-selinux >= %{version}-%{release}
-%endif
+%endif # with_selinux
# Resolves: rhbz#1045220
Requires: xz
@@ -106,7 +110,7 @@ Requires: golang >= 1.2.1-3
Provides: %{repo}-io-devel = %{version}-%{release}
Provides: %{repo}-pkg-devel = %{version}-%{release}
Provides: %{repo}-io-pkg-devel = %{version}-%{release}
-Provides: golang(%{import_path}/vendor/src/%{tar_import_path}) = %{version}-%{release}
+#Provides: golang(%{import_path}/vendor/src/%{tar_import_path}) = %{version}-%{release}
Summary: A golang registry for global request variables (source libraries)
Provides: golang(%{import_path}/contrib/docker-device-tool) = %{version}-%{release}
Provides: golang(%{import_path}/contrib/httpserver) = %{version}-%{release}
@@ -230,7 +234,7 @@ Provides: %{repo}-io-logrotate = %{version}-%{release}
This package installs %{summary}. logrotate is assumed to be installed on
containers for this to work, failures are silently ignored.
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
%package selinux
Summary: SELinux policies for Docker
BuildRequires: selinux-policy
@@ -244,7 +248,7 @@ Provides: %{repo}-io-selinux
%description selinux
SELinux policy modules for use with Docker.
-%endif
+%endif # with_selinux
%package vim
Summary: vim syntax highlighting files for Docker
@@ -266,13 +270,13 @@ This package installs %{summary}.
%prep
%setup -q -n %{repo}-%{d_commit}
-%patch0 -p1 -b unqualified-push
cp %{SOURCE5} .
+sed -i 's/$/%{?dist}/' VERSION
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
# unpack %{repo}-selinux
tar zxf %{SOURCE7}
-%endif
+%endif # with_selinux
%build
# set up temporary build gopath, and put our directory there
@@ -288,12 +292,12 @@ docs/man/md2man-all.sh
cp contrib/syntax/vim/LICENSE LICENSE-vim-syntax
cp contrib/syntax/vim/README.md README-vim-syntax.md
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
# build %{repo}-selinux
pushd %{repo}-selinux-%{ds_commit}
make SHARE="%{_datadir}" TARGETS="%{modulenames}"
popd
-%endif
+%endif # with_selinux
%install
# install binary
@@ -301,9 +305,9 @@ install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_libexecdir}/%{repo}
# Grab the first thing from -dev
-for x in bundles/%{version}; do \
- install -p -m 755 $x/dynbinary/%{repo}-%{version} %{buildroot}%{_bindir}/%{repo}
- install -p -m 755 $x/dynbinary/%{repo}init-%{version} %{buildroot}%{_libexecdir}/%{repo}/%{repo}init
+for x in bundles/*-dev%{?dist}; do \
+ install -p -m 755 $x/dynbinary/%{repo}-*-dev%{?dist} %{buildroot}%{_bindir}/%{repo}
+ install -p -m 755 $x/dynbinary/%{repo}init-*-dev%{?dist} %{buildroot}%{_libexecdir}/%{repo}/%{repo}init
break
done
@@ -354,7 +358,7 @@ install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{repo}
install -p -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/%{repo}-network
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{repo}-storage
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
# install SELinux interfaces
%_format INTERFACES $x.if
install -d %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
@@ -364,15 +368,15 @@ install -p -m 644 %{repo}-selinux-%{ds_commit}/$INTERFACES %{buildroot}%{_datadi
%_format MODULES $x.pp.bz2
install -d %{buildroot}%{_datadir}/selinux/packages
install -m 0644 %{repo}-selinux-%{ds_commit}/$MODULES %{buildroot}%{_datadir}/selinux/packages
-%endif
+%endif # with_selinux
# sources
install -d -p %{buildroot}%{gopath}/src/%{import_path}
rm -rf pkg/symlink/testdata
# install tar_import_path to devel package
-install -d -p %{buildroot}%{gopath}/src/%{import_path}/vendor/src/%{tar_import_path}
-cp -rpav vendor/src/%{tar_import_path}/* %{buildroot}%{gopath}/src/%{import_path}/vendor/src/%{tar_import_path}
+#install -d -p %{buildroot}%{gopath}/src/%{import_path}/vendor/src/%{tar_import_path}
+#cp -rpav vendor/src/%{tar_import_path}/* %{buildroot}%{gopath}/src/%{import_path}/vendor/src/%{tar_import_path}
# remove dirs that won't be installed in devel
rm -rf vendor docs _build bundles contrib/init hack project
@@ -408,7 +412,7 @@ exit 0
%post
%systemd_post %{repo}
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
%post selinux
# Install all modules in a single transaction
%_format MODULES %{_datadir}/selinux/packages/$x.pp.bz2
@@ -417,7 +421,7 @@ if %{_sbindir}/selinuxenabled ; then
%{_sbindir}/load_policy
%relabel_files
fi
-%endif
+%endif # with_selinux
%preun
%systemd_preun %{repo}
@@ -425,7 +429,7 @@ fi
%postun
%systemd_postun_with_restart %{repo}
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
%postun selinux
if [ $1 -eq 0 ]; then
%{_sbindir}/semodule -n -r %{modulenames} &> /dev/null || :
@@ -434,7 +438,7 @@ if %{_sbindir}/selinuxenabled ; then
%relabel_files
fi
fi
-%endif
+%endif # with_selinux
%files
%doc AUTHORS CHANGELOG.md CONTRIBUTING.md LICENSE MAINTAINERS NOTICE README.md
@@ -465,11 +469,11 @@ fi
%doc README.%{repo}-logrotate
%{_sysconfdir}/cron.daily/%{repo}-logrotate
-%if 0%{?fedora} >= 23
+%if 0%{?with_selinux}
%files selinux
%doc %{repo}-selinux-%{ds_commit}/README.md
%{_datadir}/selinux/*
-%endif
+%endif # with_selinux
%files vim
%{_datadir}/vim/vimfiles/doc/%{repo}file.txt
@@ -480,6 +484,10 @@ fi
%{_datadir}/zsh/site-functions/_%{repo}
%changelog
+* Mon Jun 01 2015 Lokesh Mandvekar <lsm5 at fedoraproject.org> - 1.7.0-1.gita53a6e6
+- built docker @lsm5/fedora commit#a53a6e6
+- modify docker-selinux condition
+
* Tue May 05 2015 Michal Minar <miminar at redhat.com> - 1.6.0-3.git9d26a07
- Resolves: bz#1217987 - fix unqualified push
diff --git a/sources b/sources
index 06365b7..5336329 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-ae4e63d04eb582e7e1c54c548b93434b docker-9d26a07.tar.gz
-4b29225af6b07ed0051216bbd613ab51 docker-selinux-d74079c.tar.gz
+83251f036ea92149b635455cfbe3eeb0 docker-a53a6e6.tar.gz
+267f404d7f1c83b26fe028ed76cb3607 docker-selinux-4421e0d.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/docker.git/commit/?h=f22&id=81fb0e4290c4ecd08d8a0249a7211e2651baf780
More information about the scm-commits
mailing list