From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 371B0385483E; Tue, 16 Mar 2021 18:31:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 371B0385483E To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.906 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 2024cace3d41b80fb6cab9e84806cc2f012e1a60 X-Git-Newrev: d4527e2a3b55874b40e1286c7e390fabf7102b07 Message-Id: <20210316183108.371B0385483E@sourceware.org> Date: Tue, 16 Mar 2021 18:31:08 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2021 18:31:08 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=d4527e2a3b55874b40e1286c7e390fabf7102b07 commit d4527e2a3b55874b40e1286c7e390fabf7102b07 Author: Jon Turney Date: Tue Mar 16 16:35:59 2021 +0000 Add a github action to cross-build on Fedora https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b3487b36ad848cf1a1e8df06fde280e2c9c8e147 commit b3487b36ad848cf1a1e8df06fde280e2c9c8e147 Author: Jon Turney Date: Wed Feb 26 00:45:25 2020 +0000 Add scripts used in packaging https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=ca68262f8959338c333ed309f629efa79ec93c0d commit ca68262f8959338c333ed309f629efa79ec93c0d Author: Jon Turney Date: Tue Mar 16 17:38:49 2021 +0000 Link with libssp Fedora builds some of the libraries we use with -D_FORTIFY_SOURCE=2, so we need to link with libssp to provide __memcpy_chk etc. Future work: build setup itself with -D_FORTIFY_SOURCE=2. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=2752cfd1600fe0180f749a91954e0538e8a4acd9 commit 2752cfd1600fe0180f749a91954e0538e8a4acd9 Author: Jon Turney Date: Tue Mar 16 15:55:59 2021 +0000 Turn on __USE_MINGW_ANSI_STDIO everywhere __USE_MINGW_ANSI_STDIO is turned on by C++ STL headers, so we're getting this define due to that in most places, except where we happen to include stdio.h before them. archive_tar.cc happens to do that, and wants ANSI stdio since da31ad35, so turn it on unconditionally. It's also turned on for C++11 by MinGW headers >= 8.0.0, which Cygwin already has, so this already works when building there, and we're going to have to deal with any other problem that might cause elsewhere in the source eventually anyhow. This fixes building since da31ad35 on F33, which only has mingw-headers 7.0.0. Diff: --- .github/workflows/fedora.yml | 24 ++++++++++++++++++++++++ Makefile.am | 6 ++++-- packaging-scripts/checkout.sh | 7 +++++++ packaging-scripts/conf.sh | 21 +++++++++++++++++++++ packaging-scripts/fedora-prereqs-install.sh | 11 +++++++++++ 5 files changed, 67 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml new file mode 100644 index 00000000..f732d296 --- /dev/null +++ b/.github/workflows/fedora.yml @@ -0,0 +1,24 @@ +name: Fedora + +on: push + +jobs: + fedora-build: + name: Fedora + runs-on: ubuntu-latest + container: fedora:latest + steps: + # install git, so checkout uses git to fetch repository, so 'git describe' works + - name: Install git + run: dnf install -y git + + # fetch all history for all tags for 'git describe' + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install build prerequisites + run: packaging-scripts/fedora-prereqs-install.sh + + - name: Build + run: packaging-scripts/conf.sh upx diff --git a/Makefile.am b/Makefile.am index 1a2171c9..d10ad6b1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,7 +28,8 @@ AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \ AM_YFLAGS = -d AM_LFLAGS = -8 WINDRES = @WINDRES@ -AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include \ +AM_CPPFLAGS = -D__USE_MINGW_ANSI_STDIO=1 -DLZMA_API_STATIC\ + -I$(srcdir)/libgetopt++/include \ $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(ZSTD_CFLAGS) $(LIBCRYPT_CFLAGS) $(LIBSOLV_CFLAGS) inilex_CXXFLAGS:=-Wno-sign-compare @@ -93,7 +94,8 @@ inilint_SOURCES = \ $(BZ2_LIBS) \ $(ZLIB_LIBS) \ $(LIBSOLV_LIBS) -lregex \ - -lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 -lmingw32 + -lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 \ + -lmingw32 -lssp @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs @SETUP@_SOURCES = \ actionlist.h \ diff --git a/packaging-scripts/checkout.sh b/packaging-scripts/checkout.sh new file mode 100755 index 00000000..42616c85 --- /dev/null +++ b/packaging-scripts/checkout.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +rm -rf setup +mkdir setup +cd setup +git clone git://cygwin.com/git/cygwin-setup.git + diff --git a/packaging-scripts/conf.sh b/packaging-scripts/conf.sh new file mode 100755 index 00000000..10d78b46 --- /dev/null +++ b/packaging-scripts/conf.sh @@ -0,0 +1,21 @@ +#!/bin/bash -e + +TARGET=${1:-upx} + +function arch() { +cpu=$1 +rm -rf $cpu +mkdir $cpu +cd $cpu + +NOCONFIGURE=1 ../bootstrap.sh +../configure --host=$cpu-w64-mingw32 --target=$cpu-w64-mingw32 + +make ${TARGET} + +cd .. +} + +for ARCH in i686 x86_64 ; do + arch ${ARCH} +done diff --git a/packaging-scripts/fedora-prereqs-install.sh b/packaging-scripts/fedora-prereqs-install.sh new file mode 100755 index 00000000..edc50b10 --- /dev/null +++ b/packaging-scripts/fedora-prereqs-install.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +sudo dnf -y install automake bison diffutils flex libtool make upx +sudo dnf -y install mingw32-gcc-c++ mingw32-zlib-static mingw32-libgcrypt-static mingw32-bzip2-static mingw32-xz-libs-static mingw32-winpthreads-static +sudo dnf -y install mingw64-gcc-c++ mingw64-zlib-static mingw64-libgcrypt-static mingw64-bzip2-static mingw64-xz-libs-static mingw64-winpthreads-static +sudo dnf -y install 'dnf-command(copr)' +sudo dnf -y copr enable jturney/mingw-libsolv +sudo dnf -y install mingw32-libsolv-static mingw64-libsolv-static +sudo dnf -y install mingw32-libgnurx-static mingw64-libgnurx-static +sudo dnf -y copr enable jturney/mingw-zstd +sudo dnf -y install mingw32-libzstd-static mingw64-libzstd-static