cloudfoundry / apt-buildpack

MIT License
31 stars 48 forks source link

Unable to get the offline apt-buildpack to work #176

Open Prachi-Srivastava-13 opened 7 months ago

Prachi-Srivastava-13 commented 7 months ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

cf version 8.6.1+b5a352a.2023-02-27

What version of the buildpack you are using?

0.3.4

If you were attempting to accomplish a task, what was it you were attempting to do?

Trying to generate an offline buildpack, using command sudo GOARCH=amd64 GOOS=linux buildpack-packager build -stack cflinuxfs3 --cached

What did you expect to happen?

To create an offline buildpack zip, which holds the dependencies I have specified in manifest.yml i.e.

language: apt default_versions: [] dependency_deprecation_dates: [] dependencies:

In the buildpack zip I see the dependencies folder with the deb files. Attached the buildpack cached zip- apt_buildpack-cached-cflinuxfs3-v0.3.4.zip I expected my app to retrieve dependencies from the zip.

What was the actual behavior? The app is unable to find the package and hence trying to get it from apt-get, which fails because of no access to internet.

2024-01-30T10:06:03.399-08:00 [STG/0] [OUT] Downloading app package... 2024-01-30T10:06:05.610-08:00 [STG/0] [OUT] Downloaded app package (61.2M) 2024-01-30T10:06:05.714-08:00 [STG/0] [OUT] -----> Apt Buildpack version 0.3.4 2024-01-30T10:06:05.714-08:00 [STG/0] [OUT] -----> Updating apt cache 2024-01-30T10:06:37.163-08:00 [STG/0] [OUT] -----> Downloading apt packages 2024-01-30T10:06:37.179-08:00 [STG/0] [ERR] E: Unable to locate package percona-toolkit 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] Reading package lists... 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] Building dependency tree... 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] **ERROR** Error running supply: failed apt-get install Reading package lists... 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] Building dependency tree... 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] 2024-01-30T10:06:37.180-08:00 [STG/0] [OUT] exit status 100 2024-01-30T10:06:37.181-08:00 [STG/0] [ERR] Failed to run all supply scripts: exit status 14 2024-01-30T10:06:37.187-08:00 [STG/0] [OUT] Exit status 225 2024-01-30T10:06:37.464-08:00 [STG/0] [OUT] Cell d498bae6-85e6-4520-a174-784adfd7b139 stopping instance f1731fa8-1d1d-43c7-b827-d5d834386334 2024-01-30T10:06:37.464-08:00 [STG/0] [OUT] Cell d498bae6-85e6-4520-a174-784adfd7b139 destroying container for instance f1731fa8-1d1d-43c7-b827-d5d834386334 2024-01-30T10:06:37.513-08:00 [API/2] [ERR] Failed to stage build: staging failed 2024-01-30T10:06:37.944-08:00 [STG/0] [OUT] Cell d498bae6-85e6-4520-a174-784adfd7b139 successfully destroyed container for instance f1731fa8-1d1d-43c7-b827-d5d834386334

I am running this on cflinuxfs3 (Cloud Foundry Linux-based filesystem - Ubuntu Bionic 18.04 LTS) machine.

Please confirm where necessary: