public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org> To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.906 Date: Tue, 16 Mar 2021 18:31:08 +0000 (GMT) [thread overview] Message-ID: <20210316183108.371B0385483E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=d4527e2a3b55874b40e1286c7e390fabf7102b07 commit d4527e2a3b55874b40e1286c7e390fabf7102b07 Author: Jon Turney <jon.turney@dronecode.org.uk> 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 <jon.turney@dronecode.org.uk> 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 <jon.turney@dronecode.org.uk> 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 <jon.turney@dronecode.org.uk> 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
next reply other threads:[~2021-03-16 18:31 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-16 18:31 Jon TURNEY [this message] -- strict thread matches above, loose matches on Subject: below -- 2021-03-15 17:58 Jon TURNEY
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210316183108.371B0385483E@sourceware.org \ --to=jturney@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).