git: replace remaining broken hardlinks with symlinks.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/3 git: replace remaining broken hardlinks with symlinks.
--- recipes/git/git_1.7.0.2.bb | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
recipes/git/git_1.7.0.2.bb +6 -2
@@ -14,14 +14,18 @@ RDEPENDS_${PN} = "perl perl-module-file-path cpio findutils sed" # Dropbear ssh needs a wrapper script, so install openssh-ssh to make it work out of the box RRECOMMENDS_${PN} = "openssh-ssh" -PR = "r6" +PR = "r6.1" do_install_append() { # Fix broken hardlinks for gitprog in git-receive-pack git-upload-archive ; do - rm ${D}${bindir}/$gitprog + rm ${D}${bindir}/$gitprog ln -sf ${bindir}/git ${D}${bindir}/$gitprog done + for gitprog in git-cvsserver git-shell git-upload-pack ; do + rm ${D}/usr/libexec/git-core/$gitprog + ln -sf ${bindir}/$gitprog ${D}/usr/libexec/git-core/$gitprog + done rm ${D}${libexecdir}/git-core/git && ln -sf ${bindir}/git ${D}${libexecdir}/git-core/git }
Signature · 1 line
1.7.1
Dear Yann,
Am Mittwoch, den 04.08.2010, 00:50 +0200 schrieb Yann Dirson:
[…]
could you do me a favor and explain what is broken regarding hardlinks please. This issue was pointed out to me before, but I could not reproduce it or did not understand it [1].
Thanks,
Paul
[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-July/021869.html
Hi Paul,
Quoted 4 lines
Objet: Re: [oe] [PATCH 1/3] git: replace remaining broken hardlinks with symlinks. could you do me a favor and explain what is broken regarding hardlinks please. This issue was pointed out to me before, but I could not reproduce it or did not understand it [1].
I was puzzled myself :)
While dpkg itself handles hardlinks in deb's (and thus in ipk's), if you run "dpkg --fsystarfile git*.ipk|tar tvf -", you won't see any hardlink in the tar, even though the Makefile creates them. You can also "dpkg-deb -x" the ipk and check that no hardlink gets extracted.
You can also comment out the loop that relinks binaries in current recipe, and see the size of extracted ipk grow to 40+ MB.
Now I just assumed it was a bug in the mechanism generating the ipk's, but one should first check that the output of do_stage is correct before pointing a finger :) I don't claim this patch fixes the root cause of the problem, it just mitigates it and just allows me to bring a working git in my pocket :)
PATCH v2 1/3 git: replace remaining broken hardlinks with symlinks.
In reply to Yann Dirson--- recipes/git/git_1.7.0.2.bb | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
recipes/git/git_1.7.0.2.bb +6 -2
@@ -14,14 +14,18 @@ RDEPENDS_${PN} = "perl perl-module-file-path cpio findutils sed" # Dropbear ssh needs a wrapper script, so install openssh-ssh to make it work out of the box RRECOMMENDS_${PN} = "openssh-ssh" -PR = "r7" +PR = "r8" do_install_append() { # Fix broken hardlinks for gitprog in git-receive-pack git-upload-archive ; do - rm ${D}${bindir}/$gitprog + rm ${D}${bindir}/$gitprog ln -sf ${bindir}/git ${D}${bindir}/$gitprog done + for gitprog in git-cvsserver git-shell git-upload-pack ; do + rm ${D}${libexecdir}/git-core/$gitprog + ln -sf ${bindir}/$gitprog ${D}${libexecdir}/git-core/$gitprog + done rm ${D}${libexecdir}/git-core/git && ln -sf ${bindir}/git ${D}${libexecdir}/git-core/git }
Signature · 1 line
1.7.2.3
PATCH v2 2/3 git: split space-hungry rarely-used commands into -perltools and -large packages.
This trims the main package by ~75%, and split of all perl scripts allows to spare the installation of perl, which is no small bargain either.
Note that git-remote-http triggers a strange bug (OE#5465), so it is not split out for now.
Also drop cpio dependency, which has been unneeded since a number of git revisions.
Tested rapidly on shr/testing: seen no problem doing clone/commit/amend/reset/ revert/log/status/diff/rebase -i/conflict resolution.
--- recipes/git/git_1.7.0.2.bb | 46 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 44 insertions(+), 2 deletions(-)
recipes/git/git_1.7.0.2.bb +44 -2
@@ -9,12 +9,12 @@ EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes" DEPENDS = "openssl curl zlib expat" -RDEPENDS_${PN} = "perl perl-module-file-path cpio findutils sed" +RDEPENDS_${PN} = "findutils sed" # Dropbear ssh needs a wrapper script, so install openssh-ssh to make it work out of the box RRECOMMENDS_${PN} = "openssh-ssh" -PR = "r8" +PR = "r9" do_install_append() { # Fix broken hardlinks
@@ -30,3 +30,45 @@ do_install_append() { } FILES_${PN}-dbg += "${libexecdir}/git-core/.debug" + +PACKAGES =+ "${PN}-perltools" +FILES_${PN}-perltools += " \ + ${libexecdir}/git-core/git-add--interactive \ + ${libexecdir}/git-core/git-archimport \ + ${libexecdir}/git-core/git-cvsexportcommit \ + ${libexecdir}/git-core/git-cvsimport \ + ${libexecdir}/git-core/git-cvsserver \ + ${bindir}/git-cvsserver \ + ${libexecdir}/git-core/git-difftool \ + ${libexecdir}/git-core/git-relink \ + ${libexecdir}/git-core/git-send-email \ + ${libexecdir}/git-core/git-svn \ + ${datadir}/perl \ +" +RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils" + +PACKAGES =+ "${PN}-large" +FILES_${PN}-large += " \ + ${libexecdir}/git-core/git-http-backend \ + ${libexecdir}/git-core/git-daemon \ + ${libexecdir}/git-core/git-http-push \ + ${libexecdir}/git-core/git-quiltimport \ + ${libexecdir}/git-core/git-request-pull \ + ${libexecdir}/git-core/git-shell \ + ${bindir}/git-shell \ + ${libexecdir}/git-core/git-instaweb \ + ${libexecdir}/git-core/git-fast-import \ + ${libexecdir}/git-core/git-imap-send \ +" +# those might be useful in a less-than-large package ? +FILES_${PN}-large += " \ + ${libexecdir}/git-core/git-http-fetch \ + ${libexecdir}/git-core/git-upload-pack \ + ${bindir}/git-upload-pack \ +" +# same here, but adding it causes git to depend on git-large(!) +# see http://bugs.openembedded.net/show_bug.cgi?id=5465 +#FILES_${PN}-large += " \ +# ${libexecdir}/git-core/git-remote-http \ +#" +RDEPENDS_${PN}-large = "${PN}"
Signature · 1 line
1.7.2.3
PATCH v2 3/3 git: activate gitk.
It does not work perfectly (complains about possible problems in the tcl package), and buttons are huge, but it allows to browse history.
git-gui OTOH does not start at all, it only complains that tk is not correctly installed, so it is commented out.
--- recipes/git/git-native_1.7.0.2.bb | 1 + recipes/git/git.inc | 2 -- recipes/git/git_1.7.0.2.bb | 22 ++++++++++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-)
recipes/git/git-native_1.7.0.2.bb +1 -0
@@ -6,3 +6,4 @@ SRC_URI[src.md5sum] = "76518fa774b36de81d160b85fa4f19c1" SRC_URI[src.sha256sum] = "5601df7fc282fdd66de196b282694eb77dcfc50438f01587de144b3ead1a6b2f" EXTRA_OECONF_append = " --without-python" +EXTRA_OEMAKE = "NO_TCLTK=1"
recipes/git/git.inc +0 -2
@@ -8,8 +8,6 @@ S = "${WORKDIR}/git-${PV}" inherit autotools -EXTRA_OEMAKE = "NO_TCLTK=1" - do_install () { oe_runmake install DESTDIR="${D}" bindir=${bindir} \ template_dir=${datadir}/git-core/templates \
recipes/git/git_1.7.0.2.bb +20 -2
@@ -8,13 +8,13 @@ SRC_URI += "file://git-less-hardlinks.diff" EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes" -DEPENDS = "openssl curl zlib expat" +DEPENDS = "openssl curl zlib expat tcl-native" RDEPENDS_${PN} = "findutils sed" # Dropbear ssh needs a wrapper script, so install openssh-ssh to make it work out of the box RRECOMMENDS_${PN} = "openssh-ssh" -PR = "r9" +PR = "r10" do_install_append() { # Fix broken hardlinks
@@ -72,3 +72,21 @@ FILES_${PN}-large += " \ # ${libexecdir}/git-core/git-remote-http \ #" RDEPENDS_${PN}-large = "${PN}" + +# git-tk package with gitk and git-gui +PACKAGES =+ "${PN}-tk" +RDEPENDS_${PN}-tk = "${PN} tk tcl" +EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" +FILES_${PN}-tk = " \ + ${bindir}/gitk \ + ${datadir}/gitk \ +" +# git gui does not start at all at this time +#FILES_${PN}-tk += " \ +# ${libexecdir}/git-core/git-gui \ +# ${libexecdir}/git-core/git-gui--askpass \ +# ${datadir}/git-gui \ +#" +#PACKAGES += "${PN}-tk-locale" +#PACKAGES_DYNAMIC = "${PN}-tk-locale-*" +#FILES_${PN}-tk-locale = "${datadir}/git-gui/lib/msgs"
Signature · 1 line
1.7.2.3