Skip to content

Commit f82a40d

Browse files
authored
Merge pull request #1290 from kiril-keranov/patch-33
Adjust cflinuxfs5 stack for some dependencies and correct docs
2 parents 857abfe + 32c98a6 commit f82a40d

2 files changed

Lines changed: 20 additions & 54 deletions

File tree

RUBY_VS_GO_BUILDPACK_COMPARISON.md

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,9 @@ cf set-env myapp JBP_CONFIG_TOMCAT '{tomcat: {version: 10.1.+}}'
551551
cf set-env myapp JBP_CONFIG_TOMCAT '{external_configuration_enabled: true, external_configuration: {version: "1.0.0"}}'
552552
```
553553

554-
#### External Configuration: Different Approaches
554+
#### External Configuration:
555555

556-
**Ruby Buildpack**: Runtime repository_root override ✅
556+
Both buildpacks support repository_root override ✅
557557

558558
```bash
559559
# ✅ Works: Specify custom repository at runtime
@@ -566,37 +566,6 @@ cf set-env myapp JBP_CONFIG_TOMCAT '{
566566
}'
567567
```
568568

569-
**Implementation**:
570-
```ruby
571-
# Ruby buildpack fetches index.yml from repository_root at staging time
572-
def compile
573-
download(@version, @uri) { |file| expand file } # Downloads from repository_root
574-
end
575-
```
576-
577-
**Go Buildpack**: Manifest-only configuration ⚠️
578-
579-
```bash
580-
# ❌ DOES NOT WORK: repository_root via environment variable not supported
581-
cf set-env myapp JBP_CONFIG_TOMCAT '{external_configuration_enabled: true, ...}'
582-
```
583-
584-
**Required approach**:
585-
1. Fork buildpack
586-
2. Add external configuration to `manifest.yml`:
587-
```yaml
588-
dependencies:
589-
- name: tomcat-external-configuration
590-
version: 1.0.0
591-
uri: https://my-repo.example.com/tomcat-config-1.0.0.tar.gz
592-
sha256: abc123...
593-
cf_stacks:
594-
- cflinuxfs4
595-
```
596-
3. Package and upload custom buildpack
597-
598-
**Why the difference**: Go buildpack prioritizes security (mandatory SHA256 verification) and reproducibility (same manifest = same configs) over runtime flexibility.
599-
600569
### 2A.5 Access Logging Configuration
601570

602571
#### Default Behavior: Disabled (Parity)
@@ -1241,13 +1210,13 @@ func (s *SpringBootCLIContainer) Detect() (string, error) {
12411210

12421211
### 3.1 Cloud Foundry API Versions
12431212

1244-
| Aspect | Ruby (V2 API) | Go (V3 API) |
1245-
|--------|---------------|-------------|
1246-
| **Phases** | detect → compile → release | detect → supply → finalize |
1247-
| **Multi-buildpack** | Not supported (needs workarounds) | Native support (multiple supply phases) |
1213+
| Aspect | Ruby (V2 API) | Go (V3 API) |
1214+
|--------|---------------|--------------------------------------------|
1215+
| **Phases** | detect → compile → release | detect → supply → finalize -> release |
1216+
| **Multi-buildpack** | Not supported (needs workarounds) | Native support (multiple supply phases) |
12481217
| **Entrypoints** | `bin/detect`, `bin/compile`, `bin/release` | `bin/detect`, `bin/supply`, `bin/finalize` |
1249-
| **State Management** | Droplet object (in-memory) | Files in `/deps/<idx>/` (persistent) |
1250-
| **Caching** | `$CF_BUILDPACK_BUILDPACK_CACHE` | Same + `/deps/<idx>/` for dependencies |
1218+
| **State Management** | Droplet object (in-memory) | Files in `/deps/<idx>/` (persistent) |
1219+
| **Caching** | `$CF_BUILDPACK_BUILDPACK_CACHE` | Same + `/deps/<idx>/` for dependencies |
12511220

12521221
### 3.2 Phase Responsibilities
12531222

@@ -1723,8 +1692,6 @@ func (t *Tomcat) Supply() error {
17231692

17241693
**Key difference**: The Go buildpack **initially forgot to use strip_components**, requiring helper functions like `findTomcatHome()`. The correct approach is to use `crush.Extract()` with `strip=1` parameter (similar to Ruby's `--strip 1`).
17251694

1726-
See detailed analysis: `/ruby_vs_go_buildpack_comparison.md` (the OLD document focuses on this specific issue).
1727-
17281695
### 5.3 Caching Strategies
17291696

17301697
| Aspect | Ruby Buildpack | Go Buildpack |
@@ -1741,13 +1708,13 @@ See detailed analysis: `/ruby_vs_go_buildpack_comparison.md` (the OLD document f
17411708

17421709
### 6.1 Test Framework Comparison
17431710

1744-
| Aspect | Ruby Buildpack | Go Buildpack |
1745-
|--------|---------------|--------------|
1746-
| **Unit Test Framework** | RSpec | Go testing + Gomega assertions |
1747-
| **Integration Tests** | Separate repo (java-buildpack-system-test) | In-tree (src/integration/) |
1748-
| **Test Runner** | Rake tasks | Switchblade framework |
1749-
| **Platforms** | Cloud Foundry only | CF + Docker (with GitHub token) |
1750-
| **Total Tests** | ~300+ specs | ~100+ integration tests |
1711+
| Aspect | Ruby Buildpack | Go Buildpack |
1712+
|--------|---------------|---------------------------------------|
1713+
| **Unit Test Framework** | RSpec | Go testing + Gomega assertions |
1714+
| **Integration Tests** | Separate repo (java-buildpack-system-test) | In-tree (src/integration/) |
1715+
| **Test Runner** | Rake tasks | Switchblade framework |
1716+
| **Platforms** | Cloud Foundry only | CF + Docker (with GitHub token) |
1717+
| **Total Tests** | ~300+ specs | ~800+ integration tests |
17511718
| **Test Apps** | External repo (java-test-applications) | Embedded in src/integration/testdata/ |
17521719

17531720
### 6.2 Test Organization
@@ -2313,8 +2280,6 @@ The Go-based Java buildpack is a **production-ready, feature-complete** migratio
23132280
## Appendix B: Further Reading
23142281

23152282
- **ARCHITECTURE.md** - Detailed Go buildpack architecture
2316-
- **comparison.md** - Component-by-component feature parity analysis
2317-
- **ruby_vs_go_buildpack_comparison.md** - OLD document (focused on dependency extraction only, outdated)
23182283
- **docs/custom-jre-usage.md** - Guide for custom JRE repositories in Go buildpack
23192284
- **docs/DEVELOPING.md** - Development workflow and testing
23202285
- **docs/IMPLEMENTING_FRAMEWORKS.md** - Framework implementation guide
@@ -2323,5 +2288,5 @@ The Go-based Java buildpack is a **production-ready, feature-complete** migratio
23232288
---
23242289

23252290
**Document Version**: 1.0
2326-
**Last Updated**: January 5, 2026
2291+
**Last Updated**: May 20, 2026
23272292
**Authors**: Cloud Foundry Java Buildpack Team

manifest.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ dependencies:
399399
sha256: e024103719ffa99a011607942ecddfd91c5681113e6cea27f5514bc9fa172875
400400
cf_stacks:
401401
- cflinuxfs4
402+
- cflinuxfs5
402403
- name: mariadb-jdbc
403404
version: 3.5.8
404405
uri: https://buildpacks.cloudfoundry.org/dependencies/mariadb-jdbc/mariadb-jdbc_3.5.8_linux_noarch_any-stack_6127dc78.jar
@@ -592,7 +593,7 @@ dependencies:
592593
sha256: b3452d5ffbf0652e0f44958a5cb306a961906280102e5fa1a15840d2ddb6bcc1
593594
cf_stacks:
594595
- cflinuxfs4
595-
- cflinuxfs3
596+
- cflinuxfs5
596597
source: https://repo1.maven.org/maven2/org/cloudfoundry/tomcat-access-logging-support/3.4.0.RELEASE/tomcat-access-logging-support-3.4.0.RELEASE.jar
597598
source_sha256: b3452d5ffbf0652e0f44958a5cb306a961906280102e5fa1a15840d2ddb6bcc1
598599
- name: tomcat-lifecycle-support
@@ -601,7 +602,7 @@ dependencies:
601602
sha256: 3861d32a91b58302fa936d6f84354e1874f71e59dd97b003efcc992a5a6f3c47
602603
cf_stacks:
603604
- cflinuxfs4
604-
- cflinuxfs3
605+
- cflinuxfs5
605606
source: https://repo1.maven.org/maven2/org/cloudfoundry/tomcat-lifecycle-support/3.4.0.RELEASE/tomcat-lifecycle-support-3.4.0.RELEASE.jar
606607
source_sha256: 3861d32a91b58302fa936d6f84354e1874f71e59dd97b003efcc992a5a6f3c47
607608
- name: tomcat-logging-support
@@ -610,7 +611,7 @@ dependencies:
610611
sha256: 07de9efe8dda4c67dec6183ec1d59953abf1372cd71fe276fc4598739bd70667
611612
cf_stacks:
612613
- cflinuxfs4
613-
- cflinuxfs3
614+
- cflinuxfs5
614615
source: https://repo1.maven.org/maven2/org/cloudfoundry/tomcat-logging-support/3.4.0.RELEASE/tomcat-logging-support-3.4.0.RELEASE.jar
615616
source_sha256: 07de9efe8dda4c67dec6183ec1d59953abf1372cd71fe276fc4598739bd70667
616617
- name: your-kit-profiler

0 commit comments

Comments
 (0)