[
https://issues.apache.org/jira/browse/AVRO-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040783#comment-17040783
]
Kengo Seki commented on AVRO-1461:
----------------------------------
I checked the distribution (Avro-1.9.2.tar.gz) created by {{./build.sh dist}}
before uploading it, and unfortunately found a problem.
The perl modules in that distribution don't have proper version info, which is
[required in the CPAN
document|https://www.cpan.org/modules/04pause.html#version].
{code}
# Install required modules to build
sekikn@ubuntu1804:~$ sudo apt-get install cpanminus libmodule-install-perl
libmodule-install-readmefrompod-perl libmath-bigint-perl libtest-exception-perl
libjson-xs-perl libtry-tiny-perl libregexp-common-perl libio-string-perl
libobject-tiny-perl
sekikn@ubuntu1804:~$ cpanm --sudo Module::Install::Repository
# Checkout from Avro repository and build the Perl distribution
sekikn@ubuntu1804:~$ git clone https://github.com/apache/avro.git
sekikn@ubuntu1804:~$ cd avro
sekikn@ubuntu1804:~/avro$ git checkout release-1.9.2
sekikn@ubuntu1804:~/avro$ cd lang/perl
sekikn@ubuntu1804:~/avro/lang/perl$ ./build.sh clean dist
sekikn@ubuntu1804:~/avro/lang/perl$ ./build.sh dist
(snip)
Created Avro-1.9.2.tar.gz
sekikn@ubuntu1804:~/avro/lang/perl$ echo $?
0
{code}
The distribution seems to be created successfully, but it doesn't have version
info, due to the lack of {{../../share/VERSION.txt}}.
{code}
# Install the distribution
sekikn@ubuntu1804:~/avro/lang/perl$ cpanm --sudo Avro-1.9.2.tar.gz
--> Working on Avro-1.9.2.tar.gz
Fetching file:///home/sekikn/avro/lang/perl/Avro-1.9.2.tar.gz ... OK
Configuring Avro-1.9.2 ... OK
Building and testing Avro-1.9.2 ... OK
Successfully installed Avro-1.9.2
1 distribution installed
# Check if the installed module has the right version
sekikn@ubuntu1804:~/avro/lang/perl$ perl -de 1
(snip)
DB<1> use Avro
DB<2> print $Avro::VERSION
(no version displayed)
{code}
For your reference, if it's built within the whole Avro source tree, the
{{$VERSION}} variables are properly set, as follows:
{code}
sekikn@ubuntu1804:~/avro/lang/perl$ make
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/Protocol/Message.pm
>blib/lib/Avro/Protocol/Message.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/Protocol.pm
>blib/lib/Avro/Protocol.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/DataFile.pm
>blib/lib/Avro/DataFile.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/DataFileWriter.pm
>blib/lib/Avro/DataFileWriter.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/BinaryDecoder.pm
>blib/lib/Avro/BinaryDecoder.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/Schema.pm >blib/lib/Avro/Schema.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/DataFileReader.pm
>blib/lib/Avro/DataFileReader.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro/BinaryEncoder.pm
>blib/lib/Avro/BinaryEncoder.pm
sed -e s/++MODULE_VERSION++/1.9.2/ <lib/Avro.pm >blib/lib/Avro.pm
Manifying 3 pod documents
sekikn@ubuntu1804:~/avro/lang/perl$ perl -Iblib/lib -de 1
(snip)
DB<1> use Avro
DB<2> print $Avro::VERSION
1.9.2
{code}
I'd like to fix this problem first and publish the distribution after Avro
1.10.0 is released, rather than publishing an incomplete one as 1.9.2.
Is that OK with you [~rskraba] [~iemejia]?
> Distribute Perl API on CPAN
> ---------------------------
>
> Key: AVRO-1461
> URL: https://issues.apache.org/jira/browse/AVRO-1461
> Project: Apache Avro
> Issue Type: Wish
> Components: perl
> Reporter: John Karp
> Priority: Minor
>
> Having a package for the Perl Avro API distributed on CPAN would increase the
> visibility and convenience of the Avro project to the Perl world
> significantly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)