summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/git
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/git')
-rw-r--r--meta/recipes-devtools/git/git/0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch30
-rw-r--r--meta/recipes-devtools/git/git_2.30.1.bb9
-rw-r--r--meta/recipes-devtools/git/git_2.44.0.bb (renamed from meta/recipes-devtools/git/git.inc)81
3 files changed, 84 insertions, 36 deletions
diff --git a/meta/recipes-devtools/git/git/0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch b/meta/recipes-devtools/git/git/0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch
new file mode 100644
index 0000000000..d80d082ba3
--- /dev/null
+++ b/meta/recipes-devtools/git/git/0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch
@@ -0,0 +1,30 @@
1From c0c5241abdc113acbe6bcd960686cea414bce357 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 7 Feb 2022 10:13:15 +0100
4Subject: [PATCH] config.mak.uname: do not force RHEL-7 specific build settings
5
6This breaks reproducibility as git builds on centos 7 use
7different flags than git builds on other host distros.
8
9Upstream-Status: Inappropriate [upstream needs to check compiler and component versions properly]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11
12---
13 config.mak.uname | 4 ----
14 1 file changed, 4 deletions(-)
15
16diff --git a/config.mak.uname b/config.mak.uname
17index 259d151..136ae3b 100644
18--- a/config.mak.uname
19+++ b/config.mak.uname
20@@ -64,10 +64,6 @@ ifeq ($(uname_S),Linux)
21 PROCFS_EXECUTABLE_PATH = /proc/self/exe
22 HAVE_PLATFORM_PROCINFO = YesPlease
23 COMPAT_OBJS += compat/linux/procinfo.o
24- # centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7.
25- ifneq ($(findstring .el7.,$(uname_R)),)
26- BASIC_CFLAGS += -std=c99
27- endif
28 endif
29 ifeq ($(uname_S),GNU/kFreeBSD)
30 HAVE_ALLOCA_H = YesPlease
diff --git a/meta/recipes-devtools/git/git_2.30.1.bb b/meta/recipes-devtools/git/git_2.30.1.bb
deleted file mode 100644
index bc1635ada9..0000000000
--- a/meta/recipes-devtools/git/git_2.30.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
1require git.inc
2
3EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
4 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
5 "
6EXTRA_OEMAKE += "NO_GETTEXT=1"
7
8SRC_URI[tarball.sha256sum] = "23a3e53f0d2dd3e62a8147b24a1a91d6ffe95b92123ef4dbae04e9a6205e71c0"
9SRC_URI[manpages.sha256sum] = "db323e1b242e9d0337363b1e538c8b879e4c46eedbf94d3bee9e65dab6d49138"
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git_2.44.0.bb
index 0cc40b9378..90e555eba7 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git_2.44.0.bb
@@ -2,55 +2,74 @@ SUMMARY = "Distributed version control system"
2HOMEPAGE = "http://git-scm.com" 2HOMEPAGE = "http://git-scm.com"
3DESCRIPTION = "Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency." 3DESCRIPTION = "Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
4SECTION = "console/utils" 4SECTION = "console/utils"
5LICENSE = "GPLv2" 5LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause & MIT & BSL-1.0 & LGPL-2.1-or-later"
6DEPENDS = "openssl curl zlib expat" 6DEPENDS = "openssl zlib"
7DEPENDS:class-native += "ca-certificates"
7 8
8PROVIDES_append_class-native = " git-replacement-native" 9PROVIDES:append:class-native = " git-replacement-native"
9 10
10SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ 11SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
11 ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \ 12 file://fixsort.patch \
12 file://fixsort.patch" 13 file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \
14 "
13 15
14S = "${WORKDIR}/git-${PV}" 16S = "${WORKDIR}/git-${PV}"
15 17
16LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1" 18LIC_FILES_CHKSUM = "\
19 file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1 \
20 file://reftable/LICENSE;md5=1a6424cafc4c9c88c689848e165af33b \
21 file://sha1dc/LICENSE.txt;md5=9bbe4c990a9e98ea4b98ef5d3bcb8a7a \
22 file://compat/nedmalloc/License.txt;md5=e4224ccaecb14d942c71d31bef20d78c \
23 file://compat/inet_ntop.c;md5=76593c6f74e8ced5b24520175688d59b;endline=16 \
24 file://compat/obstack.h;md5=08ad25fee5428cd879ceef451ce3a22e;endline=18 \
25 file://compat/poll/poll.h;md5=9fc00170a53b8e3e52157c91ac688dd1;endline=19 \
26 file://compat/regex/regex.h;md5=30cc8af0e6f0f8a25acec6d8783bb763;beginline=4;endline=22 \
27"
17 28
18CVE_PRODUCT = "git-scm:git" 29CVE_PRODUCT = "git-scm:git"
19 30
20PACKAGECONFIG ??= "" 31PACKAGECONFIG ??= "expat curl"
21PACKAGECONFIG[cvsserver] = "" 32PACKAGECONFIG[cvsserver] = ""
22PACKAGECONFIG[svn] = "" 33PACKAGECONFIG[svn] = ""
34PACKAGECONFIG[manpages] = ",,asciidoc-native xmlto-native"
35PACKAGECONFIG[curl] = "--with-curl,--without-curl,curl"
36PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
23 37
24EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \ 38EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
25 --without-tcltk \ 39 --without-tcltk \
26 --without-iconv \ 40 --without-iconv \
27" 41"
28EXTRA_OECONF_append_class-nativesdk = " --with-gitconfig=/etc/gitconfig " 42EXTRA_OECONF:append:class-nativesdk = " --with-gitconfig=/etc/gitconfig "
29 43
30# Needs brokensep as this doesn't use automake 44# Needs brokensep as this doesn't use automake
31inherit autotools-brokensep perlnative bash-completion 45inherit autotools-brokensep perlnative bash-completion manpages
32 46
33EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" 47EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
34EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'" 48EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'"
35EXTRA_OEMAKE_append_class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1" 49EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no"
50EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1"
36 51
37do_compile_prepend () { 52do_compile:prepend () {
38 # Remove perl/perl.mak to fix the out-of-date perl.mak error 53 # Remove perl/perl.mak to fix the out-of-date perl.mak error
39 # during rebuild 54 # during rebuild
40 rm -f perl/perl.mak 55 rm -f perl/perl.mak
56
57 if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then
58 oe_runmake man
59 fi
41} 60}
42 61
43do_install () { 62do_install () {
44 oe_runmake install DESTDIR="${D}" bindir=${bindir} \ 63 oe_runmake install DESTDIR="${D}" bindir=${bindir} \
45 template_dir=${datadir}/git-core/templates 64 template_dir=${datadir}/git-core/templates
46 65
47 for section in man1 man5 man7; do
48 install -d ${D}/${mandir}/$section
49 install -t ${D}/${mandir}/$section ${WORKDIR}/$section/*
50 done
51
52 install -d ${D}/${datadir}/bash-completion/completions/ 66 install -d ${D}/${datadir}/bash-completion/completions/
53 install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git 67 install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
68
69 if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then
70 # Needs to be serial with make 4.4 due to https://savannah.gnu.org/bugs/index.php?63362
71 make install-man DESTDIR="${D}"
72 fi
54} 73}
55 74
56perl_native_fixup () { 75perl_native_fixup () {
@@ -77,29 +96,30 @@ perl_native_fixup () {
77 96
78REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core" 97REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
79REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates" 98REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
99REL_GIT_SSL_CAINFO = "${@os.path.relpath(sysconfdir, bindir)}/ssl/certs/ca-certificates.crt"
80 100
81do_install_append_class-target () { 101do_install:append:class-target () {
82 perl_native_fixup 102 perl_native_fixup
83} 103}
84 104
85do_install_append_class-native() { 105do_install:append:class-native() {
86 create_wrapper ${D}${bindir}/git \ 106 create_wrapper ${D}${bindir}/git \
87 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ 107 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
108 GIT_SSL_CAINFO='`dirname $''realpath`'/${REL_GIT_SSL_CAINFO} \
88 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} 109 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
89} 110}
90 111
91do_install_append_class-nativesdk() { 112do_install:append:class-nativesdk() {
92 create_wrapper ${D}${bindir}/git \ 113 create_wrapper ${D}${bindir}/git \
93 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ 114 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
94 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} 115 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
95 perl_native_fixup 116 perl_native_fixup
96} 117}
97 118
98FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/" 119FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
99 120
100PERLTOOLS = " \ 121PERLTOOLS = " \
101 ${bindir}/git-cvsserver \ 122 ${bindir}/git-cvsserver \
102 ${libexecdir}/git-core/git-add--interactive \
103 ${libexecdir}/git-core/git-archimport \ 123 ${libexecdir}/git-core/git-archimport \
104 ${libexecdir}/git-core/git-cvsexportcommit \ 124 ${libexecdir}/git-core/git-cvsexportcommit \
105 ${libexecdir}/git-core/git-cvsimport \ 125 ${libexecdir}/git-core/git-cvsimport \
@@ -115,25 +135,32 @@ PERLTOOLS = " \
115 135
116# Git tools requiring perl 136# Git tools requiring perl
117PACKAGES =+ "${PN}-perltools" 137PACKAGES =+ "${PN}-perltools"
118FILES_${PN}-perltools += " \ 138FILES:${PN}-perltools += " \
119 ${PERLTOOLS} \ 139 ${PERLTOOLS} \
120 ${libdir}/perl \ 140 ${libdir}/perl \
121 ${datadir}/perl5 \ 141 ${datadir}/perl5 \
122" 142"
123 143
124RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils" 144RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils"
125 145
126# git-tk package with gitk and git-gui 146# git-tk package with gitk and git-gui
127PACKAGES =+ "${PN}-tk" 147PACKAGES =+ "${PN}-tk"
128#RDEPENDS_${PN}-tk = "${PN} tk tcl" 148#RDEPENDS:${PN}-tk = "${PN} tk tcl"
129#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" 149#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh"
130FILES_${PN}-tk = " \ 150FILES:${PN}-tk = " \
131 ${bindir}/gitk \ 151 ${bindir}/gitk \
132 ${datadir}/gitk \ 152 ${datadir}/gitk \
133" 153"
134 154
135PACKAGES =+ "gitweb" 155PACKAGES =+ "gitweb"
136FILES_gitweb = "${datadir}/gitweb/" 156FILES:gitweb = "${datadir}/gitweb/"
137RDEPENDS_gitweb = "perl" 157RDEPENDS:gitweb = "perl"
138 158
139BBCLASSEXTEND = "native nativesdk" 159BBCLASSEXTEND = "native nativesdk"
160
161EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
162 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
163 "
164EXTRA_OEMAKE += "NO_GETTEXT=1"
165
166SRC_URI[tarball.sha256sum] = "f9e36f085458fe9688fbbe7846b8c4770b13d161fcd8953655f36b2b85f06b76"