@@ -539,3 +539,102 @@ jobs:
539539 git/.github/macos-installer/*.dmg
540540 git/.github/macos-installer/*.pkg
541541 # End build and sign Mac OSX installers
542+
543+ # Build unsigned Ubuntu package
544+ create-linux-unsigned-artifacts :
545+ runs-on : ubuntu-latest
546+ container :
547+ image : ubuntu:20.04 # security support until 04/02/2025, according to https://endoflife.date/ubuntu
548+ volumes :
549+ # override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc, see "Install dependencies" below
550+ - /tmp:/__e/node20
551+ needs : prereqs
552+ steps :
553+ - name : Install dependencies
554+ run : |
555+ set -ex
556+
557+ # Prevent the dialog that asks interactively for the timezone
558+ export DEBIAN_FRONTEND=noninteractive
559+ export TZ=Etc/UTC
560+
561+ apt-get update -q
562+ apt-get install -y -q --no-install-recommends \
563+ build-essential \
564+ tcl tk gettext asciidoc xmlto \
565+ libcurl4-gnutls-dev libpcre2-dev zlib1g-dev libexpat-dev \
566+ curl ca-certificates
567+
568+ # Install a Node.js version that works in older Ubuntu containers (read: does not require very recent glibc)
569+ NODE_VERSION=v20.18.1 &&
570+ NODE_URL=https://unofficial-builds.nodejs.org/download/release/$NODE_VERSION/node-$NODE_VERSION-linux-x64-glibc-217.tar.gz &&
571+ curl -Lo /tmp/node.tar.gz $NODE_URL &&
572+ tar -C /__e/node20 -x --strip-components=1 -f /tmp/node.tar.gz
573+
574+ - name : Clone git
575+ uses : actions/checkout@v4
576+ with :
577+ path : git
578+
579+ - name : Build and create Debian package
580+ run : |
581+ set -ex
582+
583+ die () {
584+ echo "$*" >&2
585+ exit 1
586+ }
587+
588+ VERSION="${{ needs.prereqs.outputs.tag_version }}"
589+ make -C git GIT-VERSION-FILE
590+
591+ ARCH="$(dpkg-architecture -q DEB_HOST_ARCH)"
592+ if test -z "$ARCH"; then
593+ die "Could not determine host architecture!"
594+ fi
595+
596+ PKGNAME="microsoft-git_$VERSION"
597+ PKGDIR="$(dirname $(pwd))/$PKGNAME"
598+
599+ rm -rf "$PKGDIR"
600+ mkdir -p "$PKGDIR"
601+
602+ DESTDIR="$PKGDIR" make -C git -j5 V=1 DEVELOPER=1 \
603+ USE_LIBPCRE=1 \
604+ USE_CURL_FOR_IMAP_SEND=1 NO_OPENSSL=1 \
605+ NO_CROSS_DIRECTORY_HARDLINKS=1 \
606+ ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1 \
607+ ASCIIDOC='TZ=UTC asciidoc' \
608+ prefix=/usr/local \
609+ gitexecdir=/usr/local/lib/git-core \
610+ libexecdir=/usr/local/lib/git-core \
611+ htmldir=/usr/local/share/doc/git/html \
612+ install install-doc install-html
613+
614+ cd ..
615+ mkdir "$PKGNAME/DEBIAN"
616+
617+ # Based on https://packages.ubuntu.com/xenial/vcs/git
618+ cat >"$PKGNAME/DEBIAN/control" <<EOF
619+ Package: microsoft-git
620+ Version: $VERSION
621+ Section: vcs
622+ Priority: optional
623+ Architecture: $ARCH
624+ Depends: libcurl3-gnutls, liberror-perl, libexpat1, libpcre2-8-0, perl, perl-modules, zlib1g
625+ Maintainer: GitClient <gitclient@microsoft.com>
626+ Description: Git client built from the https://github.com/microsoft/git repository,
627+ specialized in supporting monorepo scenarios. Includes the Scalar CLI.
628+ EOF
629+
630+ dpkg-deb -Zxz --build "$PKGNAME"
631+ # Move Debian package for later artifact upload
632+ mv "$PKGNAME.deb" "$GITHUB_WORKSPACE"
633+
634+ - name : Upload artifacts
635+ uses : actions/upload-artifact@v4
636+ with :
637+ name : linux-artifacts
638+ path : |
639+ *.deb
640+ # End build unsigned Debian package
0 commit comments