Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of Port ehcache to version 3.8.1 #6784

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

saptarshi1729
Copy link
Contributor

Resolution of issue #60219 - [https://trac.macports.org/ticket/60219]

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.15.3 19D76

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@macportsbot
Copy link

Travis Build #11028 Failed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache fail on xcode10.3. Log
Port ehcache fail on xcode9.4. Log
Port ehcache fail on xcode8.3. Log
Port ehcache fail on xcode7.3. Log

@ryandesign
Copy link
Contributor

The homepage is wrong. Use PortGroup github 1.0 and github.setup ehcache ehcache3 3.8.1 v and github.tarball_from releases which will set homepage, master_sites, name, version, livecheck for you.

The log of the build failure says:

Error: Failed to destroot ehcache: xinstall: Cannot stat: /opt/local/var/macports/build/_Users_runner_runners_2.165.2_work_1_s_java_ehcache/ehcache/work/ehcache/build/dist/ehcache-3.8.1.jar, No such file or directory

Since you're now downloading a prebuilt jar rather than building it, you'd need to change ${worksrcpath}/build/dist/${name}-${version}.jar to ${distpath}/${files}.

The log also says:

--->  Extracting ehcache-3.8.1.jar
...
gzip: /opt/local/var/macports/distfiles/ehcache/ehcache-3.8.1.jar: not in gzip format

Since you don't want MacPorts to try to extract this file you should add the line extract.only (to indicate that MacPorts should "only" extract none of the distfiles).

Probably should add supported_archs noarch.

worksrcdir should be removed.

@ryandesign
Copy link
Contributor

Oh, and add Closes: https://trac.macports.org/ticket/60219 to the commit message (on a line by itself with a blank line above it).

@macportsbot
Copy link

Travis Build #11040 Failed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache fail on xcode10.3. Log
Port ehcache fail on xcode9.4. Log
Port ehcache fail on xcode8.3. Log

@macportsbot
Copy link

Travis Build #11041 Failed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache fail on xcode10.3. Log
Port ehcache fail on xcode9.4. Log
Port ehcache fail on xcode8.3. Log

@macportsbot
Copy link

Travis Build #11042 Failed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache fail on xcode10.3. Log
Port ehcache fail on xcode9.4. Log
Port ehcache fail on xcode8.3. Log

@ryandesign
Copy link
Contributor

ryandesign commented Apr 5, 2020

${distpath}/${files}

Oh whoops I meant ${distpath}/${distfiles}

@macportsbot
Copy link

Travis Build #11043 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log

@macportsbot
Copy link

Travis Build #11044 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log

@JacksonIsaac
Copy link
Member

The homepage is wrong. Use PortGroup github 1.0 and github.setup ehcache ehcache3 3.8.1 v and github.tarball_from releases which will set homepage, master_sites, name, version, livecheck for you.

Here's an example to use github Portgroup:

https://github.com/macports/macports-ports/blob/master/devel/libsolv/Portfile#L7

@macportsbot
Copy link

Travis Build #11045 Failed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache fail on xcode10.3. Log
Port ehcache fail on xcode9.4. Log
Port ehcache fail on xcode8.3. Log

@macportsbot
Copy link

Travis Build #11046 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log

@macportsbot
Copy link

Travis Build #11058 Failed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache fail on xcode10.3. Log
Port ehcache fail on xcode9.4. Log
Port ehcache fail on xcode8.3. Log
Port ehcache fail on xcode7.3. Log

@ryandesign
Copy link
Contributor

I didn't notice that there is a difference between the desired port name "ehcache" and the github repository name "ehcache3" so yes you do need to override the github portgroup's default name with name ehcache as you did.

It's failing to fetch because the github portgroup overrides the default for distname. Usually this is helpful, but in the case of this port it's unfortunately counterproductive, so you'll need to override distname again with distname ${name}-${version}.

@macportsbot
Copy link

Travis Build #11061 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log
Port ehcache success on xcode7.3. Log

@macportsbot
Copy link

Travis Build #11062 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log
Port ehcache success on xcode7.3. Log

Copy link
Member

@mojca mojca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow commit message guidelines (you have the link in the PR template).


categories java
maintainers nomaintainer
platforms darwin
license Apache-2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure that you use consistent whitespacing (spaces only, no tabs, align to 20 spaces) throughout the file. If the original uses tabs, create a separate commit that first fixes whitespacing, and then another commit with functional changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Thanks for the suggestions. I'll rectify it soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I've added the whitespaces, but the resulting alignment doesn't seem to serve the purpose. You may kindly find the same in my commit and revert. I'm trying out a way of ensuring a fine alignment. Any advice in this regard is always highly appreciated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use spaces instead of tabs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Thanks to both @mojca and @mf2k for pointing it out. I've corrected and incorporated the spacing, hopefully as required. Please revert in case of any issue.


