[Mingw-users] Error on mingw-pkg distribute

Cesar Strauss cestr****@gmail*****
Thu Jan 9 07:37:24 JST 2020


Hello,

A little background:

In ticket #39246 [1], Keith asks me to package a newer version of awk
for MSYS. I took the opportunity to try out his mingw-pkg tool [2], but
ran into trouble. Since, according to Keith, he supports his tool on
this mailing list, I am following-up here.

My steps were:

1) Clone, build and install mingw-pkg [2].

2) Read "mingw-pkg --help"

3) Inspect the source for a better understanding of each command.

4) Run an MSYS Developer Shell (the package is for MSYS).

5) Unpack the source for awk [3] and go into the top directory.

6) Run: mingw-pkg --arch=msys initialize

7) Run: mingw-pkg --arch=msys mkspec

8) Edit the Package Spec file on arch/msys (attached, work in progress)

9) Create an MSYS specific patch and put it into arch/msys (attached)

10) Run: mingw-pkg --arch=msys patch

11) Run: mingw-pkg --arch=msys compile

Up to here, all seems to go well.

12) Run: mingw-pkg --arch=msys install

This installs to /usr/local, where I was expecting some staging directory.

12) Run: mingw-pkg --arch=msys distribute

This gives an error:

 >>> prepare source distribution

mingw-pkg: *** FATAL *** no handler implemented for action 'stage_srcdist'

Note: I also tried the example pthreads-win32-2.10-pre.tar.xz in [2],
with the same error above on the distribute step.

At this point, I suspected that mingw-pkg was incomplete, but Keith
assures me he is using it for some time already.

Regards,

Cesar

[1] Ticket #39246 - Please update MSYS awk; current awk-3.1.7
implementation is too old to remain viable
https://osdn.net/projects/mingw/ticket/39246

[2] MinGW Package Builder Tool
https://osdn.net/users/keith/pf/mingw.pkg/wiki/FrontPage

[3] http://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.xz




-------------- next part --------------
# gawk-4.0.1-msys.pkgspec
#
# Package specification file -- automatically generated by mingw-pkg
#
# Package name and version must be explicitly specified; these appear
# as the initial part of the package name, as interpreted by mingw-get.
#
pkgname 	gawk
pkgversion	4.0.1

# Contributed by Cesar Strauss
# Copyright (C) 2020, MinGW.org Project
#
# -----------------------------------------------------------------------------
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# -----------------------------------------------------------------------------
#
# Identify an internet URL for acquisition of the primary package soucres;
# (it will be composed by conflation of srcpath/srcname specifications).
#
# pkghome 	specify PACKAGE_HOME_URI here
# srcpath 	$PACKAGE_HOME_URI # plus host directory path here
# srcname 	gawk-4.0.1.tar.gz

# A release identifier is optional; if specified, it will be appended
# to the package name and version, delimited by an intervening hyphen.
#
# pkgrelease 	1

# A system architecture identifier is required for any package which
# is to be delivered by mingw-get; it establishes the sub-system type
# identifier which will appear within the package name, following the
# package name, version and release identifiers.
#
arch		msys

# The pkgtype specification determines the packaging method to be used
# for all distributable component packages, and the final extension to
# be appended to the component package names.  The default is tar.gz;
# alternatives supported by mingw-get are tar.bz2, tar.lzma and tar.xz
#
pkgtype 	tar.xz

# Optional alias, title, and description specifications may be provided;
# these are used by 'mingw-pkg mkxml', to specify the associated entries
# in mingw-get's xml catalogue specification for this package.
#
# Each of these should be specified only once; 'aliases' is permitted as
# a synonym for 'alias', where the associated value is a space separated
# list of multiple alias names.
#
alias		gawk
title		"GNU Awk"

# An affiliate specification is also optional; it identifies a package
# category with which mingw-get will affiliate this package.  Unlike
# the alias, title, and description specifications, multiple affiliate
# specifications are permitted, allowing for affiliation of the package
# with multiple mingw-get categories.
#
affiliate	"MSYS Base System"

# The distributable package inventory is established by means of a
# collection of component specifications; each is of the form:
#
#   component  keyword  "content"
#
#   where:
#     keyword	specifies the component package class name, as it
#		will be included in the mingw-get compatible package
#		archive name, immediately preceding the pkgtype.
#     content	specifies a white-space separated list of directory
#		and/or file path names, relative to the top of the
#		staging directory tree in which the distribution is
#		prepared, which are to be passed as argument list
#		to the archiving program, so defining the content
#		for the associated component package.
#
# The following is a typical component package list, which may be
# adjusted to suit the requirements for each individual package;
# (do please note that the 'N' in 'dll-N' should be replaced by an
# appropriate ABI version serial number for the DLL component).
#
component	bin	"bin/*.exe"
component	dll-N	"bin/*.dll"
component	dev	"include lib share/$PACKAGE"
component	lic	"share/doc/$PACKAGE/$VERSION/COPYRIGHT"
component	man	"share/man"

component	doc	"--exclude=share/doc/$PACKAGE/$VERSION/COPYRIGHT
			 share/doc/$PACKAGE/$VERSION"

# For some packages, it may be necessary to override mingw-pkg's
# default actions.  Each action is supported by a shell function
# called "action_$ACTION_NAME", and any so-named function defined
# here will override the built-in default.
#
# This facility should be avoided, unless absolutely necessary.
# The following examples are taken from the mingw32-lua package;
# they will not be suitable for direct use in any other package
# specification, without appropriate modification.
#
# action_compile(){
#   make ${host+"host=$host"} mingw
# }
#
# action_install(){
#   ${is_staged-"false"} && rm -rf ${INSTALLDIR="staged"} \
#     || INSTALLDIR=${INSTALLDIR-"${prefix-"/mingw"}"}
#   test -f src/lua.exe || action_compile
#   mkdir -p $INSTALLDIR/share/doc/$PACKAGE/$VERSION
#   make INSTALL_TOP=`pwd`/$INSTALLDIR EXEEXT=.exe install
#   cp COPYRIGHT doc/*.[!1]* $INSTALLDIR/share/doc/$PACKAGE/$VERSION
#   mv $INSTALLDIR/man $INSTALLDIR/share
# }
#
# action_clean(){
#   make EXEEXT=.exe clean
# }
#
# gawk-4.0.1-msys.pkgspec: end of file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msys.patch.gz
Type: application/gzip
Size: 32286 bytes
Desc: not available
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20200108/432e45fb/attachment-0001.gz>


More information about the MinGW-Users mailing list