Hi again,

please find the proposed patch series attached to this mail.

For your convenience, I have pushed the branch to my GitHub fork.  You
can review the changes at [1].

Thanks,
  Philipp

[1] https://github.com/pah/git/compare/debian-sid...deb-cred-gnome-keyring

-- 
vay' DalarghDI' yIqaw
From a3e3faf7a07d41d627588f353f5120b5095e737c Mon Sep 17 00:00:00 2001
From: "Philipp A. Hartmann" <[email protected]>
Date: Tue, 4 Mar 2014 15:39:37 +0100
Subject: [PATCH 1/3] debian/rules: add PKG_ARCH list

This patch adds a new variable PKG_ARCH holding the names of the
arch-dependant packages to the debian/rules file.

This simplifies the addition of further arch-dependant packages
from the Git sources, e.g. binaries built from the contrib/
directory.

Currently, only 'git' itself is in this list.

Signed-off-by: Philipp A. Hartmann <[email protected]>
---
 debian/rules | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/debian/rules b/debian/rules
index 69cb7a8..1320d08 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,6 +32,9 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   MAKEFLAGS += -j$(NUMJOBS)
 endif
 
+PKG_ARCH =
+PKG_ARCH += git
+
 PKG_INDEP =
 PKG_INDEP += git-doc
 PKG_INDEP += git-arch
@@ -111,13 +114,13 @@ clean: deb-checkdir
        rm -rf '$(TMP)'
        rm -f patch-stamp build-arch-stamp build-indep-stamp
        set -e; \
-         for i in '' $(patsubst git%,%,$(PKG_INDEP)) -core; do \
+         for i in $(patsubst git%,'%',$(PKG_ARCH) $(PKG_INDEP)) -core; do \
            rm -rf '$(GIT)'$$i; \
          done
        rm -f debian/files debian/substvars
 
 install: install-arch install-indep
-git.install: install-arch
+$(patsubst %,%.install,$(PKG_ARCH)): install-arch
 install-arch: deb-checkdir deb-checkuid build-arch-stamp
        # git
        rm -rf '$(GIT)'
@@ -136,12 +139,6 @@ install-arch: deb-checkdir deb-checkuid build-arch-stamp
        done
        rm -f '$(GIT)'/usr/bin/git-cvsserver
        rm -f '$(GIT)'/usr/bin/gitk
-       for i in '$(GIT)'/usr/bin/* '$(GIT)'/usr/lib/git-core/*; do \
-         test -d $$i || \
-         test "`head -c2 $$i`" = '#!' || \
-         test "`head -c2 $$i`" = '# ' || \
-         $(STRIP) -R .comment -R .note $$i; \
-       done
        # don't include git-gui's lib
        rm -rf '$(GIT)'/usr/share/git-gui/
        # don't include gitk's lib
@@ -186,6 +183,15 @@ install-arch: deb-checkdir deb-checkuid build-arch-stamp
        ln -s ../../../git-core/contrib/hooks \
          '$(GIT)'/usr/share/doc/git/contrib/
        find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f
+       # strip all arch binaries
+       for p in $(patsubst git%,'%',$(PKG_ARCH)) ; do \
+         for i in '$(GIT)'$$p/usr/bin/* '$(GIT)'$$p/usr/lib/git-core/*; do \
+           test -d $$i || test ! -f $$i || \
+           test "`head -c2 $$i`" = '#!' || \
+           test "`head -c2 $$i`" = '# ' || \
+           $(STRIP) -R .comment -R .note $$i; \
+         done; \
+       done
 
 $(patsubst %,%.install,$(PKG_INDEP)) git-core.install: install-indep
 install-indep: build-arch-stamp build-indep-stamp
@@ -365,11 +371,13 @@ git-core.deb-docs:
        : no doc dir
 
 binary: binary-arch binary-indep
-binary-arch: install-arch git.deb
+binary-arch: install-arch $(patsubst %,%.deb,$(PKG_ARCH))
        rm -f debian/substvars
-       dpkg-shlibdeps '$(GIT)'/usr/bin/* '$(GIT)'/usr/lib/git-core/*
-       dpkg-gencontrol -isp -pgit -P'$(GIT)'
-       dpkg -b '$(GIT)' ..
+       for i in $(patsubst git%,'%',$(PKG_ARCH)); do \
+         dpkg-shlibdeps '$(GIT)'$$i/usr/bin/* '$(GIT)'$$i/usr/lib/git-core/* ; 
\
+         dpkg-gencontrol -isp -pgit$$i -P'$(GIT)'$$i && \
+         dpkg -b '$(GIT)'$$i .. || exit 1; \
+       done
 binary-indep: install-indep $(patsubst %,%.deb,$(PKG_INDEP)) 
git-core.deb-DEBIAN
        rm -f debian/substvars
        for i in $(patsubst git%,%,$(PKG_INDEP)) -core; do \
-- 
1.9.0


From a2a2beddb1e099065cf30506445c41ddab9640b1 Mon Sep 17 00:00:00 2001
From: "Philipp A. Hartmann" <[email protected]>
Date: Tue, 4 Mar 2014 15:42:24 +0100
Subject: [PATCH 2/3] git-credential-gnome-keyring: add new package

This patch adds a new package for 'git-credential-gnome-keyring'
to Debian's Git source package.

Quoting from its README.Debian:

  Git will sometimes need credentials from the user in order to perform
  operations; for example, it may need to ask for a username and password in
  order to access a remote repository over HTTP.  This package contains a Git
  credential helper for passwords stored in a GNOME keyring.

Signed-off-by: Philipp A. Hartmann <[email protected]>
---
 debian/control                                    | 20 +++++++++++++++++++-
 debian/git-credential-gnome-keyring.README.Debian | 14 ++++++++++++++
 debian/rules                                      | 12 ++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 debian/git-credential-gnome-keyring.README.Debian

diff --git a/debian/control b/debian/control
index 14e14b7..b1e8566 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,8 @@ Build-Depends: libz-dev, libpcre3-dev, gettext,
  bzr, python, python-bzrlib,
  cvs, cvsps, libdbd-sqlite3-perl,
  unzip, libio-pty-perl,
- dpkg-dev (>= 1.16.2~)
+ dpkg-dev (>= 1.16.2~),
+ libgnome-keyring-dev
 Build-Depends-Indep: asciidoc, xmlto, docbook-xsl
 Standards-Version: 3.9.4.0
 Homepage: http://git-scm.com/
@@ -376,6 +377,23 @@ Description: fast, scalable, distributed revision control 
system (web interface)
  If libcgi-fast-perl is installed, gitweb can also be run over FastCGI
  (and served by nginx, for example).
 
+Package: git-credential-gnome-keyring
+Architecture: any
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, git (>> 1:1.7.9)
+Description: fast, scalable, distributed revision control system (GNOME 
keyring helper)
+ Git is popular version control system designed to handle very large
+ projects with speed and efficiency; it is used for many high profile
+ open source projects, most notably the Linux kernel.
+ .
+ Git falls in the category of distributed source code management tools.
+ Every Git working directory is a full-fledged repository with full
+ revision tracking capabilities, not dependent on network access or a
+ central server.
+ .
+ This package provides a gitcredentials(7) helper to access and manage
+ usernames and passwords for Git stored in the GNOME keyring.
+
 Package: git-all
 Architecture: all
 Multi-Arch: foreign
diff --git a/debian/git-credential-gnome-keyring.README.Debian 
b/debian/git-credential-gnome-keyring.README.Debian
new file mode 100644
index 0000000..a0d5152
--- /dev/null
+++ b/debian/git-credential-gnome-keyring.README.Debian
@@ -0,0 +1,14 @@
+git-credential-gnome-keyring for Debian
+---------------------------------------
+
+Git will sometimes need credentials from the user in order to perform
+operations; for example, it may need to ask for a username and password in
+order to access a remote repository over HTTP.  This package contains a Git
+credential helper for passwords stored in a GNOME keyring.
+
+To use this backend, you can add it to your (global) Git
+configuration by setting
+
+  git config [--global] credential.helper gnome-keyring
+
+See gitcredentials(7) for more information.
diff --git a/debian/rules b/debian/rules
index 1320d08..6ebe802 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,6 +34,7 @@ endif
 
 PKG_ARCH =
 PKG_ARCH += git
+PKG_ARCH += git-credential-gnome-keyring
 
 PKG_INDEP =
 PKG_INDEP += git-doc
@@ -72,6 +73,9 @@ build-arch-stamp: patch-stamp
        test -z '$(TEST)' || \
          DESTDIR='$(GIT)' $(MAKE) $(TEST) $(OPTS) || \
          GIT_TEST_OPTS=--verbose DESTDIR='$(GIT)' $(MAKE) $(TEST) $(OPTS)
+       # git-credential-gnome-keyring
+       DESTDIR='$(GIT)'-credential-gnome-keyring \
+         $(MAKE) -Ccontrib/credential/gnome-keyring all $(OPTS)
        touch build-arch-stamp
 
 build-indep: deb-checkdir build-indep-stamp
@@ -102,6 +106,7 @@ clean: deb-checkdir
        rm -f debian/git-remote-bzr.xml debian/git-remote-bzr.html
        rm -f Documentation/git-remote-bzr.1
        $(MAKE) clean $(OPTS)
+       $(MAKE) -Ccontrib/credential/gnome-keyring clean $(OPTS)
        ! test -e patch-stamp || \
        { \
          set -e; \
@@ -173,6 +178,7 @@ install-arch: deb-checkdir deb-checkuid build-arch-stamp
        install -d -m0755 '$(GIT)'/usr/share/doc/git
        cp -R contrib '$(GIT)'/usr/share/doc/git/
        rm -rf '$(GIT)'/usr/share/doc/git/contrib/completion
+       rm -rf '$(GIT)'/usr/share/doc/git/contrib/credential/gnome-keyring
        rm -rf '$(GIT)'/usr/share/doc/git/contrib/emacs
        rm -rf '$(GIT)'/usr/share/doc/git/contrib/mw-to-git
        find '$(GIT)'/usr/share/doc/git/contrib -type f | xargs chmod 0644
@@ -183,6 +189,12 @@ install-arch: deb-checkdir deb-checkuid build-arch-stamp
        ln -s ../../../git-core/contrib/hooks \
          '$(GIT)'/usr/share/doc/git/contrib/
        find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f
+       # git-credential-gnome-keyring
+       install -d -m0755 \
+         '$(GIT)'-credential-gnome-keyring/usr/lib/git-core
+       install -m0755 \
+         contrib/credential/gnome-keyring/git-credential-gnome-keyring \
+         '$(GIT)'-credential-gnome-keyring/usr/lib/git-core/
        # strip all arch binaries
        for p in $(patsubst git%,'%',$(PKG_ARCH)) ; do \
          for i in '$(GIT)'$$p/usr/bin/* '$(GIT)'$$p/usr/lib/git-core/*; do \
-- 
1.9.0


From 773abff417920320b72060ad8252c457ab1e9cc1 Mon Sep 17 00:00:00 2001
From: "Philipp A. Hartmann" <[email protected]>
Date: Tue, 4 Mar 2014 16:40:49 +0100
Subject: [PATCH 3/3] git-credential-gnome-keyring: update changelog

Signed-off-by: Philipp A. Hartmann <[email protected]>
---
 debian/changelog | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 943612d..6a97d0b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
 git (1:1.9.0-1.1) unstable; urgency=low
 
+  [ Jonathan Nieder ]
   * git-email: Recommends: libio-socket-ssl-perl (>= 1.951) since
     earlier versions do not use OpenSSL's defaults when ca_path
     and ca_file are unset.
 
+  [ Philipp A. Hartmann ]
+  * git-credential-gnome-keyring: add new package for GNOME keyring
+    credentials helper from contrib/ directory (closes: #740739)
+
  -- Jonathan Nieder <[email protected]>  Tue, 25 Feb 2014 21:16:56 -0800
 
 git (1:1.9.0-1) unstable; urgency=low
-- 
1.9.0

Reply via email to