depends_build bin:ant:apache-ant
depends_lib bin:java:kaffe
checksums md5 a6f66597f5aca8104972a79e72d62a04 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need md5? It's not strictly deprecated. If the upstream publishes md5 it may be kept.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the other existing portfiles, I had wished to retain it. I may remove it, may please let me know if required.

@macportsbot
Copy link

Travis Build #11064 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log
Port ehcache success on xcode7.3. Log

@macportsbot
Copy link

Travis Build #11072 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log

@macportsbot
Copy link

Travis Build #11073 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log
Port ehcache success on xcode7.3. Log

Comment on lines 17 to 27
1. Fast \
2. Simple \
3. Acts as a pluggable cache for Hibernate \
4. Small foot print. Both in terms of size and memory requirements. \
5. Minimal dependencies. \
6. Fully documented. See the online Documentation, FAQ and the online JavaDoc. \
7. Comprehensively Test Coverage. See the clover test report. \
8. Scalable to hundreds of caches and large multi-cpu servers. \
9. Provides LRU, LFU and FIFO cache eviction policies. \
10. Available under the Apache 1.1 license. Ehcache's copyright and licensing has been reviewed and approved by the Apache Software Foundation, making ehcache suitable for use in Apache projects. \
11. Production tested. All final versions of ehcache are production tested for several weeks on a large and very busy eCommerce site before release.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your lines are too long here. First, start at four spaces out and for the lines that are still past column 80, wrap them to the next line.

Comment on lines 44 to 46
xinstall -m 644 \
${distpath}/${distfiles} \
${distpath}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is normally all on the same line. Don't wrap it to make 3 lines.

Copy link
Member

@mojca mojca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash the commits and fix the commit message according to the guidelines.

@@ -1,53 +1,54 @@
PortSystem 1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you fixed the spacing: check other ports which contain some special commented-out settings in the first line and copy-paste that one here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I've added the same.

Copy link
Member

@mojca mojca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read again through the Commit Message Guidelines.

@macportsbot
Copy link

Travis Build #11076 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log

@macportsbot
Copy link

Travis Build #11077 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log
Port ehcache success on xcode7.3. Log

@saptarshi1729
Copy link
Contributor Author

Please read again through the Commit Message Guidelines.

Hi, I've gone through the same and have incorporated changes. Kindly see.

Comment on lines 19 to 39
following features: \
1. Fast \
2. Simple \
3. Acts as a pluggable cache for Hibernate \
4. Small foot print. Both in terms of size and memory \
requirements. \
5. Minimal dependencies. \
6. Fully documented. See the online Documentation, FAQ \
and the online JavaDoc. \
7. Comprehensively Test Coverage. See the clover test \
report. \
8. Scalable to hundreds of caches and large multi-cpu \
servers. \
9. Provides LRU, LFU and FIFO cache eviction policies. \
10. Available under the Apache 1.1 license. Ehcache's \
copyright and licensing has been reviewed and approved \
by the Apache Software Foundation, making ehcache \
suitable for use in Apache projects. \
11. Production tested. All final versions of ehcache \
are production tested for several weeks on a large and \
very busy eCommerce site before release.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are wasting too much space here. Move these lines left to start at column 4. Then you can re-wrap out to column 80. Then it won't be using as many lines. Does that make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sir,
I've made the change accordingly. Please review my latest commit. Thanks.

@macportsbot
Copy link

Travis Build #11079 Passed.

Lint results
--->  Verifying Portfile for ehcache
--->  0 errors and 0 warnings found.

Port ehcache success on xcode10.3. Log
Port ehcache success on xcode9.4. Log
Port ehcache success on xcode8.3. Log
Port ehcache success on xcode7.3. Log


description Ehcache is a pure Java, in-process object cache.
long_description Ehcache is a pure Java, in-process cache with the \
following features: \
Copy link
Contributor

@mf2k mf2k Apr 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there. This one (1) line should be moved left to column 4 also.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done the same, Sir. May please review it. Thanks.

* update to version 3.8.1
* removing dependency on deprecated port kaffe
* introducing dependency on Java portgroup
* rectifying alignment and spacing

Closes: https://trac.macports.org/ticket/60219
@JacksonIsaac JacksonIsaac merged commit 3ae6f98 into macports:master Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants