@kugel- requested changes on this pull request.
> + PACKAGE_VERSION="${GEANY_VERSION}-1~$(date
> '+%Y%m%d')git${GEANY_GIT_REVISION}"
+}
+
+
+run_autogen_sh() {
+ log "Run ./autogen.sh"
+ cd ${GEANY_BUILD_DIR}
+ # run ./autogen.sh as the Debian package won't run ./autogen.sh for us
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+create_tarball_for_debuild() {
+ log "Create source tarball"
+ cd ${GEANY_BUILD_DIR}
+ # create a source tarball, keep .git included on purpose for Geany GIT
build detection
+ tar --transform "s,^,geany-plugins-${GEANY_VERSION}/,S" \
geany-_plugins-_${GEANY_VERSION} ?
> +
+RUN set -ex && \
+ apt-get update && \
+ apt-get install --no-install-recommends --assume-yes \
+ build-essential meson wget xz-utils zstd gnupg2 file zstd ca-certificates \
+ pkg-config m4 libarchive-dev libssl-dev libcurl4-gnutls-dev libgpgme-dev \
+ python3-setuptools
+
+# compile Pacman
+RUN set -ex && \
+ wget --no-verbose
https://sources.archlinux.org/other/pacman/pacman-${PACMAN_VERSION}.tar.xz && \
+ echo "${PACMAN_SHA256} *pacman-${PACMAN_VERSION}.tar.xz" | sha256sum
--check --strict - && \
+ tar xf pacman-${PACMAN_VERSION}.tar.xz && \
+ cd /pacman-${PACMAN_VERSION} && \
+ meson \
+ --prefix /usr/local/pacman \
Why not set prefix to /usr/local in the first place? That would avoid having to
create symlinks and potential binary-relocation issues in the future.
This is a fresh system container, /usr/local should contain nothing but the
pacman installation afterwards.
> + python3-lxml python3-docutils
+
+
+# copy pacman and scripts
+COPY --from=build-pacman /windows /windows
+COPY --from=build-pacman /usr/local/pacman /usr/local/pacman
+COPY mingw64/bin/ /usr/local/bin/
+RUN ln -s /usr/local/pacman/bin/* /usr/local/bin/ && \
+ mkdir /build
+
+WORKDIR /build
+ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pacman/lib/x86_64-linux-gnu
+
+# start wine to initially create config directory
+RUN /usr/local/bin/mingw-w64-i686-wine hostname.exe && \
+ /usr/local/bin/mingw-w64-x86_64-wine hostname.exe && \
Why do you need to run hostname.exe twice?
> + libcurl3-gnutls libgpgme11 libarchive13 libssl1.1 \
+ # common useful utilities \
+ wget curl less nano git gnupg2 file ca-certificates dos2unix \
+ zip unzip xz-utils zstd \
+ # build tools \
+ build-essential automake autoconf autopoint gettext libtool check cppcheck
\
+ # genay-plugins autogen.sh requirements
+ intltool libglib2.0-dev \
+ # mingw-w64 \
+ gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
mingw-w64-tools \
+ # install wine to test installer and created binaries
+ wine wine32 wine64 \
+ # install NSIS and exiftool to inspect binary metadata
+ nsis libimage-exiftool-perl osslsigncode \
+ # Geany build dependencies \
+ python3-lxml python3-docutils
I'm still uneasy that Geany dependencies are encoded in the infrastructure
script. What happens if a PR in Geany adds new dependencies? How can that PR
possibly proceed, without breaking CI?
> + COMPILER_VERSION=$(gcc -dumpfullversion)
+
+ echo "Debian Distribution : $(grep PRETTY_NAME /etc/os-release | cut
-d '=' -f 2)"
+ echo "Geany version : ${GEANY_VERSION}"
+ echo "Geany GIT revision : ${GEANY_GIT_REVISION}"
+ echo "GLib version : ${GLIB_VERSION}"
+ echo "GTK version : ${GTK_VERSION}"
+ echo "GCC version : ${COMPILER_VERSION}"
+
+ cat <<EOT > ${OUTPUT_DIRECTORY}/geany/versions.json
+ {
+ "glib_version": "${GLIB_VERSION}",
+ "gtk_version": "${GTK_VERSION}",
+ "gcc_version": "${COMPILER_VERSION}",
+ }
+EOT
Who uses versions.json?
> + create_tarball_for_debuild
+
+ git_clone_debian_geany
+ install_build_dependencies
+ add_changelog_entry
+
+ build_package
+ copy_results
+
+ log_and_store_build_environment
+
+ log "Done."
+}
+
+
+main
Lots of this file is identical to build_debian_geany.sh. Don't you think it
would be worthwhile to share code instead of duplication?
> @@ -0,0 +1,121 @@
+#
+# Copyright 2022 The Geany contributors
+# License: GPLv2
+#
+# Docker image for Geany and Geany-Plugins cross-build to Windows
+# The image contains a self-compiled Pacman to install mingw-w64
+# packages and all other dependencies necessary to build the code
+# and create a ready-use installer.
+# For more details, see build_mingw64_geany.sh where this image is used.
+#
+# Intermediate container for building pacman
+FROM debian:bullseye as build-pacman
good to know
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/infrastructure/pull/7#pullrequestreview-1151535395
You are receiving this because you are subscribed to this thread.
Message ID: <geany/infrastructure/pull/7/review/[email protected]>