Giter VIP home page Giter VIP logo

apt-buildpack's Introduction

Cloud Foundry Experimental Apt Buildpack

CF Slack Join us on Slack

A Cloud Foundry buildpack for apps requiring custom apt packages.

Buildpack User Documentation

The apt buildpack can be used to install deb packages prior to use in another buildpack. To configure which packages to install, provide apt.yml in your application and include a list of packages to install, eg:

---
packages:
- ascii
- libxml
- https://example.com/exciting.deb

If you would like to use custom apt repositories, you can add keys and repos to the apt.yml, eg:

---
truncatesources: true
cleancache: true
keys:
- https://example.com/public.key
repos:
- deb http://apt.example.com stable main
packages:
- ascii
- libxml

truncatesources as the name suggests truncates the sources.list file and puts just the entries specified in repos section. This maybe needed in environment where ubuntu public repos are blocked.

cleancache calls apt-get clean and apt-get autoclean. Useful to purge any cached content.

Using a PPA

It's possible to use a PPA, but you need to indicate the GPG key for the PPA and the full repo line, not just the PPA name.

To locate this information, navigate to the PPA on Launchpad. Expand where it says "Technical Details about this PPA". See this Stack Overflow post if you're having trouble finding it.

Under that, select the correct version of Ubuntu from the drop down. Then you can copy and paste the sources.list entries presented there under the repos block in apt.yml. Beneath the sources.list entry, you'll a label named "Signing Key" and beneath that a link. Click on the link. On the page that loads, you should see one GPG key entry. In the bits/keyID column, you'll see a link. Right click on that and copy the link. Paste that in under the keys block in your apt.yml.

You should now be able to install packages from that PPA.

Building the Buildpack

To build this buildpack, run the following commands from the buildpack's directory:

  1. Source the .envrc file in the buildpack directory.

    source .envrc

    To simplify the process in the future, install direnv which will automatically source .envrc when you change directories.

  2. Install buildpack-packager

    go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager
  3. Build the buildpack

    buildpack-packager build
  4. Use in Cloud Foundry

    Upload the buildpack to your Cloud Foundry and optionally specify it by name

    cf create-buildpack [BUILDPACK_NAME] [BUILDPACK_ZIP_FILE_PATH] 1
    cf push my_app [-b BUILDPACK_NAME]

Testing

Buildpacks use the Cutlass framework for running integration tests against Cloud Foundry. Before running the integration tests, you need to login to your Cloud Foundry using the cf cli:

cf login -a https://api.your-cf.com -u [email protected] -p pa55woRD

Note that your user requires permissions to run cf create-buildpack and cf update-buildpack. To run the integration tests, run the following command from the buildpack's directory:

  1. Source the .envrc file in the buildpack directory.

    source .envrc

    To simplify the process in the future, install direnv which will automatically source .envrc when you change directories.

  2. Run unit tests

    ./scripts/unit.sh
  3. Run integration tests

    ./scripts/integration.sh

Contributing

Find our guidelines here.

Help and Support

Join the #buildpacks channel in our Slack community.

Reporting Issues

Open an issue on this project

Active Development

The project backlog is on Pivotal Tracker.

Disclaimer

This buildpack is experimental and not yet intended for production use.

apt-buildpack's People

Contributors

abhinavrau avatar anyu avatar arjun024 avatar astrieanna avatar ben16 avatar brayanhenao avatar cf-buildpacks-eng avatar dependabot[bot] avatar dfreilich avatar dgodd avatar drnic avatar dwillist avatar flavorjones avatar foresteckhardt avatar idoru avatar jfeeny avatar johannesrudolph avatar kardolus avatar ndon55555 avatar ryanmoran avatar sclevine avatar sophiewigmore avatar tisvictress avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apt-buildpack's Issues

Support for HTTPS proxy

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?

{
   "name": "XXXXXXXX",
   "build": "",
   "support": "https://XXXXXXXX",
   "version": 0,
   "description": "",
   "authorization_endpoint": "https://XXXXXXXX",
   "token_endpoint": "https://XXXXXXXX",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "app_ssh_endpoint": "XXXXXXXX:2222",
   "app_ssh_host_key_fingerprint": "c8:f4:e8:b3:0e:44:3f:55:01:cb:67:60:6c:b9:41:47",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://XXXXXXXX:443",
   "api_version": "2.141.0",
   "osbapi_version": "2.15",
   "routing_endpoint": "https://XXXXXXXX",
   "user": "XXXXXXXX"
}
cf version 6.46.1+4934877ec.2019-08-23

What version of the buildpack you are using?

0.2.0

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

Install an apt package from behind a proxy, which supports https only.

What did you expect to happen?

APT buildpack provides a possibility to configure a http and https proxy, furthermore it should be able to install from https repositories.

What was the actual behavior?

No connection possible.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Related:

There is an issue #20 which seems to refer the same problem, still it is unclear to my, why it was closed.

Install specific version of apt instead of latest

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?
{
"name": "VMware Tanzu Application Service",
"build": "2.11.6-build.3",
"support": "https://support.pivotal.io",
"version": 0,
"description": "...",
"authorization_endpoint": "...",
"token_endpoint": "...",
"min_cli_version": "6.23.0",
"min_recommended_cli_version": "6.23.0",
"app_ssh_endpoint": "...",
"app_ssh_host_key_fingerprint": "...",
"app_ssh_oauth_client": "ssh-proxy",
"doppler_logging_endpoint": "...",
"api_version": "2.164.0",
"osbapi_version": "2.15",
"routing_endpoint": "...",
"user": "..."
}

cf version 7.3.0+645c3ce6a.2021-08-16

What version of the buildpack you are using?
latest version from github

If you were attempting to accomplish a task, what was it you were attempting to do?
Install a specific version of a package (microsoft sql server odbc driver)

What did you expect to happen?
I would like to know how to specify the exact version of the package I install. I do not know how to specify that in the apt.yml file. As a result, a different binary is installed every time there is an update

What was the actual behavior?
The latest version is installed rather than the specific version I want

Please confirm where necessary:

  • [] I have included a log output
  • [] My log includes an error message
  • [] I have included steps for reproduction

No error, but no package installed

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 6.38.0+7ddf0aadd.2018-08-07

What version of the buildpack you are using?

  • latest

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

  • Installing the smbclient package

apt.yml

---
packages:
  - smbclient

manifest.yml

