From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 0256C3858D1E; Sat, 11 Mar 2023 16:24:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0256C3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678551897; bh=mQDrbJnvusWqTrvKwADYFDMyIrdGSGYT0mf3sTa0t+I=; h=To:Subject:Date:From:From; b=hnwlsu7prjARRBBpxJ0nT0QSsTEUQaaTjk98Jcjp+HAj8fVtY7mfbgvZfLigma1ev cq4nbXaUZ7NSYucENzdkWZCtuA3IM3Gr6dE4ZctFx3fPVaffEJq0uZw7PicTsZs8Kb ZPJVZkxsSpnk9pWx+fS9e4+mqE3AI+jnHj8LKhAU= To: cygwin-apps-cvs@sourceware.org Subject: [cygport - the Cygwin packaging tool] branch master, updated. 0.36.1 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a24d555b79fc8ebcdd088e8240220074469fb334 X-Git-Newrev: d200b76b365f9b6204911306a7e9b70b4ec4b654 Message-Id: <20230311162457.0256C3858D1E@sourceware.org> Date: Sat, 11 Mar 2023 16:24:56 +0000 (GMT) From: Jon Turney List-Id: https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=d200b76b365f9b6204911306a7e9b70b4ec4b654 commit d200b76b365f9b6204911306a7e9b70b4ec4b654 Author: Jon Turney Date: Sat Mar 11 14:44:47 2023 +0000 Bump version to 0.36.1 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=995631fec197fec813a4e0c8f4105266d82b2809 commit 995631fec197fec813a4e0c8f4105266d82b2809 Author: Jon Turney Date: Sat Mar 11 15:22:11 2023 +0000 Update tests for updated python https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=4ac24f22f4cda3116d4d6b222ae0acdb64428d1c commit 4ac24f22f4cda3116d4d6b222ae0acdb64428d1c Author: Ken Brown Date: Mon Feb 20 13:39:34 2023 -0500 texlive.cygclass: remove references to i386-cygwin These are no longer relevant now that we're not supporting 32-bit Cygwin. Moreover, upstream TeX Live is removing all i386-cygwin packages starting with TeX Live 2023. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=62beb0a7b00161aa752324021816c1a2836bcebf commit 62beb0a7b00161aa752324021816c1a2836bcebf Author: Jon Turney Date: Tue Feb 21 14:14:00 2023 +0000 src_postinstall: fix $PKG[0] == $PN assumption Install $PKG[0]'s preremove/postinstall scripts, when it's not the same as $PN. Don't install $PN's scripts twice when $PKG[i] == $PN for i != 0. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=6e364201080b84d542162927d02b542907ba3dd2 commit 6e364201080b84d542162927d02b542907ba3dd2 Author: Jon Turney Date: Wed Feb 8 20:13:18 2023 +0000 Improve error if CATEGORY or SUMMARY isn't set At the moment, if CATEGORY or SUMMARY aren't set, it's assumed that this is an old .cygport with explicit, handwritten .hint files, which we warn about being missing. Update the message, since the contemporary assumption is that .hint files will be auto-generated, and make it fatal, since the package is never going to be useful without a hint. Also: Fix a typo in link to category list Future work: Stop supporting handwritten .hints completely? https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=9e3b718e635e5e0fdab27343ca60cd48a6230fda commit 9e3b718e635e5e0fdab27343ca60cd48a6230fda Author: Stuart Caie Date: Sun Feb 5 17:20:11 2023 +0000 src_postinst: Avoid an infinite loop in __prep_libtool_modules When running cygport, I run it from a path that includes a symlink. Part of the postinstall runs forever because it performs "readlink -f" on the path it's looking for, but not on the path it thinks it should find. If I follow through its logic with "bash -x", I see output like this: ++ readlink -f usr/lib/.. + '[' /cygdrive/c/Users/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../.. + '[' /cygdrive/c/Users/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../.. + '[' /cygdrive/c/Users/Jenny/Desktop/1/libmspack-0.11-1.x86_64 '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../.. + '[' /cygdrive/c/Users/Jenny/Desktop/1 '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../.. + '[' /cygdrive/c/Users/Jenny/Desktop '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../.. + '[' /cygdrive/c/Users/Jenny '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../../.. + '[' /cygdrive/c/Users '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../../../.. + '[' /cygdrive/c '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../../../../.. + '[' /cygdrive '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../../../../../.. + '[' / '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../../../../../../.. + '[' / '!=' /home/Jenny/Desktop/1/libmspack-0.11-1.x86_64/inst/usr ']' ++ readlink -f usr/lib/../../../../../../../../../../../.. ... and so on forever. No amount of ".." is to make /cygdrive/c/User/Jenny/Desktop match /home/Jenny/Desktop (which I've symlinked to the former). The fix is to run readlink -f on both paths. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=0aa9e5b93845d96cab5d58a596435bb0d0efd5d2 commit 0aa9e5b93845d96cab5d58a596435bb0d0efd5d2 Author: Jon Turney Date: Sun Feb 5 14:21:55 2023 +0000 src_postinst: Improve X session shortcut folder naming Don't create shortcuts (but still remove them) if CYGWIN_SETUP_OPTIONS contains "no-startmenu". If CYGWIN_START_MENU_SUFFIX is defined, it overrides the old logic for determining a suffix (which is " (32-bit)" for WOW64) (but still keep that logic for compatibility with old setup versions). The idea here is 1) x86_64 setup running on ARM64 will set CYGWIN_START_MENU_SUFFIX appropriately, and 2) we might even allow the suffix to be set via a setup option, so that multiple installations dont't fight over these shortcuts. Future work: generic helper for a cygport to create these shortcuts? https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=9e78e2d48941b9319d9d2dfbef2fff54a9d4eae0 commit 9e78e2d48941b9319d9d2dfbef2fff54a9d4eae0 Author: Jon Turney Date: Wed Jan 25 20:06:58 2023 +0000 Add RESTRICT 'case-insensitive' Add a new RESTRICT 'case-insensitive', which prevents building on case-insensitive filesystems. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=6d99c6cd62ba314a8c9cbbf6c767f794f40f3a82 commit 6d99c6cd62ba314a8c9cbbf6c767f794f40f3a82 Author: Jon Turney Date: Sun Jan 22 14:27:24 2023 +0000 Report an error when SRC_URI has no basename When SRC_URI has no basename, rather than failing with a weird error from 'mv' due to trying to "mv .tmp ${EMPTY}", report that as a problem Diff: --- NEWS | 14 +++++- bin/cygport.in | 17 +++++++ cygclass/texlive.cygclass | 8 +--- cygport.spec | 2 +- data/sample.cygport | 2 +- lib/pkg_pkg.cygpart | 11 +++-- lib/src_fetch.cygpart | 5 ++ lib/src_postinst.cygpart | 53 +++++++++++++++++----- meson.build | 2 +- .../python3-beautifulsoup-4.11.1-1.hint | 2 +- 10 files changed, 90 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index 9a27e545..5fb53113 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,15 @@ +0.36.1: + * Report an error when SRC_URI has no basename and #/FILENAME isn't used + * Add RESTRICT 'case-insensitive' and warn about using a case-insenstive + filesystem. + * Take notice of CYGWIN_SETUP_OPTIONS and use CYGWIN_START_MENU_SUFFIX + in X session shortcut folder naming + * Fix a potential infinite loop in __prep_libtool_modules if working + directory includes a symlink + * Update error if CATEGORY or SUMMARY isn't set + * Fix $PKG[0] == $PN assumption in src_postinstall + * texlive.cygclass: remove references to i386-cygwin + 0.36.0: * Allow package compression to be specified with TAR_COMPRESSION_EXT * Add CYGWIN_FILES to place files in $C, as an alternative to creating @@ -14,7 +26,7 @@ * Canonicalize whitespace in the values of .hint file keys which are single-line, space-separated lists * python-wheel: Handle PEP 517 projects without a setup.py - * Umprove auto-decompression for patches to handle .xz & .zst + * Improve auto-decompression for patches to handle .xz & .zst * Decompress SRC_URI archives and files using ZStandard compression * Implement --jobs/-j N option to specify number of build jobs to use diff --git a/bin/cygport.in b/bin/cygport.in index 46647573..a1b20985 100755 --- a/bin/cygport.in +++ b/bin/cygport.in @@ -572,6 +572,23 @@ declare -r src_patchfile=${PF}.src.patch; declare -ar pkg_name=(${PKG_NAMES:-${PN}}); declare -r pkg_count=${#pkg_name[*]}; +# this requires workdir to be already defined +mkdir -p ${workdir} +rm -f ${workdir}/.probe_case_sensitivity +touch ${workdir}/.PROBE_CASE_SENSITIVITY +probe=$( [ -f ${workdir}/.probe_case_sensitivity ] && echo "failed" || echo "" ) +rm -f ${workdir}/.PROBE_CASE_SENSITIVITY +if [ -n "$probe" ] +then + if defined _CYGPORT_RESTRICT_case_insensitive_ + then + error "Package ${NAME} cannot be built on a case-insensitive filesystem"; + else + warning "Building on a case-insensitive filesystem"; + fi +fi +unset probe + # this requires S and B to be already defined if ! defined _CYGPORT_RESTRICT_debuginfo_ then diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass index 75eae7df..06b4849c 100644 --- a/cygclass/texlive.cygclass +++ b/cygclass/texlive.cygclass @@ -116,7 +116,6 @@ done for pkg in ${TEXLIVE_ARCH_PKGS//,/ } do SRC_URI+=" ${tlnet}/archive/$pkg.tar.xz" - SRC_URI+=" ${tlnet}/archive/$pkg.i386-cygwin.tar.xz" SRC_URI+=" ${tlnet}/archive/$pkg.x86_64-cygwin.tar.xz" done for pkg in ${TEXLIVE_DOC_PKGS//,/ } @@ -149,7 +148,7 @@ texlive_install() { done for pkg in ${TEXLIVE_ARCH_PKGS//,/ } do - pkgs+="$pkg $pkg.i386-cygwin $pkg.x86_64-cygwin " + pkgs+="$pkg $pkg.x86_64-cygwin " done for pkg in ${TEXLIVE_DOC_PKGS//,/ } do @@ -170,7 +169,7 @@ texlive_install() { *.bat) # only needed for native Win32 continue ;; - bin/i386-cygwin/*) + bin/x86_64-cygwin/*) if [ ! -L ${f} ] then dobin $f @@ -183,9 +182,6 @@ texlive_install() { esac fi continue ;; - bin/x86_64-cygwin/*) - # duplicate to i386-cygwin handled above - continue ;; *doc/info/dir) # system-managed file continue ;; diff --git a/cygport.spec b/cygport.spec index b596f241..0f1eed5f 100644 --- a/cygport.spec +++ b/cygport.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: cygport -Version: 0.36.0 +Version: 0.36.1 Release: 1%{?dist} Summary: Cygwin package building tool diff --git a/data/sample.cygport b/data/sample.cygport index d26e2f8d..7eadc6a6 100644 --- a/data/sample.cygport +++ b/data/sample.cygport @@ -1,7 +1,7 @@ inherit meson NAME="cygport" -VERSION=0.36.0 +VERSION=0.36.1 RELEASE=1 CATEGORY="Devel" SUMMARY="Cygwin source packaging tool" diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart index 65dd145d..2a2bb663 100644 --- a/lib/pkg_pkg.cygpart +++ b/lib/pkg_pkg.cygpart @@ -630,7 +630,7 @@ license: ${LICENSE} _EOF fi else - warning "${PN}-src.hint is missing"; + error "Cannot generate ${PN}-src.hint. A category and summary must be specified"; fi fi } @@ -682,7 +682,9 @@ __pkg_dist() { # libfoo-devel will use libfoo_devel_CATEGORY. # NOTE # A list of official categories is available on the -# |htmlf Cygwin website. +# |html Cygwin website. +# +# Specifying the categories for a package is mandatory. #**** #****v* Packaging/SUMMARY # DESCRIPTION @@ -702,6 +704,9 @@ __pkg_dist() { # cannot be used in a shell variable name (namely '+', '-', and '.'), # that character must be substituted with an underscore ('_'), e.g. # libfoo-devel will use libfoo_devel_SUMMARY. +# +# NOTE +# Specifying a summary for a package is mandatory. #**** #****v* Packaging/DESCRIPTION # DESCRIPTION @@ -933,7 +938,7 @@ _EOF ${pkg_tag} _EOF else - warning "${pkg_hint[${n}]%.hint}.hint is missing"; + error "Cannot generate ${pkg_hint[${n}]%.hint}.hint. A category and summary must be specified."; fi n+=1; diff --git a/lib/src_fetch.cygpart b/lib/src_fetch.cygpart index 930f5f65..93cc98b2 100644 --- a/lib/src_fetch.cygpart +++ b/lib/src_fetch.cygpart @@ -83,6 +83,11 @@ fetch() { urifile=${urifile%\?*}; urifile=${urifile##*/}; + if [ -z "${urifile}" ] + then + error "Won't fetch URI '$1', as it doesn't have a basename. Please specify one by appending #/FILENAME. See SRC_URI in the reference manual for details." + fi + if defined __DL_ONLY_MISSING && defined DISTDIR && [ -f ${DISTDIR}/${urifile} ] then inform "Using ${urifile} from DISTDIR" diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart index eb33939e..ef432f60 100644 --- a/lib/src_postinst.cygpart +++ b/lib/src_postinst.cygpart @@ -368,12 +368,23 @@ __prep_xsessions() { dodir /etc/postinstall /etc/preremove /etc/X11/xinit/Xclients.d cat >> ${D}/etc/postinstall/${PN}.sh <<_EOF -case \$(uname -s) in *-WOW*) wow64=" (32-bit)" ;; esac -/usr/bin/mkdir -p "\$(/usr/bin/cygpath \$CYGWINFORALL -P)/Cygwin-X\${wow64}" +if [ ! -v CYGWIN_START_MENU_SUFFIX ] +then + case \$(uname -s) in *-WOW*) CYGWIN_START_MENU_SUFFIX=" (32-bit)" ;; esac +fi + +case \${CYGWIN_SETUP_OPTIONS} in + *no-startmenu*) + ;; + *) + /usr/bin/mkdir -p "\$(/usr/bin/cygpath \$CYGWINFORALL -P)/Cygwin-X\${CYGWIN_START_MENU_SUFFIX}" _EOF cat >> ${D}/etc/preremove/${PN}.sh <<_EOF -case \$(uname -s) in *-WOW*) wow64=" (32-bit)" ;; esac +if [ ! -v CYGWIN_START_MENU_SUFFIX ] +then + case \$(uname -s) in *-WOW*) CYGWIN_START_MENU_SUFFIX=" (32-bit)" ;; esac +fi _EOF for s in ${D}/usr/share/xsessions/*.desktop @@ -401,16 +412,21 @@ _EOF chmod +x ${D}/etc/X11/xinit/Xclients.d/Xclients.${sname}.sh cat >> ${D}/etc/postinstall/${PN}.sh <<_EOF -/usr/bin/mkshortcut \$CYGWINFORALL -P -w / -i ${ico} -n "Cygwin-X\${wow64}/${Name}" -a "--quote /usr/bin/bash.exe -l -c \"cd; XSESSION_ICON=${Icon} exec /usr/bin/startx /etc/X11/xinit/Xsession ${sname}\"" /usr/bin/run.exe + /usr/bin/mkshortcut \$CYGWINFORALL -P -w / -i ${ico} -n "Cygwin-X\${CYGWIN_START_MENU_SUFFIX}/${Name}" -a "--quote /usr/bin/bash.exe -l -c \"cd; XSESSION_ICON=${Icon} exec /usr/bin/startx /etc/X11/xinit/Xsession ${sname}\"" /usr/bin/run.exe _EOF cat >> ${D}/etc/preremove/${PN}.sh <<_EOF -/bin/rm -f "\$(/usr/bin/cygpath \$CYGWINFORALL -P)/Cygwin-X\${wow64}/${Name}.lnk" +/bin/rm -f "\$(/usr/bin/cygpath \$CYGWINFORALL -P)/Cygwin-X\${CYGWIN_START_MENU_SUFFIX}/${Name}.lnk" _EOF done + cat >> ${D}/etc/postinstall/${PN}.sh <<_EOF + ;; +esac +_EOF + cat >> ${D}/etc/preremove/${PN}.sh <<_EOF -/bin/rmdir --ignore-fail-on-non-empty "\$(/usr/bin/cygpath \$CYGWINFORALL -P)/Cygwin-X\${wow64}" +/bin/rmdir --ignore-fail-on-non-empty "\$(/usr/bin/cygpath \$CYGWINFORALL -P)/Cygwin-X\${CYGWIN_START_MENU_SUFFIX}" _EOF } @@ -597,9 +613,16 @@ __prepetc() { fi done - n=1; + n=0; while [ -n "${pkg_name[${n}]}" ] do + # avoid appending script for PN twice + if [ "${pkg_name[${n}]}" = "$PN" ] + then + n+=1 + continue; + fi + if [ -f ${C}/${pkg_name[${n}]}.${s} ] then dodir /etc/${s}; @@ -1330,7 +1353,7 @@ __prep_libtool_modules() { else origdlname=${dlname} - while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != ${D}$(__host_prefix) ] + while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != $(readlink -f ${D}$(__host_prefix)) ] do dlname=../${dlname} done @@ -1449,19 +1472,25 @@ __prep_libtool_modules() { #****v* Postinstall/RESTRICT # DESCRIPTION # List of automatic postinstall or packaging step(s) which should be skipped -# for this package. Supported values are: -# * debuginfo: do not create a debuginfo subpackage +# for this package, and restrictions on package use. +# +# Supported values are: +# +# * case-insensitive: do not build on case-insensitive filesystems. +# * debuginfo: do not create a debuginfo subpackage. # * diff: do not generate a .src.patch file of changes made in $S. # * postinst-doc: do not install standard documentation files. # * postinst-gconf: do not create postinstall commands for GConf schemas. # * postinst-info: do not compress info documentation. # * strip: do not strip binaries. # * upload: do not allow uploading binary packages to cygwin.com. +# # Of these, "diff" is the only one that should be considered useful, e.g. # with very large data-only packages which will have no useful diff. # "debuginfo" is useful on a temporary, per-build basis to debug a package -# in the build tree (e.g. a noinst test package). "upload" makes it safer -# for cygport to be used for building private packages. +# in the build tree (e.g. a noinst test package). +# +# "upload" makes it safer for cygport to be used for building private packages. # # If you find yourself using any of the others to work around cygport's # default behaviour, in all likelyhood it is either a bug in cygport or in diff --git a/meson.build b/meson.build index dfe5f18c..b138d048 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cygport', - version: '0.36.0') + version: '0.36.1') bindir = join_paths(get_option('prefix'), get_option('bindir')) datadir = join_paths(get_option('prefix'), get_option('datadir')) diff --git a/testsuite/python/distutils/hints/python3-beautifulsoup-4.11.1-1.x86_64/dist/python3-beautifulsoup/python3-beautifulsoup-4.11.1-1.hint b/testsuite/python/distutils/hints/python3-beautifulsoup-4.11.1-1.x86_64/dist/python3-beautifulsoup/python3-beautifulsoup-4.11.1-1.hint index 73e356b9..c0dec61a 100644 --- a/testsuite/python/distutils/hints/python3-beautifulsoup-4.11.1-1.x86_64/dist/python3-beautifulsoup/python3-beautifulsoup-4.11.1-1.hint +++ b/testsuite/python/distutils/hints/python3-beautifulsoup-4.11.1-1.x86_64/dist/python3-beautifulsoup/python3-beautifulsoup-4.11.1-1.hint @@ -1,5 +1,5 @@ category: Python -requires: python38 +requires: python38 python38-pytest sdesc: "Python HTML/XML parser" ldesc: "Beautiful Soup is a Python HTML/XML parser designed for quick turnaround projects like screen-scraping. Beautiful Soup parses anything you