[ https://issues.apache.org/jira/browse/AVRO-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149413#comment-17149413 ]
Kengo Seki edited comment on AVRO-1461 at 7/1/20, 12:47 PM: ------------------------------------------------------------ I found an article explaining the issue we encountered. [https://xdg.me/blog/this-distribution-name-can-only-be-used-by-users-with-permission/] This article gives three possibilities. But #1 ("You don’t have a module "Foo::Bar::Baz" in a distribution called Foo-Bar-Baz-$VERSION.tar.gz; fix it by adding that module") doesn't seem to be applicable to us, because our filename and package declaration looks correct and consistent, as follows: {code} $ git checkout release-1.10.0 HEAD is now at 6b55656b AVRO-2865: Actually bump the jar. $ ./build.sh docker (snip) sekikn@895320c1e641:~/avro$ ./build.sh dist (snip) + cd lang/perl + ./build.sh dist include /home/sekikn/avro/lang/perl/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm include inc/Module/Install/ReadmeFromPod.pm readme_from lib/Avro.pm to txt include inc/Module/Install/Repository.pm Cannot determine repository URL include inc/Module/Install/MakeMaker.pm include inc/Module/Install/Makefile.pm Checking if your kit is complete... Warning: the following files are missing in your kit: META.yml Please inform the author. Generating a Unix-style Makefile Writing Makefile for Avro Writing MYMETA.yml and MYMETA.json Writing META.yml rm -rf Avro-1.10.0 "/usr/bin/perl" "-Iinc" "-MExtUtils::Manifest=manicopy,maniread" \ -e "manicopy(maniread(),'Avro-1.10.0', 'best');" mkdir Avro-1.10.0 mkdir Avro-1.10.0/lib mkdir Avro-1.10.0/lib/Avro mkdir Avro-1.10.0/t mkdir Avro-1.10.0/inc mkdir Avro-1.10.0/inc/Module mkdir Avro-1.10.0/inc/Module/Install mkdir Avro-1.10.0/bin mkdir Avro-1.10.0/xt mkdir Avro-1.10.0/lib/Avro/Protocol "/usr/bin/perl" "-Iinc" -I. "-MModule::Install::Admin" -e "dist_preop(q(Avro-1.10.0))" tar cvf Avro-1.10.0.tar Avro-1.10.0 Avro-1.10.0/ Avro-1.10.0/.gitignore Avro-1.10.0/lib/ Avro-1.10.0/lib/Avro/ Avro-1.10.0/lib/Avro/DataFileWriter.pm Avro-1.10.0/lib/Avro/BinaryEncoder.pm Avro-1.10.0/lib/Avro/DataFile.pm Avro-1.10.0/lib/Avro/BinaryDecoder.pm Avro-1.10.0/lib/Avro/Protocol.pm Avro-1.10.0/lib/Avro/DataFileReader.pm Avro-1.10.0/lib/Avro/Protocol/ Avro-1.10.0/lib/Avro/Protocol/Message.pm Avro-1.10.0/lib/Avro/Schema.pm Avro-1.10.0/lib/Avro.pm Avro-1.10.0/README Avro-1.10.0/Changes Avro-1.10.0/META.yml Avro-1.10.0/Makefile.PL Avro-1.10.0/VERSION.txt Avro-1.10.0/inc/ Avro-1.10.0/inc/Module/ Avro-1.10.0/inc/Module/Install/ Avro-1.10.0/inc/Module/Install/MakeMaker.pm Avro-1.10.0/inc/Module/Install/Base.pm Avro-1.10.0/inc/Module/Install/Repository.pm Avro-1.10.0/inc/Module/Install/Makefile.pm Avro-1.10.0/inc/Module/Install/Metadata.pm Avro-1.10.0/inc/Module/Install/ReadmeFromPod.pm Avro-1.10.0/inc/Module/Install.pm Avro-1.10.0/bin/ Avro-1.10.0/bin/avro-to-json Avro-1.10.0/t/ Avro-1.10.0/t/04_datafile.t Avro-1.10.0/t/02_bin_encode.t Avro-1.10.0/t/05_protocol.t Avro-1.10.0/t/01_schema.t Avro-1.10.0/t/00_compile.t Avro-1.10.0/t/01_names.t Avro-1.10.0/t/03_bin_decode.t Avro-1.10.0/MANIFEST Avro-1.10.0/xt/ Avro-1.10.0/xt/pod.t Avro-1.10.0/LICENSE Avro-1.10.0/NOTICE rm -rf Avro-1.10.0 gzip --best Avro-1.10.0.tar Created Avro-1.10.0.tar.gz + cp lang/perl/Avro-1.10.0.tar.gz dist/perl/ (snip) BUILD SUCCESSFUL Total time: 10 seconds + mkdir -p build/avro-doc-1.10.0 + cp doc/LICENSE build/avro-doc-1.10.0 + cp doc/NOTICE build/avro-doc-1.10.0 + cd build + tar czf ../dist/avro-doc-1.10.0.tar.gz avro-doc-1.10.0 + cp DIST_README.txt dist/README.txt + (( 0 )) sekikn@895320c1e641:~/avro$ cd dist/perl sekikn@895320c1e641:~/avro/dist/perl$ ls Avro-1.10.0.tar.gz sekikn@895320c1e641:~/avro/dist/perl$ tar xfz Avro-1.10.0.tar.gz sekikn@895320c1e641:~/avro/dist/perl$ cat Avro-1.10.0/lib/Avro.pm (snip) package Avro; (snip) {code} So, I'd like to examine the next possibility by adding the "provides" option explicitly in META.yml. The patch I attached adds that option into META.yml, as follows: {code} sekikn@895320c1e641:~/avro$ git diff diff --git a/lang/perl/Makefile.PL b/lang/perl/Makefile.PL index 751fc338..69447e56 100644 --- a/lang/perl/Makefile.PL +++ b/lang/perl/Makefile.PL @@ -50,4 +50,18 @@ unless ($Config{use64bitint}) { } auto_set_repository(); +my %packages = ( + 'Avro' => 'lib/Avro.pm', + 'Avro::BinaryDecoder' => 'lib/Avro/BinaryDecoder.pm', + 'Avro::BinaryEncoder' => 'lib/Avro/BinaryEncoder.pm', + 'Avro::DataFile' => 'lib/Avro/DataFile.pm', + 'Avro::DataFileReader' => 'lib/Avro/DataFileReader.pm', + 'Avro::DataFileWriter' => 'lib/Avro/DataFileWriter.pm', + 'Avro::Protocol' => 'lib/Avro/Protocol.pm', + 'Avro::Protocol::Message' => 'lib/Avro/Protocol/Message.pm', + 'Avro::Schema' => 'lib/Avro/Schema.pm', +); +my %provides = map { $_ => { file => $packages{$_}, version => $version } } keys %packages; +provides(%provides); + WriteMakefile(PM_FILTER => "sed -e 's/\+\+MODULE_VERSION\+\+/$version/'"); sekikn@895320c1e641:~/avro$ ./build.sh dist (snip) sekikn@895320c1e641:~/avro$ cd dist/perl sekikn@895320c1e641:~/avro/dist/perl$ tar xfz Avro-1.10.0.tar.gz sekikn@895320c1e641:~/avro/dist/perl$ cat Avro-1.10.0/META.yml (snip) provides: Avro: file: lib/Avro.pm version: 1.10.0 Avro::BinaryDecoder: file: lib/Avro/BinaryDecoder.pm version: 1.10.0 Avro::BinaryEncoder: file: lib/Avro/BinaryEncoder.pm version: 1.10.0 Avro::DataFile: file: lib/Avro/DataFile.pm version: 1.10.0 Avro::DataFileReader: file: lib/Avro/DataFileReader.pm version: 1.10.0 Avro::DataFileWriter: file: lib/Avro/DataFileWriter.pm version: 1.10.0 Avro::Protocol: file: lib/Avro/Protocol.pm version: 1.10.0 Avro::Protocol::Message: file: lib/Avro/Protocol/Message.pm version: 1.10.0 Avro::Schema: file: lib/Avro/Schema.pm version: 1.10.0 (snip) {code} May I try to upload the new tarball that contains revised META.yml to CPAN, or would you like to try [~iemejia]? If it also doesn't help and [~rskraba] doesn't have an ownership for the Avro namespace, we may have to ask CPAN admins how we can fix it. was (Author: sekikn): I found an article explaining the issue we encountered. [https://xdg.me/blog/this-distribution-name-can-only-be-used-by-users-with-permission/] This article gives three possibilities. But #1 ("You don’t have a module "Foo::Bar::Baz" in a distribution called Foo-Bar-Baz-$VERSION.tar.gz; fix it by adding that module") doesn't seem to be applicable to us, because our filename and package declaration looks correct and consistent, as follows: {code:java} $ git checkout release-1.10.0 HEAD is now at 6b55656b AVRO-2865: Actually bump the jar. $ ./build.sh docker (snip) sekikn@895320c1e641:~/avro$ ./build.sh dist (snip) + cd lang/perl + ./build.sh dist include /home/sekikn/avro/lang/perl/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm include inc/Module/Install/ReadmeFromPod.pm readme_from lib/Avro.pm to txt include inc/Module/Install/Repository.pm Cannot determine repository URL include inc/Module/Install/MakeMaker.pm include inc/Module/Install/Makefile.pm Checking if your kit is complete... Warning: the following files are missing in your kit: META.yml Please inform the author. Generating a Unix-style Makefile Writing Makefile for Avro Writing MYMETA.yml and MYMETA.json Writing META.yml rm -rf Avro-1.10.0 "/usr/bin/perl" "-Iinc" "-MExtUtils::Manifest=manicopy,maniread" \ -e "manicopy(maniread(),'Avro-1.10.0', 'best');" mkdir Avro-1.10.0 mkdir Avro-1.10.0/lib mkdir Avro-1.10.0/lib/Avro mkdir Avro-1.10.0/t mkdir Avro-1.10.0/inc mkdir Avro-1.10.0/inc/Module mkdir Avro-1.10.0/inc/Module/Install mkdir Avro-1.10.0/bin mkdir Avro-1.10.0/xt mkdir Avro-1.10.0/lib/Avro/Protocol "/usr/bin/perl" "-Iinc" -I. "-MModule::Install::Admin" -e "dist_preop(q(Avro-1.10.0))" tar cvf Avro-1.10.0.tar Avro-1.10.0 Avro-1.10.0/ Avro-1.10.0/.gitignore Avro-1.10.0/lib/ Avro-1.10.0/lib/Avro/ Avro-1.10.0/lib/Avro/DataFileWriter.pm Avro-1.10.0/lib/Avro/BinaryEncoder.pm Avro-1.10.0/lib/Avro/DataFile.pm Avro-1.10.0/lib/Avro/BinaryDecoder.pm Avro-1.10.0/lib/Avro/Protocol.pm Avro-1.10.0/lib/Avro/DataFileReader.pm Avro-1.10.0/lib/Avro/Protocol/ Avro-1.10.0/lib/Avro/Protocol/Message.pm Avro-1.10.0/lib/Avro/Schema.pm Avro-1.10.0/lib/Avro.pm Avro-1.10.0/README Avro-1.10.0/Changes Avro-1.10.0/META.yml Avro-1.10.0/Makefile.PL Avro-1.10.0/VERSION.txt Avro-1.10.0/inc/ Avro-1.10.0/inc/Module/ Avro-1.10.0/inc/Module/Install/ Avro-1.10.0/inc/Module/Install/MakeMaker.pm Avro-1.10.0/inc/Module/Install/Base.pm Avro-1.10.0/inc/Module/Install/Repository.pm Avro-1.10.0/inc/Module/Install/Makefile.pm Avro-1.10.0/inc/Module/Install/Metadata.pm Avro-1.10.0/inc/Module/Install/ReadmeFromPod.pm Avro-1.10.0/inc/Module/Install.pm Avro-1.10.0/bin/ Avro-1.10.0/bin/avro-to-json Avro-1.10.0/t/ Avro-1.10.0/t/04_datafile.t Avro-1.10.0/t/02_bin_encode.t Avro-1.10.0/t/05_protocol.t Avro-1.10.0/t/01_schema.t Avro-1.10.0/t/00_compile.t Avro-1.10.0/t/01_names.t Avro-1.10.0/t/03_bin_decode.t Avro-1.10.0/MANIFEST Avro-1.10.0/xt/ Avro-1.10.0/xt/pod.t Avro-1.10.0/LICENSE Avro-1.10.0/NOTICE rm -rf Avro-1.10.0 gzip --best Avro-1.10.0.tar Created Avro-1.10.0.tar.gz + cp lang/perl/Avro-1.10.0.tar.gz dist/perl/ (snip) BUILD SUCCESSFUL Total time: 10 seconds + mkdir -p build/avro-doc-1.10.0 + cp doc/LICENSE build/avro-doc-1.10.0 + cp doc/NOTICE build/avro-doc-1.10.0 + cd build + tar czf ../dist/avro-doc-1.10.0.tar.gz avro-doc-1.10.0 + cp DIST_README.txt dist/README.txt + (( 0 )) sekikn@895320c1e641:~/avro$ cd dist/perl sekikn@895320c1e641:~/avro/dist/perl$ ls Avro-1.10.0.tar.gz sekikn@895320c1e641:~/avro/dist/perl$ tar xfz Avro-1.10.0.tar.gz sekikn@895320c1e641:~/avro/dist/perl$ cat Avro-1.10.0/lib/Avro.pm (snip) package Avro; (snip) {code} So, I'd like to try the next possibility by adding the "provides" option explicitly in META.yml. The patch I attached adds that option into META.yml, as follows: {code:java} sekikn@895320c1e641:~/avro$ git diff diff --git a/lang/perl/Makefile.PL b/lang/perl/Makefile.PL index 751fc338..69447e56 100644 --- a/lang/perl/Makefile.PL +++ b/lang/perl/Makefile.PL @@ -50,4 +50,18 @@ unless ($Config{use64bitint}) { } auto_set_repository(); +my %packages = ( + 'Avro' => 'lib/Avro.pm', + 'Avro::BinaryDecoder' => 'lib/Avro/BinaryDecoder.pm', + 'Avro::BinaryEncoder' => 'lib/Avro/BinaryEncoder.pm', + 'Avro::DataFile' => 'lib/Avro/DataFile.pm', + 'Avro::DataFileReader' => 'lib/Avro/DataFileReader.pm', + 'Avro::DataFileWriter' => 'lib/Avro/DataFileWriter.pm', + 'Avro::Protocol' => 'lib/Avro/Protocol.pm', + 'Avro::Protocol::Message' => 'lib/Avro/Protocol/Message.pm', + 'Avro::Schema' => 'lib/Avro/Schema.pm', +); +my %provides = map { $_ => { file => $packages{$_}, version => $version } } keys %packages; +provides(%provides); + WriteMakefile(PM_FILTER => "sed -e 's/\+\+MODULE_VERSION\+\+/$version/'"); sekikn@895320c1e641:~/avro$ ./build.sh dist (snip) sekikn@895320c1e641:~/avro$ cd dist/perl sekikn@895320c1e641:~/avro/dist/perl$ tar xfz Avro-1.10.0.tar.gz sekikn@895320c1e641:~/avro/dist/perl$ cat Avro-1.10.0/META.yml (snip) provides: Avro: file: lib/Avro.pm version: 1.10.0 Avro::BinaryDecoder: file: lib/Avro/BinaryDecoder.pm version: 1.10.0 Avro::BinaryEncoder: file: lib/Avro/BinaryEncoder.pm version: 1.10.0 Avro::DataFile: file: lib/Avro/DataFile.pm version: 1.10.0 Avro::DataFileReader: file: lib/Avro/DataFileReader.pm version: 1.10.0 Avro::DataFileWriter: file: lib/Avro/DataFileWriter.pm version: 1.10.0 Avro::Protocol: file: lib/Avro/Protocol.pm version: 1.10.0 Avro::Protocol::Message: file: lib/Avro/Protocol/Message.pm version: 1.10.0 Avro::Schema: file: lib/Avro/Schema.pm version: 1.10.0 (snip) {code} May I try to upload the new tarball that contains revised META.yml to CPAN, or would you like to try? If it also doesn't help and Ryan doesn't have an ownership for the Avro namespace, we may have to ask CPAN admins how we can fix it. > 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 > Assignee: Kengo Seki > Priority: Minor > Fix For: 1.10.0 > > Attachments: AVRO-1461.patch > > > 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)