---
applications:
- name: MDS_Service
  memory: 1024M
  instances: 2
  disk_quota: 2048M
  buildpacks:
  - https://github.com/cloudfoundry/apt-buildpack.git
  - https://github.com/cloudfoundry/nodejs-buildpack.git

What did you expect to happen?

  • When logging in with ssh, smbclient should be available or apt list --installed should list smbclient

What was the actual behavior?

  • There is no error, but no signs of the smbclient

2019-03-14T15:44:52.51+0100 [STG/0] OUT Downloading build artifacts cache...
2019-03-14T15:44:52.51+0100 [STG/0] OUT Downloading app package...
2019-03-14T15:44:52.73+0100 [STG/0] OUT Downloaded app package (837K)
2019-03-14T15:44:55.19+0100 [STG/0] OUT Downloaded build artifacts cache (56.3M)
2019-03-14T15:45:05.47+0100 [STG/0] OUT -----> Download go 1.11.5
2019-03-14T15:45:14.16+0100 [STG/0] OUT -----> Running go build supply
2019-03-14T15:45:14.16+0100 [STG/0] OUT /tmp/buildpackdownloads/3f6188191ee386ccd86c13b8a9cd4b0d ~
2019-03-14T15:45:18.82+0100 [STG/0] OUT ~
2019-03-14T15:45:18.82+0100 [STG/0] OUT -----> Apt Buildpack version 0.1.6
2019-03-14T15:45:18.83+0100 [STG/0] OUT -----> Updating apt cache
2019-03-14T15:45:19.30+0100 [STG/0] ERR rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
2019-03-14T15:45:20.83+0100 [STG/0] OUT -----> Downloading apt packages
2019-03-14T15:45:22.63+0100 [STG/0] ERR W: --force-yes is deprecated, use one of the options starting with --allow instead.
2019-03-14T15:45:22.63+0100 [STG/0] OUT -----> Installing apt packages
2019-03-14T15:45:24.01+0100 [STG/0] OUT -----> Running go build supply
2019-03-14T15:45:24.01+0100 [STG/0] OUT /tmp/buildpackdownloads/50534934fac3192dbe6dfd44b34ba147 ~
2019-03-14T15:45:25.85+0100 [STG/0] OUT ~
2019-03-14T15:45:25.85+0100 [STG/0] OUT -----> Nodejs Buildpack version 1.6.45

Please confirm where necessary:

  • [*] I have included a log output
  • [*] My log includes an error message
  • [*] I have included steps for reproduction

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

9ccf313 Updating github-config
a84724b Updating github-config
f01383a Update libbuildpack
b624de9 Update libbuildpack
7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

f01383a Update libbuildpack
b624de9 Update libbuildpack
7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

fails with no internet access

This is an issue I saw after I had issues in #20.

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-cli: v6.43.0 and cf version: 2.3.8-build.6.

What version of the buildpack you are using? v0.1.7

If you were attempting to accomplish a task, what was it you were attempting to do? use an Artifactory based Ubuntu repository, as we are unable to access ubuntu repos directly due to corporate firewall reasons.

What did you expect to happen? It to fetch packages from Artifactory as if it were fetching from Ubuntu directly.

What was the actual behavior? It fails to validate the ubuntu bionic repository key (because it hits our corporate firewall), and doesn't do anything with the referenced Artifactory repository.

Creating app python-example...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 13.10 KiB / 13.10 KiB  100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading python_buildpack...
   Downloading apt_buildpack...
   Downloaded apt_buildpack (2.2M)
   Downloaded python_buildpack (561.2M)
   Cell ab560f62-dda9-49af-9dfa-1b6c2f16d52f creating container for instance 41ce6f44-71dd-4cf2-b8d4-7c094a4c5ae0
   Cell ab560f62-dda9-49af-9dfa-1b6c2f16d52f successfully created container for instance 41ce6f44-71dd-4cf2-b8d4-7c094a4c5ae0
   Downloading app package...
   Downloaded app package (13.1K)
   -----> Apt Buildpack version 0.1.7
   -----> Adding apt repos
   -----> Updating apt cache
   rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
   E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
Error staging application: Staging error: staging failed
FAILED
Deleting app python-example in org myorg / space myspace as myuser...
OK
Renaming app python-example-venerable to python-example in org myorg / space myspace as myuser...
OK
error running command: exit status 1

