diff options
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-.patch | 30 | ||||
-rw-r--r-- | meta/recipes-devtools/git/git/fixsort.patch | 31 | ||||
-rw-r--r-- | meta/recipes-devtools/git/git_2.24.1.bb | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/git/git_2.44.1.bb (renamed from meta/recipes-devtools/git/git.inc) | 82 |
4 files changed, 118 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 @@ +From c0c5241abdc113acbe6bcd960686cea414bce357 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Mon, 7 Feb 2022 10:13:15 +0100 +Subject: [PATCH] config.mak.uname: do not force RHEL-7 specific build settings + +This breaks reproducibility as git builds on centos 7 use +different flags than git builds on other host distros. + +Upstream-Status: Inappropriate [upstream needs to check compiler and component versions properly] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> + +--- + config.mak.uname | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/config.mak.uname b/config.mak.uname +index 259d151..136ae3b 100644 +--- a/config.mak.uname ++++ b/config.mak.uname +@@ -64,10 +64,6 @@ ifeq ($(uname_S),Linux) + PROCFS_EXECUTABLE_PATH = /proc/self/exe + HAVE_PLATFORM_PROCINFO = YesPlease + COMPAT_OBJS += compat/linux/procinfo.o +- # centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7. +- ifneq ($(findstring .el7.,$(uname_R)),) +- BASIC_CFLAGS += -std=c99 +- endif + endif + ifeq ($(uname_S),GNU/kFreeBSD) + HAVE_ALLOCA_H = YesPlease diff --git a/meta/recipes-devtools/git/git/fixsort.patch b/meta/recipes-devtools/git/git/fixsort.patch new file mode 100644 index 0000000000..07a487e8ca --- /dev/null +++ b/meta/recipes-devtools/git/git/fixsort.patch @@ -0,0 +1,31 @@ +[PATCH] generate-configlist.sh: Fix determinism issue + +Currently git binaries are not entirely reproducible, at least partly +due to config-list.h differing in order depending on the system's +locale settings. Under different locales, the entries: + +"sendemail.identity", +"sendemail.<identity>.*", + +would differ in order for example and this leads to differences in +the debug symbols for the binaries. + +This can be fixed by specifying the C locale for the sort in the +shell script generating the header. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Upstream-Status: Submitted [https://public-inbox.org/git/f029a942dd3d50d85e60bd37d8e454524987842f.camel@linuxfoundation.org/T/#u] + +Index: git-2.30.0/generate-configlist.sh +=================================================================== +--- git-2.30.0.orig/generate-configlist.sh ++++ git-2.30.0/generate-configlist.sh +@@ -9,7 +9,7 @@ static const char *config_name_list[] = + EOF + grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt | + sed '/deprecated/d; s/::$//; s/, */\n/g' | +- sort | ++ LC_ALL=C sort | + sed 's/^.*$/ "&",/' + cat <<EOF + NULL, diff --git a/meta/recipes-devtools/git/git_2.24.1.bb b/meta/recipes-devtools/git/git_2.24.1.bb deleted file mode 100644 index daea31eab2..0000000000 --- a/meta/recipes-devtools/git/git_2.24.1.bb +++ /dev/null @@ -1,11 +0,0 @@ -require git.inc - -EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ - ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ - " -EXTRA_OEMAKE += "NO_GETTEXT=1" - -SRC_URI[tarball.md5sum] = "166bde96adbbc11c8843d4f8f4f9811b" -SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02" -SRC_URI[manpages.md5sum] = "31c2272a8979022497ba3d4202df145d" -SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230" diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git_2.44.1.bb index 95ab397f6a..53d67eb40a 100644 --- a/meta/recipes-devtools/git/git.inc +++ b/meta/recipes-devtools/git/git_2.44.1.bb @@ -1,52 +1,76 @@ SUMMARY = "Distributed version control system" HOMEPAGE = "http://git-scm.com" +DESCRIPTION = "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." SECTION = "console/utils" -LICENSE = "GPLv2" -DEPENDS = "openssl curl zlib expat" +LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause & MIT & BSL-1.0 & LGPL-2.1-or-later" +DEPENDS = "openssl zlib" +DEPENDS:class-native += "ca-certificates" -PROVIDES_append_class-native = " git-replacement-native" +PROVIDES:append:class-native = " git-replacement-native" SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ - ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages" + file://fixsort.patch \ + file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \ + " S = "${WORKDIR}/git-${PV}" -LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1 \ + file://reftable/LICENSE;md5=1a6424cafc4c9c88c689848e165af33b \ + file://sha1dc/LICENSE.txt;md5=9bbe4c990a9e98ea4b98ef5d3bcb8a7a \ + file://compat/nedmalloc/License.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ + file://compat/inet_ntop.c;md5=76593c6f74e8ced5b24520175688d59b;endline=16 \ + file://compat/obstack.h;md5=08ad25fee5428cd879ceef451ce3a22e;endline=18 \ + file://compat/poll/poll.h;md5=9fc00170a53b8e3e52157c91ac688dd1;endline=19 \ + file://compat/regex/regex.h;md5=30cc8af0e6f0f8a25acec6d8783bb763;beginline=4;endline=22 \ +" CVE_PRODUCT = "git-scm:git" -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "expat curl" PACKAGECONFIG[cvsserver] = "" PACKAGECONFIG[svn] = "" +PACKAGECONFIG[manpages] = ",,asciidoc-native xmlto-native" +PACKAGECONFIG[curl] = "--with-curl,--without-curl,curl" +PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat" EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \ --without-tcltk \ + --without-iconv \ " +EXTRA_OECONF:append:class-nativesdk = " --with-gitconfig=/etc/gitconfig " +EXTRA_OECONF:append:class-native = " --with-gitconfig=/etc/gitconfig " # Needs brokensep as this doesn't use automake -inherit autotools-brokensep perlnative bash-completion +inherit autotools-brokensep perlnative bash-completion manpages EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'" -EXTRA_OEMAKE_append_class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1" +EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no" +EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1" -do_compile_prepend () { +do_compile:prepend () { # Remove perl/perl.mak to fix the out-of-date perl.mak error # during rebuild rm -f perl/perl.mak + + if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then + oe_runmake man + fi } do_install () { oe_runmake install DESTDIR="${D}" bindir=${bindir} \ template_dir=${datadir}/git-core/templates - for section in man1 man5 man7; do - install -d ${D}/${mandir}/$section - install -t ${D}/${mandir}/$section ${WORKDIR}/$section/* - done - install -d ${D}/${datadir}/bash-completion/completions/ install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git + + if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then + # Needs to be serial with make 4.4 due to https://savannah.gnu.org/bugs/index.php?63362 + make install-man DESTDIR="${D}" + fi } perl_native_fixup () { @@ -73,29 +97,30 @@ perl_native_fixup () { REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core" REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates" +REL_GIT_SSL_CAINFO = "${@os.path.relpath(sysconfdir, bindir)}/ssl/certs/ca-certificates.crt" -do_install_append_class-target () { +do_install:append:class-target () { perl_native_fixup } -do_install_append_class-native() { +do_install:append:class-native() { create_wrapper ${D}${bindir}/git \ GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ + GIT_SSL_CAINFO='`dirname $''realpath`'/${REL_GIT_SSL_CAINFO} \ GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} } -do_install_append_class-nativesdk() { +do_install:append:class-nativesdk() { create_wrapper ${D}${bindir}/git \ GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} perl_native_fixup } -FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/" +FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/" PERLTOOLS = " \ ${bindir}/git-cvsserver \ - ${libexecdir}/git-core/git-add--interactive \ ${libexecdir}/git-core/git-archimport \ ${libexecdir}/git-core/git-cvsexportcommit \ ${libexecdir}/git-core/git-cvsimport \ @@ -111,25 +136,32 @@ PERLTOOLS = " \ # Git tools requiring perl PACKAGES =+ "${PN}-perltools" -FILES_${PN}-perltools += " \ +FILES:${PN}-perltools += " \ ${PERLTOOLS} \ ${libdir}/perl \ ${datadir}/perl5 \ " -RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils" +RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils" # git-tk package with gitk and git-gui PACKAGES =+ "${PN}-tk" -#RDEPENDS_${PN}-tk = "${PN} tk tcl" +#RDEPENDS:${PN}-tk = "${PN} tk tcl" #EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" -FILES_${PN}-tk = " \ +FILES:${PN}-tk = " \ ${bindir}/gitk \ ${datadir}/gitk \ " PACKAGES =+ "gitweb" -FILES_gitweb = "${datadir}/gitweb/" -RDEPENDS_gitweb = "perl" +FILES:gitweb = "${datadir}/gitweb/" +RDEPENDS:gitweb = "perl" BBCLASSEXTEND = "native nativesdk" + +EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ + ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ + " +EXTRA_OEMAKE += "NO_GETTEXT=1" + +SRC_URI[tarball.sha256sum] = "118214bb8d7ba971a62741416e757562b8f5451cefc087a407e91857897c92cc" |