Primarily (it's complaining about it not being signed because it does actually hit a corporate firewall that responds. no key that I would be able to use though):

   rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
   E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed.

apt.yml

---
packages:
- tesseract-ocr
- libtesseract-dev
repos:
- deb https://my-artifactory-hostname/ubuntu-archive-remote bionic universe

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Repro is a little hard, but I think the general solution would have to be a way for me to disable the default repos completely I think. Thoughts?

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

9ccf313 Updating github-config
a84724b Updating github-config
f01383a Update libbuildpack
b624de9 Update libbuildpack
7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

Show logs from apt install

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?

{
   "name": "",
   "build": "",
   "support": "",
   "version": 0,
   "description": "",
   "authorization_endpoint": "https://login.fr.cloud.gov",
   "token_endpoint": "https://uaa.fr.cloud.gov",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "app_ssh_endpoint": "ssh.fr.cloud.gov:2222",
   "app_ssh_host_key_fingerprint": "[REDACTED]",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.fr.cloud.gov:443",
   "api_version": "2.173.0",
   "osbapi_version": "2.15",
   "user": "8d785a43-1e91-493b-9329-12615443c430"
}
cf version 7.3.0+645c3ce6a.2021-08-16

What version of the buildpack you are using?
0.27

If you were attempting to accomplish a task, what was it you were attempting to do?
Install the default-jre-headless and libsaxon-java packages so that the java CLI and saxon.jar file would be available for our Python code to call.

What did you expect to happen?

$ ls -lh
total 8.0K
-rw-r--r-- 1 bmogilefsky bmogilefsky 19 Oct 15 15:56 Procfile
-rw-r--r-- 1 bmogilefsky bmogilefsky 53 Oct 15 15:48 apt.yml
$ cat apt.yml
---
packages:
- default-jre-headless
- libsaxon-java
$ cat Procfile
web: sleep 100000
$ cf push bret-apttest -u process -b https://github.com/cloudfoundry/apt-buildpack -b binary_buildpack
[lots of output]
  -----> Apt Buildpack version 0.2.7
   -----> Updating apt cache
   -----> Downloading apt packages
   -----> Installing apt packages
[====DETAILED OUTPUT OF PACKAGE INSTALLATION AND CONFIGURATION====]
[lots of output]
$ cf ssh app
$ /tmp/lifecycle/shell
$ java -jar /usr/share/java/saxon.jar
bash: java: command not found
$ exit
$ cf logs --recent app 
[====SEE LOGS OF THE PACKAGE INSTALL AND ANY ERRORS ENCOUNTERED====]

What was the actual behavior?

$ ls -lh
total 8.0K
-rw-r--r-- 1 bmogilefsky bmogilefsky 19 Oct 15 15:56 Procfile
-rw-r--r-- 1 bmogilefsky bmogilefsky 53 Oct 15 15:48 apt.yml
$ cat apt.yml
---
packages:
- default-jre-headless
- libsaxon-java
$ cat Procfile
web: sleep 100000
$ cf push bret-apttest -u process -b https://github.com/cloudfoundry/apt-buildpack -b binary_buildpack
[lots of output]
  -----> Apt Buildpack version 0.2.7
   -----> Updating apt cache
   -----> Downloading apt packages
   -----> Installing apt packages
[====NO DETAILS OF THE PACKAGE INSTALLATION/CONFIGURATION====]
[lots of output]
$ cf ssh app
$ /tmp/lifecycle/shell
$ java -jar /usr/share/java/saxon.jar
bash: java: command not found
$ exit
$ cf logs --recent app 
[====NO LOGS OF THE PACKAGE INSTALL OUTPUT OR ERRORS OF ANY KIND====]

Please confirm where necessary:

  • I have included a log output
$ cf logs --recent bret-apttest
Retrieving logs for app bret-apttest in org sandbox-gsa / space bret.mogilefsky as [email protected]...

   2021-10-15T16:03:22.62-0700 [API/0] OUT Added process: "web"
   2021-10-15T16:03:22.63-0700 [API/0] OUT Created app with guid 18fa59b2-0718-4a16-854b-b204183d7b43
   2021-10-15T16:03:22.64-0700 [API/0] OUT Applied manifest to app with guid 18fa59b2-0718-4a16-854b-b204183d7b43 (---
   2021-10-15T16:03:22.64-0700 [API/0] OUT applications:
   2021-10-15T16:03:22.64-0700 [API/0] OUT - name: bret-apttest
   2021-10-15T16:03:22.65-0700 [API/0] OUT   health-check-type: process
   2021-10-15T16:03:22.65-0700 [API/0] OUT   default-route: true
   2021-10-15T16:03:22.65-0700 [API/0] OUT   buildpacks:
   2021-10-15T16:03:22.65-0700 [API/0] OUT   - https://github.com/cloudfoundry/apt-buildpack
   2021-10-15T16:03:22.65-0700 [API/0] OUT   - binary_buildpack
   2021-10-15T16:03:22.65-0700 [API/0] OUT )
   2021-10-15T16:03:26.14-0700 [API/4] OUT Uploading app package for app with guid 18fa59b2-0718-4a16-854b-b204183d7b43
   2021-10-15T16:03:29.43-0700 [API/2] OUT Creating build for app with guid 18fa59b2-0718-4a16-854b-b204183d7b43
   2021-10-15T16:03:29.85-0700 [STG/0] OUT Downloading binary_buildpack...
   2021-10-15T16:03:29.89-0700 [STG/0] OUT Downloaded binary_buildpack
   2021-10-15T16:03:29.89-0700 [STG/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 creating container for instance 2c94987f-09fa-46ac-b5d3-a39512a07208
   2021-10-15T16:03:30.21-0700 [STG/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 successfully created container for instance 2c94987f-09fa-46ac-b5d3-a39512a07208
   2021-10-15T16:03:30.27-0700 [STG/0] OUT Downloading app package...
   2021-10-15T16:03:30.31-0700 [STG/0] OUT Downloaded app package (353B)
   2021-10-15T16:03:32.31-0700 [STG/0] OUT -----> Download go 1.15.5
   2021-10-15T16:03:39.50-0700 [STG/0] OUT -----> Running go build supply
   2021-10-15T16:03:39.50-0700 [STG/0] OUT /tmp/buildpackdownloads/1986c11e5045899f72e33ebceb13b732 ~
   2021-10-15T16:03:40.65-0700 [STG/0] OUT ~
   2021-10-15T16:03:40.65-0700 [STG/0] OUT -----> Apt Buildpack version 0.2.7
   2021-10-15T16:03:40.65-0700 [STG/0] OUT -----> Updating apt cache
   2021-10-15T16:03:45.72-0700 [STG/0] OUT -----> Downloading apt packages
   2021-10-15T16:03:51.60-0700 [STG/0] OUT -----> Installing apt packages
   2021-10-15T16:03:55.47-0700 [STG/0] OUT -----> Binary Buildpack version 1.0.40
   2021-10-15T16:04:06.25-0700 [STG/0] OUT Exit status 0
   2021-10-15T16:04:06.25-0700 [STG/0] OUT Uploading droplet, build artifacts cache...
   2021-10-15T16:04:06.25-0700 [STG/0] OUT Uploading droplet...
   2021-10-15T16:04:06.25-0700 [STG/0] OUT Uploading build artifacts cache...
   2021-10-15T16:04:07.56-0700 [API/2] OUT Creating droplet for app with guid 18fa59b2-0718-4a16-854b-b204183d7b43
   2021-10-15T16:04:09.50-0700 [STG/0] OUT Uploaded build artifacts cache (62.6M)
   2021-10-15T16:04:11.05-0700 [STG/0] OUT Uploaded droplet (59.4M)
   2021-10-15T16:04:11.06-0700 [STG/0] OUT Uploading complete
   2021-10-15T16:04:11.36-0700 [STG/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 stopping instance 2c94987f-09fa-46ac-b5d3-a39512a07208
   2021-10-15T16:04:11.36-0700 [STG/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 destroying container for instance 2c94987f-09fa-46ac-b5d3-a39512a07208
   2021-10-15T16:04:12.34-0700 [STG/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 successfully destroyed container for instance 2c94987f-09fa-46ac-b5d3-a39512a07208
   2021-10-15T16:04:13.52-0700 [API/0] OUT Updated app with guid 18fa59b2-0718-4a16-854b-b204183d7b43 ({:droplet_guid=>"eef9e79b-55b4-43b8-a15d-882be838b83d"})
   2021-10-15T16:04:13.83-0700 [API/2] OUT Creating revision for app with guid 18fa59b2-0718-4a16-854b-b204183d7b43
   2021-10-15T16:04:14.78-0700 [API/2] OUT Restarted app with guid 18fa59b2-0718-4a16-854b-b204183d7b43
   2021-10-15T16:04:14.79-0700 [CELL/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 creating container for instance a9f8e2fa-16c4-47b7-62be-a213
   2021-10-15T16:04:15.15-0700 [CELL/0] OUT Cell e9142d48-5d18-4f21-a8ee-91d48a62cc84 successfully created container for instance a9f8e2fa-16c4-47b7-62be-a213
   2021-10-15T16:04:15.45-0700 [CELL/0] OUT Downloading droplet...
   2021-10-15T16:04:18.05-0700 [CELL/0] OUT Downloaded droplet (59.4M)
  • My log includes an error message
  • I have included steps for reproduction

apt-buildpack https support (apt-transport-https)

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-cli: v6.43.0 and cf version: 2.2.9-build.5 and tested with 2.3.8-build.6.

What version of the buildpack you are using? v0.1.6

If you were attempting to accomplish a task, what was it you were attempting to do? use an Artifactory based Ubuntu repository, as we are unable to access ubuntu repos directly due to corporate firewall reasons.

What did you expect to happen? It to fetch packages from Artifactory as if it were fetching from Ubuntu directly.

What was the actual behavior? Our Artifactory cluster is https only, which requires the https module for apt. I believe it is failing out because the buildpack doesn't have the https module.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Deploy logs:

Creating app python-example...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 13.09 KiB / 13.09 KiB  100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading python_buildpack...
   Downloading apt_buildpack...
   Downloaded python_buildpack
   Downloaded apt_buildpack
   Cell e4b900e7-e937-48e0-b4eb-3332195c51c6 creating container for instance dc9f2501-88e5-46fa-9e9f-07e0d4431c02
   Cell e4b900e7-e937-48e0-b4eb-3332195c51c6 successfully created container for instance dc9f2501-88e5-46fa-9e9f-07e0d4431c02
   Downloading app package...
   Downloaded app package (13.1K)
   -----> Apt Buildpack version 0.1.6
          **WARNING** 
          โš ๏ธ๏ธ๏ธ ๐Ÿšจ๏ธ๏ธ โš ๏ธ ๐Ÿšจ๏ธ๏ธ
          This application is being deployed on cflinuxfs2 which is being deprecated in April, 2019.
          Please migrate this application to cflinuxfs3.
          For more information about changing the stack, see https://docs.cloudfoundry.org/devguide/deploy-apps/stacks.html
          โš ๏ธ๏ธ๏ธ ๐Ÿšจ๏ธ๏ธ โš ๏ธ ๐Ÿšจ๏ธ๏ธ
   -----> Adding apt repos
   -----> Updating apt cache
   E: The method driver /usr/lib/apt/methods/https could not be found.
          **ERROR** Error running supply: failed to apt-get update 
          
          exit status 100
   Failed to run all supply scripts: exit status 14
   Exit status 225
   Cell e4b900e7-e937-48e0-b4eb-3332195c51c6 stopping instance dc9f2501-88e5-46fa-9e9f-07e0d4431c02
   Cell e4b900e7-e937-48e0-b4eb-3332195c51c6 destroying container for instance dc9f2501-88e5-46fa-9e9f-07e0d4431c02
   Cell e4b900e7-e937-48e0-b4eb-3332195c51c6 successfully destroyed container for instance dc9f2501-88e5-46fa-9e9f-07e0d4431c02
Error staging application: Staging error: staging failed
FAILED
Deleting app python-example in org myorg / space myspace as myuser...
OK
Renaming app python-example-venerable to python-example in org myorg / space myspace as myuser...
OK
error running command: exit status 1

Repo:

  1. apt.yml:
---
packages:
- tesseract-ocr
- libtesseract-dev
repos:
- deb https://myartifactory.domain.com/ubuntu-archive-remote bionic universe
  1. deploy the app.

Sidenote: I also noticed that if I didn't specify Artifactory, because Ubuntu is blocked, it just succeeded, but didn't show it was installed when I logged into the container. I think this may be similar to #19

Failing for cflinuxfs3 - Unable to initialize apt package: open /etc/apt/trusted.gpg

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?

  • PWS with cflinuxfs3 stack.

What version of the buildpack you are using?

  • git/master/HEAD

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

I wanted the glorious benefits of cflinuxfs3/ubuntu 18.08 with apt-buildpack - newer packages + hopefully newer imagemagick in the stack.

What did you expect to happen?

Ruby + Apt buildpacks to do their thing.

What was the actual behavior?

Staging app and tracing logs...
   Downloaded ruby_buildpack (263.8M)
   Cell 26c41a05-0278-476c-a153-75f61619a1cd creating container for instance 22458e2a-7b1b-4afa-89e3-0611c6b06d96
   Cell 26c41a05-0278-476c-a153-75f61619a1cd successfully created container for instance 22458e2a-7b1b-4afa-89e3-0611c6b06d96
   Downloading app package...
   Downloaded app package (9.8M)
   -----> Download go 1.9.1
   -----> Running go build supply
   .
   ./final
   ./1986c11e5045899f72e33ebceb13b732
   -----> Apt Buildpack version 0.1.2
          **ERROR** Unable to initialize apt package: open /etc/apt/trusted.gpg: no such file or directory
   Failed to run all supply scripts: exit status 13

The method driver /usr/lib/apt/methods/https could not be found

What version of the buildpack you are using?
develop

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

I tried to install the cf-cli using this apt.yml:

keys:
- https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key

repos:
- deb http://packages.cloudfoundry.org/debian stable main

packages:
- cf-cli

What did you expect to happen?

The package should install fine.

What was the actual behavior?

I got a staging error:

   -----> Apt Buildpack version 0.1.1
   -----> Adding apt keys
   gpg: key 50C212B6: public key "CF CLI Team <[email protected]>" imported
   gpg: Total number processed: 1
   gpg:               imported: 1  (RSA: 1)
   -----> Adding apt repos
   -----> Updating apt cache
   E: The method driver /usr/lib/apt/methods/https could not be found.
          **ERROR** Failed to update apt cache: exit status 100
          Ign http://archive.ubuntu.com trusty InRelease

It does not matter if I use http://packages.cloudfoundry.org/debian or https://packages.cloudfoundry.org/debian in the apt.yml.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

**Suggested fix: **
The apt buildpack should pre-install the apt-transport-https package if it detects a http repository in apt.yml. This should fix the installation error.

Please configure GITBOT

Pivotal uses GITBOT to synchronize Github issues and pull requests with Pivotal Tracker.
Please add your new repo to the GITBOT config-production.yml in the Gitbot configuration repo.
If you don't have access you can send an ask ticket to the CF admins. We prefer teams to submit their changes via a pull request.

Steps:

  • Fork this repo: cfgitbot-config
  • Add your project to config-production.yml file
  • Submit a PR

If there are any questions, please reach out to [email protected].

Install deb from pushed application directory

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.exe version 6.53.0+8e2b70a4a.2020-10-01

What version of the buildpack you are using?
Apt Buildpack version 0.2.2

If you were attempting to accomplish a task, what was it you were attempting to do?
Attempting to include deb files that are not in a repository, I'd like to install the deb files from a directory located in the app upload ($HOME) path.

My apt.yml looks like this:

packages:
- $HOME/deb_files/x.deb
- $HOME/deb_files/y.deb
- $HOME/deb_files/z.deb

The application that I push contains a directory deb_files containing the deb packages.

What did you expect to happen?
The apt buildpack would recognize / accept a path instead of a URL or repo package name

What was the actual behavior?

Packaging files to upload...
Uploading files...
 48.88 KiB / 48.88 KiB [=========================================================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...


Staging app and tracing logs...
   Downloading python_buildpack...
   Downloading apt-buildpack...
   Downloaded python_buildpack
   Downloaded apt-buildpack (2.5M)
   ...
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded app package (4.4M)
   Downloaded build artifacts cache (105.4M)
   -----> Apt Buildpack version 0.2.2
   -----> Updating apt cache
   -----> Downloading apt packages
          **ERROR** Error running supply: Get $HOME/deb_files/x.deb: unsupported protocol scheme ""
   Failed to run all supply scripts: exit status 14

Perhaps this is in fact already possible, and I just don't understand the correct protocol / method of defining the needed packages in the apt.yml, if thats the case, maybe a simple documentation update would help.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

**Release:** apt-buildpack 0.2.4

Dependency Changes:

No dependency changes

New Commits on Develop:

15c8c2a Update libbuildpack
6a42614 Update libbuildpack
ba070b8 Update libbuildpack
10e1259 Update libbuildpack
534fdc8 Update libbuildpack
1d7444f Update libbuildpack
65be44c Update libbuildpack
8ed52b5 Update libbuildpack
0e8fa97 Update libbuildpack
1a35f13 Update libbuildpack
672c94a Update libbuildpack
a920a0f Update libbuildpack
885a65c Update libbuildpack
81a0ac6 Update libbuildpack
758b104 Update libbuildpack
79fa781 Update libbuildpack

Refer to release instructions.

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

4fc6144 Update libbuildpack
9ccf313 Updating github-config
a84724b Updating github-config
f01383a Update libbuildpack
b624de9 Update libbuildpack
7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

cflinuxfs3 shows warning: rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied

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?

  • PWS
  • cf version 6.43.0+815ea2f3d.2019-02-20

What version of the buildpack you are using?

  • latest on PWS - v1.5

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

  • deploy to cflinuxfs3 stack

What did you expect to happen?

  • No warnings

What was the actual behavior?

I see a warning:

   -----> Apt Buildpack version 0.1.5
   -----> Adding apt keys
   Warning: apt-key output should not be parsed (stdout is not a terminal)
   gpg: key 535EAEC4: "Stark & Wayne Bot (Created by CI) <[email protected]>" not changed
   gpg: Total number processed: 1
   gpg:              unchanged: 1
   -----> Adding apt repos
   -----> Updating apt cache
   rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied

Per

Consider creating a bosh release

It would be nice if there were a bosh release for this buildpack so I could make it a standard admin buildpack for my users and easily upgrade it regularly.

openjdk-8-jre-headless symlinks point to wrong files.

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?

{
   "name": "VMware Tanzu Application Service",
   "build": "2.10.20-build.17",
   "support": "https://support.pivotal.io",
   "version": 0,
   "min_cli_version": "6.23.0",
   "min_recommended_cli_version": "6.23.0",
   "app_ssh_oauth_client": "ssh-proxy",
   "api_version": "2.150.0",
   "osbapi_version": "2.15",
}
cf version 7.2.0+be4a5ce2b.2020-12-10

What version of the buildpack you are using?
Every >=0.2.6

If you were attempting to accomplish a task, what was it you were attempting to do?
Install openjdk-8-jre-headless

What did you expect to happen?
Symlinks in /home/vcap/deps/0/lib/jvm/java-8-openjdk-amd64/jre/lib/security point to right files so that SSL is possible.

What was the actual behavior?
The symlinks point to non-existing files and SSL is not working because of that.

ls -l /home/vcap/deps/0/lib/jvm/java-8-openjdk-amd64/jre/lib/security
lrwxrwxrwx 1 vcap vcap 46 Apr 21 2021 blacklisted.certs -> /etc/java-8-openjdk/security/blacklisted.certs
lrwxrwxrwx 1 vcap vcap 27 Apr 21 2021 cacerts -> /etc/ssl/certs/java/cacerts
lrwxrwxrwx 1 vcap vcap 40 Apr 21 2021 java.policy -> /etc/java-8-openjdk/security/java.policy
lrwxrwxrwx 1 vcap vcap 42 Apr 21 2021 java.security -> /etc/java-8-openjdk/security/java.security
lrwxrwxrwx 1 vcap vcap 36 Apr 21 2021 nss.cfg -> /etc/java-8-openjdk/security/nss.cfg
drwxr-xr-x 4 vcap vcap 38 Apr 21 2021 policy
ls -l /etc/java-8-openjdk
ls: cannot access '/etc/java-8-openjdk': No such file or directory
ls -l /etc/ssl/certs/java/cacerts
ls: cannot access '/etc/ssl/certs/java/cacerts': No such file or directory

security folder is actually here:

ls -l /home/vcap/deps/0/apt/etc/java-8-openjdk/security
-rw-r--r-- 1 vcap vcap 2488 Apr 21 2021 blacklisted.certs
-rw-r--r-- 1 vcap vcap 4499 Apr 21 2021 java.policy
-rw-r--r-- 1 vcap vcap 51111 Apr 21 2021 java.security
-rw-r--r-- 1 vcap vcap 106 Apr 21 2021 nss.cfg

But cacerts can't be found anywhere.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Test from Dave

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?

What version of the buildpack you are using?

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

What did you expect to happen?

What was the actual behavior?

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Server certificate verification failed for https://dist.sapmachine.io/ due to Let's Encrypt DST Root CA X3 expiration

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?

What version of the buildpack you are using?

0.2.7

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

In my project pg-beershop I'm using the apt-buildpack to create an app that contains the SapMachine JDK and also the NodeJS runtime. This is defined in mta.yaml#L24. To load the additional package I've defined this apt.yml with the following content:

---
keys:
  - https://dist.sapmachine.io/debian/sapmachine.old.key
  - https://dist.sapmachine.io/debian/sapmachine.key
repos:
  - deb http://dist.sapmachine.io/debian/amd64/ ./
packages:
  - sapmachine-11-jdk

What did you expect to happen?

The build worked until 30th of September 2021.

What was the actual behavior?

Right now I get the following errors during build:

   2021-10-08T07:25:26.82+0200 [STG/0] OUT -----> Apt Buildpack version 0.2.7
   2021-10-08T07:25:26.82+0200 [STG/0] OUT -----> Adding apt keys
   2021-10-08T07:25:26.88+0200 [STG/0] ERR Warning: apt-key output should not be parsed (stdout is not a terminal)
   2021-10-08T07:25:27.29+0200 [STG/0] ERR gpg: no valid OpenPGP data found.
   2021-10-08T07:25:27.29+0200 [STG/0] ERR gpg: Total number processed: 0
   2021-10-08T07:25:27.29+0200 [STG/0] ERR gpg: keyserver communications error: keyserver helper internal error
   2021-10-08T07:25:27.29+0200 [STG/0] ERR gpg: keyserver internal error
   2021-10-08T07:25:27.29+0200 [STG/0] ERR gpg: WARNING: unable to fetch URI https://dist.sapmachine.io/debian/sapmachine.old.key: keyserver error
   2021-10-08T07:25:27.29+0200 [STG/0] OUT        **ERROR** Error running supply: could not add apt key https://dist.sapmachine.io/debian/sapmachine.old.key
   2021-10-08T07:25:27.29+0200 [STG/0] OUT        
   2021-10-08T07:25:27.29+0200 [STG/0] OUT        Executing: /tmp/apt-key-gpghome.D525i3huSB/gpg.1.sh --fetch-keys https://dist.sapmachine.io/debian/sapmachine.old.key
   2021-10-08T07:25:27.29+0200 [STG/0] OUT        gpgkeys: https fetch error 60: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

I think the issue is caused by the fact that the certificate of https://dist.sapmachine.io/ is signed by Let's Encrypt:

Screenshot 2021-10-08 at 07 40 42

They expired the DST Root CA X3. I think the list of CA Certificates in the file /etc/ssl/certs/ca-certificates.crt needs to be updated.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction: Please ask me if you need help with the build and deploy

integration tests fail for me

I've run the integration tests three times and each time this test fails. I'm deploying to a latest CF on bosh-lite. Ideas for debugging/fixing?

$ cf t
api endpoint:   https://api.10-58-111-49.sslip.io
api version:    2.98.0
user:           admin
org:            system
space:          dev
$ cf -v
cf version 6.32.0+0191c33d9.2017-09-26
$ ./scripts/integration.sh
Running Suite: Integration Suite
================================
Random Seed: 1508883458
Will run 3 specs

Running in parallel across 3 nodes

Creating app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...
OK

Creating route simple-nbqcxeuqjwfkqgrblvjm.10-58-111-49.sslip.io...
OK

Binding simple-nbqcxeuqjwfkqgrblvjm.10-58-111-49.sslip.io to simple-nbqcxeuqjwfkqgrblvjm...
OK

Uploading simple-nbqcxeuqjwfkqgrblvjm...
Uploading app files from: /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/fixtures/simple
Uploading 566B, 3 files
Done uploading
OK

Setting env variable 'BP_DEBUG' to '1' for app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...
OK
TIP: Use 'cf restage simple-nbqcxeuqjwfkqgrblvjm' to ensure your env variable changes take effect
Starting app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...

Staging app and tracing logs...
Error staging application: App staging failed in the buildpack compile phase
FAILED
Deleting app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...
OK


โ€ข Failure [78.216 seconds]
Apt supply buildpack
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:13
  as a single buildpack
  /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:47
    reports failure [It]
    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:54

    Timed out after 3.001s.
    Expected
        <string>: Retrieving logs for app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...


    to match regular expression
        <string>: (?i)failed

    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:56
------------------------------
โ€ข [SLOW TEST:96.848 seconds]
Apt supply buildpack
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:13
  as a final buildpack
  /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:32
    reports failure
    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:39
------------------------------
โ€ข [SLOW TEST:144.302 seconds]
Apt supply buildpack
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:13
  as a supply buildpack
  /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:17
    supplies apt packages to later buildpacks
    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:24
------------------------------


Summarizing 1 Failure:

[Fail] Apt supply buildpack as a single buildpack [It] reports failure
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:56

Ran 3 of 3 Specs in 350.202 seconds
FAIL! -- 2 Passed | 1 Failed | 0 Pending | 0 Skipped

Ginkgo ran 1 suite in 5m54.157217275s
Test Suite Failed

Need option to invoke apt-get update

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?

2.109.0
6.37.0+a40009753.2018-05-25

What version of the buildpack you are using?

The latest version from the master branch

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

I am trying to install the gss-ntlmssp package as part of a v3-push.

What did you expect to happen?

It would update and find the gss-ntlmssp package.

What was the actual behavior?

It cannot find the package, and there doesn't seem to be an option to do apt-get update.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Steps to reproduce

  1. Create application with apt.yml file having gss-ntlmssp package
  2. Do a cf v3-push with the apt-buildpack and any other buildpack
  3. Push fails to find gss-ntlmssp package, and there is no option to tell apt-get to update

apt.yml

---
packages:
- gss-ntlmssp

Log

   -----> Apt Buildpack version 0.1.2
   -----> Updating apt cache
   -----> Downloading apt packages
   E: Unable to locate package gss-ntlmssp
          **ERROR** Failed to download apt packages: exit status 100
          Reading package lists...
          Building dependency tree...

   Failed to run all supply scripts: exit status 14
   Exit status 225

Cannot install packages on cflinuxfs3

It looks like apt update cannot be run on cflinuxfs3

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?

Normans-MacBook-Pro:ghost-for-cloudfoundry Norman$ cf curl /v2/info; cf version
{
"name": "",
"build": "",
"support": "https://support.run.pivotal.io",
"version": 0,
"description": "Cloud Foundry sponsored by Pivotal",
"authorization_endpoint": "https://login.run.pivotal.io",
"token_endpoint": "https://uaa.run.pivotal.io",
"min_cli_version": "6.22.0",
"min_recommended_cli_version": "latest",
"app_ssh_endpoint": "ssh.run.pivotal.io:2222",
...
"app_ssh_oauth_client": "ssh-proxy",
"doppler_logging_endpoint": "wss://doppler.run.pivotal.io:443",
"api_version": "2.128.0",
"osbapi_version": "2.14",
"routing_endpoint": "https://api.run.pivotal.io/routing"
}
cf version 6.42.0+0cba12168.2019-01-10

What version of the buildpack you are using?
Apt Buildpack version 0.1.5

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

get mysql-shell installed

What did you expect to happen?
mysql-shell package installs without failures

What was the actual behavior?
Staging app and tracing logs...
Cell 0a17e4d2-86af-4269-bf35-434c403ddb61 creating container for instance 46ae3507-c619-4ed9-b128-d461fdb76d5f
Cell 0a17e4d2-86af-4269-bf35-434c403ddb61 successfully created container for instance 46ae3507-c619-4ed9-b128-d461fdb76d5f
Downloading app package...
Downloaded app package (7.5M)
-----> Download go 1.11.4
-----> Running go build supply
/tmp/buildpackdownloads/1986c11e5045899f72e33ebceb13b732 ~
~
-----> Apt Buildpack version 0.1.5
-----> Adding apt keys
....
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
-----> Adding apt repos
-----> Updating apt cache
rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
-----> Downloading apt packages
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Unable to correct problems, you have held broken packages.
ERROR Error running supply: failed apt-get install Reading package lists...
Building dependency tree...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

      The following packages have unmet dependencies:
       mysql-shell : Depends: libprotobuf8 but it is not installable
      
      
      exit status 100

Failed to run all supply scripts: exit status 14
Exit status 225
Cell 0a17e4d2-86af-4269-bf35-434c403ddb61 stopping instance 46ae3507-c619-4ed9-b128-d461fdb76d5f
Cell 0a17e4d2-86af-4269-bf35-434c403ddb61 destroying container for instance 46ae3507-c619-4ed9-b128-d461fdb76d5f
Error staging application: Staging error: staging failed
FAILED
error running command: exit status 1

Please confirm where necessary:

  • I have included a log output
  • [X ] My log includes an error message
  • I have included steps for reproduction

apt.yml

keys:

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

4fc6144 Update libbuildpack
9ccf313 Updating github-config
a84724b Updating github-config
f01383a Update libbuildpack
b624de9 Update libbuildpack
7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory

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?

{
   "name": "",
   "build": "",
   "support": "https://support.run.pivotal.io",
   "version": 0,
   "description": "Cloud Foundry sponsored by Pivotal",
   "authorization_endpoint": "https://login.run.pivotal.io",
   "token_endpoint": "https://uaa.run.pivotal.io",
   "min_cli_version": "6.22.0",
   "min_recommended_cli_version": "latest",
   "app_ssh_endpoint": "ssh.run.pivotal.io:2222",
   "app_ssh_host_key_fingerprint": "e7:13:4e:32:ee:39:62:df:54:41:d7:f7:8b:b2:a7:6b",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.run.pivotal.io:443",
   "api_version": "2.142.0",
   "osbapi_version": "2.15",
   "routing_endpoint": "https://api.run.pivotal.io/routing",
   "user": "2e77339e-007e-4323-b086-dcbf38d8a7d5"
}
cf version 6.47.2+d526c2cb3.2019-11-05

What version of the buildpack you are using?
Apt Buildpack version 0.2.1

If you were attempting to accomplish a task, what was it you were attempting to do?
Run /home/vcap/deps/0/bin/gpg --import /home/vcap/app/xxx.asc

What did you expect to happen?
gpg to not throw an error

What was the actual behavior?
There was an error because gpg was looking for /usr/bin/gpg-agent instead of /home/vcap/deps/0/bin/gpg-agent

2019-11-19T00:34:33.805-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | command failed
2019-11-19T00:34:33.805-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | command = /home/vcap/deps/0/bin/gpg --import /home/vcap/app/xxx.asc
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | Array
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | (
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [0] => gpg: directory '/home/vcap/app/.gnupg' created
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [1] => gpg: keybox '/home/vcap/app/.gnupg/pubring.kbx' created
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [2] => gpg: /home/vcap/app/.gnupg/trustdb.gpg: trustdb created
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [3] => gpg: key xxx: public key "xxx <[email protected]>" imported
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [4] => gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [5] => gpg: can't connect to the agent: No such file or directory
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [6] => gpg: Total number processed: 1
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | [7] => gpg: imported: 1
2019-11-19T00:34:33.806-07:00 [APP/PROC/WEB/0] [OUT] 07:34:33 php-app | )

The error happens even if I run /home/vcap/deps/0/bin/gpg-agent --daemon before running the import command

apt.yml

---
packages:
- gpg
- gpg-agent

composer.json

{
	"minimum-stability": "stable",
	"require": {
        "guzzlehttp/guzzle": "*",
        "phpseclib/phpseclib": "*"
    },
    "scripts": {
        "post-root-package-install": [
            "/tmp/lifecycle/shell"
        ]
    }
}

manifest.yml

---
applications:
- name: xxx
  memory: 128M
  instances: 1
  path: .
  buildpacks:
    - https://github.com/cloudfoundry/apt-buildpack.git
    - php_buildpack
  health-check-type: none
  no-route: true
  disk_quota: 2G
  stack: cflinuxfs3

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

f01383a Update libbuildpack
b624de9 Update libbuildpack
7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

Minor (non breaking) build errors during push

Note that the application is pushed successfully and works fine.

What version of Cloud Foundry and CF CLI are you using?
cf curl /v2/info

{
   "name": "",
   "build": "",
   "support": "",
   "version": 0,
   "description": "Cloud Foundry at Foobar",
   "authorization_endpoint": "https://login.cf.foobar.com",
   "token_endpoint": "https://uaa.cf.foobar.com",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "app_ssh_endpoint": "ssh.cf.foobar.com:2222",
   "app_ssh_host_key_fingerprint": "...",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.cf.foobar.com:443",
   "api_version": "2.128.0",
   "osbapi_version": "2.14",
   "bits_endpoint": "https://bits.cf.foobar.com",
   "user": "..."
}
cf -v
cf version 6.41.0+dd4c76cdd.2018-11-28

What version of the buildpack you are using?

  • nodejs_buildpack-cflinuxfs3-v1.6.38.zip
  • apt-buildpack master 302ce5a

apt.yml

---
packages:
- libx11-xcb1
- libxtst6
- libnss3
- libnspr4
- libxss1
- libgconf-2-4
- libasound2
- chromium-browser

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

  • Pushing the application with cf push

What did you expect to happen?

  • No errors from the apt buildpack

What was the actual behavior?

  • Error from the apt buildpack
-----> Apt Buildpack version 0.1.5
   -----> Updating apt cache
   rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
   -----> Downloading apt packages
   W: --force-yes is deprecated, use one of the options starting with --allow instead.

Full cf push log

 cf push -f manifest-test.yml foobar-app
Pushing from manifest to org Foo Org / space foospace as foouser ...
Using manifest file manifest-test.yml
Getting app info...
Updating app with these attributes...
  name:                foobar-app
  path:                /apps/foobar-app
  buildpacks:
    https://github.com/cloudfoundry/apt-buildpack
    nodejs_buildpack
  command:             npm run test-cf
  disk quota:          1.5G
  health check type:   none
  instances:           1
  memory:              4G
  stack:               cflinuxfs3
  env:
    NODE_ENV
    NPM_CONFIG_PRODUCTION

Updating app foobar-app...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 8.04 MiB / 8.04 MiB [================================================================================================================================================================] 100.00% 2s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading nodejs_buildpack...
   Downloaded nodejs_buildpack
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 creating container for instance f5171059-0028-4477-a53d-01aa77bb6610
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 successfully created container for instance f5171059-0028-4477-a53d-01aa77bb6610
   Downloading app package...
   Downloaded app package (57.4M)
   -----> Download go 1.11.4
   -----> Running go build supply
   /tmp/buildpackdownloads/1986c11e5045899f72e33ebceb13b732 ~
   ~
   -----> Apt Buildpack version 0.1.5
   -----> Updating apt cache
   rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
   -----> Downloading apt packages
   W: --force-yes is deprecated, use one of the options starting with --allow instead.
   -----> Installing apt packages
   -----> Nodejs Buildpack version 1.6.38
   -----> Installing binaries
          engines.node (package.json): ~8.x
          engines.npm (package.json): unspecified (use default)
   -----> Installing node 8.14.1
          Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-8.14.1-linux-x64-cflinuxfs3-a4e189cb.tgz]
          Using default npm version: 6.4.1
   -----> Installing yarn 1.12.3
          Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-1.12.3-any-stack-02cd4b58.tar.gz]
          Installed yarn 1.12.3
   -----> Creating runtime environment
          PRO TIP: It is recommended to vendor the application's Node.js dependencies
          Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring
          NODE_ENV=development
          NPM_CONFIG_PRODUCTION=false
          NODE_HOME=/tmp/contents452461028/deps/1/node
          NODE_MODULES_CACHE=true
          NODE_VERBOSE=false
          NPM_CONFIG_LOGLEVEL=error
   -----> Building dependencies
          Installing node modules (yarn.lock)
          Found yarn mirror directory /tmp/app/npm-packages-offline-cache
          Running yarn in offline mode
   yarn install v1.12.3
   warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
   [1/4] Resolving packages...
   [2/4] Fetching packages...
   [3/4] Linking dependencies...
   [4/4] Building fresh packages...
   Done in 26.38s.
          yarn.lock and package.json match
   Exit status 0
   Uploading droplet, build artifacts cache...
   Uploading droplet...
   Uploading build artifacts cache...
   Uploaded build artifacts cache (187.1M)
   Uploaded droplet (363.9M)
   Uploading complete
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 stopping instance f5171059-0028-4477-a53d-01aa77bb6610
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 destroying container for instance f5171059-0028-4477-a53d-01aa77bb6610

Waiting for app to start...

name:              foobar-app
requested state:   started
routes:
last uploaded:     Fri 01 Feb 07:44:32 UTC 2019
stack:             cflinuxfs3
buildpacks:        https://github.com/cloudfoundry/apt-buildpack, nodejs

type:            web
instances:       1/1
memory usage:    4096M
start command:   npm run test-cf
     state     since                  cpu    memory      disk         details
#0   running   2019-02-01T07:45:14Z   0.0%   44K of 4G   8K of 1.5G

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Is this buildpack still considered experimental?

We are looking at using this buildpack in our PCF installation, but the team has raised concerns over the fact that the readme states that the buildpack is experimental and not yet intended for production use. Can someone confirm if this should still be considered not suitable for production, and if so if there is any milestones for when it would be considered production ready?

**Release:** apt-buildpack 0.2.7

Dependency Changes:

No dependency changes

New Commits on Develop:

7577e05 Adds integration testing matrix
02dd825 Rewrites integration suite using spec
f9c390c Breaks up integration suite into smaller files
cd45568 Removes some unused integration suite items
e207e80 Merge pull request #48 from cloudfoundry/automation/github-config/update
fff3082 Updating github-config
4df23bb Updating github-config
d79b583 Merge pull request #47 from cloudfoundry/automation/github-config/update
00a5476 Updating github-config
293e0d2 Update libbuildpack
b1c9671 Merge pull request #44 from cloudfoundry/automation/github-config/update
664c93a Updating github-config
8d012e5 Merge pull request #43 from cloudfoundry/automation/github-config/update
528179f Updating github-config
7347fc5 Update libbuildpack

Refer to release instructions.

How to add /opt bin to PATH?

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?
API 2.162.0
CLI 7.2.0+be4a5ce2b.2020-12-10

What version of the buildpack you are using?
3f8d808

If you were attempting to accomplish a task, what was it you were attempting to do?
Installing fluent-bit which installs to /opt/td-agent-bit successfully.

---
keys:
  - https://packages.fluentbit.io/fluentbit.key
packages:
  - td-agent-bit
repos:
  - deb https://packages.fluentbit.io/ubuntu/bionic bionic main

What did you expect to happen?
Would like a configuration option to add /opt/td-agent-bit/bin to PATH as part of the buildpack.

What was the actual behavior?
Binaries are copied to /home/vcap/deps/0/apt/opt/td-agent-bit/bin/ but not added to path.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.