diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..b7fdd974 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: mhart diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 00000000..801ac7c5 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,20 @@ +name: ci-build + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build build Docker images + working-directory: base + run: ./build-all-build.sh + - name: List Docker images + run: | + docker images diff --git a/.github/workflows/ci-run.yml b/.github/workflows/ci-run.yml new file mode 100644 index 00000000..880bb7df --- /dev/null +++ b/.github/workflows/ci-run.yml @@ -0,0 +1,20 @@ +name: ci-run + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build run Docker images + working-directory: base + run: ./build-all-run.sh + - name: List Docker images + run: | + docker images diff --git a/.gitignore b/.gitignore index 3d17f05b..97b322a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,42 @@ node_modules base/diff +base/diff-2 *.pyc *.vs *.userprefs .gradle -target -vendor -bin -obj -examples/java/build -go1.x/run/aws-lambda-mock -go1.x/run/vendor -examples/go1.x/handler +base/tar-find-layer/layer.zip +base/dump-java8/bin +base/dump-java8/build +base/dump-java8al2/bin +base/dump-java8al2/build +base/dump-java11/bin +base/dump-java11/build +base/dump-dotnetcore20/bin +base/dump-dotnetcore20/obj +base/dump-dotnetcore21/bin +base/dump-dotnetcore21/obj +base/dump-dotnetcore31/bin +base/dump-dotnetcore31/obj +base/dump-providedal2/bootstrap +base/dump-providedal2/bootstrap.zip +dotnetcore2.0/run/MockBootstraps/bin +dotnetcore2.0/run/MockBootstraps/obj +dotnetcore2.1/run/MockBootstraps/bin +dotnetcore2.1/run/MockBootstraps/obj +java8/run/lambda-runtime-mock/target +examples/dotnetcore2.0/bin +examples/dotnetcore2.0/obj examples/dotnetcore2.0/pub +examples/dotnetcore2.1/bin +examples/dotnetcore2.1/obj examples/dotnetcore2.1/pub +examples/dotnetcore3.1/bin +examples/dotnetcore3.1/obj +examples/dotnetcore3.1/pub +examples/java/bin +examples/java/build +examples/go1.x/handler +examples/go1.x/handler +examples/provided.al2/bootstrap +package-lock.json diff --git a/.npmignore b/.npmignore index af0f539c..a802736e 100644 --- a/.npmignore +++ b/.npmignore @@ -5,3 +5,5 @@ python* java* go1* dotnetcore* +ruby* +provided diff --git a/README.md b/README.md index 8c2068b8..136a5ff2 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,23 @@ -docker-lambda -------------- +# Deprecated + +NB: these images are deprecated in favor of AWS' official images, which you can find at: + +https://github.com/aws/aws-lambda-base-images + +And browse on the ECR public gallery, eg: + +https://gallery.ecr.aws/lambda/python + +This project is now archived and will not receive any further updates. + +# docker-lambda A sandboxed local environment that replicates the live [AWS Lambda](https://aws.amazon.com/lambda/) environment almost identically – including installed software and libraries, file structure and permissions, environment variables, context objects and behaviors – even the user and running process are the same. -![Terminal Example](https://raw.githubusercontent.com/lambci/docker-lambda/master/examples/terminal.png "Example usage when index.js in current dir") +Example usage with java11 runtime You can use it for [running your functions](#run-examples) in the same strict Lambda environment, knowing that they'll exhibit the same behavior when deployed live. You can @@ -14,133 +25,243 @@ also use it to [compile native dependencies](#build-examples) knowing that you'r same library versions that exist on AWS Lambda and then deploy using the [AWS CLI](https://aws.amazon.com/cli/). -This project consists of a set of Docker images for each of the supported Lambda runtimes. +--- -There are also a set of build images that include packages like gcc-c++, git, -zip and the aws-cli for compiling and deploying. +## Contents -There's also an npm module to make it convenient to invoke from Node.js +* [Usage](#usage) +* [Run Examples](#run-examples) +* [Build Examples](#build-examples) +* [Using a Dockerfile to build](#using-a-dockerfile-to-build) +* [Docker tags](#docker-tags) +* [Verifying images](#verifying-images) +* [Environment variables](#environment-variables) +* [Build environment](#build-environment) +* [Questions](#questions) -Prerequisites -------------- +--- -You'll need [Docker](https://www.docker.com) installed +## Usage -Run Examples ------------- +### Running Lambda functions You can run your Lambdas from local directories using the `-v` arg with -`docker run` – logging goes to stderr and the callback result goes to stdout. +`docker run`. You can run them in two modes: as a single execution, or as +[an API server that listens for invoke events](#running-in-stay-open-api-mode). +The default is single execution mode, which outputs all logging to stderr and the result of the handler to stdout. You mount your (unzipped) lambda code at `/var/task` and any (unzipped) layer code at `/opt`, and most runtimes take two arguments – the first for the handler and the second for the event, ie: ```sh -docker run [--rm] -v :/var/task [-v :/opt] lambci/lambda: [] [] +docker run --rm \ + -v :/var/task:ro,delegated \ + [-v :/opt:ro,delegated] \ + lambci/lambda: \ + [] [] +``` + +(the `--rm` flag will remove the docker container once it has run, which is usually what you want, +and the `ro,delegated` options ensure the directories are mounted read-only and have the highest performance) + +You can pass environment variables (eg `-e AWS_ACCESS_KEY_ID=abcd`) to talk to live AWS services, +or modify aspects of the runtime. See [below](#environment-variables) for a list. + +#### Running in "stay-open" API mode + +If you pass the environment variable `DOCKER_LAMBDA_STAY_OPEN=1` to the container, then instead of +executing the event and shutting down, it will start an API server (on port 9001 by default), which +you can then call with HTTP following the [Lambda Invoke API](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html). +This allows you to make fast subsequent calls to your handler without paying the "cold start" penalty each time. + +```sh +docker run --rm [-d] \ + -e DOCKER_LAMBDA_STAY_OPEN=1 \ + -p 9001:9001 \ + -v :/var/task:ro,delegated \ + [-v :/opt:ro,delegated] \ + lambci/lambda: \ + [] +``` + +(the `-d` flag will start the container in detached mode, in the background) + +You should then see: + +```sh +Lambda API listening on port 9001... +``` + +Then, in another terminal shell/window you can invoke your function using the [AWS CLI](https://aws.amazon.com/cli/) +(or any http client, like `curl`): + +```sh +aws lambda invoke --endpoint http://localhost:9001 --no-sign-request \ + --function-name myfunction --payload '{}' output.json +``` + +(if you're using [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html#cliv2-migration-binaryparam), you'll need to add `--cli-binary-format raw-in-base64-out` to the above command) + +Or just: + +```sh +curl -d '{}' http://localhost:9001/2015-03-31/functions/myfunction/invocations +``` + +It also supports the [documented Lambda API headers](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html) +`X-Amz-Invocation-Type`, `X-Amz-Log-Type` and `X-Amz-Client-Context`. + +If you want to change the exposed port, eg run on port 3000 on the host, use `-p 3000:9001` (then query `http://localhost:3000`). + +You can change the internal Lambda API port from `9001` by passing `-e DOCKER_LAMBDA_API_PORT=`. +You can also change the [custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html#runtimes-custom-build) +port from `9001` by passing `-e DOCKER_LAMBDA_RUNTIME_PORT=`. + +#### Developing in "stay-open" mode + +docker-lambda can watch for changes to your handler (and layer) code and restart the internal bootstrap process +so you can always invoke the latest version of your code without needing to shutdown the container. + +To enable this, pass `-e DOCKER_LAMBDA_WATCH=1` to `docker run`: + +``` +docker run --rm \ + -e DOCKER_LAMBDA_WATCH=1 -e DOCKER_LAMBDA_STAY_OPEN=1 -p 9001:9001 \ + -v "$PWD":/var/task:ro,delegated \ + lambci/lambda:java11 handler +``` + +Then when you make changes to any file in the mounted directory, you'll see: + +``` +Handler/layer file changed, restarting bootstrap... +``` + +And the next invoke will reload your handler with the latest version of your code. + +NOTE: This doesn't work in exactly the same way with some of the older runtimes due to the way they're loaded. Specifically: `nodejs8.10` and earlier, `python3.6` and earlier, `dotnetcore2.1` and earlier, `java8` and `go1.x`. These runtimes will instead exit with error code 2 +when they are in watch mode and files in the handler or layer are changed. + +That way you can use the `--restart on-failure` capabilities of `docker run` to have the container automatically restart instead. + +So, for `nodejs8.10`, `nodejs6.10`, `nodejs4.3`, `python3.6`, `python2.7`, `dotnetcore2.1`, `dotnetcore2.0`, `java8` and `go1.x`, you'll +need to run watch mode like this instead: + +``` +docker run --restart on-failure \ + -e DOCKER_LAMBDA_WATCH=1 -e DOCKER_LAMBDA_STAY_OPEN=1 -p 9001:9001 \ + -v "$PWD":/var/task:ro,delegated \ + lambci/lambda:java8 handler +``` + +When you make changes to any file in the mounted directory, you'll see: + +``` +Handler/layer file changed, restarting bootstrap... +``` + +And then the docker container will restart. See the [Docker documentation](https://docs.docker.com/engine/reference/commandline/run/#restart-policies---restart) for more details. Your terminal may get detached, but the container should still be running and the +API should have restarted. You can do `docker ps` to find the container ID and then `docker attach ` to reattach if you wish. + +If none of the above strategies work for you, you can use a file-watching utility like [nodemon](https://nodemon.io/): + +```sh +# npm install -g nodemon +nodemon -w ./ -e '' -s SIGINT -x docker -- run --rm \ + -e DOCKER_LAMBDA_STAY_OPEN=1 -p 9001:9001 \ + -v "$PWD":/var/task:ro,delegated \ + lambci/lambda:go1.x handler ``` -(the `--rm` flag will remove the docker container once it has run, which is usually what you want) +### Building Lambda functions -Eg: +The build images have a [number of extra system packages installed](#build-environment) +intended for building and packaging your Lambda functions. You can run your build commands (eg, `gradle` on the java image), and then package up your function using `zip` or the +[AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html), +all from within the image. ```sh -# Test an index.handler function from the current directory on Node.js v8.10 -docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs8.10 +docker run [--rm] -v :/var/task [-v :/opt] lambci/lambda:build- +``` -# If using a function other than index.handler, with a custom event -docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs8.10 index.myHandler '{"some": "event"}' +You can also use [yumda](https://github.com/lambci/yumda) to install precompiled native dependencies using `yum install`. -# Use the Node.js v6.10 runtime -docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs6.10 +## Run Examples -# Test a default function (lambda_function.lambda_handler) from the current directory on Python 2.7 -docker run --rm -v "$PWD":/var/task lambci/lambda:python2.7 +```sh +# Test a `handler` function from an `index.js` file in the current directory on Node.js v12.x +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:nodejs12.x index.handler -# Test on Python 3.6 with a custom file named my_module.py containing a my_handler function -docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6 my_module.my_handler +# Using a different file and handler, with a custom event +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:nodejs12.x app.myHandler '{"some": "event"}' -# Python 3.7 requires the handler be given explicitly -docker run --rm -v "$PWD":/var/task lambci/lambda:python3.7 lambda_function.lambda_handler +# Test a `lambda_handler` function in `lambda_function.py` with an empty event on Python 3.8 +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:python3.8 lambda_function.lambda_handler -# Similarly with Ruby 2.5 -docker run --rm -v "$PWD":/var/task lambci/lambda:ruby2.5 lambda_function.lambda_handler +# Similarly with Ruby 2.7 +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:ruby2.7 lambda_function.lambda_handler # Test on Go 1.x with a compiled handler named my_handler and a custom event -docker run --rm -v "$PWD":/var/task lambci/lambda:go1.x my_handler '{"some": "event"}' +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:go1.x my_handler '{"some": "event"}' -# Test a function from the current directory on Java 8 +# Test a function from the current directory on Java 11 # The directory must be laid out in the same way the Lambda zip file is, # with top-level package source directories and a `lib` directory for third-party jars -# http://docs.aws.amazon.com/lambda/latest/dg/create-deployment-pkg-zip-java.html -# The default handler is "index.Handler", but you'll likely have your own package and class -docker run --rm -v "$PWD":/var/task lambci/lambda:java8 org.myorg.MyHandler +# https://docs.aws.amazon.com/lambda/latest/dg/java-package.html +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:java11 org.myorg.MyHandler -# Test on .NET Core 2.0 given a test.dll assembly in the current directory, +# Test on .NET Core 3.1 given a test.dll assembly in the current directory, # a class named Function with a FunctionHandler method, and a custom event -docker run --rm -v "$PWD":/var/task lambci/lambda:dotnetcore2.0 test::test.Function::FunctionHandler '{"some": "event"}' - -# Test on .NET Core 2.1 in the same way -docker run --rm -v "$PWD":/var/task lambci/lambda:dotnetcore2.1 test::test.Function::FunctionHandler '{"some": "event"}' +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:dotnetcore3.1 test::test.Function::FunctionHandler '{"some": "event"}' -# Test with a provided runtime (assumes you have a bootstrap file in the current directory) -docker run --rm -v "$PWD":/var/task lambci/lambda:provided handler '{"some": "event"}' +# Test with a provided runtime (assumes you have a `bootstrap` executable in the current directory) +docker run --rm -v "$PWD":/var/task:ro,delegated lambci/lambda:provided handler '{"some": "event"}' -# Test with layers (assumes all layers have been unzipped to ../opt) -docker run --rm -v "$PWD":/var/task -v "$PWD"/../opt:/opt lambci/lambda:nodejs8.10 +# Test with layers (assumes your function code is in `./fn` and your layers in `./layer`) +docker run --rm -v "$PWD"/fn:/var/task:ro,delegated -v "$PWD"/layer:/opt:ro,delegated lambci/lambda:nodejs12.x # Run custom commands -docker run --rm --entrypoint node lambci/lambda:nodejs8.10 -v +docker run --rm --entrypoint node lambci/lambda:nodejs12.x -v -# For large events you can pipe them into stdin if you set DOCKER_LAMBDA_USE_STDIN (on any runtime) -echo '{"some": "event"}' | docker run --rm -v "$PWD":/var/task -i -e DOCKER_LAMBDA_USE_STDIN=1 lambci/lambda:nodejs8.10 +# For large events you can pipe them into stdin if you set DOCKER_LAMBDA_USE_STDIN +echo '{"some": "event"}' | docker run --rm -v "$PWD":/var/task:ro,delegated -i -e DOCKER_LAMBDA_USE_STDIN=1 lambci/lambda:nodejs12.x ``` You can see more examples of how to build docker images and run different runtimes in the [examples](./examples) directory. -Build Examples --------------- +## Build Examples To use the build images, for compilation, deployment, etc: ```sh -# To compile native deps in node_modules (runs `npm rebuild`) -docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs8.10 +# To compile native deps in node_modules +docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm rebuild --build-from-source + +# To install defined poetry dependencies +docker run --rm -v "$PWD":/var/task lambci/lambda:build-python3.8 poetry install -# To resolve dependencies on go1.x (working directory is /go/src/handler, will run `dep ensure`) -docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x +# To resolve dependencies on go1.x (working directory is /go/src/handler) +docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x go mod download -# For .NET Core 2.0, this will publish the compiled code to `./pub`, +# For .NET Core, this will publish the compiled code to `./pub`, # which you can then use to run with `-v "$PWD"/pub:/var/task` -docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore2.0 dotnet publish -c Release -o pub +docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore3.1 dotnet publish -c Release -o pub # Run custom commands on a build container -docker run --rm lambci/lambda:build-python2.7 aws --version +docker run --rm lambci/lambda:build-python3.8 aws --version # To run an interactive session on a build container -docker run -it lambci/lambda:build-python3.6 bash +docker run -it lambci/lambda:build-python3.8 bash ``` -Using the Node.js module (`npm install docker-lambda`) – for example in tests: - -```js -var dockerLambda = require('docker-lambda') - -// Spawns synchronously, uses current dir – will throw if it fails -var lambdaCallbackResult = dockerLambda({event: {some: 'event'}}) +## Using a Dockerfile to build -// Manually specify directory and custom args -lambdaCallbackResult = dockerLambda({taskDir: __dirname, dockerArgs: ['-m', '1.5G']}) - -// Use a different image from the default Node.js v4.3 -lambdaCallbackResult = dockerLambda({dockerImage: 'lambci/lambda:nodejs6.10'}) -``` - -Create your own Docker image for finer control: +Create your own Docker image to build and deploy: ```dockerfile -FROM lambci/lambda:build-nodejs8.10 +FROM lambci/lambda:build-nodejs12.x ENV AWS_DEFAULT_REGION us-east-1 @@ -148,131 +269,206 @@ COPY . . RUN npm install -# Assumes you have a .lambdaignore file with a list of files you don't want in your zip -RUN cat .lambdaignore | xargs zip -9qyr lambda.zip . -x +RUN zip -9yr lambda.zip . CMD aws lambda update-function-code --function-name mylambda --zip-file fileb://lambda.zip - -# docker build -t mylambda . -# docker run --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY mylambda ``` +And then: -Questions ---------- - -* *When should I use this?* - - When you want fast local reproducibility. When you don't want to spin up an - Amazon Linux EC2 instance (indeed, network aside, this is closer to the real - Lambda environment because there are a number of different files, permissions - and libraries on a default Amazon Linux instance). When you don't want to - invoke a live Lambda just to test your Lambda package – you can do it locally - from your dev machine or run tests on your CI system (assuming it has Docker - support!) - - -* *Wut, how?* +```sh +docker build -t mylambda . +docker run --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY mylambda +``` - By [tarring the full filesystem in Lambda, uploading that to S3](./base/dump-nodejs43.js), - and then [piping into Docker to create a new image from scratch](./base/create-base.sh) – - then [creating mock modules](./nodejs4.3/run/awslambda-mock.js) that will be - required/included in place of the actual native modules that communicate with - the real Lambda coordinating services. Only the native modules are mocked - out – the actual parent JS/PY/Java runner files are left alone, so their behaviors - don't need to be replicated (like the overriding of `console.log`, and custom - defined properties like `callbackWaitsForEmptyEventLoop`) +## Node.js module -* *What's missing from the images?* +Using the Node.js module (`npm install docker-lambda`) – for example in tests: - Hard to tell – anything that's not readable – so at least `/root/*` – - but probably a little more than that – hopefully nothing important, after all, - it's not readable by Lambda, so how could it be! +```js +var dockerLambda = require('docker-lambda') -* *Is it really necessary to replicate exactly to this degree?* +// Spawns synchronously, uses current dir – will throw if it fails +var lambdaCallbackResult = dockerLambda({event: {some: 'event'}, dockerImage: 'lambci/lambda:nodejs12.x'}) - Not for many scenarios – some compiled Linux binaries work out of the box - and an Amazon Linux Docker image can compile some binaries that work on - Lambda too, for example – but for testing it's great to be able to reliably - verify permissions issues, library linking issues, etc. +// Manually specify directory and custom args +lambdaCallbackResult = dockerLambda({taskDir: __dirname, dockerArgs: ['-m', '1.5G'], dockerImage: 'lambci/lambda:nodejs12.x'}) +``` -* *What's this got to do with LambCI?* +Options to pass to `dockerLambda()`: + - `dockerImage` + - `handler` + - `event` + - `taskDir` + - `cleanUp` + - `addEnvVars` + - `dockerArgs` + - `spawnOptions` + - `returnSpawnResult` - Technically nothing – it's just been incredibly useful during the building - and testing of LambCI. +## Docker tags -Documentation ------------- +These follow the Lambda runtime names: -Docker tags (follow the Lambda runtime names): - `nodejs4.3` - `nodejs6.10` - `nodejs8.10` + - `nodejs10.x` + - `nodejs12.x` - `python2.7` - `python3.6` - `python3.7` + - `python3.8` - `ruby2.5` + - `ruby2.7` - `java8` + - `java8.al2` + - `java11` - `go1.x` - `dotnetcore2.0` - `dotnetcore2.1` + - `dotnetcore3.1` - `provided` + - `provided.al2` - `build-nodejs4.3` - `build-nodejs6.10` - `build-nodejs8.10` + - `build-nodejs10.x` + - `build-nodejs12.x` - `build-python2.7` - `build-python3.6` - `build-python3.7` + - `build-python3.8` - `build-ruby2.5` + - `build-ruby2.7` - `build-java8` + - `build-java8.al2` + - `build-java11` - `build-go1.x` - `build-dotnetcore2.0` - `build-dotnetcore2.1` + - `build-dotnetcore3.1` - `build-provided` + - `build-provided.al2` + +## Verifying images + +These images are signed using [Docker Content Trust](https://docs.docker.com/engine/security/trust/content_trust/), +with the following keys: + +- Repository Key: `e966126aacd4be5fb92e0160212dd007fc16a9b4366ef86d28fc7eb49f4d0809` +- Root Key: `031d78bcdca4171be103da6ffb55e8ddfa9bd113e0ec481ade78d897d9e65c0e` + +You can verify/inspect an image using `docker trust inspect`: + +```sh +$ docker trust inspect --pretty lambci/lambda:provided + +Signatures for lambci/lambda:provided + +SIGNED TAG DIGEST SIGNERS +provided 838c42079b5fcfd6640d486f13c1ceeb52ac661e19f9f1d240b63478e53d73f8 (Repo Admin) + +Administrative keys for lambci/lambda:provided + + Repository Key: e966126aacd4be5fb92e0160212dd007fc16a9b4366ef86d28fc7eb49f4d0809 + Root Key: 031d78bcdca4171be103da6ffb55e8ddfa9bd113e0ec481ade78d897d9e65c0e +``` + +(The `DIGEST` for a given tag may not match the example above, but the Repository and Root keys should match) + +## Environment variables -Env vars: + - `AWS_LAMBDA_FUNCTION_HANDLER` or `_HANDLER` + - `AWS_LAMBDA_EVENT_BODY` - `AWS_LAMBDA_FUNCTION_NAME` - `AWS_LAMBDA_FUNCTION_VERSION` - `AWS_LAMBDA_FUNCTION_INVOKED_ARN` - `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` - `AWS_LAMBDA_FUNCTION_TIMEOUT` - - `AWS_LAMBDA_FUNCTION_HANDLER` - - `AWS_LAMBDA_EVENT_BODY` - - `AWS_REGION` - - `AWS_DEFAULT_REGION` + - `_X_AMZN_TRACE_ID` + - `AWS_REGION` or `AWS_DEFAULT_REGION` - `AWS_ACCOUNT_ID` - `AWS_ACCESS_KEY_ID` - `AWS_SECRET_ACCESS_KEY` - `AWS_SESSION_TOKEN` - `DOCKER_LAMBDA_USE_STDIN` + - `DOCKER_LAMBDA_STAY_OPEN` + - `DOCKER_LAMBDA_API_PORT` + - `DOCKER_LAMBDA_RUNTIME_PORT` + - `DOCKER_LAMBDA_DEBUG` + - `DOCKER_LAMBDA_NO_MODIFY_LOGS` -Options to pass to `dockerLambda()`: - - `dockerImage` - - `handler` - - `event` - - `taskDir` - - `cleanUp` - - `addEnvVars` - - `dockerArgs` - - `spawnOptions` - - `returnSpawnResult` +## Build environment Yum packages installed on build images: + + - `development` (group, includes `gcc-c++`, `autoconf`, `automake`, `git`, `vim`, etc) - `aws-cli` - - `zip` - - `git` - - `vim` + - `aws-sam-cli` - `docker` (Docker in Docker!) - - `gcc-c++` - `clang` - - `openssl-devel` - `cmake` - - `autoconf` - - `automake` - - `libtool` - - `xz-libs` - - `libffi-devel` + +The build image for older Amazon Linux 1 based runtimes also include: + - `python27-devel` + - `python36-devel` + - `ImageMagick-devel` + - `cairo-devel` + - `libssh2-devel` + - `libxslt-devel` - `libmpc-devel` - - `mpfr-devel` - - `gmp-devel` + - `readline-devel` + - `db4-devel` + - `libffi-devel` + - `expat-devel` + - `libicu-devel` + - `lua-devel` + - `gdbm-devel` + - `sqlite-devel` + - `pcre-devel` + - `libcurl-devel` + - `yum-plugin-ovl` + +## Questions + +* *When should I use this?* + + When you want fast local reproducibility. When you don't want to spin up an + Amazon Linux EC2 instance (indeed, network aside, this is closer to the real + Lambda environment because there are a number of different files, permissions + and libraries on a default Amazon Linux instance). When you don't want to + invoke a live Lambda just to test your Lambda package – you can do it locally + from your dev machine or run tests on your CI system (assuming it has Docker + support!) + + +* *Wut, how?* + + By [tarring the full filesystem in Lambda, uploading that to S3](./base/dump-nodejs43.js), + and then [piping into Docker to create a new image from scratch](./base/create-base.sh) – + then [creating mock modules](./nodejs4.3/run/awslambda-mock.js) that will be + required/included in place of the actual native modules that communicate with + the real Lambda coordinating services. Only the native modules are mocked + out – the actual parent JS/PY/Java runner files are left alone, so their behaviors + don't need to be replicated (like the overriding of `console.log`, and custom + defined properties like `callbackWaitsForEmptyEventLoop`) + +* *What's missing from the images?* + + Hard to tell – anything that's not readable – so at least `/root/*` – + but probably a little more than that – hopefully nothing important, after all, + it's not readable by Lambda, so how could it be! + +* *Is it really necessary to replicate exactly to this degree?* + + Not for many scenarios – some compiled Linux binaries work out of the box + and an Amazon Linux Docker image can compile some binaries that work on + Lambda too, for example – but for testing it's great to be able to reliably + verify permissions issues, library linking issues, etc. + +* *What's this got to do with LambCI?* + + Technically nothing – it's just been incredibly useful during the building + and testing of LambCI. diff --git a/base/.dockerignore b/base/.dockerignore index e7794243..83ea83a0 100644 --- a/base/.dockerignore +++ b/base/.dockerignore @@ -1 +1,2 @@ -diff +** +!base*.tgz diff --git a/base/Dockerfile b/base/Dockerfile index 69ae7e93..c3623a79 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,9 +1,16 @@ -FROM scratch +FROM amazonlinux:1 # Docker doesn't support unpacking from remote URLs with ADD, # and we don't want to 'docker import' because we can't squash into a small layer # So this is expected to be downloaded from https://lambci.s3.amazonaws.com/fs/base.tgz -ADD ./base.tgz / +ADD ./base.tgz /opt/ + +RUN yum --installroot=/opt reinstall -y filesystem-2.4.30-3.8.amzn1 && \ + yum --installroot=/opt clean all + +FROM scratch + +COPY --from=0 /opt / ENV PATH=/usr/local/bin:/usr/bin/:/bin:/opt/bin \ LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib \ @@ -21,12 +28,13 @@ ENV PATH=/usr/local/bin:/usr/bin/:/bin:/opt/bin \ _AWS_XRAY_DAEMON_PORT=2000 \ AWS_XRAY_DAEMON_ADDRESS=169.254.79.2:2000 \ AWS_XRAY_CONTEXT_MISSING=LOG_ERROR \ - _X_AMZN_TRACE_ID='Parent=11560be54abce8ed' + _X_AMZN_TRACE_ID='Root=1-dc99d00f-c079a84d433534434534ef0d;Parent=91ed514f1e5c03b2;Sampled=1' -RUN yum reinstall -y filesystem; \ - rm -rf /var/cache/yum /var/lib/rpm/__db.* && \ - > /var/log/yum.log && \ - mkdir /tmp && \ +# pam has problems reinstalling from a non-standard installroot, +# so reinstall everything except filesystem here +RUN yum reinstall -y setup-2.8.14-20.12.amzn1 audit-libs-2.6.5-3.28.amzn1 shadow-utils-4.1.4.2-13.10.amzn1 \ + openssl-1.0.2k-16.152.amzn1 glibc-2.17-292.180.amzn1 glibc-common-2.17-292.180.amzn1 pam-1.1.8-12.33.amzn1 && \ + yum clean all && \ chown sbx_user1051:495 /tmp && \ chmod 700 /tmp diff --git a/base/amazonlinux1.txt b/base/amazonlinux1.txt new file mode 100644 index 00000000..4d630e4b --- /dev/null +++ b/base/amazonlinux1.txt @@ -0,0 +1,102 @@ +basesystem-10.0-4.9.amzn1.noarch +bash-4.2.46-34.43.amzn1.x86_64 +bzip2-libs-1.0.6-8.12.amzn1.x86_64 +ca-certificates-2018.2.22-65.1.22.amzn1.noarch +chkconfig-1.3.49.3-2.14.amzn1.x86_64 +coreutils-8.22-15.52.amzn1.x86_64 +curl-7.61.1-12.95.amzn1.x86_64 +cyrus-sasl-lib-2.1.23-13.16.amzn1.x86_64 +db4-4.7.25-18.11.amzn1.x86_64 +db4-utils-4.7.25-18.11.amzn1.x86_64 +elfutils-libelf-0.168-8.19.amzn1.x86_64 +expat-2.1.0-11.22.amzn1.x86_64 +file-libs-5.37-8.49.amzn1.x86_64 +filesystem-2.4.30-3.8.amzn1.x86_64 +gawk-3.1.7-10.10.amzn1.x86_64 +gdbm-1.8.0-36.6.amzn1.x86_64 +glib2-2.36.3-5.21.amzn1.x86_64 +glibc-2.17-292.180.amzn1.x86_64 +glibc-common-2.17-292.180.amzn1.x86_64 +gmp-6.0.0-11.16.amzn1.x86_64 +gnupg2-2.0.28-2.33.amzn1.x86_64 +gpgme-1.4.3-5.15.amzn1.x86_64 +grep-2.20-3.18.amzn1.x86_64 +gzip-1.5-9.19.amzn1.x86_64 +info-5.1-4.10.amzn1.x86_64 +keyutils-libs-1.5.8-3.12.amzn1.x86_64 +krb5-libs-1.15.1-46.48.amzn1.x86_64 +libacl-2.2.49-6.11.amzn1.x86_64 +libassuan-2.0.3-3.3.amzn1.x86_64 +libattr-2.4.46-12.10.amzn1.x86_64 +libcap-2.16-5.5.8.amzn1.x86_64 +libcom_err-1.43.5-2.43.amzn1.x86_64 +libcurl-7.61.1-12.95.amzn1.x86_64 +libffi-3.0.13-16.5.amzn1.x86_64 +libgcc72-7.2.1-2.59.amzn1.x86_64 +libgcrypt-1.5.3-12.19.amzn1.x86_64 +libgpg-error-1.11-1.12.amzn1.x86_64 +libicu-50.2-4.0.amzn1.x86_64 +libidn2-2.3.0-1.4.amzn1.x86_64 +libnghttp2-1.33.0-1.1.6.amzn1.x86_64 +libpsl-0.6.2-1.2.amzn1.x86_64 +libselinux-2.1.10-3.22.amzn1.x86_64 +libsepol-2.1.7-3.12.amzn1.x86_64 +libssh2-1.4.2-3.12.amzn1.x86_64 +libstdc++72-7.2.1-2.59.amzn1.x86_64 +libtasn1-2.3-6.6.amzn1.x86_64 +libunistring-0.9.3-6.1.amzn1.x86_64 +libverto-0.2.5-4.9.amzn1.x86_64 +libxml2-2.9.1-6.4.41.amzn1.x86_64 +libxml2-python27-2.9.1-6.4.41.amzn1.x86_64 +lua-5.1.4-4.1.9.amzn1.x86_64 +make-3.82-21.10.amzn1.x86_64 +ncurses-5.7-4.20090207.14.amzn1.x86_64 +ncurses-base-5.7-4.20090207.14.amzn1.x86_64 +ncurses-libs-5.7-4.20090207.14.amzn1.x86_64 +nspr-4.21.0-1.43.amzn1.x86_64 +nss-3.44.0-7.84.amzn1.x86_64 +nss-pem-1.0.3-4.3.amzn1.x86_64 +nss-softokn-3.44.0-8.44.amzn1.x86_64 +nss-softokn-freebl-3.44.0-8.44.amzn1.x86_64 +nss-sysinit-3.44.0-7.84.amzn1.x86_64 +nss-tools-3.44.0-7.84.amzn1.x86_64 +nss-util-3.44.0-4.56.amzn1.x86_64 +openldap-2.4.40-16.31.amzn1.x86_64 +openssl-1.0.2k-16.151.amzn1.x86_64 +p11-kit-0.18.5-2.3.amzn1.x86_64 +p11-kit-trust-0.18.5-2.3.amzn1.x86_64 +pcre-8.21-7.8.amzn1.x86_64 +pinentry-0.7.6-6.11.amzn1.x86_64 +pkgconfig-0.27.1-2.7.amzn1.x86_64 +popt-1.13-7.7.amzn1.x86_64 +pth-2.0.7-9.3.7.amzn1.x86_64 +python27-2.7.18-2.140.amzn1.x86_64 +python27-chardet-2.0.1-7.7.amzn1.noarch +python27-iniparse-0.3.1-2.1.9.amzn1.noarch +python27-kitchen-1.1.1-5.6.amzn1.noarch +python27-libs-2.7.18-2.140.amzn1.x86_64 +python27-pycurl-7.19.0-17.12.amzn1.x86_64 +python27-pygpgme-0.3-9.12.amzn1.x86_64 +python27-pyliblzma-0.5.3-11.6.amzn1.x86_64 +python27-pyxattr-0.5.0-1.6.amzn1.x86_64 +python27-urlgrabber-3.10-8.16.amzn1.noarch +readline-6.2-9.14.amzn1.x86_64 +rpm-4.11.3-40.78.amzn1.x86_64 +rpm-build-libs-4.11.3-40.78.amzn1.x86_64 +rpm-libs-4.11.3-40.78.amzn1.x86_64 +rpm-python27-4.11.3-40.78.amzn1.x86_64 +sed-4.2.1-10.10.amzn1.x86_64 +setup-2.8.14-20.12.amzn1.noarch +shared-mime-info-1.1-9.8.amzn1.x86_64 +sqlite-3.7.17-8.14.amzn1.x86_64 +sysctl-defaults-1.0-1.1.amzn1.noarch +system-release-2018.03-0.0.noarch +tar-1.26-31.22.amzn1.x86_64 +tzdata-2020a-1.75.amzn1.noarch +xz-libs-5.2.2-1.13.amzn1.x86_64 +yum-3.4.3-150.71.amzn1.noarch +yum-metadata-parser-1.1.4-10.20.amzn1.x86_64 +yum-plugin-ovl-1.1.31-46.30.amzn1.noarch +yum-plugin-priorities-1.1.31-46.30.amzn1.noarch +yum-utils-1.1.31-46.30.amzn1.noarch +zlib-1.2.8-7.18.amzn1.x86_64 diff --git a/base/base-2/Dockerfile b/base/base-2/Dockerfile new file mode 100644 index 00000000..6f41cc31 --- /dev/null +++ b/base/base-2/Dockerfile @@ -0,0 +1,37 @@ +FROM amazonlinux:2 + +# Docker doesn't support unpacking from remote URLs with ADD, +# and we don't want to 'docker import' because we can't squash into a small layer +# So this is expected to be downloaded from https://lambci.s3.amazonaws.com/fs/base-2.tgz +ADD ./base-2.tgz /opt/ + +RUN yum --installroot=/opt reinstall -y filesystem-3.2-25.amzn2.0.4 \ + setup-2.8.71-10.amzn2.0.1 glibc-2.26-39.amzn2 glibc-common-2.26-39.amzn2 && \ + yum --installroot=/opt clean all + +FROM scratch + +COPY --from=0 /opt / + +ENV PATH=/usr/local/bin:/usr/bin/:/bin:/opt/bin \ + LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib \ + LANG=en_US.UTF-8 \ + TZ=:UTC \ + LAMBDA_TASK_ROOT=/var/task \ + LAMBDA_RUNTIME_DIR=/var/runtime \ + _LAMBDA_CONTROL_SOCKET=14 \ + _LAMBDA_SHARED_MEM_FD=11 \ + _LAMBDA_LOG_FD=9 \ + _LAMBDA_SB_ID=7 \ + _LAMBDA_CONSOLE_SOCKET=16 \ + _LAMBDA_RUNTIME_LOAD_TIME=1530232235231 \ + _AWS_XRAY_DAEMON_ADDRESS=169.254.79.2 \ + _AWS_XRAY_DAEMON_PORT=2000 \ + AWS_XRAY_DAEMON_ADDRESS=169.254.79.2:2000 \ + AWS_XRAY_CONTEXT_MISSING=LOG_ERROR \ + _X_AMZN_TRACE_ID='Root=1-dc99d00f-c079a84d433534434534ef0d;Parent=91ed514f1e5c03b2;Sampled=1' + +RUN chown sbx_user1051:495 /tmp && \ + chmod 700 /tmp + +WORKDIR /var/task diff --git a/base/base-2/amazonlinux2.txt b/base/base-2/amazonlinux2.txt new file mode 100644 index 00000000..39e195e2 --- /dev/null +++ b/base/base-2/amazonlinux2.txt @@ -0,0 +1,103 @@ +amazon-linux-extras-1.6.12-1.amzn2.noarch +basesystem-10.0-7.amzn2.0.1.noarch +bash-4.2.46-34.amzn2.x86_64 +bzip2-libs-1.0.6-13.amzn2.0.2.x86_64 +ca-certificates-2019.2.32-76.amzn2.0.3.noarch +chkconfig-1.7.4-1.amzn2.0.2.x86_64 +coreutils-8.22-24.amzn2.x86_64 +cpio-2.11-28.amzn2.x86_64 +curl-7.61.1-12.amzn2.0.2.x86_64 +cyrus-sasl-lib-2.1.26-23.amzn2.x86_64 +diffutils-3.3-5.amzn2.x86_64 +elfutils-libelf-0.176-2.amzn2.x86_64 +expat-2.1.0-12.amzn2.x86_64 +file-libs-5.11-36.amzn2.0.1.x86_64 +filesystem-3.2-25.amzn2.0.4.x86_64 +findutils-4.5.11-6.amzn2.x86_64 +gawk-4.0.2-4.amzn2.1.2.x86_64 +gdbm-1.13-6.amzn2.0.2.x86_64 +glib2-2.56.1-7.amzn2.0.1.x86_64 +glibc-2.26-38.amzn2.x86_64 +glibc-common-2.26-38.amzn2.x86_64 +glibc-langpack-en-2.26-38.amzn2.x86_64 +glibc-minimal-langpack-2.26-38.amzn2.x86_64 +gmp-6.0.0-15.amzn2.0.2.x86_64 +gnupg2-2.0.22-5.amzn2.0.4.x86_64 +gpgme-1.3.2-5.amzn2.0.2.x86_64 +grep-2.20-3.amzn2.0.2.x86_64 +info-5.1-5.amzn2.x86_64 +keyutils-libs-1.5.8-3.amzn2.0.2.x86_64 +krb5-libs-1.15.1-37.amzn2.2.2.x86_64 +libacl-2.2.51-14.amzn2.x86_64 +libassuan-2.1.0-3.amzn2.0.2.x86_64 +libattr-2.4.46-12.amzn2.0.2.x86_64 +libblkid-2.30.2-2.amzn2.0.4.x86_64 +libcap-2.22-9.amzn2.0.2.x86_64 +libcom_err-1.42.9-19.amzn2.x86_64 +libcrypt-2.26-38.amzn2.x86_64 +libcurl-7.61.1-12.amzn2.0.2.x86_64 +libdb-5.3.21-24.amzn2.0.3.x86_64 +libdb-utils-5.3.21-24.amzn2.0.3.x86_64 +libffi-3.0.13-18.amzn2.0.2.x86_64 +libgcc-7.3.1-9.amzn2.x86_64 +libgcrypt-1.5.3-14.amzn2.0.2.x86_64 +libgpg-error-1.12-3.amzn2.0.3.x86_64 +libidn2-2.3.0-1.amzn2.x86_64 +libmetalink-0.1.3-13.amzn2.x86_64 +libmount-2.30.2-2.amzn2.0.4.x86_64 +libnghttp2-1.41.0-1.amzn2.x86_64 +libselinux-2.5-12.amzn2.0.2.x86_64 +libsepol-2.5-8.1.amzn2.0.2.x86_64 +libssh2-1.4.3-12.amzn2.2.3.x86_64 +libstdc++-7.3.1-9.amzn2.x86_64 +libtasn1-4.10-1.amzn2.0.2.x86_64 +libunistring-0.9.3-9.amzn2.0.2.x86_64 +libuuid-2.30.2-2.amzn2.0.4.x86_64 +libverto-0.2.5-4.amzn2.0.2.x86_64 +libxml2-2.9.1-6.amzn2.5.1.x86_64 +lua-5.1.4-15.amzn2.0.2.x86_64 +ncurses-6.0-8.20170212.amzn2.1.3.x86_64 +ncurses-base-6.0-8.20170212.amzn2.1.3.noarch +ncurses-libs-6.0-8.20170212.amzn2.1.3.x86_64 +nspr-4.25.0-2.amzn2.x86_64 +nss-3.53.1-3.amzn2.x86_64 +nss-pem-1.0.3-5.amzn2.x86_64 +nss-softokn-3.53.1-6.amzn2.x86_64 +nss-softokn-freebl-3.53.1-6.amzn2.x86_64 +nss-sysinit-3.53.1-3.amzn2.x86_64 +nss-tools-3.53.1-3.amzn2.x86_64 +nss-util-3.53.1-1.amzn2.x86_64 +openldap-2.4.44-22.amzn2.x86_64 +openssl-libs-1.0.2k-19.amzn2.0.3.x86_64 +p11-kit-0.23.21-2.amzn2.0.1.x86_64 +p11-kit-trust-0.23.21-2.amzn2.0.1.x86_64 +pcre-8.32-17.amzn2.0.2.x86_64 +pinentry-0.8.1-17.amzn2.0.2.x86_64 +popt-1.13-16.amzn2.0.2.x86_64 +pth-2.0.7-23.amzn2.0.2.x86_64 +pygpgme-0.3-9.amzn2.0.2.x86_64 +pyliblzma-0.5.3-11.amzn2.0.2.x86_64 +python-2.7.18-1.amzn2.0.2.x86_64 +python-iniparse-0.4-9.amzn2.noarch +python-libs-2.7.18-1.amzn2.0.2.x86_64 +python-pycurl-7.19.0-19.amzn2.0.2.x86_64 +python-urlgrabber-3.10-9.amzn2.0.1.noarch +python2-rpm-4.11.3-40.amzn2.0.5.x86_64 +pyxattr-0.5.1-5.amzn2.0.2.x86_64 +readline-6.2-10.amzn2.0.2.x86_64 +rpm-4.11.3-40.amzn2.0.5.x86_64 +rpm-build-libs-4.11.3-40.amzn2.0.5.x86_64 +rpm-libs-4.11.3-40.amzn2.0.5.x86_64 +sed-4.2.2-5.amzn2.0.2.x86_64 +setup-2.8.71-10.amzn2.0.1.noarch +shared-mime-info-1.8-4.amzn2.x86_64 +sqlite-3.7.17-8.amzn2.1.1.x86_64 +system-release-2-12.amzn2.x86_64 +tzdata-2020a-1.amzn2.noarch +vim-minimal-8.1.1602-1.amzn2.x86_64 +xz-libs-5.2.2-1.amzn2.0.2.x86_64 +yum-3.4.3-158.amzn2.0.4.noarch +yum-metadata-parser-1.1.4-10.amzn2.0.2.x86_64 +yum-plugin-ovl-1.1.31-46.amzn2.0.1.noarch +yum-plugin-priorities-1.1.31-46.amzn2.0.1.noarch +zlib-1.2.7-18.amzn2.x86_64 diff --git a/base/base-2/diff.txt b/base/base-2/diff.txt new file mode 100644 index 00000000..02234165 --- /dev/null +++ b/base/base-2/diff.txt @@ -0,0 +1,61 @@ +amazon-linux-extras-1.6.11-1.amzn2.noarch +bzip2-libs-1.0.6-13.amzn2.0.2.x86_64 +cpio-2.11-27.amzn2.x86_64 +curl-7.61.1-12.amzn2.0.1.x86_64 +cyrus-sasl-lib-2.1.26-23.amzn2.x86_64 +diffutils-3.3-5.amzn2.x86_64 +elfutils-libelf-0.176-2.amzn2.x86_64 +expat-2.1.0-10.amzn2.0.2.x86_64 +file-libs-5.11-35.amzn2.0.2.x86_64 +findutils-4.5.11-6.amzn2.x86_64 +gdbm-1.13-6.amzn2.0.2.x86_64 +glib2-2.56.1-5.amzn2.0.1.x86_64 +glibc-langpack-en-2.26-34.amzn2.x86_64 +gnupg2-2.0.22-5.amzn2.0.4.x86_64 +gpgme-1.3.2-5.amzn2.0.2.x86_64 +libassuan-2.1.0-3.amzn2.0.2.x86_64 +libblkid-2.30.2-2.amzn2.0.4.x86_64 +libcrypt-2.26-34.amzn2.x86_64 +libcurl-7.61.1-12.amzn2.0.1.x86_64 +libdb-5.3.21-24.amzn2.0.3.x86_64 +libdb-utils-5.3.21-24.amzn2.0.3.x86_64 +libgcrypt-1.5.3-14.amzn2.0.2.x86_64 +libgpg-error-1.12-3.amzn2.0.3.x86_64 +libidn2-2.3.0-1.amzn2.x86_64 +libmetalink-0.1.2-7.amzn2.0.2.x86_64 +libmount-2.30.2-2.amzn2.0.4.x86_64 +libnghttp2-1.39.2-1.amzn2.x86_64 +libssh2-1.4.3-12.amzn2.2.2.x86_64 +libunistring-0.9.3-9.amzn2.0.2.x86_64 +libuuid-2.30.2-2.amzn2.0.4.x86_64 +libxml2-2.9.1-6.amzn2.3.3.x86_64 +lua-5.1.4-15.amzn2.0.2.x86_64 +nss-3.44.0-7.amzn2.x86_64 +nss-pem-1.0.3-5.amzn2.x86_64 +nss-softokn-3.44.0-8.amzn2.x86_64 +nss-sysinit-3.44.0-7.amzn2.x86_64 +nss-tools-3.44.0-7.amzn2.x86_64 +openldap-2.4.44-15.amzn2.x86_64 +pinentry-0.8.1-17.amzn2.0.2.x86_64 +pth-2.0.7-23.amzn2.0.2.x86_64 +pygpgme-0.3-9.amzn2.0.2.x86_64 +pyliblzma-0.5.3-11.amzn2.0.2.x86_64 +python-2.7.18-1.amzn2.x86_64 +python-iniparse-0.4-9.amzn2.noarch +python-libs-2.7.18-1.amzn2.x86_64 +python-pycurl-7.19.0-19.amzn2.0.2.x86_64 +python-urlgrabber-3.10-9.amzn2.0.1.noarch +python2-rpm-4.11.3-40.amzn2.0.4.x86_64 +pyxattr-0.5.1-5.amzn2.0.2.x86_64 +readline-6.2-10.amzn2.0.2.x86_64 +rpm-4.11.3-40.amzn2.0.4.x86_64 +rpm-build-libs-4.11.3-40.amzn2.0.4.x86_64 +rpm-libs-4.11.3-40.amzn2.0.4.x86_64 +shared-mime-info-1.8-4.amzn2.x86_64 +sqlite-3.7.17-8.amzn2.1.1.x86_64 +vim-minimal-8.1.1602-1.amzn2.x86_64 +xz-libs-5.2.2-1.amzn2.0.2.x86_64 +yum-3.4.3-158.amzn2.0.4.noarch +yum-metadata-parser-1.1.4-10.amzn2.0.2.x86_64 +yum-plugin-ovl-1.1.31-46.amzn2.0.1.noarch +yum-plugin-priorities-1.1.31-46.amzn2.0.1.noarch diff --git a/base/base-2/dump-packages.sh b/base/base-2/dump-packages.sh new file mode 100755 index 00000000..908bb05a --- /dev/null +++ b/base/base-2/dump-packages.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +curl https://lambci.s3.amazonaws.com/fs/base-2.tgz | tar -xz --strip-components=2 -- var/lib/rpm + +docker pull amazonlinux:2 +docker run -v "$PWD/rpm":/rpm --rm amazonlinux:2 rpm -qa --dbpath /rpm | grep -v ^gpg-pubkey- | sort > packages.txt +rm -rf rpm + +docker run --rm amazonlinux:2 bash -c 'yum upgrade -y > /dev/null && rpm -qa' | grep -v ^gpg-pubkey- | sort > amazonlinux2.txt + +if diff -w -d amazonlinux2.txt packages.txt | grep -q '>'; then + echo 'Mismatching packages on images' + diff -w -d amazonlinux2.txt packages.txt +else + diff -w -d amazonlinux2.txt packages.txt | grep '<' | awk '{print $2}' > diff.txt +fi diff --git a/base/base-2/fs.txt b/base/base-2/fs.txt new file mode 100644 index 00000000..0421df88 --- /dev/null +++ b/base/base-2/fs.txt @@ -0,0 +1,5625 @@ +bin +boot/ +etc/ +etc/DIR_COLORS +etc/DIR_COLORS.256color +etc/DIR_COLORS.lightbgcolor +etc/GREP_COLORS +etc/X11/ +etc/X11/applnk/ +etc/X11/fontpath.d/ +etc/aliases +etc/alternatives/ +etc/alternatives/libnssckbi.so.x86_64 +etc/bash_completion.d/ +etc/bashrc +etc/chkconfig.d/ +etc/cloud/ +etc/cloud/cloud.cfg.d/ +etc/cloud/cloud.cfg.d/10_aws_yumvars.cfg +etc/csh.cshrc +etc/csh.login +etc/default/ +etc/default/nss +etc/environment +etc/exports +etc/filesystems +etc/group +etc/gss/ +etc/gss/mech.d/ +etc/host.conf +etc/hosts +etc/hosts.allow +etc/hosts.deny +etc/init.d +etc/inputrc +etc/issue +etc/issue.net +etc/krb5.conf +etc/krb5.conf.d/ +etc/ld.so.cache +etc/ld.so.conf +etc/ld.so.conf.d/ +etc/localtime +etc/motd +etc/nsswitch.conf +etc/opt/ +etc/os-release +etc/passwd +etc/pkcs11/ +etc/pkcs11/modules/ +etc/pki/ +etc/pki/ca-trust/ +etc/pki/ca-trust/README +etc/pki/ca-trust/ca-legacy.conf +etc/pki/ca-trust/extracted/ +etc/pki/ca-trust/extracted/README +etc/pki/ca-trust/extracted/java/ +etc/pki/ca-trust/extracted/java/README +etc/pki/ca-trust/extracted/java/cacerts +etc/pki/ca-trust/extracted/openssl/ +etc/pki/ca-trust/extracted/openssl/README +etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt +etc/pki/ca-trust/extracted/pem/ +etc/pki/ca-trust/extracted/pem/README +etc/pki/ca-trust/extracted/pem/email-ca-bundle.pem +etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem +etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem +etc/pki/ca-trust/source/ +etc/pki/ca-trust/source/README +etc/pki/ca-trust/source/anchors/ +etc/pki/ca-trust/source/blacklist/ +etc/pki/ca-trust/source/ca-bundle.legacy.crt +etc/pki/java/ +etc/pki/java/cacerts +etc/pki/rpm-gpg/ +etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2 +etc/pki/tls/ +etc/pki/tls/cert.pem +etc/pki/tls/certs/ +etc/pki/tls/certs/ca-bundle.crt +etc/pki/tls/certs/ca-bundle.trust.crt +etc/pki/tls/misc/ +etc/pki/tls/openssl.cnf +etc/pki/tls/private/ +etc/pm/ +etc/pm/config.d/ +etc/pm/power.d/ +etc/pm/sleep.d/ +etc/popt.d/ +etc/prelink.conf.d/ +etc/prelink.conf.d/nss-softokn-prelink.conf +etc/printcap +etc/profile +etc/profile.d/ +etc/profile.d/colorgrep.csh +etc/profile.d/colorgrep.sh +etc/profile.d/colorls.csh +etc/profile.d/colorls.sh +etc/profile.d/csh.local +etc/profile.d/sh.local +etc/protocols +etc/rc.d/ +etc/rc.d/init.d/ +etc/rc.d/rc0.d/ +etc/rc.d/rc1.d/ +etc/rc.d/rc2.d/ +etc/rc.d/rc3.d/ +etc/rc.d/rc4.d/ +etc/rc.d/rc5.d/ +etc/rc.d/rc6.d/ +etc/rc0.d +etc/rc1.d +etc/rc2.d +etc/rc3.d +etc/rc4.d +etc/rc5.d +etc/rc6.d +etc/resolv.conf +etc/rpc +etc/rpm/ +etc/rpm/macros.dist +etc/services +etc/shells +etc/skel/ +etc/skel/.bash_logout +etc/skel/.bash_profile +etc/skel/.bashrc +etc/ssl/ +etc/ssl/certs +etc/subgid +etc/subuid +etc/sysconfig/ +etc/system-release +etc/system-release-cpe +etc/terminfo/ +etc/update-motd.d/ +etc/update-motd.d/30-banner +etc/update-motd.d/70-available-updates +etc/xdg/ +etc/xdg/autostart/ +etc/xinetd.d/ +etc/yum.conf +etc/yum.repos.d/ +etc/yum.repos.d/amzn2-core.repo +etc/yum/ +etc/yum/fssnap.d/ +etc/yum/pluginconf.d/ +etc/yum/pluginconf.d/ovl.conf +etc/yum/pluginconf.d/priorities.conf +etc/yum/protected.d/ +etc/yum/vars/ +etc/yum/vars/awsdomain +etc/yum/vars/awsregion +etc/yum/vars/product +etc/yum/vars/target +etc/yum/version-groups.conf +home/ +lib +lib64 +media/ +mnt/ +opt/ +run/ +sbin +srv/ +usr/ +usr/bin/ +usr/bin/[ +usr/bin/alias +usr/bin/arch +usr/bin/awk +usr/bin/base64 +usr/bin/basename +usr/bin/bash +usr/bin/bashbug +usr/bin/bashbug-64 +usr/bin/bg +usr/bin/ca-legacy +usr/bin/captoinfo +usr/bin/cat +usr/bin/catchsegv +usr/bin/cd +usr/bin/chcon +usr/bin/chgrp +usr/bin/chmod +usr/bin/chown +usr/bin/cksum +usr/bin/clear +usr/bin/comm +usr/bin/command +usr/bin/cp +usr/bin/csplit +usr/bin/cut +usr/bin/date +usr/bin/dd +usr/bin/df +usr/bin/dgawk +usr/bin/dir +usr/bin/dircolors +usr/bin/dirname +usr/bin/du +usr/bin/echo +usr/bin/egrep +usr/bin/env +usr/bin/expand +usr/bin/expr +usr/bin/factor +usr/bin/false +usr/bin/fc +usr/bin/fg +usr/bin/fgrep +usr/bin/fmt +usr/bin/fold +usr/bin/gawk +usr/bin/gencat +usr/bin/getconf +usr/bin/getent +usr/bin/getopts +usr/bin/grep +usr/bin/groups +usr/bin/head +usr/bin/hostid +usr/bin/iconv +usr/bin/id +usr/bin/igawk +usr/bin/info +usr/bin/infocmp +usr/bin/infokey +usr/bin/infotocap +usr/bin/install +usr/bin/jobs +usr/bin/join +usr/bin/ldd +usr/bin/link +usr/bin/ln +usr/bin/locale +usr/bin/localedef +usr/bin/logname +usr/bin/ls +usr/bin/makedb +usr/bin/md5sum +usr/bin/mkdir +usr/bin/mkfifo +usr/bin/mknod +usr/bin/mktemp +usr/bin/mv +usr/bin/nice +usr/bin/nl +usr/bin/nohup +usr/bin/nproc +usr/bin/numfmt +usr/bin/od +usr/bin/p11-kit +usr/bin/paste +usr/bin/pathchk +usr/bin/pgawk +usr/bin/pinky +usr/bin/pldd +usr/bin/pr +usr/bin/printenv +usr/bin/printf +usr/bin/ptx +usr/bin/pwd +usr/bin/read +usr/bin/readlink +usr/bin/realpath +usr/bin/reset +usr/bin/rm +usr/bin/rmdir +usr/bin/rpcgen +usr/bin/runcon +usr/bin/sed +usr/bin/seq +usr/bin/sh +usr/bin/sha1sum +usr/bin/sha224sum +usr/bin/sha256sum +usr/bin/sha384sum +usr/bin/sha512sum +usr/bin/shred +usr/bin/shuf +usr/bin/sleep +usr/bin/sort +usr/bin/sotruss +usr/bin/split +usr/bin/sprof +usr/bin/stat +usr/bin/stdbuf +usr/bin/stty +usr/bin/sum +usr/bin/sync +usr/bin/tabs +usr/bin/tac +usr/bin/tail +usr/bin/tee +usr/bin/test +usr/bin/tic +usr/bin/timeout +usr/bin/toe +usr/bin/touch +usr/bin/tput +usr/bin/tr +usr/bin/true +usr/bin/truncate +usr/bin/trust +usr/bin/tset +usr/bin/tsort +usr/bin/tty +usr/bin/tzselect +usr/bin/umask +usr/bin/unalias +usr/bin/uname +usr/bin/unexpand +usr/bin/uniq +usr/bin/unlink +usr/bin/update-ca-trust +usr/bin/users +usr/bin/vdir +usr/bin/wait +usr/bin/wc +usr/bin/who +usr/bin/whoami +usr/bin/yes +usr/etc/ +usr/games/ +usr/include/ +usr/lib/ +usr/lib/debug/ +usr/lib/debug/bin +usr/lib/debug/lib +usr/lib/debug/lib64 +usr/lib/debug/sbin +usr/lib/debug/usr/ +usr/lib/debug/usr/.dwz +usr/lib/debug/usr/bin/ +usr/lib/debug/usr/lib/ +usr/lib/debug/usr/lib64/ +usr/lib/debug/usr/sbin/ +usr/lib/dracut/ +usr/lib/dracut/dracut.conf.d/ +usr/lib/dracut/dracut.conf.d/50-nss-softokn.conf +usr/lib/dracut/modules.d/ +usr/lib/dracut/modules.d/05nss-softokn/ +usr/lib/dracut/modules.d/05nss-softokn/module-setup.sh +usr/lib/games/ +usr/lib/locale/ +usr/lib/locale/C.utf8/ +usr/lib/locale/C.utf8/LC_ADDRESS +usr/lib/locale/C.utf8/LC_COLLATE +usr/lib/locale/C.utf8/LC_CTYPE +usr/lib/locale/C.utf8/LC_IDENTIFICATION +usr/lib/locale/C.utf8/LC_MEASUREMENT +usr/lib/locale/C.utf8/LC_MESSAGES/ +usr/lib/locale/C.utf8/LC_MESSAGES/SYS_LC_MESSAGES +usr/lib/locale/C.utf8/LC_MONETARY +usr/lib/locale/C.utf8/LC_NAME +usr/lib/locale/C.utf8/LC_NUMERIC +usr/lib/locale/C.utf8/LC_PAPER +usr/lib/locale/C.utf8/LC_TELEPHONE +usr/lib/locale/C.utf8/LC_TIME +usr/lib/modules/ +usr/lib/sse2/ +usr/lib/systemd/ +usr/lib/systemd/system-preset/ +usr/lib/systemd/system-preset/85-display-manager.preset +usr/lib/systemd/system-preset/90-default.preset +usr/lib/systemd/systemd-sysv-install +usr/lib/tmpfiles.d/ +usr/lib/tmpfiles.d/libselinux.conf +usr/lib64/ +usr/lib64/.libcrypto.so.1.0.2k.hmac +usr/lib64/.libcrypto.so.10.hmac +usr/lib64/.libssl.so.1.0.2k.hmac +usr/lib64/.libssl.so.10.hmac +usr/lib64/X11/ +usr/lib64/audit/ +usr/lib64/audit/sotruss-lib.so +usr/lib64/fipscheck/ +usr/lib64/fipscheck/libgmp.so.10.2.0.hmac +usr/lib64/fipscheck/libgmp.so.10.hmac +usr/lib64/games/ +usr/lib64/gconv/ +usr/lib64/gconv/ANSI_X3.110.so +usr/lib64/gconv/ARMSCII-8.so +usr/lib64/gconv/ASMO_449.so +usr/lib64/gconv/BIG5.so +usr/lib64/gconv/BIG5HKSCS.so +usr/lib64/gconv/BRF.so +usr/lib64/gconv/CP10007.so +usr/lib64/gconv/CP1125.so +usr/lib64/gconv/CP1250.so +usr/lib64/gconv/CP1251.so +usr/lib64/gconv/CP1252.so +usr/lib64/gconv/CP1253.so +usr/lib64/gconv/CP1254.so +usr/lib64/gconv/CP1255.so +usr/lib64/gconv/CP1256.so +usr/lib64/gconv/CP1257.so +usr/lib64/gconv/CP1258.so +usr/lib64/gconv/CP737.so +usr/lib64/gconv/CP770.so +usr/lib64/gconv/CP771.so +usr/lib64/gconv/CP772.so +usr/lib64/gconv/CP773.so +usr/lib64/gconv/CP774.so +usr/lib64/gconv/CP775.so +usr/lib64/gconv/CP932.so +usr/lib64/gconv/CSN_369103.so +usr/lib64/gconv/CWI.so +usr/lib64/gconv/DEC-MCS.so +usr/lib64/gconv/EBCDIC-AT-DE-A.so +usr/lib64/gconv/EBCDIC-AT-DE.so +usr/lib64/gconv/EBCDIC-CA-FR.so +usr/lib64/gconv/EBCDIC-DK-NO-A.so +usr/lib64/gconv/EBCDIC-DK-NO.so +usr/lib64/gconv/EBCDIC-ES-A.so +usr/lib64/gconv/EBCDIC-ES-S.so +usr/lib64/gconv/EBCDIC-ES.so +usr/lib64/gconv/EBCDIC-FI-SE-A.so +usr/lib64/gconv/EBCDIC-FI-SE.so +usr/lib64/gconv/EBCDIC-FR.so +usr/lib64/gconv/EBCDIC-IS-FRISS.so +usr/lib64/gconv/EBCDIC-IT.so +usr/lib64/gconv/EBCDIC-PT.so +usr/lib64/gconv/EBCDIC-UK.so +usr/lib64/gconv/EBCDIC-US.so +usr/lib64/gconv/ECMA-CYRILLIC.so +usr/lib64/gconv/EUC-CN.so +usr/lib64/gconv/EUC-JISX0213.so +usr/lib64/gconv/EUC-JP-MS.so +usr/lib64/gconv/EUC-JP.so +usr/lib64/gconv/EUC-KR.so +usr/lib64/gconv/EUC-TW.so +usr/lib64/gconv/GB18030.so +usr/lib64/gconv/GBBIG5.so +usr/lib64/gconv/GBGBK.so +usr/lib64/gconv/GBK.so +usr/lib64/gconv/GEORGIAN-ACADEMY.so +usr/lib64/gconv/GEORGIAN-PS.so +usr/lib64/gconv/GOST_19768-74.so +usr/lib64/gconv/GREEK-CCITT.so +usr/lib64/gconv/GREEK7-OLD.so +usr/lib64/gconv/GREEK7.so +usr/lib64/gconv/HP-GREEK8.so +usr/lib64/gconv/HP-ROMAN8.so +usr/lib64/gconv/HP-ROMAN9.so +usr/lib64/gconv/HP-THAI8.so +usr/lib64/gconv/HP-TURKISH8.so +usr/lib64/gconv/IBM037.so +usr/lib64/gconv/IBM038.so +usr/lib64/gconv/IBM1004.so +usr/lib64/gconv/IBM1008.so +usr/lib64/gconv/IBM1008_420.so +usr/lib64/gconv/IBM1025.so +usr/lib64/gconv/IBM1026.so +usr/lib64/gconv/IBM1046.so +usr/lib64/gconv/IBM1047.so +usr/lib64/gconv/IBM1097.so +usr/lib64/gconv/IBM1112.so +usr/lib64/gconv/IBM1122.so +usr/lib64/gconv/IBM1123.so +usr/lib64/gconv/IBM1124.so +usr/lib64/gconv/IBM1129.so +usr/lib64/gconv/IBM1130.so +usr/lib64/gconv/IBM1132.so +usr/lib64/gconv/IBM1133.so +usr/lib64/gconv/IBM1137.so +usr/lib64/gconv/IBM1140.so +usr/lib64/gconv/IBM1141.so +usr/lib64/gconv/IBM1142.so +usr/lib64/gconv/IBM1143.so +usr/lib64/gconv/IBM1144.so +usr/lib64/gconv/IBM1145.so +usr/lib64/gconv/IBM1146.so +usr/lib64/gconv/IBM1147.so +usr/lib64/gconv/IBM1148.so +usr/lib64/gconv/IBM1149.so +usr/lib64/gconv/IBM1153.so +usr/lib64/gconv/IBM1154.so +usr/lib64/gconv/IBM1155.so +usr/lib64/gconv/IBM1156.so +usr/lib64/gconv/IBM1157.so +usr/lib64/gconv/IBM1158.so +usr/lib64/gconv/IBM1160.so +usr/lib64/gconv/IBM1161.so +usr/lib64/gconv/IBM1162.so +usr/lib64/gconv/IBM1163.so +usr/lib64/gconv/IBM1164.so +usr/lib64/gconv/IBM1166.so +usr/lib64/gconv/IBM1167.so +usr/lib64/gconv/IBM12712.so +usr/lib64/gconv/IBM1364.so +usr/lib64/gconv/IBM1371.so +usr/lib64/gconv/IBM1388.so +usr/lib64/gconv/IBM1390.so +usr/lib64/gconv/IBM1399.so +usr/lib64/gconv/IBM16804.so +usr/lib64/gconv/IBM256.so +usr/lib64/gconv/IBM273.so +usr/lib64/gconv/IBM274.so +usr/lib64/gconv/IBM275.so +usr/lib64/gconv/IBM277.so +usr/lib64/gconv/IBM278.so +usr/lib64/gconv/IBM280.so +usr/lib64/gconv/IBM281.so +usr/lib64/gconv/IBM284.so +usr/lib64/gconv/IBM285.so +usr/lib64/gconv/IBM290.so +usr/lib64/gconv/IBM297.so +usr/lib64/gconv/IBM420.so +usr/lib64/gconv/IBM423.so +usr/lib64/gconv/IBM424.so +usr/lib64/gconv/IBM437.so +usr/lib64/gconv/IBM4517.so +usr/lib64/gconv/IBM4899.so +usr/lib64/gconv/IBM4909.so +usr/lib64/gconv/IBM4971.so +usr/lib64/gconv/IBM500.so +usr/lib64/gconv/IBM5347.so +usr/lib64/gconv/IBM803.so +usr/lib64/gconv/IBM850.so +usr/lib64/gconv/IBM851.so +usr/lib64/gconv/IBM852.so +usr/lib64/gconv/IBM855.so +usr/lib64/gconv/IBM856.so +usr/lib64/gconv/IBM857.so +usr/lib64/gconv/IBM858.so +usr/lib64/gconv/IBM860.so +usr/lib64/gconv/IBM861.so +usr/lib64/gconv/IBM862.so +usr/lib64/gconv/IBM863.so +usr/lib64/gconv/IBM864.so +usr/lib64/gconv/IBM865.so +usr/lib64/gconv/IBM866.so +usr/lib64/gconv/IBM866NAV.so +usr/lib64/gconv/IBM868.so +usr/lib64/gconv/IBM869.so +usr/lib64/gconv/IBM870.so +usr/lib64/gconv/IBM871.so +usr/lib64/gconv/IBM874.so +usr/lib64/gconv/IBM875.so +usr/lib64/gconv/IBM880.so +usr/lib64/gconv/IBM891.so +usr/lib64/gconv/IBM901.so +usr/lib64/gconv/IBM902.so +usr/lib64/gconv/IBM903.so +usr/lib64/gconv/IBM9030.so +usr/lib64/gconv/IBM904.so +usr/lib64/gconv/IBM905.so +usr/lib64/gconv/IBM9066.so +usr/lib64/gconv/IBM918.so +usr/lib64/gconv/IBM921.so +usr/lib64/gconv/IBM922.so +usr/lib64/gconv/IBM930.so +usr/lib64/gconv/IBM932.so +usr/lib64/gconv/IBM933.so +usr/lib64/gconv/IBM935.so +usr/lib64/gconv/IBM937.so +usr/lib64/gconv/IBM939.so +usr/lib64/gconv/IBM943.so +usr/lib64/gconv/IBM9448.so +usr/lib64/gconv/IEC_P27-1.so +usr/lib64/gconv/INIS-8.so +usr/lib64/gconv/INIS-CYRILLIC.so +usr/lib64/gconv/INIS.so +usr/lib64/gconv/ISIRI-3342.so +usr/lib64/gconv/ISO-2022-CN-EXT.so +usr/lib64/gconv/ISO-2022-CN.so +usr/lib64/gconv/ISO-2022-JP-3.so +usr/lib64/gconv/ISO-2022-JP.so +usr/lib64/gconv/ISO-2022-KR.so +usr/lib64/gconv/ISO-IR-197.so +usr/lib64/gconv/ISO-IR-209.so +usr/lib64/gconv/ISO646.so +usr/lib64/gconv/ISO8859-1.so +usr/lib64/gconv/ISO8859-10.so +usr/lib64/gconv/ISO8859-11.so +usr/lib64/gconv/ISO8859-13.so +usr/lib64/gconv/ISO8859-14.so +usr/lib64/gconv/ISO8859-15.so +usr/lib64/gconv/ISO8859-16.so +usr/lib64/gconv/ISO8859-2.so +usr/lib64/gconv/ISO8859-3.so +usr/lib64/gconv/ISO8859-4.so +usr/lib64/gconv/ISO8859-5.so +usr/lib64/gconv/ISO8859-6.so +usr/lib64/gconv/ISO8859-7.so +usr/lib64/gconv/ISO8859-8.so +usr/lib64/gconv/ISO8859-9.so +usr/lib64/gconv/ISO8859-9E.so +usr/lib64/gconv/ISO_10367-BOX.so +usr/lib64/gconv/ISO_11548-1.so +usr/lib64/gconv/ISO_2033.so +usr/lib64/gconv/ISO_5427-EXT.so +usr/lib64/gconv/ISO_5427.so +usr/lib64/gconv/ISO_5428.so +usr/lib64/gconv/ISO_6937-2.so +usr/lib64/gconv/ISO_6937.so +usr/lib64/gconv/JOHAB.so +usr/lib64/gconv/KOI-8.so +usr/lib64/gconv/KOI8-R.so +usr/lib64/gconv/KOI8-RU.so +usr/lib64/gconv/KOI8-T.so +usr/lib64/gconv/KOI8-U.so +usr/lib64/gconv/LATIN-GREEK-1.so +usr/lib64/gconv/LATIN-GREEK.so +usr/lib64/gconv/MAC-CENTRALEUROPE.so +usr/lib64/gconv/MAC-IS.so +usr/lib64/gconv/MAC-SAMI.so +usr/lib64/gconv/MAC-UK.so +usr/lib64/gconv/MACINTOSH.so +usr/lib64/gconv/MIK.so +usr/lib64/gconv/NATS-DANO.so +usr/lib64/gconv/NATS-SEFI.so +usr/lib64/gconv/PT154.so +usr/lib64/gconv/RK1048.so +usr/lib64/gconv/SAMI-WS2.so +usr/lib64/gconv/SHIFT_JISX0213.so +usr/lib64/gconv/SJIS.so +usr/lib64/gconv/T.61.so +usr/lib64/gconv/TCVN5712-1.so +usr/lib64/gconv/TIS-620.so +usr/lib64/gconv/TSCII.so +usr/lib64/gconv/UHC.so +usr/lib64/gconv/UNICODE.so +usr/lib64/gconv/UTF-16.so +usr/lib64/gconv/UTF-32.so +usr/lib64/gconv/UTF-7.so +usr/lib64/gconv/VISCII.so +usr/lib64/gconv/gconv-modules +usr/lib64/gconv/gconv-modules.cache +usr/lib64/gconv/libCNS.so +usr/lib64/gconv/libGB.so +usr/lib64/gconv/libISOIR165.so +usr/lib64/gconv/libJIS.so +usr/lib64/gconv/libJISX0213.so +usr/lib64/gconv/libKSC.so +usr/lib64/krb5/ +usr/lib64/krb5/plugins/ +usr/lib64/krb5/plugins/authdata/ +usr/lib64/krb5/plugins/kdb/ +usr/lib64/krb5/plugins/libkrb5/ +usr/lib64/krb5/plugins/preauth/ +usr/lib64/krb5/plugins/tls/ +usr/lib64/krb5/plugins/tls/k5tls.so +usr/lib64/ld-2.26.so +usr/lib64/ld-linux-x86-64.so.2 +usr/lib64/libBrokenLocale-2.26.so +usr/lib64/libBrokenLocale.so.1 +usr/lib64/libSegFault.so +usr/lib64/libacl.so.1 +usr/lib64/libacl.so.1.1.0 +usr/lib64/libanl-2.26.so +usr/lib64/libanl.so.1 +usr/lib64/libattr.so.1 +usr/lib64/libattr.so.1.1.0 +usr/lib64/libc-2.26.so +usr/lib64/libc.so.6 +usr/lib64/libcap.so.2 +usr/lib64/libcap.so.2.22 +usr/lib64/libcidn-2.26.so +usr/lib64/libcidn.so.1 +usr/lib64/libcom_err.so.2 +usr/lib64/libcom_err.so.2.1 +usr/lib64/libcrypto.so.1.0.2k +usr/lib64/libcrypto.so.10 +usr/lib64/libdl-2.26.so +usr/lib64/libdl.so.2 +usr/lib64/libffi.so.6 +usr/lib64/libffi.so.6.0.1 +usr/lib64/libform.so.6 +usr/lib64/libform.so.6.0 +usr/lib64/libformw.so.6 +usr/lib64/libformw.so.6.0 +usr/lib64/libfreebl3.chk +usr/lib64/libfreebl3.so +usr/lib64/libfreeblpriv3.chk +usr/lib64/libfreeblpriv3.so +usr/lib64/libgcc_s-7-20180303.so.1 +usr/lib64/libgcc_s.so.1 +usr/lib64/libgmp.so.10 +usr/lib64/libgmp.so.10.2.0 +usr/lib64/libgmpxx.so.4 +usr/lib64/libgmpxx.so.4.4.0 +usr/lib64/libgssapi_krb5.so.2 +usr/lib64/libgssapi_krb5.so.2.2 +usr/lib64/libgssrpc.so.4 +usr/lib64/libgssrpc.so.4.2 +usr/lib64/libk5crypto.so.3 +usr/lib64/libk5crypto.so.3.1 +usr/lib64/libkdb5.so.8 +usr/lib64/libkdb5.so.8.0 +usr/lib64/libkeyutils.so.1 +usr/lib64/libkeyutils.so.1.5 +usr/lib64/libkrad.so.0 +usr/lib64/libkrad.so.0.0 +usr/lib64/libkrb5.so.3 +usr/lib64/libkrb5.so.3.3 +usr/lib64/libkrb5support.so.0 +usr/lib64/libkrb5support.so.0.1 +usr/lib64/libm-2.26.so +usr/lib64/libm.so.6 +usr/lib64/libmemusage.so +usr/lib64/libmenu.so.6 +usr/lib64/libmenu.so.6.0 +usr/lib64/libmenuw.so.6 +usr/lib64/libmenuw.so.6.0 +usr/lib64/libmvec-2.26.so +usr/lib64/libmvec.so.1 +usr/lib64/libncurses.so.6 +usr/lib64/libncurses.so.6.0 +usr/lib64/libncursesw.so.6 +usr/lib64/libncursesw.so.6.0 +usr/lib64/libnsl-2.26.so +usr/lib64/libnsl.so.1 +usr/lib64/libnspr4.so +usr/lib64/libnss_compat-2.26.so +usr/lib64/libnss_compat.so.2 +usr/lib64/libnss_dns-2.26.so +usr/lib64/libnss_dns.so.2 +usr/lib64/libnss_files-2.26.so +usr/lib64/libnss_files.so.2 +usr/lib64/libnssckbi.so +usr/lib64/libnssutil3.so +usr/lib64/libp11-kit.so.0 +usr/lib64/libp11-kit.so.0.3.0 +usr/lib64/libpanel.so.6 +usr/lib64/libpanel.so.6.0 +usr/lib64/libpanelw.so.6 +usr/lib64/libpanelw.so.6.0 +usr/lib64/libpcprofile.so +usr/lib64/libpcre.so.1 +usr/lib64/libpcre.so.1.2.0 +usr/lib64/libpcre16.so.0 +usr/lib64/libpcre16.so.0.2.0 +usr/lib64/libpcre32.so.0 +usr/lib64/libpcre32.so.0.0.0 +usr/lib64/libpcrecpp.so.0 +usr/lib64/libpcrecpp.so.0.0.0 +usr/lib64/libpcreposix.so.0 +usr/lib64/libpcreposix.so.0.0.1 +usr/lib64/libplc4.so +usr/lib64/libplds4.so +usr/lib64/libpopt.so.0 +usr/lib64/libpopt.so.0.0.0 +usr/lib64/libpthread-2.26.so +usr/lib64/libpthread.so.0 +usr/lib64/libresolv-2.26.so +usr/lib64/libresolv.so.2 +usr/lib64/librt-2.26.so +usr/lib64/librt.so.1 +usr/lib64/libselinux.so.1 +usr/lib64/libsepol.so.1 +usr/lib64/libssl.so.1.0.2k +usr/lib64/libssl.so.10 +usr/lib64/libstdc++.so.6 +usr/lib64/libstdc++.so.6.0.24 +usr/lib64/libtasn1.so.6 +usr/lib64/libtasn1.so.6.5.3 +usr/lib64/libthread_db-1.0.so +usr/lib64/libthread_db.so.1 +usr/lib64/libtic.so.6 +usr/lib64/libtic.so.6.0 +usr/lib64/libtinfo.so.6 +usr/lib64/libtinfo.so.6.0 +usr/lib64/libutil-2.26.so +usr/lib64/libutil.so.1 +usr/lib64/libverto.so.1 +usr/lib64/libverto.so.1.0.0 +usr/lib64/libz.so.1 +usr/lib64/libz.so.1.2.7 +usr/lib64/openssl/ +usr/lib64/openssl/engines/ +usr/lib64/openssl/engines/lib4758cca.so +usr/lib64/openssl/engines/libaep.so +usr/lib64/openssl/engines/libatalla.so +usr/lib64/openssl/engines/libcapi.so +usr/lib64/openssl/engines/libchil.so +usr/lib64/openssl/engines/libcswift.so +usr/lib64/openssl/engines/libgmp.so +usr/lib64/openssl/engines/libnuron.so +usr/lib64/openssl/engines/libpadlock.so +usr/lib64/openssl/engines/libsureware.so +usr/lib64/openssl/engines/libubsec.so +usr/lib64/p11-kit-proxy.so +usr/lib64/p11-kit-trust.so +usr/lib64/pkcs11/ +usr/lib64/pkcs11/p11-kit-trust.so +usr/lib64/pm-utils/ +usr/lib64/pm-utils/module.d/ +usr/lib64/pm-utils/power.d/ +usr/lib64/pm-utils/sleep.d/ +usr/lib64/security/ +usr/lib64/security/pam_cap.so +usr/lib64/sse2/ +usr/lib64/tls/ +usr/libexec/ +usr/libexec/awk/ +usr/libexec/awk/grcat +usr/libexec/awk/pwcat +usr/libexec/coreutils/ +usr/libexec/coreutils/libstdbuf.so +usr/libexec/getconf/ +usr/libexec/getconf/POSIX_V6_LP64_OFF64 +usr/libexec/getconf/POSIX_V7_LP64_OFF64 +usr/libexec/getconf/XBS5_LP64_OFF64 +usr/libexec/grepconf.sh +usr/libexec/p11-kit/ +usr/libexec/p11-kit/p11-kit-remote +usr/libexec/p11-kit/trust-extract-compat +usr/local/ +usr/local/bin/ +usr/local/etc/ +usr/local/games/ +usr/local/include/ +usr/local/lib/ +usr/local/lib64/ +usr/local/libexec/ +usr/local/sbin/ +usr/local/share/ +usr/local/share/applications/ +usr/local/share/info/ +usr/local/share/man/ +usr/local/share/man/man1/ +usr/local/share/man/man1x/ +usr/local/share/man/man2/ +usr/local/share/man/man2x/ +usr/local/share/man/man3/ +usr/local/share/man/man3x/ +usr/local/share/man/man4/ +usr/local/share/man/man4x/ +usr/local/share/man/man5/ +usr/local/share/man/man5x/ +usr/local/share/man/man6/ +usr/local/share/man/man6x/ +usr/local/share/man/man7/ +usr/local/share/man/man7x/ +usr/local/share/man/man8/ +usr/local/share/man/man8x/ +usr/local/share/man/man9/ +usr/local/share/man/man9x/ +usr/local/share/man/mann/ +usr/local/src/ +usr/sbin/ +usr/sbin/alternatives +usr/sbin/capsh +usr/sbin/chkconfig +usr/sbin/getcap +usr/sbin/getpcaps +usr/sbin/iconvconfig +usr/sbin/iconvconfig.x86_64 +usr/sbin/install-info +usr/sbin/ldconfig +usr/sbin/sefcontext_compile +usr/sbin/setcap +usr/sbin/sln +usr/sbin/update-alternatives +usr/sbin/zdump +usr/sbin/zic +usr/share/ +usr/share/X11/ +usr/share/aclocal/ +usr/share/applications/ +usr/share/augeas/ +usr/share/augeas/lenses/ +usr/share/awk/ +usr/share/awk/assert.awk +usr/share/awk/bits2str.awk +usr/share/awk/cliff_rand.awk +usr/share/awk/ctime.awk +usr/share/awk/ftrans.awk +usr/share/awk/getopt.awk +usr/share/awk/gettime.awk +usr/share/awk/group.awk +usr/share/awk/join.awk +usr/share/awk/libintl.awk +usr/share/awk/noassign.awk +usr/share/awk/ord.awk +usr/share/awk/passwd.awk +usr/share/awk/quicksort.awk +usr/share/awk/readable.awk +usr/share/awk/rewind.awk +usr/share/awk/round.awk +usr/share/awk/strtonum.awk +usr/share/awk/walkarray.awk +usr/share/awk/zerofile.awk +usr/share/backgrounds/ +usr/share/desktop-directories/ +usr/share/dict/ +usr/share/doc/ +usr/share/doc/bash-4.2.46/ +usr/share/doc/bash-4.2.46/COPYING +usr/share/doc/ca-certificates-2018.2.22/ +usr/share/doc/ca-certificates-2018.2.22/README +usr/share/doc/coreutils-8.22/ +usr/share/doc/coreutils-8.22/ABOUT-NLS +usr/share/doc/coreutils-8.22/COPYING +usr/share/doc/coreutils-8.22/ChangeLog.bz2 +usr/share/doc/coreutils-8.22/NEWS +usr/share/doc/coreutils-8.22/README +usr/share/doc/coreutils-8.22/THANKS +usr/share/doc/coreutils-8.22/TODO +usr/share/doc/coreutils-8.22/fileutils/ +usr/share/doc/coreutils-8.22/fileutils/ChangeLog-1997.bz2 +usr/share/doc/coreutils-8.22/fileutils/ChangeLog.bz2 +usr/share/doc/coreutils-8.22/fileutils/NEWS +usr/share/doc/coreutils-8.22/sh-utils/ +usr/share/doc/coreutils-8.22/sh-utils/ChangeLog.0.bz2 +usr/share/doc/coreutils-8.22/sh-utils/ChangeLog.bz2 +usr/share/doc/coreutils-8.22/sh-utils/NEWS +usr/share/doc/coreutils-8.22/textutils/ +usr/share/doc/coreutils-8.22/textutils/ChangeLog.bz2 +usr/share/doc/coreutils-8.22/textutils/NEWS +usr/share/doc/gawk-4.0.2/ +usr/share/doc/gawk-4.0.2/COPYING +usr/share/doc/gawk-4.0.2/FUTURES +usr/share/doc/gawk-4.0.2/LIMITATIONS +usr/share/doc/gawk-4.0.2/NEWS +usr/share/doc/gawk-4.0.2/POSIX.STD +usr/share/doc/gawk-4.0.2/README +usr/share/doc/gawk-4.0.2/README.multibyte +usr/share/doc/gawk-4.0.2/README.tests +usr/share/doc/glibc-2.26/ +usr/share/doc/glibc-2.26/BUGS +usr/share/doc/glibc-2.26/CONFORMANCE +usr/share/doc/glibc-2.26/INSTALL +usr/share/doc/glibc-2.26/NEWS +usr/share/doc/glibc-2.26/README +usr/share/doc/glibc-2.26/rtld-debugger-interface.txt +usr/share/doc/glibc-common-2.26/ +usr/share/doc/glibc-common-2.26/README.timezone +usr/share/doc/glibc-common-2.26/gai.conf +usr/share/doc/gmp-6.0.0/ +usr/share/doc/gmp-6.0.0/NEWS +usr/share/doc/gmp-6.0.0/README +usr/share/doc/grep-2.20/ +usr/share/doc/grep-2.20/ABOUT-NLS +usr/share/doc/grep-2.20/AUTHORS +usr/share/doc/grep-2.20/COPYING +usr/share/doc/grep-2.20/ChangeLog +usr/share/doc/grep-2.20/NEWS +usr/share/doc/grep-2.20/README +usr/share/doc/grep-2.20/THANKS +usr/share/doc/grep-2.20/TODO +usr/share/doc/info-5.1/ +usr/share/doc/info-5.1/COPYING +usr/share/doc/keyutils-libs-1.5.8/ +usr/share/doc/keyutils-libs-1.5.8/LICENCE.LGPL +usr/share/doc/krb5-libs-1.15.1/ +usr/share/doc/krb5-libs-1.15.1/NOTICE +usr/share/doc/krb5-libs-1.15.1/README +usr/share/doc/krb5-libs-1.15.1/examples/ +usr/share/doc/krb5-libs-1.15.1/examples/kdc.conf +usr/share/doc/krb5-libs-1.15.1/examples/krb5.conf +usr/share/doc/krb5-libs-1.15.1/examples/services.append +usr/share/doc/libcap-2.22/ +usr/share/doc/libcap-2.22/License +usr/share/doc/libcap-2.22/capability.notes +usr/share/doc/libcom_err-1.42.9/ +usr/share/doc/libcom_err-1.42.9/COPYING +usr/share/doc/libffi-3.0.13/ +usr/share/doc/libffi-3.0.13/LICENSE +usr/share/doc/libffi-3.0.13/README +usr/share/doc/libtasn1-4.10/ +usr/share/doc/libtasn1-4.10/AUTHORS +usr/share/doc/libtasn1-4.10/COPYING +usr/share/doc/libtasn1-4.10/COPYING.LIB +usr/share/doc/libtasn1-4.10/NEWS +usr/share/doc/libtasn1-4.10/README +usr/share/doc/libtasn1-4.10/THANKS +usr/share/doc/libtasn1-4.10/TODO +usr/share/doc/libtasn1-4.10/libtasn1.pdf +usr/share/doc/libverto-0.2.5/ +usr/share/doc/libverto-0.2.5/AUTHORS +usr/share/doc/libverto-0.2.5/COPYING +usr/share/doc/libverto-0.2.5/ChangeLog +usr/share/doc/libverto-0.2.5/NEWS +usr/share/doc/libverto-0.2.5/README +usr/share/doc/ncurses-6.0/ +usr/share/doc/ncurses-6.0/ANNOUNCE +usr/share/doc/ncurses-6.0/AUTHORS +usr/share/doc/ncurses-6.0/NEWS.bz2 +usr/share/doc/ncurses-6.0/README +usr/share/doc/ncurses-6.0/TO-DO +usr/share/doc/ncurses-base-6.0/ +usr/share/doc/ncurses-base-6.0/README +usr/share/doc/p11-kit-0.23.5/ +usr/share/doc/p11-kit-0.23.5/AUTHORS +usr/share/doc/p11-kit-0.23.5/COPYING +usr/share/doc/p11-kit-0.23.5/NEWS +usr/share/doc/p11-kit-0.23.5/README +usr/share/doc/p11-kit-0.23.5/pkcs11.conf.example +usr/share/doc/pcre-8.32/ +usr/share/doc/pcre-8.32/AUTHORS +usr/share/doc/pcre-8.32/COPYING +usr/share/doc/pcre-8.32/ChangeLog +usr/share/doc/pcre-8.32/LICENCE +usr/share/doc/pcre-8.32/NEWS +usr/share/doc/pcre-8.32/README +usr/share/doc/popt-1.13/ +usr/share/doc/popt-1.13/CHANGES +usr/share/doc/popt-1.13/COPYING +usr/share/doc/sed-4.2.2/ +usr/share/doc/sed-4.2.2/AUTHORS +usr/share/doc/sed-4.2.2/BUGS +usr/share/doc/sed-4.2.2/COPYING +usr/share/doc/sed-4.2.2/COPYING.DOC +usr/share/doc/sed-4.2.2/NEWS +usr/share/doc/sed-4.2.2/README +usr/share/doc/sed-4.2.2/THANKS +usr/share/doc/sed-4.2.2/sedfaq.txt.gz +usr/share/doc/setup-2.8.71/ +usr/share/doc/setup-2.8.71/COPYING +usr/share/doc/setup-2.8.71/uidgid +usr/share/doc/system-release/ +usr/share/doc/system-release/GPL +usr/share/doc/tzdata-2018i/ +usr/share/doc/tzdata-2018i/README +usr/share/doc/tzdata-2018i/theory.html +usr/share/doc/tzdata-2018i/tz-art.html +usr/share/doc/tzdata-2018i/tz-link.html +usr/share/doc/zlib-1.2.7/ +usr/share/doc/zlib-1.2.7/ChangeLog +usr/share/doc/zlib-1.2.7/FAQ +usr/share/doc/zlib-1.2.7/README +usr/share/empty/ +usr/share/games/ +usr/share/gcc-7/ +usr/share/gcc-7/python/ +usr/share/gcc-7/python/libstdcxx/ +usr/share/gcc-7/python/libstdcxx/__init__.py +usr/share/gcc-7/python/libstdcxx/__init__.pyc +usr/share/gcc-7/python/libstdcxx/__init__.pyo +usr/share/gcc-7/python/libstdcxx/v6/ +usr/share/gcc-7/python/libstdcxx/v6/__init__.py +usr/share/gcc-7/python/libstdcxx/v6/__init__.pyc +usr/share/gcc-7/python/libstdcxx/v6/__init__.pyo +usr/share/gcc-7/python/libstdcxx/v6/printers.py +usr/share/gcc-7/python/libstdcxx/v6/printers.pyc +usr/share/gcc-7/python/libstdcxx/v6/printers.pyo +usr/share/gcc-7/python/libstdcxx/v6/xmethods.py +usr/share/gcc-7/python/libstdcxx/v6/xmethods.pyc +usr/share/gcc-7/python/libstdcxx/v6/xmethods.pyo +usr/share/gdb/ +usr/share/gdb/auto-load/ +usr/share/gdb/auto-load/usr/ +usr/share/gdb/auto-load/usr/lib64/ +usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.24-gdb.py +usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.24-gdb.pyc +usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.24-gdb.pyo +usr/share/ghostscript/ +usr/share/ghostscript/conf.d/ +usr/share/gnome/ +usr/share/i18n/ +usr/share/i18n/charmaps/ +usr/share/i18n/locales/ +usr/share/icons/ +usr/share/idl/ +usr/share/info/ +usr/share/info/bash.info.gz +usr/share/info/coreutils.info.gz +usr/share/info/dir +usr/share/info/gawk.info.gz +usr/share/info/gawkinet.info.gz +usr/share/info/grep.info.gz +usr/share/info/info-stnd.info.gz +usr/share/info/info.info.gz +usr/share/info/sed.info.gz +usr/share/licenses/ +usr/share/licenses/chkconfig-1.7.4/ +usr/share/licenses/chkconfig-1.7.4/COPYING +usr/share/licenses/glibc-2.26/ +usr/share/licenses/glibc-2.26/COPYING +usr/share/licenses/glibc-2.26/COPYING.LIB +usr/share/licenses/glibc-2.26/LICENSES +usr/share/licenses/gmp-6.0.0/ +usr/share/licenses/gmp-6.0.0/COPYING +usr/share/licenses/gmp-6.0.0/COPYING.LESSERv3 +usr/share/licenses/gmp-6.0.0/COPYINGv2 +usr/share/licenses/gmp-6.0.0/COPYINGv3 +usr/share/licenses/krb5-libs-1.15.1/ +usr/share/licenses/krb5-libs-1.15.1/LICENSE +usr/share/licenses/libgcc-7.3.1/ +usr/share/licenses/libgcc-7.3.1/COPYING +usr/share/licenses/libgcc-7.3.1/COPYING.LIB +usr/share/licenses/libgcc-7.3.1/COPYING.RUNTIME +usr/share/licenses/libgcc-7.3.1/COPYING3 +usr/share/licenses/libgcc-7.3.1/COPYING3.LIB +usr/share/licenses/libsepol-2.5/ +usr/share/licenses/libsepol-2.5/COPYING +usr/share/licenses/ncurses-base-6.0/ +usr/share/licenses/ncurses-base-6.0/COPYING +usr/share/licenses/openssl-libs-1.0.2k/ +usr/share/licenses/openssl-libs-1.0.2k/LICENSE +usr/share/locale/ +usr/share/locale/aa/ +usr/share/locale/aa/LC_MESSAGES/ +usr/share/locale/ab/ +usr/share/locale/ab/LC_MESSAGES/ +usr/share/locale/ace/ +usr/share/locale/ace/LC_MESSAGES/ +usr/share/locale/ach/ +usr/share/locale/ach/LC_MESSAGES/ +usr/share/locale/ada/ +usr/share/locale/ada/LC_MESSAGES/ +usr/share/locale/ady/ +usr/share/locale/ady/LC_MESSAGES/ +usr/share/locale/ae/ +usr/share/locale/ae/LC_MESSAGES/ +usr/share/locale/af/ +usr/share/locale/af/LC_MESSAGES/ +usr/share/locale/af/LC_MESSAGES/bash.mo +usr/share/locale/af/LC_MESSAGES/coreutils.mo +usr/share/locale/af/LC_MESSAGES/grep.mo +usr/share/locale/af/LC_MESSAGES/sed.mo +usr/share/locale/af/LC_TIME/ +usr/share/locale/af/LC_TIME/coreutils.mo +usr/share/locale/af_ZA/ +usr/share/locale/af_ZA/LC_MESSAGES/ +usr/share/locale/afa/ +usr/share/locale/afa/LC_MESSAGES/ +usr/share/locale/afh/ +usr/share/locale/afh/LC_MESSAGES/ +usr/share/locale/ain/ +usr/share/locale/ain/LC_MESSAGES/ +usr/share/locale/ak/ +usr/share/locale/ak/LC_MESSAGES/ +usr/share/locale/akk/ +usr/share/locale/akk/LC_MESSAGES/ +usr/share/locale/ale/ +usr/share/locale/ale/LC_MESSAGES/ +usr/share/locale/alg/ +usr/share/locale/alg/LC_MESSAGES/ +usr/share/locale/alt/ +usr/share/locale/alt/LC_MESSAGES/ +usr/share/locale/am/ +usr/share/locale/am/LC_MESSAGES/ +usr/share/locale/am_ET/ +usr/share/locale/am_ET/LC_MESSAGES/ +usr/share/locale/an/ +usr/share/locale/an/LC_MESSAGES/ +usr/share/locale/ang/ +usr/share/locale/ang/LC_MESSAGES/ +usr/share/locale/anp/ +usr/share/locale/anp/LC_MESSAGES/ +usr/share/locale/apa/ +usr/share/locale/apa/LC_MESSAGES/ +usr/share/locale/ar/ +usr/share/locale/ar/LC_MESSAGES/ +usr/share/locale/ar/LC_MESSAGES/chkconfig.mo +usr/share/locale/arc/ +usr/share/locale/arc/LC_MESSAGES/ +usr/share/locale/arn/ +usr/share/locale/arn/LC_MESSAGES/ +usr/share/locale/arp/ +usr/share/locale/arp/LC_MESSAGES/ +usr/share/locale/art/ +usr/share/locale/art/LC_MESSAGES/ +usr/share/locale/arw/ +usr/share/locale/arw/LC_MESSAGES/ +usr/share/locale/as/ +usr/share/locale/as/LC_MESSAGES/ +usr/share/locale/as/LC_MESSAGES/chkconfig.mo +usr/share/locale/ast/ +usr/share/locale/ast/LC_MESSAGES/ +usr/share/locale/ast/LC_MESSAGES/sed.mo +usr/share/locale/ast_ES/ +usr/share/locale/ast_ES/LC_MESSAGES/ +usr/share/locale/ath/ +usr/share/locale/ath/LC_MESSAGES/ +usr/share/locale/aus/ +usr/share/locale/aus/LC_MESSAGES/ +usr/share/locale/av/ +usr/share/locale/av/LC_MESSAGES/ +usr/share/locale/awa/ +usr/share/locale/awa/LC_MESSAGES/ +usr/share/locale/ay/ +usr/share/locale/ay/LC_MESSAGES/ +usr/share/locale/az/ +usr/share/locale/az/LC_MESSAGES/ +usr/share/locale/az_IR/ +usr/share/locale/az_IR/LC_MESSAGES/ +usr/share/locale/ba/ +usr/share/locale/ba/LC_MESSAGES/ +usr/share/locale/bad/ +usr/share/locale/bad/LC_MESSAGES/ +usr/share/locale/bai/ +usr/share/locale/bai/LC_MESSAGES/ +usr/share/locale/bal/ +usr/share/locale/bal/LC_MESSAGES/ +usr/share/locale/bal/LC_MESSAGES/chkconfig.mo +usr/share/locale/ban/ +usr/share/locale/ban/LC_MESSAGES/ +usr/share/locale/bas/ +usr/share/locale/bas/LC_MESSAGES/ +usr/share/locale/bat/ +usr/share/locale/bat/LC_MESSAGES/ +usr/share/locale/be/ +usr/share/locale/be/LC_MESSAGES/ +usr/share/locale/be/LC_MESSAGES/chkconfig.mo +usr/share/locale/be/LC_MESSAGES/coreutils.mo +usr/share/locale/be/LC_MESSAGES/grep.mo +usr/share/locale/be/LC_TIME/ +usr/share/locale/be/LC_TIME/coreutils.mo +usr/share/locale/be@latin/ +usr/share/locale/be@latin/LC_MESSAGES/ +usr/share/locale/bej/ +usr/share/locale/bej/LC_MESSAGES/ +usr/share/locale/bem/ +usr/share/locale/bem/LC_MESSAGES/ +usr/share/locale/ber/ +usr/share/locale/ber/LC_MESSAGES/ +usr/share/locale/bg/ +usr/share/locale/bg/LC_MESSAGES/ +usr/share/locale/bg/LC_MESSAGES/bash.mo +usr/share/locale/bg/LC_MESSAGES/chkconfig.mo +usr/share/locale/bg/LC_MESSAGES/coreutils.mo +usr/share/locale/bg/LC_MESSAGES/grep.mo +usr/share/locale/bg/LC_TIME/ +usr/share/locale/bg/LC_TIME/coreutils.mo +usr/share/locale/bg_BG/ +usr/share/locale/bg_BG/LC_MESSAGES/ +usr/share/locale/bh/ +usr/share/locale/bh/LC_MESSAGES/ +usr/share/locale/bho/ +usr/share/locale/bho/LC_MESSAGES/ +usr/share/locale/bi/ +usr/share/locale/bi/LC_MESSAGES/ +usr/share/locale/bik/ +usr/share/locale/bik/LC_MESSAGES/ +usr/share/locale/bin/ +usr/share/locale/bin/LC_MESSAGES/ +usr/share/locale/bla/ +usr/share/locale/bla/LC_MESSAGES/ +usr/share/locale/bm/ +usr/share/locale/bm/LC_MESSAGES/ +usr/share/locale/bn/ +usr/share/locale/bn/LC_MESSAGES/ +usr/share/locale/bn/LC_MESSAGES/chkconfig.mo +usr/share/locale/bn_IN/ +usr/share/locale/bn_IN/LC_MESSAGES/ +usr/share/locale/bn_IN/LC_MESSAGES/chkconfig.mo +usr/share/locale/bnt/ +usr/share/locale/bnt/LC_MESSAGES/ +usr/share/locale/bo/ +usr/share/locale/bo/LC_MESSAGES/ +usr/share/locale/br/ +usr/share/locale/br/LC_MESSAGES/ +usr/share/locale/bra/ +usr/share/locale/bra/LC_MESSAGES/ +usr/share/locale/brx/ +usr/share/locale/brx/LC_MESSAGES/ +usr/share/locale/bs/ +usr/share/locale/bs/LC_MESSAGES/ +usr/share/locale/bs/LC_MESSAGES/chkconfig.mo +usr/share/locale/btk/ +usr/share/locale/btk/LC_MESSAGES/ +usr/share/locale/bua/ +usr/share/locale/bua/LC_MESSAGES/ +usr/share/locale/bug/ +usr/share/locale/bug/LC_MESSAGES/ +usr/share/locale/byn/ +usr/share/locale/byn/LC_MESSAGES/ +usr/share/locale/ca/ +usr/share/locale/ca/LC_MESSAGES/ +usr/share/locale/ca/LC_MESSAGES/bash.mo +usr/share/locale/ca/LC_MESSAGES/chkconfig.mo +usr/share/locale/ca/LC_MESSAGES/coreutils.mo +usr/share/locale/ca/LC_MESSAGES/grep.mo +usr/share/locale/ca/LC_MESSAGES/sed.mo +usr/share/locale/ca/LC_TIME/ +usr/share/locale/ca/LC_TIME/coreutils.mo +usr/share/locale/ca@valencia/ +usr/share/locale/ca@valencia/LC_MESSAGES/ +usr/share/locale/ca_ES/ +usr/share/locale/ca_ES/LC_MESSAGES/ +usr/share/locale/ca_ES@valencian/ +usr/share/locale/ca_ES@valencian/LC_MESSAGES/ +usr/share/locale/cad/ +usr/share/locale/cad/LC_MESSAGES/ +usr/share/locale/cai/ +usr/share/locale/cai/LC_MESSAGES/ +usr/share/locale/car/ +usr/share/locale/car/LC_MESSAGES/ +usr/share/locale/cau/ +usr/share/locale/cau/LC_MESSAGES/ +usr/share/locale/ce/ +usr/share/locale/ce/LC_MESSAGES/ +usr/share/locale/ceb/ +usr/share/locale/ceb/LC_MESSAGES/ +usr/share/locale/cel/ +usr/share/locale/cel/LC_MESSAGES/ +usr/share/locale/ch/ +usr/share/locale/ch/LC_MESSAGES/ +usr/share/locale/chb/ +usr/share/locale/chb/LC_MESSAGES/ +usr/share/locale/chg/ +usr/share/locale/chg/LC_MESSAGES/ +usr/share/locale/chk/ +usr/share/locale/chk/LC_MESSAGES/ +usr/share/locale/chm/ +usr/share/locale/chm/LC_MESSAGES/ +usr/share/locale/chn/ +usr/share/locale/chn/LC_MESSAGES/ +usr/share/locale/cho/ +usr/share/locale/cho/LC_MESSAGES/ +usr/share/locale/chp/ +usr/share/locale/chp/LC_MESSAGES/ +usr/share/locale/chr/ +usr/share/locale/chr/LC_MESSAGES/ +usr/share/locale/chy/ +usr/share/locale/chy/LC_MESSAGES/ +usr/share/locale/cmc/ +usr/share/locale/cmc/LC_MESSAGES/ +usr/share/locale/co/ +usr/share/locale/co/LC_MESSAGES/ +usr/share/locale/cop/ +usr/share/locale/cop/LC_MESSAGES/ +usr/share/locale/cpe/ +usr/share/locale/cpe/LC_MESSAGES/ +usr/share/locale/cpf/ +usr/share/locale/cpf/LC_MESSAGES/ +usr/share/locale/cpp/ +usr/share/locale/cpp/LC_MESSAGES/ +usr/share/locale/cr/ +usr/share/locale/cr/LC_MESSAGES/ +usr/share/locale/crh/ +usr/share/locale/crh/LC_MESSAGES/ +usr/share/locale/crp/ +usr/share/locale/crp/LC_MESSAGES/ +usr/share/locale/cs/ +usr/share/locale/cs/LC_MESSAGES/ +usr/share/locale/cs/LC_MESSAGES/bash.mo +usr/share/locale/cs/LC_MESSAGES/chkconfig.mo +usr/share/locale/cs/LC_MESSAGES/coreutils.mo +usr/share/locale/cs/LC_MESSAGES/grep.mo +usr/share/locale/cs/LC_MESSAGES/popt.mo +usr/share/locale/cs/LC_MESSAGES/sed.mo +usr/share/locale/cs/LC_TIME/ +usr/share/locale/cs/LC_TIME/coreutils.mo +usr/share/locale/cs_CZ/ +usr/share/locale/cs_CZ/LC_MESSAGES/ +usr/share/locale/csb/ +usr/share/locale/csb/LC_MESSAGES/ +usr/share/locale/cu/ +usr/share/locale/cu/LC_MESSAGES/ +usr/share/locale/cus/ +usr/share/locale/cus/LC_MESSAGES/ +usr/share/locale/cv/ +usr/share/locale/cv/LC_MESSAGES/ +usr/share/locale/cy/ +usr/share/locale/cy/LC_MESSAGES/ +usr/share/locale/cy/LC_MESSAGES/chkconfig.mo +usr/share/locale/da/ +usr/share/locale/da/LC_MESSAGES/ +usr/share/locale/da/LC_MESSAGES/chkconfig.mo +usr/share/locale/da/LC_MESSAGES/coreutils.mo +usr/share/locale/da/LC_MESSAGES/gawk.mo +usr/share/locale/da/LC_MESSAGES/grep.mo +usr/share/locale/da/LC_MESSAGES/popt.mo +usr/share/locale/da/LC_MESSAGES/sed.mo +usr/share/locale/da/LC_TIME/ +usr/share/locale/da/LC_TIME/coreutils.mo +usr/share/locale/dak/ +usr/share/locale/dak/LC_MESSAGES/ +usr/share/locale/dar/ +usr/share/locale/dar/LC_MESSAGES/ +usr/share/locale/day/ +usr/share/locale/day/LC_MESSAGES/ +usr/share/locale/de/ +usr/share/locale/de/LC_MESSAGES/ +usr/share/locale/de/LC_MESSAGES/bash.mo +usr/share/locale/de/LC_MESSAGES/chkconfig.mo +usr/share/locale/de/LC_MESSAGES/coreutils.mo +usr/share/locale/de/LC_MESSAGES/gawk.mo +usr/share/locale/de/LC_MESSAGES/grep.mo +usr/share/locale/de/LC_MESSAGES/libstdc++.mo +usr/share/locale/de/LC_MESSAGES/mit-krb5.mo +usr/share/locale/de/LC_MESSAGES/popt.mo +usr/share/locale/de/LC_MESSAGES/sed.mo +usr/share/locale/de/LC_TIME/ +usr/share/locale/de/LC_TIME/coreutils.mo +usr/share/locale/de_AT/ +usr/share/locale/de_AT/LC_MESSAGES/ +usr/share/locale/de_CH/ +usr/share/locale/de_CH/LC_MESSAGES/ +usr/share/locale/de_DE/ +usr/share/locale/de_DE/LC_MESSAGES/ +usr/share/locale/default/ +usr/share/locale/default/LC_MESSAGES/ +usr/share/locale/del/ +usr/share/locale/del/LC_MESSAGES/ +usr/share/locale/den/ +usr/share/locale/den/LC_MESSAGES/ +usr/share/locale/dgr/ +usr/share/locale/dgr/LC_MESSAGES/ +usr/share/locale/din/ +usr/share/locale/din/LC_MESSAGES/ +usr/share/locale/doi/ +usr/share/locale/doi/LC_MESSAGES/ +usr/share/locale/dra/ +usr/share/locale/dra/LC_MESSAGES/ +usr/share/locale/dsb/ +usr/share/locale/dsb/LC_MESSAGES/ +usr/share/locale/dua/ +usr/share/locale/dua/LC_MESSAGES/ +usr/share/locale/dum/ +usr/share/locale/dum/LC_MESSAGES/ +usr/share/locale/dv/ +usr/share/locale/dv/LC_MESSAGES/ +usr/share/locale/dyu/ +usr/share/locale/dyu/LC_MESSAGES/ +usr/share/locale/dz/ +usr/share/locale/dz/LC_MESSAGES/ +usr/share/locale/ee/ +usr/share/locale/ee/LC_MESSAGES/ +usr/share/locale/efi/ +usr/share/locale/efi/LC_MESSAGES/ +usr/share/locale/egy/ +usr/share/locale/egy/LC_MESSAGES/ +usr/share/locale/eka/ +usr/share/locale/eka/LC_MESSAGES/ +usr/share/locale/el/ +usr/share/locale/el/LC_MESSAGES/ +usr/share/locale/el/LC_MESSAGES/chkconfig.mo +usr/share/locale/el/LC_MESSAGES/coreutils.mo +usr/share/locale/el/LC_MESSAGES/grep.mo +usr/share/locale/el/LC_MESSAGES/sed.mo +usr/share/locale/el/LC_TIME/ +usr/share/locale/el/LC_TIME/coreutils.mo +usr/share/locale/el_GR/ +usr/share/locale/el_GR/LC_MESSAGES/ +usr/share/locale/elx/ +usr/share/locale/elx/LC_MESSAGES/ +usr/share/locale/en/ +usr/share/locale/en/LC_MESSAGES/ +usr/share/locale/en@boldquot/ +usr/share/locale/en@boldquot/LC_MESSAGES/ +usr/share/locale/en@boldquot/LC_MESSAGES/bash.mo +usr/share/locale/en@quot/ +usr/share/locale/en@quot/LC_MESSAGES/ +usr/share/locale/en@quot/LC_MESSAGES/bash.mo +usr/share/locale/en@shaw/ +usr/share/locale/en@shaw/LC_MESSAGES/ +usr/share/locale/en_AU/ +usr/share/locale/en_AU/LC_MESSAGES/ +usr/share/locale/en_CA/ +usr/share/locale/en_CA/LC_MESSAGES/ +usr/share/locale/en_GB/ +usr/share/locale/en_GB/LC_MESSAGES/ +usr/share/locale/en_GB/LC_MESSAGES/chkconfig.mo +usr/share/locale/en_NZ/ +usr/share/locale/en_NZ/LC_MESSAGES/ +usr/share/locale/en_US/ +usr/share/locale/en_US/LC_MESSAGES/ +usr/share/locale/en_US/LC_MESSAGES/mit-krb5.mo +usr/share/locale/enm/ +usr/share/locale/enm/LC_MESSAGES/ +usr/share/locale/eo/ +usr/share/locale/eo/LC_MESSAGES/ +usr/share/locale/eo/LC_MESSAGES/bash.mo +usr/share/locale/eo/LC_MESSAGES/coreutils.mo +usr/share/locale/eo/LC_MESSAGES/grep.mo +usr/share/locale/eo/LC_MESSAGES/sed.mo +usr/share/locale/eo/LC_TIME/ +usr/share/locale/eo/LC_TIME/coreutils.mo +usr/share/locale/es/ +usr/share/locale/es/LC_MESSAGES/ +usr/share/locale/es/LC_MESSAGES/bash.mo +usr/share/locale/es/LC_MESSAGES/chkconfig.mo +usr/share/locale/es/LC_MESSAGES/coreutils.mo +usr/share/locale/es/LC_MESSAGES/gawk.mo +usr/share/locale/es/LC_MESSAGES/grep.mo +usr/share/locale/es/LC_MESSAGES/popt.mo +usr/share/locale/es/LC_MESSAGES/sed.mo +usr/share/locale/es/LC_TIME/ +usr/share/locale/es/LC_TIME/coreutils.mo +usr/share/locale/es_AR/ +usr/share/locale/es_AR/LC_MESSAGES/ +usr/share/locale/es_CL/ +usr/share/locale/es_CL/LC_MESSAGES/ +usr/share/locale/es_CO/ +usr/share/locale/es_CO/LC_MESSAGES/ +usr/share/locale/es_CR/ +usr/share/locale/es_CR/LC_MESSAGES/ +usr/share/locale/es_DO/ +usr/share/locale/es_DO/LC_MESSAGES/ +usr/share/locale/es_EC/ +usr/share/locale/es_EC/LC_MESSAGES/ +usr/share/locale/es_ES/ +usr/share/locale/es_ES/LC_MESSAGES/ +usr/share/locale/es_GT/ +usr/share/locale/es_GT/LC_MESSAGES/ +usr/share/locale/es_HN/ +usr/share/locale/es_HN/LC_MESSAGES/ +usr/share/locale/es_MX/ +usr/share/locale/es_MX/LC_MESSAGES/ +usr/share/locale/es_NI/ +usr/share/locale/es_NI/LC_MESSAGES/ +usr/share/locale/es_PA/ +usr/share/locale/es_PA/LC_MESSAGES/ +usr/share/locale/es_PE/ +usr/share/locale/es_PE/LC_MESSAGES/ +usr/share/locale/es_PR/ +usr/share/locale/es_PR/LC_MESSAGES/ +usr/share/locale/es_SV/ +usr/share/locale/es_SV/LC_MESSAGES/ +usr/share/locale/es_UY/ +usr/share/locale/es_UY/LC_MESSAGES/ +usr/share/locale/es_VE/ +usr/share/locale/es_VE/LC_MESSAGES/ +usr/share/locale/et/ +usr/share/locale/et/LC_MESSAGES/ +usr/share/locale/et/LC_MESSAGES/bash.mo +usr/share/locale/et/LC_MESSAGES/chkconfig.mo +usr/share/locale/et/LC_MESSAGES/coreutils.mo +usr/share/locale/et/LC_MESSAGES/grep.mo +usr/share/locale/et/LC_MESSAGES/sed.mo +usr/share/locale/et/LC_TIME/ +usr/share/locale/et/LC_TIME/coreutils.mo +usr/share/locale/et_EE/ +usr/share/locale/et_EE/LC_MESSAGES/ +usr/share/locale/eu/ +usr/share/locale/eu/LC_MESSAGES/ +usr/share/locale/eu/LC_MESSAGES/chkconfig.mo +usr/share/locale/eu/LC_MESSAGES/coreutils.mo +usr/share/locale/eu/LC_MESSAGES/grep.mo +usr/share/locale/eu/LC_MESSAGES/sed.mo +usr/share/locale/eu/LC_TIME/ +usr/share/locale/eu/LC_TIME/coreutils.mo +usr/share/locale/eu_ES/ +usr/share/locale/eu_ES/LC_MESSAGES/ +usr/share/locale/ewo/ +usr/share/locale/ewo/LC_MESSAGES/ +usr/share/locale/fa/ +usr/share/locale/fa/LC_MESSAGES/ +usr/share/locale/fa/LC_MESSAGES/chkconfig.mo +usr/share/locale/fa_IR/ +usr/share/locale/fa_IR/LC_MESSAGES/ +usr/share/locale/fan/ +usr/share/locale/fan/LC_MESSAGES/ +usr/share/locale/fat/ +usr/share/locale/fat/LC_MESSAGES/ +usr/share/locale/ff/ +usr/share/locale/ff/LC_MESSAGES/ +usr/share/locale/fi/ +usr/share/locale/fi/LC_MESSAGES/ +usr/share/locale/fi/LC_MESSAGES/bash.mo +usr/share/locale/fi/LC_MESSAGES/chkconfig.mo +usr/share/locale/fi/LC_MESSAGES/coreutils.mo +usr/share/locale/fi/LC_MESSAGES/gawk.mo +usr/share/locale/fi/LC_MESSAGES/grep.mo +usr/share/locale/fi/LC_MESSAGES/sed.mo +usr/share/locale/fi/LC_TIME/ +usr/share/locale/fi/LC_TIME/coreutils.mo +usr/share/locale/fi_FI/ +usr/share/locale/fi_FI/LC_MESSAGES/ +usr/share/locale/fil/ +usr/share/locale/fil/LC_MESSAGES/ +usr/share/locale/fiu/ +usr/share/locale/fiu/LC_MESSAGES/ +usr/share/locale/fj/ +usr/share/locale/fj/LC_MESSAGES/ +usr/share/locale/fo/ +usr/share/locale/fo/LC_MESSAGES/ +usr/share/locale/fon/ +usr/share/locale/fon/LC_MESSAGES/ +usr/share/locale/fr/ +usr/share/locale/fr/LC_MESSAGES/ +usr/share/locale/fr/LC_MESSAGES/bash.mo +usr/share/locale/fr/LC_MESSAGES/chkconfig.mo +usr/share/locale/fr/LC_MESSAGES/coreutils.mo +usr/share/locale/fr/LC_MESSAGES/gawk.mo +usr/share/locale/fr/LC_MESSAGES/grep.mo +usr/share/locale/fr/LC_MESSAGES/libstdc++.mo +usr/share/locale/fr/LC_MESSAGES/popt.mo +usr/share/locale/fr/LC_MESSAGES/sed.mo +usr/share/locale/fr/LC_TIME/ +usr/share/locale/fr/LC_TIME/coreutils.mo +usr/share/locale/fr_BE/ +usr/share/locale/fr_BE/LC_MESSAGES/ +usr/share/locale/fr_CA/ +usr/share/locale/fr_CA/LC_MESSAGES/ +usr/share/locale/fr_CH/ +usr/share/locale/fr_CH/LC_MESSAGES/ +usr/share/locale/fr_FR/ +usr/share/locale/fr_FR/LC_MESSAGES/ +usr/share/locale/frm/ +usr/share/locale/frm/LC_MESSAGES/ +usr/share/locale/fro/ +usr/share/locale/fro/LC_MESSAGES/ +usr/share/locale/frr/ +usr/share/locale/frr/LC_MESSAGES/ +usr/share/locale/frs/ +usr/share/locale/frs/LC_MESSAGES/ +usr/share/locale/fur/ +usr/share/locale/fur/LC_MESSAGES/ +usr/share/locale/fy/ +usr/share/locale/fy/LC_MESSAGES/ +usr/share/locale/ga/ +usr/share/locale/ga/LC_MESSAGES/ +usr/share/locale/ga/LC_MESSAGES/bash.mo +usr/share/locale/ga/LC_MESSAGES/coreutils.mo +usr/share/locale/ga/LC_MESSAGES/grep.mo +usr/share/locale/ga/LC_MESSAGES/popt.mo +usr/share/locale/ga/LC_MESSAGES/sed.mo +usr/share/locale/ga/LC_TIME/ +usr/share/locale/ga/LC_TIME/coreutils.mo +usr/share/locale/gaa/ +usr/share/locale/gaa/LC_MESSAGES/ +usr/share/locale/gay/ +usr/share/locale/gay/LC_MESSAGES/ +usr/share/locale/gba/ +usr/share/locale/gba/LC_MESSAGES/ +usr/share/locale/gd/ +usr/share/locale/gd/LC_MESSAGES/ +usr/share/locale/gem/ +usr/share/locale/gem/LC_MESSAGES/ +usr/share/locale/gez/ +usr/share/locale/gez/LC_MESSAGES/ +usr/share/locale/gil/ +usr/share/locale/gil/LC_MESSAGES/ +usr/share/locale/gl/ +usr/share/locale/gl/LC_MESSAGES/ +usr/share/locale/gl/LC_MESSAGES/chkconfig.mo +usr/share/locale/gl/LC_MESSAGES/coreutils.mo +usr/share/locale/gl/LC_MESSAGES/grep.mo +usr/share/locale/gl/LC_MESSAGES/popt.mo +usr/share/locale/gl/LC_MESSAGES/sed.mo +usr/share/locale/gl/LC_TIME/ +usr/share/locale/gl/LC_TIME/coreutils.mo +usr/share/locale/gl_ES/ +usr/share/locale/gl_ES/LC_MESSAGES/ +usr/share/locale/gmh/ +usr/share/locale/gmh/LC_MESSAGES/ +usr/share/locale/gn/ +usr/share/locale/gn/LC_MESSAGES/ +usr/share/locale/goh/ +usr/share/locale/goh/LC_MESSAGES/ +usr/share/locale/gon/ +usr/share/locale/gon/LC_MESSAGES/ +usr/share/locale/gor/ +usr/share/locale/gor/LC_MESSAGES/ +usr/share/locale/got/ +usr/share/locale/got/LC_MESSAGES/ +usr/share/locale/grb/ +usr/share/locale/grb/LC_MESSAGES/ +usr/share/locale/grc/ +usr/share/locale/grc/LC_MESSAGES/ +usr/share/locale/gsw/ +usr/share/locale/gsw/LC_MESSAGES/ +usr/share/locale/gu/ +usr/share/locale/gu/LC_MESSAGES/ +usr/share/locale/gu/LC_MESSAGES/chkconfig.mo +usr/share/locale/gv/ +usr/share/locale/gv/LC_MESSAGES/ +usr/share/locale/gwi/ +usr/share/locale/gwi/LC_MESSAGES/ +usr/share/locale/ha/ +usr/share/locale/ha/LC_MESSAGES/ +usr/share/locale/hai/ +usr/share/locale/hai/LC_MESSAGES/ +usr/share/locale/haw/ +usr/share/locale/haw/LC_MESSAGES/ +usr/share/locale/he/ +usr/share/locale/he/LC_MESSAGES/ +usr/share/locale/he/LC_MESSAGES/chkconfig.mo +usr/share/locale/he/LC_MESSAGES/grep.mo +usr/share/locale/he/LC_MESSAGES/sed.mo +usr/share/locale/he_IL/ +usr/share/locale/he_IL/LC_MESSAGES/ +usr/share/locale/hi/ +usr/share/locale/hi/LC_MESSAGES/ +usr/share/locale/hi/LC_MESSAGES/chkconfig.mo +usr/share/locale/hil/ +usr/share/locale/hil/LC_MESSAGES/ +usr/share/locale/him/ +usr/share/locale/him/LC_MESSAGES/ +usr/share/locale/hit/ +usr/share/locale/hit/LC_MESSAGES/ +usr/share/locale/hmn/ +usr/share/locale/hmn/LC_MESSAGES/ +usr/share/locale/ho/ +usr/share/locale/ho/LC_MESSAGES/ +usr/share/locale/hr/ +usr/share/locale/hr/LC_MESSAGES/ +usr/share/locale/hr/LC_MESSAGES/chkconfig.mo +usr/share/locale/hr/LC_MESSAGES/coreutils.mo +usr/share/locale/hr/LC_MESSAGES/grep.mo +usr/share/locale/hr/LC_MESSAGES/sed.mo +usr/share/locale/hr/LC_TIME/ +usr/share/locale/hr/LC_TIME/coreutils.mo +usr/share/locale/hr_HR/ +usr/share/locale/hr_HR/LC_MESSAGES/ +usr/share/locale/hsb/ +usr/share/locale/hsb/LC_MESSAGES/ +usr/share/locale/ht/ +usr/share/locale/ht/LC_MESSAGES/ +usr/share/locale/hu/ +usr/share/locale/hu/LC_MESSAGES/ +usr/share/locale/hu/LC_MESSAGES/bash.mo +usr/share/locale/hu/LC_MESSAGES/chkconfig.mo +usr/share/locale/hu/LC_MESSAGES/coreutils.mo +usr/share/locale/hu/LC_MESSAGES/grep.mo +usr/share/locale/hu/LC_MESSAGES/popt.mo +usr/share/locale/hu/LC_MESSAGES/sed.mo +usr/share/locale/hu/LC_TIME/ +usr/share/locale/hu/LC_TIME/coreutils.mo +usr/share/locale/hu_HU/ +usr/share/locale/hu_HU/LC_MESSAGES/ +usr/share/locale/hup/ +usr/share/locale/hup/LC_MESSAGES/ +usr/share/locale/hy/ +usr/share/locale/hy/LC_MESSAGES/ +usr/share/locale/hy/LC_MESSAGES/chkconfig.mo +usr/share/locale/hz/ +usr/share/locale/hz/LC_MESSAGES/ +usr/share/locale/ia/ +usr/share/locale/ia/LC_MESSAGES/ +usr/share/locale/ia/LC_MESSAGES/chkconfig.mo +usr/share/locale/ia/LC_MESSAGES/coreutils.mo +usr/share/locale/ia/LC_TIME/ +usr/share/locale/ia/LC_TIME/coreutils.mo +usr/share/locale/iba/ +usr/share/locale/iba/LC_MESSAGES/ +usr/share/locale/id/ +usr/share/locale/id/LC_MESSAGES/ +usr/share/locale/id/LC_MESSAGES/bash.mo +usr/share/locale/id/LC_MESSAGES/chkconfig.mo +usr/share/locale/id/LC_MESSAGES/coreutils.mo +usr/share/locale/id/LC_MESSAGES/grep.mo +usr/share/locale/id/LC_MESSAGES/sed.mo +usr/share/locale/id/LC_TIME/ +usr/share/locale/id/LC_TIME/coreutils.mo +usr/share/locale/ie/ +usr/share/locale/ie/LC_MESSAGES/ +usr/share/locale/ig/ +usr/share/locale/ig/LC_MESSAGES/ +usr/share/locale/ii/ +usr/share/locale/ii/LC_MESSAGES/ +usr/share/locale/ijo/ +usr/share/locale/ijo/LC_MESSAGES/ +usr/share/locale/ik/ +usr/share/locale/ik/LC_MESSAGES/ +usr/share/locale/ilo/ +usr/share/locale/ilo/LC_MESSAGES/ +usr/share/locale/inc/ +usr/share/locale/inc/LC_MESSAGES/ +usr/share/locale/ine/ +usr/share/locale/ine/LC_MESSAGES/ +usr/share/locale/inh/ +usr/share/locale/inh/LC_MESSAGES/ +usr/share/locale/io/ +usr/share/locale/io/LC_MESSAGES/ +usr/share/locale/ira/ +usr/share/locale/ira/LC_MESSAGES/ +usr/share/locale/iro/ +usr/share/locale/iro/LC_MESSAGES/ +usr/share/locale/is/ +usr/share/locale/is/LC_MESSAGES/ +usr/share/locale/is/LC_MESSAGES/chkconfig.mo +usr/share/locale/is/LC_MESSAGES/popt.mo +usr/share/locale/it/ +usr/share/locale/it/LC_MESSAGES/ +usr/share/locale/it/LC_MESSAGES/chkconfig.mo +usr/share/locale/it/LC_MESSAGES/coreutils.mo +usr/share/locale/it/LC_MESSAGES/gawk.mo +usr/share/locale/it/LC_MESSAGES/grep.mo +usr/share/locale/it/LC_MESSAGES/popt.mo +usr/share/locale/it/LC_MESSAGES/sed.mo +usr/share/locale/it/LC_TIME/ +usr/share/locale/it/LC_TIME/coreutils.mo +usr/share/locale/it_CH/ +usr/share/locale/it_CH/LC_MESSAGES/ +usr/share/locale/it_IT/ +usr/share/locale/it_IT/LC_MESSAGES/ +usr/share/locale/iu/ +usr/share/locale/iu/LC_MESSAGES/ +usr/share/locale/ja/ +usr/share/locale/ja/LC_MESSAGES/ +usr/share/locale/ja/LC_MESSAGES/bash.mo +usr/share/locale/ja/LC_MESSAGES/chkconfig.mo +usr/share/locale/ja/LC_MESSAGES/coreutils.mo +usr/share/locale/ja/LC_MESSAGES/gawk.mo +usr/share/locale/ja/LC_MESSAGES/grep.mo +usr/share/locale/ja/LC_MESSAGES/popt.mo +usr/share/locale/ja/LC_MESSAGES/sed.mo +usr/share/locale/ja/LC_TIME/ +usr/share/locale/ja/LC_TIME/coreutils.mo +usr/share/locale/ja_JP/ +usr/share/locale/ja_JP/LC_MESSAGES/ +usr/share/locale/jbo/ +usr/share/locale/jbo/LC_MESSAGES/ +usr/share/locale/jpr/ +usr/share/locale/jpr/LC_MESSAGES/ +usr/share/locale/jrb/ +usr/share/locale/jrb/LC_MESSAGES/ +usr/share/locale/jv/ +usr/share/locale/jv/LC_MESSAGES/ +usr/share/locale/ka/ +usr/share/locale/ka/LC_MESSAGES/ +usr/share/locale/ka/LC_MESSAGES/chkconfig.mo +usr/share/locale/kaa/ +usr/share/locale/kaa/LC_MESSAGES/ +usr/share/locale/kab/ +usr/share/locale/kab/LC_MESSAGES/ +usr/share/locale/kac/ +usr/share/locale/kac/LC_MESSAGES/ +usr/share/locale/kam/ +usr/share/locale/kam/LC_MESSAGES/ +usr/share/locale/kar/ +usr/share/locale/kar/LC_MESSAGES/ +usr/share/locale/kaw/ +usr/share/locale/kaw/LC_MESSAGES/ +usr/share/locale/kbd/ +usr/share/locale/kbd/LC_MESSAGES/ +usr/share/locale/kg/ +usr/share/locale/kg/LC_MESSAGES/ +usr/share/locale/kha/ +usr/share/locale/kha/LC_MESSAGES/ +usr/share/locale/khi/ +usr/share/locale/khi/LC_MESSAGES/ +usr/share/locale/kho/ +usr/share/locale/kho/LC_MESSAGES/ +usr/share/locale/ki/ +usr/share/locale/ki/LC_MESSAGES/ +usr/share/locale/kj/ +usr/share/locale/kj/LC_MESSAGES/ +usr/share/locale/kk/ +usr/share/locale/kk/LC_MESSAGES/ +usr/share/locale/kk/LC_MESSAGES/coreutils.mo +usr/share/locale/kk/LC_TIME/ +usr/share/locale/kk/LC_TIME/coreutils.mo +usr/share/locale/kl/ +usr/share/locale/kl/LC_MESSAGES/ +usr/share/locale/km/ +usr/share/locale/km/LC_MESSAGES/ +usr/share/locale/km/LC_MESSAGES/chkconfig.mo +usr/share/locale/kmb/ +usr/share/locale/kmb/LC_MESSAGES/ +usr/share/locale/kn/ +usr/share/locale/kn/LC_MESSAGES/ +usr/share/locale/kn/LC_MESSAGES/chkconfig.mo +usr/share/locale/ko/ +usr/share/locale/ko/LC_MESSAGES/ +usr/share/locale/ko/LC_MESSAGES/chkconfig.mo +usr/share/locale/ko/LC_MESSAGES/coreutils.mo +usr/share/locale/ko/LC_MESSAGES/grep.mo +usr/share/locale/ko/LC_MESSAGES/popt.mo +usr/share/locale/ko/LC_MESSAGES/sed.mo +usr/share/locale/ko/LC_TIME/ +usr/share/locale/ko/LC_TIME/coreutils.mo +usr/share/locale/ko_KR/ +usr/share/locale/ko_KR/LC_MESSAGES/ +usr/share/locale/kok/ +usr/share/locale/kok/LC_MESSAGES/ +usr/share/locale/kos/ +usr/share/locale/kos/LC_MESSAGES/ +usr/share/locale/kpe/ +usr/share/locale/kpe/LC_MESSAGES/ +usr/share/locale/kr/ +usr/share/locale/kr/LC_MESSAGES/ +usr/share/locale/krc/ +usr/share/locale/krc/LC_MESSAGES/ +usr/share/locale/krl/ +usr/share/locale/krl/LC_MESSAGES/ +usr/share/locale/kro/ +usr/share/locale/kro/LC_MESSAGES/ +usr/share/locale/kru/ +usr/share/locale/kru/LC_MESSAGES/ +usr/share/locale/ks/ +usr/share/locale/ks/LC_MESSAGES/ +usr/share/locale/ks@devanagari/ +usr/share/locale/ks@devanagari/LC_MESSAGES/ +usr/share/locale/ku/ +usr/share/locale/ku/LC_MESSAGES/ +usr/share/locale/ku/LC_MESSAGES/chkconfig.mo +usr/share/locale/kum/ +usr/share/locale/kum/LC_MESSAGES/ +usr/share/locale/kut/ +usr/share/locale/kut/LC_MESSAGES/ +usr/share/locale/kv/ +usr/share/locale/kv/LC_MESSAGES/ +usr/share/locale/kw/ +usr/share/locale/kw/LC_MESSAGES/ +usr/share/locale/ky/ +usr/share/locale/ky/LC_MESSAGES/ +usr/share/locale/ky/LC_MESSAGES/grep.mo +usr/share/locale/la/ +usr/share/locale/la/LC_MESSAGES/ +usr/share/locale/lad/ +usr/share/locale/lad/LC_MESSAGES/ +usr/share/locale/lah/ +usr/share/locale/lah/LC_MESSAGES/ +usr/share/locale/lam/ +usr/share/locale/lam/LC_MESSAGES/ +usr/share/locale/lb/ +usr/share/locale/lb/LC_MESSAGES/ +usr/share/locale/lez/ +usr/share/locale/lez/LC_MESSAGES/ +usr/share/locale/lg/ +usr/share/locale/lg/LC_MESSAGES/ +usr/share/locale/lg/LC_MESSAGES/coreutils.mo +usr/share/locale/lg/LC_TIME/ +usr/share/locale/lg/LC_TIME/coreutils.mo +usr/share/locale/li/ +usr/share/locale/li/LC_MESSAGES/ +usr/share/locale/ln/ +usr/share/locale/ln/LC_MESSAGES/ +usr/share/locale/lo/ +usr/share/locale/lo/LC_MESSAGES/ +usr/share/locale/lo/LC_MESSAGES/chkconfig.mo +usr/share/locale/locale.alias +usr/share/locale/lol/ +usr/share/locale/lol/LC_MESSAGES/ +usr/share/locale/loz/ +usr/share/locale/loz/LC_MESSAGES/ +usr/share/locale/lt/ +usr/share/locale/lt/LC_MESSAGES/ +usr/share/locale/lt/LC_MESSAGES/bash.mo +usr/share/locale/lt/LC_MESSAGES/coreutils.mo +usr/share/locale/lt/LC_MESSAGES/grep.mo +usr/share/locale/lt/LC_TIME/ +usr/share/locale/lt/LC_TIME/coreutils.mo +usr/share/locale/lu/ +usr/share/locale/lu/LC_MESSAGES/ +usr/share/locale/lua/ +usr/share/locale/lua/LC_MESSAGES/ +usr/share/locale/lui/ +usr/share/locale/lui/LC_MESSAGES/ +usr/share/locale/lun/ +usr/share/locale/lun/LC_MESSAGES/ +usr/share/locale/luo/ +usr/share/locale/luo/LC_MESSAGES/ +usr/share/locale/lus/ +usr/share/locale/lus/LC_MESSAGES/ +usr/share/locale/lv/ +usr/share/locale/lv/LC_MESSAGES/ +usr/share/locale/lv/LC_MESSAGES/chkconfig.mo +usr/share/locale/lv_LV/ +usr/share/locale/lv_LV/LC_MESSAGES/ +usr/share/locale/mad/ +usr/share/locale/mad/LC_MESSAGES/ +usr/share/locale/mag/ +usr/share/locale/mag/LC_MESSAGES/ +usr/share/locale/mai/ +usr/share/locale/mai/LC_MESSAGES/ +usr/share/locale/mai/LC_MESSAGES/chkconfig.mo +usr/share/locale/mak/ +usr/share/locale/mak/LC_MESSAGES/ +usr/share/locale/man/ +usr/share/locale/man/LC_MESSAGES/ +usr/share/locale/map/ +usr/share/locale/map/LC_MESSAGES/ +usr/share/locale/mas/ +usr/share/locale/mas/LC_MESSAGES/ +usr/share/locale/mdf/ +usr/share/locale/mdf/LC_MESSAGES/ +usr/share/locale/mdr/ +usr/share/locale/mdr/LC_MESSAGES/ +usr/share/locale/men/ +usr/share/locale/men/LC_MESSAGES/ +usr/share/locale/mg/ +usr/share/locale/mg/LC_MESSAGES/ +usr/share/locale/mga/ +usr/share/locale/mga/LC_MESSAGES/ +usr/share/locale/mh/ +usr/share/locale/mh/LC_MESSAGES/ +usr/share/locale/mi/ +usr/share/locale/mi/LC_MESSAGES/ +usr/share/locale/mic/ +usr/share/locale/mic/LC_MESSAGES/ +usr/share/locale/min/ +usr/share/locale/min/LC_MESSAGES/ +usr/share/locale/mis/ +usr/share/locale/mis/LC_MESSAGES/ +usr/share/locale/mk/ +usr/share/locale/mk/LC_MESSAGES/ +usr/share/locale/mk/LC_MESSAGES/chkconfig.mo +usr/share/locale/mkh/ +usr/share/locale/mkh/LC_MESSAGES/ +usr/share/locale/ml/ +usr/share/locale/ml/LC_MESSAGES/ +usr/share/locale/ml/LC_MESSAGES/chkconfig.mo +usr/share/locale/mn/ +usr/share/locale/mn/LC_MESSAGES/ +usr/share/locale/mnc/ +usr/share/locale/mnc/LC_MESSAGES/ +usr/share/locale/mni/ +usr/share/locale/mni/LC_MESSAGES/ +usr/share/locale/mno/ +usr/share/locale/mno/LC_MESSAGES/ +usr/share/locale/mo/ +usr/share/locale/mo/LC_MESSAGES/ +usr/share/locale/moh/ +usr/share/locale/moh/LC_MESSAGES/ +usr/share/locale/mos/ +usr/share/locale/mos/LC_MESSAGES/ +usr/share/locale/mr/ +usr/share/locale/mr/LC_MESSAGES/ +usr/share/locale/mr/LC_MESSAGES/chkconfig.mo +usr/share/locale/ms/ +usr/share/locale/ms/LC_MESSAGES/ +usr/share/locale/ms/LC_MESSAGES/chkconfig.mo +usr/share/locale/ms/LC_MESSAGES/coreutils.mo +usr/share/locale/ms/LC_TIME/ +usr/share/locale/ms/LC_TIME/coreutils.mo +usr/share/locale/ms_MY/ +usr/share/locale/ms_MY/LC_MESSAGES/ +usr/share/locale/mt/ +usr/share/locale/mt/LC_MESSAGES/ +usr/share/locale/mul/ +usr/share/locale/mul/LC_MESSAGES/ +usr/share/locale/mun/ +usr/share/locale/mun/LC_MESSAGES/ +usr/share/locale/mus/ +usr/share/locale/mus/LC_MESSAGES/ +usr/share/locale/mwl/ +usr/share/locale/mwl/LC_MESSAGES/ +usr/share/locale/mwr/ +usr/share/locale/mwr/LC_MESSAGES/ +usr/share/locale/my/ +usr/share/locale/my/LC_MESSAGES/ +usr/share/locale/my/LC_MESSAGES/chkconfig.mo +usr/share/locale/my_MM/ +usr/share/locale/my_MM/LC_MESSAGES/ +usr/share/locale/myn/ +usr/share/locale/myn/LC_MESSAGES/ +usr/share/locale/myv/ +usr/share/locale/myv/LC_MESSAGES/ +usr/share/locale/na/ +usr/share/locale/na/LC_MESSAGES/ +usr/share/locale/nah/ +usr/share/locale/nah/LC_MESSAGES/ +usr/share/locale/nai/ +usr/share/locale/nai/LC_MESSAGES/ +usr/share/locale/nap/ +usr/share/locale/nap/LC_MESSAGES/ +usr/share/locale/nb/ +usr/share/locale/nb/LC_MESSAGES/ +usr/share/locale/nb/LC_MESSAGES/chkconfig.mo +usr/share/locale/nb/LC_MESSAGES/coreutils.mo +usr/share/locale/nb/LC_MESSAGES/grep.mo +usr/share/locale/nb/LC_MESSAGES/popt.mo +usr/share/locale/nb/LC_MESSAGES/sed.mo +usr/share/locale/nb/LC_TIME/ +usr/share/locale/nb/LC_TIME/coreutils.mo +usr/share/locale/nb_NO/ +usr/share/locale/nb_NO/LC_MESSAGES/ +usr/share/locale/nd/ +usr/share/locale/nd/LC_MESSAGES/ +usr/share/locale/nds/ +usr/share/locale/nds/LC_MESSAGES/ +usr/share/locale/nds/LC_MESSAGES/chkconfig.mo +usr/share/locale/nds@NFE/ +usr/share/locale/nds@NFE/LC_MESSAGES/ +usr/share/locale/nds_DE/ +usr/share/locale/nds_DE/LC_MESSAGES/ +usr/share/locale/ne/ +usr/share/locale/ne/LC_MESSAGES/ +usr/share/locale/new/ +usr/share/locale/new/LC_MESSAGES/ +usr/share/locale/ng/ +usr/share/locale/ng/LC_MESSAGES/ +usr/share/locale/nia/ +usr/share/locale/nia/LC_MESSAGES/ +usr/share/locale/nic/ +usr/share/locale/nic/LC_MESSAGES/ +usr/share/locale/niu/ +usr/share/locale/niu/LC_MESSAGES/ +usr/share/locale/nl/ +usr/share/locale/nl/LC_MESSAGES/ +usr/share/locale/nl/LC_MESSAGES/bash.mo +usr/share/locale/nl/LC_MESSAGES/chkconfig.mo +usr/share/locale/nl/LC_MESSAGES/coreutils.mo +usr/share/locale/nl/LC_MESSAGES/gawk.mo +usr/share/locale/nl/LC_MESSAGES/grep.mo +usr/share/locale/nl/LC_MESSAGES/popt.mo +usr/share/locale/nl/LC_MESSAGES/sed.mo +usr/share/locale/nl/LC_TIME/ +usr/share/locale/nl/LC_TIME/coreutils.mo +usr/share/locale/nl_BE/ +usr/share/locale/nl_BE/LC_MESSAGES/ +usr/share/locale/nl_NL/ +usr/share/locale/nl_NL/LC_MESSAGES/ +usr/share/locale/nn/ +usr/share/locale/nn/LC_MESSAGES/ +usr/share/locale/nn/LC_MESSAGES/chkconfig.mo +usr/share/locale/no/ +usr/share/locale/no/LC_MESSAGES/ +usr/share/locale/nog/ +usr/share/locale/nog/LC_MESSAGES/ +usr/share/locale/non/ +usr/share/locale/non/LC_MESSAGES/ +usr/share/locale/nqo/ +usr/share/locale/nqo/LC_MESSAGES/ +usr/share/locale/nr/ +usr/share/locale/nr/LC_MESSAGES/ +usr/share/locale/nso/ +usr/share/locale/nso/LC_MESSAGES/ +usr/share/locale/nub/ +usr/share/locale/nub/LC_MESSAGES/ +usr/share/locale/nv/ +usr/share/locale/nv/LC_MESSAGES/ +usr/share/locale/nwc/ +usr/share/locale/nwc/LC_MESSAGES/ +usr/share/locale/ny/ +usr/share/locale/ny/LC_MESSAGES/ +usr/share/locale/nym/ +usr/share/locale/nym/LC_MESSAGES/ +usr/share/locale/nyn/ +usr/share/locale/nyn/LC_MESSAGES/ +usr/share/locale/nyo/ +usr/share/locale/nyo/LC_MESSAGES/ +usr/share/locale/nzi/ +usr/share/locale/nzi/LC_MESSAGES/ +usr/share/locale/oc/ +usr/share/locale/oc/LC_MESSAGES/ +usr/share/locale/oj/ +usr/share/locale/oj/LC_MESSAGES/ +usr/share/locale/om/ +usr/share/locale/om/LC_MESSAGES/ +usr/share/locale/or/ +usr/share/locale/or/LC_MESSAGES/ +usr/share/locale/or/LC_MESSAGES/chkconfig.mo +usr/share/locale/os/ +usr/share/locale/os/LC_MESSAGES/ +usr/share/locale/osa/ +usr/share/locale/osa/LC_MESSAGES/ +usr/share/locale/ota/ +usr/share/locale/ota/LC_MESSAGES/ +usr/share/locale/oto/ +usr/share/locale/oto/LC_MESSAGES/ +usr/share/locale/pa/ +usr/share/locale/pa/LC_MESSAGES/ +usr/share/locale/pa/LC_MESSAGES/chkconfig.mo +usr/share/locale/pa/LC_MESSAGES/grep.mo +usr/share/locale/paa/ +usr/share/locale/paa/LC_MESSAGES/ +usr/share/locale/pag/ +usr/share/locale/pag/LC_MESSAGES/ +usr/share/locale/pal/ +usr/share/locale/pal/LC_MESSAGES/ +usr/share/locale/pam/ +usr/share/locale/pam/LC_MESSAGES/ +usr/share/locale/pap/ +usr/share/locale/pap/LC_MESSAGES/ +usr/share/locale/pau/ +usr/share/locale/pau/LC_MESSAGES/ +usr/share/locale/peo/ +usr/share/locale/peo/LC_MESSAGES/ +usr/share/locale/phi/ +usr/share/locale/phi/LC_MESSAGES/ +usr/share/locale/phn/ +usr/share/locale/phn/LC_MESSAGES/ +usr/share/locale/pi/ +usr/share/locale/pi/LC_MESSAGES/ +usr/share/locale/pl/ +usr/share/locale/pl/LC_MESSAGES/ +usr/share/locale/pl/LC_MESSAGES/bash.mo +usr/share/locale/pl/LC_MESSAGES/chkconfig.mo +usr/share/locale/pl/LC_MESSAGES/coreutils.mo +usr/share/locale/pl/LC_MESSAGES/gawk.mo +usr/share/locale/pl/LC_MESSAGES/grep.mo +usr/share/locale/pl/LC_MESSAGES/popt.mo +usr/share/locale/pl/LC_MESSAGES/sed.mo +usr/share/locale/pl/LC_TIME/ +usr/share/locale/pl/LC_TIME/coreutils.mo +usr/share/locale/pl_PL/ +usr/share/locale/pl_PL/LC_MESSAGES/ +usr/share/locale/pon/ +usr/share/locale/pon/LC_MESSAGES/ +usr/share/locale/pra/ +usr/share/locale/pra/LC_MESSAGES/ +usr/share/locale/pro/ +usr/share/locale/pro/LC_MESSAGES/ +usr/share/locale/ps/ +usr/share/locale/ps/LC_MESSAGES/ +usr/share/locale/pt/ +usr/share/locale/pt/LC_MESSAGES/ +usr/share/locale/pt/LC_MESSAGES/chkconfig.mo +usr/share/locale/pt/LC_MESSAGES/coreutils.mo +usr/share/locale/pt/LC_MESSAGES/grep.mo +usr/share/locale/pt/LC_MESSAGES/popt.mo +usr/share/locale/pt/LC_MESSAGES/sed.mo +usr/share/locale/pt/LC_TIME/ +usr/share/locale/pt/LC_TIME/coreutils.mo +usr/share/locale/pt_BR/ +usr/share/locale/pt_BR/LC_MESSAGES/ +usr/share/locale/pt_BR/LC_MESSAGES/bash.mo +usr/share/locale/pt_BR/LC_MESSAGES/chkconfig.mo +usr/share/locale/pt_BR/LC_MESSAGES/coreutils.mo +usr/share/locale/pt_BR/LC_MESSAGES/grep.mo +usr/share/locale/pt_BR/LC_MESSAGES/sed.mo +usr/share/locale/pt_BR/LC_TIME/ +usr/share/locale/pt_BR/LC_TIME/coreutils.mo +usr/share/locale/pt_PT/ +usr/share/locale/pt_PT/LC_MESSAGES/ +usr/share/locale/qaa-qtz/ +usr/share/locale/qaa-qtz/LC_MESSAGES/ +usr/share/locale/qu/ +usr/share/locale/qu/LC_MESSAGES/ +usr/share/locale/raj/ +usr/share/locale/raj/LC_MESSAGES/ +usr/share/locale/rap/ +usr/share/locale/rap/LC_MESSAGES/ +usr/share/locale/rar/ +usr/share/locale/rar/LC_MESSAGES/ +usr/share/locale/rm/ +usr/share/locale/rm/LC_MESSAGES/ +usr/share/locale/rn/ +usr/share/locale/rn/LC_MESSAGES/ +usr/share/locale/ro/ +usr/share/locale/ro/LC_MESSAGES/ +usr/share/locale/ro/LC_MESSAGES/bash.mo +usr/share/locale/ro/LC_MESSAGES/chkconfig.mo +usr/share/locale/ro/LC_MESSAGES/coreutils.mo +usr/share/locale/ro/LC_MESSAGES/grep.mo +usr/share/locale/ro/LC_MESSAGES/popt.mo +usr/share/locale/ro/LC_MESSAGES/sed.mo +usr/share/locale/ro/LC_TIME/ +usr/share/locale/ro/LC_TIME/coreutils.mo +usr/share/locale/roa/ +usr/share/locale/roa/LC_MESSAGES/ +usr/share/locale/rom/ +usr/share/locale/rom/LC_MESSAGES/ +usr/share/locale/ru/ +usr/share/locale/ru/LC_MESSAGES/ +usr/share/locale/ru/LC_MESSAGES/bash.mo +usr/share/locale/ru/LC_MESSAGES/chkconfig.mo +usr/share/locale/ru/LC_MESSAGES/coreutils.mo +usr/share/locale/ru/LC_MESSAGES/grep.mo +usr/share/locale/ru/LC_MESSAGES/popt.mo +usr/share/locale/ru/LC_MESSAGES/sed.mo +usr/share/locale/ru/LC_TIME/ +usr/share/locale/ru/LC_TIME/coreutils.mo +usr/share/locale/ru_RU/ +usr/share/locale/ru_RU/LC_MESSAGES/ +usr/share/locale/rup/ +usr/share/locale/rup/LC_MESSAGES/ +usr/share/locale/rw/ +usr/share/locale/rw/LC_MESSAGES/ +usr/share/locale/sa/ +usr/share/locale/sa/LC_MESSAGES/ +usr/share/locale/sad/ +usr/share/locale/sad/LC_MESSAGES/ +usr/share/locale/sah/ +usr/share/locale/sah/LC_MESSAGES/ +usr/share/locale/sai/ +usr/share/locale/sai/LC_MESSAGES/ +usr/share/locale/sal/ +usr/share/locale/sal/LC_MESSAGES/ +usr/share/locale/sam/ +usr/share/locale/sam/LC_MESSAGES/ +usr/share/locale/sas/ +usr/share/locale/sas/LC_MESSAGES/ +usr/share/locale/sat/ +usr/share/locale/sat/LC_MESSAGES/ +usr/share/locale/sc/ +usr/share/locale/sc/LC_MESSAGES/ +usr/share/locale/scn/ +usr/share/locale/scn/LC_MESSAGES/ +usr/share/locale/sco/ +usr/share/locale/sco/LC_MESSAGES/ +usr/share/locale/sd/ +usr/share/locale/sd/LC_MESSAGES/ +usr/share/locale/se/ +usr/share/locale/se/LC_MESSAGES/ +usr/share/locale/sel/ +usr/share/locale/sel/LC_MESSAGES/ +usr/share/locale/sem/ +usr/share/locale/sem/LC_MESSAGES/ +usr/share/locale/sg/ +usr/share/locale/sg/LC_MESSAGES/ +usr/share/locale/sga/ +usr/share/locale/sga/LC_MESSAGES/ +usr/share/locale/sgn/ +usr/share/locale/sgn/LC_MESSAGES/ +usr/share/locale/shn/ +usr/share/locale/shn/LC_MESSAGES/ +usr/share/locale/si/ +usr/share/locale/si/LC_MESSAGES/ +usr/share/locale/si/LC_MESSAGES/chkconfig.mo +usr/share/locale/sid/ +usr/share/locale/sid/LC_MESSAGES/ +usr/share/locale/sio/ +usr/share/locale/sio/LC_MESSAGES/ +usr/share/locale/sit/ +usr/share/locale/sit/LC_MESSAGES/ +usr/share/locale/sk/ +usr/share/locale/sk/LC_MESSAGES/ +usr/share/locale/sk/LC_MESSAGES/bash.mo +usr/share/locale/sk/LC_MESSAGES/chkconfig.mo +usr/share/locale/sk/LC_MESSAGES/coreutils.mo +usr/share/locale/sk/LC_MESSAGES/grep.mo +usr/share/locale/sk/LC_MESSAGES/popt.mo +usr/share/locale/sk/LC_MESSAGES/sed.mo +usr/share/locale/sk/LC_TIME/ +usr/share/locale/sk/LC_TIME/coreutils.mo +usr/share/locale/sl/ +usr/share/locale/sl/LC_MESSAGES/ +usr/share/locale/sl/LC_MESSAGES/chkconfig.mo +usr/share/locale/sl/LC_MESSAGES/coreutils.mo +usr/share/locale/sl/LC_MESSAGES/grep.mo +usr/share/locale/sl/LC_MESSAGES/popt.mo +usr/share/locale/sl/LC_MESSAGES/sed.mo +usr/share/locale/sl/LC_TIME/ +usr/share/locale/sl/LC_TIME/coreutils.mo +usr/share/locale/sl_SI/ +usr/share/locale/sl_SI/LC_MESSAGES/ +usr/share/locale/sla/ +usr/share/locale/sla/LC_MESSAGES/ +usr/share/locale/sm/ +usr/share/locale/sm/LC_MESSAGES/ +usr/share/locale/sma/ +usr/share/locale/sma/LC_MESSAGES/ +usr/share/locale/smi/ +usr/share/locale/smi/LC_MESSAGES/ +usr/share/locale/smj/ +usr/share/locale/smj/LC_MESSAGES/ +usr/share/locale/smn/ +usr/share/locale/smn/LC_MESSAGES/ +usr/share/locale/sms/ +usr/share/locale/sms/LC_MESSAGES/ +usr/share/locale/sn/ +usr/share/locale/sn/LC_MESSAGES/ +usr/share/locale/snk/ +usr/share/locale/snk/LC_MESSAGES/ +usr/share/locale/so/ +usr/share/locale/so/LC_MESSAGES/ +usr/share/locale/sog/ +usr/share/locale/sog/LC_MESSAGES/ +usr/share/locale/son/ +usr/share/locale/son/LC_MESSAGES/ +usr/share/locale/sq/ +usr/share/locale/sq/LC_MESSAGES/ +usr/share/locale/sq/LC_MESSAGES/chkconfig.mo +usr/share/locale/sq_AL/ +usr/share/locale/sq_AL/LC_MESSAGES/ +usr/share/locale/sr/ +usr/share/locale/sr/LC_MESSAGES/ +usr/share/locale/sr/LC_MESSAGES/chkconfig.mo +usr/share/locale/sr/LC_MESSAGES/grep.mo +usr/share/locale/sr/LC_MESSAGES/sed.mo +usr/share/locale/sr@Latn/ +usr/share/locale/sr@Latn/LC_MESSAGES/ +usr/share/locale/sr@ije/ +usr/share/locale/sr@ije/LC_MESSAGES/ +usr/share/locale/sr@ijekavian/ +usr/share/locale/sr@ijekavian/LC_MESSAGES/ +usr/share/locale/sr@ijekavianlatin/ +usr/share/locale/sr@ijekavianlatin/LC_MESSAGES/ +usr/share/locale/sr@latin/ +usr/share/locale/sr@latin/LC_MESSAGES/ +usr/share/locale/sr@latin/LC_MESSAGES/chkconfig.mo +usr/share/locale/sr_RS/ +usr/share/locale/sr_RS/LC_MESSAGES/ +usr/share/locale/srn/ +usr/share/locale/srn/LC_MESSAGES/ +usr/share/locale/srr/ +usr/share/locale/srr/LC_MESSAGES/ +usr/share/locale/ss/ +usr/share/locale/ss/LC_MESSAGES/ +usr/share/locale/ssa/ +usr/share/locale/ssa/LC_MESSAGES/ +usr/share/locale/st/ +usr/share/locale/st/LC_MESSAGES/ +usr/share/locale/su/ +usr/share/locale/su/LC_MESSAGES/ +usr/share/locale/suk/ +usr/share/locale/suk/LC_MESSAGES/ +usr/share/locale/sus/ +usr/share/locale/sus/LC_MESSAGES/ +usr/share/locale/sux/ +usr/share/locale/sux/LC_MESSAGES/ +usr/share/locale/sv/ +usr/share/locale/sv/LC_MESSAGES/ +usr/share/locale/sv/LC_MESSAGES/bash.mo +usr/share/locale/sv/LC_MESSAGES/chkconfig.mo +usr/share/locale/sv/LC_MESSAGES/coreutils.mo +usr/share/locale/sv/LC_MESSAGES/gawk.mo +usr/share/locale/sv/LC_MESSAGES/grep.mo +usr/share/locale/sv/LC_MESSAGES/popt.mo +usr/share/locale/sv/LC_MESSAGES/sed.mo +usr/share/locale/sv/LC_TIME/ +usr/share/locale/sv/LC_TIME/coreutils.mo +usr/share/locale/sv_SE/ +usr/share/locale/sv_SE/LC_MESSAGES/ +usr/share/locale/sw/ +usr/share/locale/sw/LC_MESSAGES/ +usr/share/locale/syc/ +usr/share/locale/syc/LC_MESSAGES/ +usr/share/locale/syr/ +usr/share/locale/syr/LC_MESSAGES/ +usr/share/locale/ta/ +usr/share/locale/ta/LC_MESSAGES/ +usr/share/locale/ta/LC_MESSAGES/chkconfig.mo +usr/share/locale/tai/ +usr/share/locale/tai/LC_MESSAGES/ +usr/share/locale/te/ +usr/share/locale/te/LC_MESSAGES/ +usr/share/locale/te/LC_MESSAGES/chkconfig.mo +usr/share/locale/tem/ +usr/share/locale/tem/LC_MESSAGES/ +usr/share/locale/ter/ +usr/share/locale/ter/LC_MESSAGES/ +usr/share/locale/tet/ +usr/share/locale/tet/LC_MESSAGES/ +usr/share/locale/tg/ +usr/share/locale/tg/LC_MESSAGES/ +usr/share/locale/tg/LC_MESSAGES/chkconfig.mo +usr/share/locale/th/ +usr/share/locale/th/LC_MESSAGES/ +usr/share/locale/th/LC_MESSAGES/chkconfig.mo +usr/share/locale/th/LC_MESSAGES/grep.mo +usr/share/locale/ti/ +usr/share/locale/ti/LC_MESSAGES/ +usr/share/locale/tig/ +usr/share/locale/tig/LC_MESSAGES/ +usr/share/locale/tiv/ +usr/share/locale/tiv/LC_MESSAGES/ +usr/share/locale/tk/ +usr/share/locale/tk/LC_MESSAGES/ +usr/share/locale/tkl/ +usr/share/locale/tkl/LC_MESSAGES/ +usr/share/locale/tl/ +usr/share/locale/tl/LC_MESSAGES/ +usr/share/locale/tlh/ +usr/share/locale/tlh/LC_MESSAGES/ +usr/share/locale/tli/ +usr/share/locale/tli/LC_MESSAGES/ +usr/share/locale/tmh/ +usr/share/locale/tmh/LC_MESSAGES/ +usr/share/locale/tn/ +usr/share/locale/tn/LC_MESSAGES/ +usr/share/locale/to/ +usr/share/locale/to/LC_MESSAGES/ +usr/share/locale/tog/ +usr/share/locale/tog/LC_MESSAGES/ +usr/share/locale/tpi/ +usr/share/locale/tpi/LC_MESSAGES/ +usr/share/locale/tr/ +usr/share/locale/tr/LC_MESSAGES/ +usr/share/locale/tr/LC_MESSAGES/bash.mo +usr/share/locale/tr/LC_MESSAGES/chkconfig.mo +usr/share/locale/tr/LC_MESSAGES/coreutils.mo +usr/share/locale/tr/LC_MESSAGES/grep.mo +usr/share/locale/tr/LC_MESSAGES/popt.mo +usr/share/locale/tr/LC_MESSAGES/sed.mo +usr/share/locale/tr/LC_TIME/ +usr/share/locale/tr/LC_TIME/coreutils.mo +usr/share/locale/ts/ +usr/share/locale/ts/LC_MESSAGES/ +usr/share/locale/tsi/ +usr/share/locale/tsi/LC_MESSAGES/ +usr/share/locale/tt/ +usr/share/locale/tt/LC_MESSAGES/ +usr/share/locale/tum/ +usr/share/locale/tum/LC_MESSAGES/ +usr/share/locale/tup/ +usr/share/locale/tup/LC_MESSAGES/ +usr/share/locale/tut/ +usr/share/locale/tut/LC_MESSAGES/ +usr/share/locale/tvl/ +usr/share/locale/tvl/LC_MESSAGES/ +usr/share/locale/tw/ +usr/share/locale/tw/LC_MESSAGES/ +usr/share/locale/ty/ +usr/share/locale/ty/LC_MESSAGES/ +usr/share/locale/tyv/ +usr/share/locale/tyv/LC_MESSAGES/ +usr/share/locale/udm/ +usr/share/locale/udm/LC_MESSAGES/ +usr/share/locale/ug/ +usr/share/locale/ug/LC_MESSAGES/ +usr/share/locale/uga/ +usr/share/locale/uga/LC_MESSAGES/ +usr/share/locale/uk/ +usr/share/locale/uk/LC_MESSAGES/ +usr/share/locale/uk/LC_MESSAGES/bash.mo +usr/share/locale/uk/LC_MESSAGES/chkconfig.mo +usr/share/locale/uk/LC_MESSAGES/coreutils.mo +usr/share/locale/uk/LC_MESSAGES/grep.mo +usr/share/locale/uk/LC_MESSAGES/popt.mo +usr/share/locale/uk/LC_MESSAGES/sed.mo +usr/share/locale/uk/LC_TIME/ +usr/share/locale/uk/LC_TIME/coreutils.mo +usr/share/locale/uk_UA/ +usr/share/locale/uk_UA/LC_MESSAGES/ +usr/share/locale/umb/ +usr/share/locale/umb/LC_MESSAGES/ +usr/share/locale/und/ +usr/share/locale/und/LC_MESSAGES/ +usr/share/locale/ur/ +usr/share/locale/ur/LC_MESSAGES/ +usr/share/locale/ur/LC_MESSAGES/chkconfig.mo +usr/share/locale/ur_PK/ +usr/share/locale/ur_PK/LC_MESSAGES/ +usr/share/locale/uz/ +usr/share/locale/uz/LC_MESSAGES/ +usr/share/locale/uz@Latn/ +usr/share/locale/uz@Latn/LC_MESSAGES/ +usr/share/locale/uz@cyrillic/ +usr/share/locale/uz@cyrillic/LC_MESSAGES/ +usr/share/locale/vai/ +usr/share/locale/vai/LC_MESSAGES/ +usr/share/locale/ve/ +usr/share/locale/ve/LC_MESSAGES/ +usr/share/locale/vi/ +usr/share/locale/vi/LC_MESSAGES/ +usr/share/locale/vi/LC_MESSAGES/bash.mo +usr/share/locale/vi/LC_MESSAGES/chkconfig.mo +usr/share/locale/vi/LC_MESSAGES/coreutils.mo +usr/share/locale/vi/LC_MESSAGES/gawk.mo +usr/share/locale/vi/LC_MESSAGES/grep.mo +usr/share/locale/vi/LC_MESSAGES/popt.mo +usr/share/locale/vi/LC_MESSAGES/sed.mo +usr/share/locale/vi/LC_TIME/ +usr/share/locale/vi/LC_TIME/coreutils.mo +usr/share/locale/vo/ +usr/share/locale/vo/LC_MESSAGES/ +usr/share/locale/vot/ +usr/share/locale/vot/LC_MESSAGES/ +usr/share/locale/wa/ +usr/share/locale/wa/LC_MESSAGES/ +usr/share/locale/wa/LC_MESSAGES/popt.mo +usr/share/locale/wak/ +usr/share/locale/wak/LC_MESSAGES/ +usr/share/locale/wal/ +usr/share/locale/wal/LC_MESSAGES/ +usr/share/locale/war/ +usr/share/locale/war/LC_MESSAGES/ +usr/share/locale/was/ +usr/share/locale/was/LC_MESSAGES/ +usr/share/locale/wen/ +usr/share/locale/wen/LC_MESSAGES/ +usr/share/locale/wo/ +usr/share/locale/wo/LC_MESSAGES/ +usr/share/locale/xal/ +usr/share/locale/xal/LC_MESSAGES/ +usr/share/locale/xh/ +usr/share/locale/xh/LC_MESSAGES/ +usr/share/locale/yao/ +usr/share/locale/yao/LC_MESSAGES/ +usr/share/locale/yap/ +usr/share/locale/yap/LC_MESSAGES/ +usr/share/locale/yi/ +usr/share/locale/yi/LC_MESSAGES/ +usr/share/locale/yo/ +usr/share/locale/yo/LC_MESSAGES/ +usr/share/locale/ypk/ +usr/share/locale/ypk/LC_MESSAGES/ +usr/share/locale/za/ +usr/share/locale/za/LC_MESSAGES/ +usr/share/locale/zap/ +usr/share/locale/zap/LC_MESSAGES/ +usr/share/locale/zbl/ +usr/share/locale/zbl/LC_MESSAGES/ +usr/share/locale/zen/ +usr/share/locale/zen/LC_MESSAGES/ +usr/share/locale/zgh/ +usr/share/locale/zgh/LC_MESSAGES/ +usr/share/locale/zh/ +usr/share/locale/zh/LC_MESSAGES/ +usr/share/locale/zh_CN.GB2312/ +usr/share/locale/zh_CN.GB2312/LC_MESSAGES/ +usr/share/locale/zh_CN/ +usr/share/locale/zh_CN/LC_MESSAGES/ +usr/share/locale/zh_CN/LC_MESSAGES/bash.mo +usr/share/locale/zh_CN/LC_MESSAGES/chkconfig.mo +usr/share/locale/zh_CN/LC_MESSAGES/coreutils.mo +usr/share/locale/zh_CN/LC_MESSAGES/grep.mo +usr/share/locale/zh_CN/LC_MESSAGES/popt.mo +usr/share/locale/zh_CN/LC_MESSAGES/sed.mo +usr/share/locale/zh_CN/LC_TIME/ +usr/share/locale/zh_CN/LC_TIME/coreutils.mo +usr/share/locale/zh_HK/ +usr/share/locale/zh_HK/LC_MESSAGES/ +usr/share/locale/zh_TW.Big5/ +usr/share/locale/zh_TW.Big5/LC_MESSAGES/ +usr/share/locale/zh_TW/ +usr/share/locale/zh_TW/LC_MESSAGES/ +usr/share/locale/zh_TW/LC_MESSAGES/bash.mo +usr/share/locale/zh_TW/LC_MESSAGES/chkconfig.mo +usr/share/locale/zh_TW/LC_MESSAGES/coreutils.mo +usr/share/locale/zh_TW/LC_MESSAGES/grep.mo +usr/share/locale/zh_TW/LC_MESSAGES/sed.mo +usr/share/locale/zh_TW/LC_TIME/ +usr/share/locale/zh_TW/LC_TIME/coreutils.mo +usr/share/locale/znd/ +usr/share/locale/znd/LC_MESSAGES/ +usr/share/locale/zu/ +usr/share/locale/zu/LC_MESSAGES/ +usr/share/locale/zun/ +usr/share/locale/zun/LC_MESSAGES/ +usr/share/locale/zxx/ +usr/share/locale/zxx/LC_MESSAGES/ +usr/share/locale/zza/ +usr/share/locale/zza/LC_MESSAGES/ +usr/share/man/ +usr/share/man/man0p/ +usr/share/man/man1/ +usr/share/man/man1/..1.gz +usr/share/man/man1/:.1.gz +usr/share/man/man1/[.1.gz +usr/share/man/man1/alias.1.gz +usr/share/man/man1/arch.1.gz +usr/share/man/man1/awk.1.gz +usr/share/man/man1/base64.1.gz +usr/share/man/man1/basename.1.gz +usr/share/man/man1/bash.1.gz +usr/share/man/man1/bashbug-64.1.gz +usr/share/man/man1/bashbug.1.gz +usr/share/man/man1/bg.1.gz +usr/share/man/man1/bind.1.gz +usr/share/man/man1/break.1.gz +usr/share/man/man1/builtin.1.gz +usr/share/man/man1/builtins.1.gz +usr/share/man/man1/caller.1.gz +usr/share/man/man1/capsh.1.gz +usr/share/man/man1/captoinfo.1m.gz +usr/share/man/man1/cat.1.gz +usr/share/man/man1/cd.1.gz +usr/share/man/man1/chcon.1.gz +usr/share/man/man1/chgrp.1.gz +usr/share/man/man1/chmod.1.gz +usr/share/man/man1/chown.1.gz +usr/share/man/man1/chroot.1.gz +usr/share/man/man1/cksum.1.gz +usr/share/man/man1/clear.1.gz +usr/share/man/man1/comm.1.gz +usr/share/man/man1/command.1.gz +usr/share/man/man1/compgen.1.gz +usr/share/man/man1/complete.1.gz +usr/share/man/man1/compopt.1.gz +usr/share/man/man1/continue.1.gz +usr/share/man/man1/cp.1.gz +usr/share/man/man1/csplit.1.gz +usr/share/man/man1/cut.1.gz +usr/share/man/man1/date.1.gz +usr/share/man/man1/dd.1.gz +usr/share/man/man1/declare.1.gz +usr/share/man/man1/df.1.gz +usr/share/man/man1/dgawk.1.gz +usr/share/man/man1/dir.1.gz +usr/share/man/man1/dircolors.1.gz +usr/share/man/man1/dirname.1.gz +usr/share/man/man1/dirs.1.gz +usr/share/man/man1/disown.1.gz +usr/share/man/man1/du.1.gz +usr/share/man/man1/echo.1.gz +usr/share/man/man1/egrep.1.gz +usr/share/man/man1/enable.1.gz +usr/share/man/man1/env.1.gz +usr/share/man/man1/eval.1.gz +usr/share/man/man1/exec.1.gz +usr/share/man/man1/exit.1.gz +usr/share/man/man1/expand.1.gz +usr/share/man/man1/export.1.gz +usr/share/man/man1/expr.1.gz +usr/share/man/man1/factor.1.gz +usr/share/man/man1/false.1.gz +usr/share/man/man1/fc.1.gz +usr/share/man/man1/fg.1.gz +usr/share/man/man1/fgrep.1.gz +usr/share/man/man1/fmt.1.gz +usr/share/man/man1/fold.1.gz +usr/share/man/man1/gawk.1.gz +usr/share/man/man1/getopts.1.gz +usr/share/man/man1/grep.1.gz +usr/share/man/man1/groups.1.gz +usr/share/man/man1/hash.1.gz +usr/share/man/man1/head.1.gz +usr/share/man/man1/help.1.gz +usr/share/man/man1/history.1.gz +usr/share/man/man1/hostid.1.gz +usr/share/man/man1/id.1.gz +usr/share/man/man1/igawk.1.gz +usr/share/man/man1/info.1.gz +usr/share/man/man1/infocmp.1m.gz +usr/share/man/man1/infokey.1.gz +usr/share/man/man1/infotocap.1m.gz +usr/share/man/man1/install-info.1.gz +usr/share/man/man1/install.1.gz +usr/share/man/man1/jobs.1.gz +usr/share/man/man1/join.1.gz +usr/share/man/man1/let.1.gz +usr/share/man/man1/link.1.gz +usr/share/man/man1/ln.1.gz +usr/share/man/man1/local.1.gz +usr/share/man/man1/logname.1.gz +usr/share/man/man1/logout.1.gz +usr/share/man/man1/ls.1.gz +usr/share/man/man1/mapfile.1.gz +usr/share/man/man1/md5sum.1.gz +usr/share/man/man1/mkdir.1.gz +usr/share/man/man1/mkfifo.1.gz +usr/share/man/man1/mknod.1.gz +usr/share/man/man1/mktemp.1.gz +usr/share/man/man1/mv.1.gz +usr/share/man/man1/nice.1.gz +usr/share/man/man1/nl.1.gz +usr/share/man/man1/nohup.1.gz +usr/share/man/man1/nproc.1.gz +usr/share/man/man1/numfmt.1.gz +usr/share/man/man1/od.1.gz +usr/share/man/man1/paste.1.gz +usr/share/man/man1/pathchk.1.gz +usr/share/man/man1/pgawk.1.gz +usr/share/man/man1/pinky.1.gz +usr/share/man/man1/popd.1.gz +usr/share/man/man1/pr.1.gz +usr/share/man/man1/printenv.1.gz +usr/share/man/man1/printf.1.gz +usr/share/man/man1/ptx.1.gz +usr/share/man/man1/pushd.1.gz +usr/share/man/man1/pwd.1.gz +usr/share/man/man1/read.1.gz +usr/share/man/man1/readlink.1.gz +usr/share/man/man1/readonly.1.gz +usr/share/man/man1/realpath.1.gz +usr/share/man/man1/reset.1.gz +usr/share/man/man1/return.1.gz +usr/share/man/man1/rm.1.gz +usr/share/man/man1/rmdir.1.gz +usr/share/man/man1/runcon.1.gz +usr/share/man/man1/sed.1.gz +usr/share/man/man1/seq.1.gz +usr/share/man/man1/set.1.gz +usr/share/man/man1/sh.1.gz +usr/share/man/man1/sha1sum.1.gz +usr/share/man/man1/sha224sum.1.gz +usr/share/man/man1/sha256sum.1.gz +usr/share/man/man1/sha384sum.1.gz +usr/share/man/man1/sha512sum.1.gz +usr/share/man/man1/shift.1.gz +usr/share/man/man1/shopt.1.gz +usr/share/man/man1/shred.1.gz +usr/share/man/man1/shuf.1.gz +usr/share/man/man1/sleep.1.gz +usr/share/man/man1/sort.1.gz +usr/share/man/man1/source.1.gz +usr/share/man/man1/split.1.gz +usr/share/man/man1/stat.1.gz +usr/share/man/man1/stdbuf.1.gz +usr/share/man/man1/stty.1.gz +usr/share/man/man1/sum.1.gz +usr/share/man/man1/suspend.1.gz +usr/share/man/man1/sync.1.gz +usr/share/man/man1/tabs.1.gz +usr/share/man/man1/tac.1.gz +usr/share/man/man1/tail.1.gz +usr/share/man/man1/tee.1.gz +usr/share/man/man1/test.1.gz +usr/share/man/man1/tic.1m.gz +usr/share/man/man1/timeout.1.gz +usr/share/man/man1/times.1.gz +usr/share/man/man1/toe.1m.gz +usr/share/man/man1/touch.1.gz +usr/share/man/man1/tput.1.gz +usr/share/man/man1/tr.1.gz +usr/share/man/man1/trap.1.gz +usr/share/man/man1/true.1.gz +usr/share/man/man1/truncate.1.gz +usr/share/man/man1/trust.1.gz +usr/share/man/man1/tset.1.gz +usr/share/man/man1/tsort.1.gz +usr/share/man/man1/tty.1.gz +usr/share/man/man1/type.1.gz +usr/share/man/man1/typeset.1.gz +usr/share/man/man1/ulimit.1.gz +usr/share/man/man1/umask.1.gz +usr/share/man/man1/unalias.1.gz +usr/share/man/man1/uname.1.gz +usr/share/man/man1/unexpand.1.gz +usr/share/man/man1/uniq.1.gz +usr/share/man/man1/unlink.1.gz +usr/share/man/man1/unset.1.gz +usr/share/man/man1/users.1.gz +usr/share/man/man1/vdir.1.gz +usr/share/man/man1/wait.1.gz +usr/share/man/man1/wc.1.gz +usr/share/man/man1/who.1.gz +usr/share/man/man1/whoami.1.gz +usr/share/man/man1/yes.1.gz +usr/share/man/man1p/ +usr/share/man/man1x/ +usr/share/man/man2/ +usr/share/man/man2x/ +usr/share/man/man3/ +usr/share/man/man3p/ +usr/share/man/man3x/ +usr/share/man/man4/ +usr/share/man/man4x/ +usr/share/man/man5/ +usr/share/man/man5/.k5identity.5.gz +usr/share/man/man5/.k5login.5.gz +usr/share/man/man5/info.5.gz +usr/share/man/man5/k5identity.5.gz +usr/share/man/man5/k5login.5.gz +usr/share/man/man5/krb5.conf.5.gz +usr/share/man/man5/pkcs11.conf.5.gz +usr/share/man/man5/term.5.gz +usr/share/man/man5/terminfo.5.gz +usr/share/man/man5x/ +usr/share/man/man6/ +usr/share/man/man6x/ +usr/share/man/man7/ +usr/share/man/man7/term.7.gz +usr/share/man/man7x/ +usr/share/man/man8/ +usr/share/man/man8/alternatives.8.gz +usr/share/man/man8/ca-legacy.8.gz +usr/share/man/man8/chkconfig.8.gz +usr/share/man/man8/getcap.8.gz +usr/share/man/man8/getpcaps.8.gz +usr/share/man/man8/p11-kit.8.gz +usr/share/man/man8/setcap.8.gz +usr/share/man/man8/update-alternatives.8.gz +usr/share/man/man8/update-ca-trust.8.gz +usr/share/man/man8x/ +usr/share/man/man9/ +usr/share/man/man9x/ +usr/share/man/mann/ +usr/share/mime-info/ +usr/share/misc/ +usr/share/omf/ +usr/share/p11-kit/ +usr/share/p11-kit/modules/ +usr/share/p11-kit/modules/p11-kit-trust.module +usr/share/pixmaps/ +usr/share/pki/ +usr/share/pki/ca-trust-legacy/ +usr/share/pki/ca-trust-legacy/ca-bundle.legacy.default.crt +usr/share/pki/ca-trust-legacy/ca-bundle.legacy.disable.crt +usr/share/pki/ca-trust-source/ +usr/share/pki/ca-trust-source/README +usr/share/pki/ca-trust-source/anchors/ +usr/share/pki/ca-trust-source/blacklist/ +usr/share/pki/ca-trust-source/ca-bundle.trust.p11-kit +usr/share/sounds/ +usr/share/tabset/ +usr/share/tabset/std +usr/share/tabset/stdcrt +usr/share/tabset/vt100 +usr/share/tabset/vt300 +usr/share/terminfo/ +usr/share/terminfo/A/ +usr/share/terminfo/A/Apple_Terminal +usr/share/terminfo/E/ +usr/share/terminfo/E/Eterm +usr/share/terminfo/E/Eterm-256color +usr/share/terminfo/E/Eterm-88color +usr/share/terminfo/E/Eterm-color +usr/share/terminfo/a/ +usr/share/terminfo/a/ansi +usr/share/terminfo/a/ansi80x25 +usr/share/terminfo/a/ansis +usr/share/terminfo/a/aterm +usr/share/terminfo/b/ +usr/share/terminfo/b/bterm +usr/share/terminfo/c/ +usr/share/terminfo/c/cons25 +usr/share/terminfo/c/cygwin +usr/share/terminfo/d/ +usr/share/terminfo/d/dumb +usr/share/terminfo/e/ +usr/share/terminfo/e/eterm +usr/share/terminfo/e/eterm-color +usr/share/terminfo/g/ +usr/share/terminfo/g/gnome +usr/share/terminfo/g/gnome-256color +usr/share/terminfo/h/ +usr/share/terminfo/h/hurd +usr/share/terminfo/j/ +usr/share/terminfo/j/jfbterm +usr/share/terminfo/k/ +usr/share/terminfo/k/kon +usr/share/terminfo/k/kon2 +usr/share/terminfo/k/konsole +usr/share/terminfo/k/konsole-256color +usr/share/terminfo/l/ +usr/share/terminfo/l/linux +usr/share/terminfo/m/ +usr/share/terminfo/m/mach +usr/share/terminfo/m/mach-bold +usr/share/terminfo/m/mach-color +usr/share/terminfo/m/mach-gnu +usr/share/terminfo/m/mach-gnu-color +usr/share/terminfo/m/mlterm +usr/share/terminfo/m/mrxvt +usr/share/terminfo/n/ +usr/share/terminfo/n/nsterm +usr/share/terminfo/n/nxterm +usr/share/terminfo/p/ +usr/share/terminfo/p/pcansi +usr/share/terminfo/p/putty +usr/share/terminfo/p/putty-256color +usr/share/terminfo/r/ +usr/share/terminfo/r/rxvt +usr/share/terminfo/r/rxvt-16color +usr/share/terminfo/r/rxvt-256color +usr/share/terminfo/r/rxvt-88color +usr/share/terminfo/r/rxvt-basic +usr/share/terminfo/r/rxvt-color +usr/share/terminfo/r/rxvt-cygwin +usr/share/terminfo/r/rxvt-cygwin-native +usr/share/terminfo/r/rxvt-unicode +usr/share/terminfo/r/rxvt-xpm +usr/share/terminfo/s/ +usr/share/terminfo/s/screen +usr/share/terminfo/s/screen-16color +usr/share/terminfo/s/screen-256color +usr/share/terminfo/s/screen.Eterm +usr/share/terminfo/s/screen.gnome +usr/share/terminfo/s/screen.konsole +usr/share/terminfo/s/screen.konsole-256color +usr/share/terminfo/s/screen.linux +usr/share/terminfo/s/screen.mlterm +usr/share/terminfo/s/screen.mlterm-256color +usr/share/terminfo/s/screen.mrxvt +usr/share/terminfo/s/screen.putty +usr/share/terminfo/s/screen.putty-256color +usr/share/terminfo/s/screen.rxvt +usr/share/terminfo/s/screen.teraterm +usr/share/terminfo/s/screen.vte +usr/share/terminfo/s/screen.vte-256color +usr/share/terminfo/s/screen.xterm-256color +usr/share/terminfo/s/screen.xterm-new +usr/share/terminfo/s/screen.xterm-r6 +usr/share/terminfo/s/screen.xterm-xfree86 +usr/share/terminfo/s/st +usr/share/terminfo/s/st-16color +usr/share/terminfo/s/st-256color +usr/share/terminfo/s/stterm +usr/share/terminfo/s/stterm-16color +usr/share/terminfo/s/stterm-256color +usr/share/terminfo/s/sun +usr/share/terminfo/s/sun1 +usr/share/terminfo/s/sun2 +usr/share/terminfo/t/ +usr/share/terminfo/t/teraterm +usr/share/terminfo/t/teraterm2.3 +usr/share/terminfo/t/tmux +usr/share/terminfo/t/tmux-256color +usr/share/terminfo/v/ +usr/share/terminfo/v/vs100 +usr/share/terminfo/v/vt100 +usr/share/terminfo/v/vt100-am +usr/share/terminfo/v/vt100-nav +usr/share/terminfo/v/vt102 +usr/share/terminfo/v/vt200 +usr/share/terminfo/v/vt220 +usr/share/terminfo/v/vt52 +usr/share/terminfo/v/vte +usr/share/terminfo/v/vte-256color +usr/share/terminfo/v/vwmterm +usr/share/terminfo/w/ +usr/share/terminfo/w/wsvt25 +usr/share/terminfo/w/wsvt25m +usr/share/terminfo/x/ +usr/share/terminfo/x/xfce +usr/share/terminfo/x/xterm +usr/share/terminfo/x/xterm-1002 +usr/share/terminfo/x/xterm-1003 +usr/share/terminfo/x/xterm-1005 +usr/share/terminfo/x/xterm-1006 +usr/share/terminfo/x/xterm-16color +usr/share/terminfo/x/xterm-24 +usr/share/terminfo/x/xterm-256color +usr/share/terminfo/x/xterm-88color +usr/share/terminfo/x/xterm-8bit +usr/share/terminfo/x/xterm-basic +usr/share/terminfo/x/xterm-bold +usr/share/terminfo/x/xterm-color +usr/share/terminfo/x/xterm-hp +usr/share/terminfo/x/xterm-new +usr/share/terminfo/x/xterm-nic +usr/share/terminfo/x/xterm-noapp +usr/share/terminfo/x/xterm-old +usr/share/terminfo/x/xterm-pcolor +usr/share/terminfo/x/xterm-r5 +usr/share/terminfo/x/xterm-r6 +usr/share/terminfo/x/xterm-sco +usr/share/terminfo/x/xterm-sun +usr/share/terminfo/x/xterm-utf8 +usr/share/terminfo/x/xterm-vt220 +usr/share/terminfo/x/xterm-vt52 +usr/share/terminfo/x/xterm-x10mouse +usr/share/terminfo/x/xterm-x11hilite +usr/share/terminfo/x/xterm-x11mouse +usr/share/terminfo/x/xterm-xf86-v32 +usr/share/terminfo/x/xterm-xf86-v33 +usr/share/terminfo/x/xterm-xf86-v333 +usr/share/terminfo/x/xterm-xf86-v40 +usr/share/terminfo/x/xterm-xf86-v43 +usr/share/terminfo/x/xterm-xf86-v44 +usr/share/terminfo/x/xterm-xfree86 +usr/share/terminfo/x/xterm-xi +usr/share/terminfo/x/xterms +usr/share/themes/ +usr/share/xsessions/ +usr/share/zoneinfo/ +usr/share/zoneinfo/Africa/ +usr/share/zoneinfo/Africa/Abidjan +usr/share/zoneinfo/Africa/Accra +usr/share/zoneinfo/Africa/Addis_Ababa +usr/share/zoneinfo/Africa/Algiers +usr/share/zoneinfo/Africa/Asmara +usr/share/zoneinfo/Africa/Asmera +usr/share/zoneinfo/Africa/Bamako +usr/share/zoneinfo/Africa/Bangui +usr/share/zoneinfo/Africa/Banjul +usr/share/zoneinfo/Africa/Bissau +usr/share/zoneinfo/Africa/Blantyre +usr/share/zoneinfo/Africa/Brazzaville +usr/share/zoneinfo/Africa/Bujumbura +usr/share/zoneinfo/Africa/Cairo +usr/share/zoneinfo/Africa/Casablanca +usr/share/zoneinfo/Africa/Ceuta +usr/share/zoneinfo/Africa/Conakry +usr/share/zoneinfo/Africa/Dakar +usr/share/zoneinfo/Africa/Dar_es_Salaam +usr/share/zoneinfo/Africa/Djibouti +usr/share/zoneinfo/Africa/Douala +usr/share/zoneinfo/Africa/El_Aaiun +usr/share/zoneinfo/Africa/Freetown +usr/share/zoneinfo/Africa/Gaborone +usr/share/zoneinfo/Africa/Harare +usr/share/zoneinfo/Africa/Johannesburg +usr/share/zoneinfo/Africa/Juba +usr/share/zoneinfo/Africa/Kampala +usr/share/zoneinfo/Africa/Khartoum +usr/share/zoneinfo/Africa/Kigali +usr/share/zoneinfo/Africa/Kinshasa +usr/share/zoneinfo/Africa/Lagos +usr/share/zoneinfo/Africa/Libreville +usr/share/zoneinfo/Africa/Lome +usr/share/zoneinfo/Africa/Luanda +usr/share/zoneinfo/Africa/Lubumbashi +usr/share/zoneinfo/Africa/Lusaka +usr/share/zoneinfo/Africa/Malabo +usr/share/zoneinfo/Africa/Maputo +usr/share/zoneinfo/Africa/Maseru +usr/share/zoneinfo/Africa/Mbabane +usr/share/zoneinfo/Africa/Mogadishu +usr/share/zoneinfo/Africa/Monrovia +usr/share/zoneinfo/Africa/Nairobi +usr/share/zoneinfo/Africa/Ndjamena +usr/share/zoneinfo/Africa/Niamey +usr/share/zoneinfo/Africa/Nouakchott +usr/share/zoneinfo/Africa/Ouagadougou +usr/share/zoneinfo/Africa/Porto-Novo +usr/share/zoneinfo/Africa/Sao_Tome +usr/share/zoneinfo/Africa/Timbuktu +usr/share/zoneinfo/Africa/Tripoli +usr/share/zoneinfo/Africa/Tunis +usr/share/zoneinfo/Africa/Windhoek +usr/share/zoneinfo/America/ +usr/share/zoneinfo/America/Adak +usr/share/zoneinfo/America/Anchorage +usr/share/zoneinfo/America/Anguilla +usr/share/zoneinfo/America/Antigua +usr/share/zoneinfo/America/Araguaina +usr/share/zoneinfo/America/Argentina/ +usr/share/zoneinfo/America/Argentina/Buenos_Aires +usr/share/zoneinfo/America/Argentina/Catamarca +usr/share/zoneinfo/America/Argentina/ComodRivadavia +usr/share/zoneinfo/America/Argentina/Cordoba +usr/share/zoneinfo/America/Argentina/Jujuy +usr/share/zoneinfo/America/Argentina/La_Rioja +usr/share/zoneinfo/America/Argentina/Mendoza +usr/share/zoneinfo/America/Argentina/Rio_Gallegos +usr/share/zoneinfo/America/Argentina/Salta +usr/share/zoneinfo/America/Argentina/San_Juan +usr/share/zoneinfo/America/Argentina/San_Luis +usr/share/zoneinfo/America/Argentina/Tucuman +usr/share/zoneinfo/America/Argentina/Ushuaia +usr/share/zoneinfo/America/Aruba +usr/share/zoneinfo/America/Asuncion +usr/share/zoneinfo/America/Atikokan +usr/share/zoneinfo/America/Atka +usr/share/zoneinfo/America/Bahia +usr/share/zoneinfo/America/Bahia_Banderas +usr/share/zoneinfo/America/Barbados +usr/share/zoneinfo/America/Belem +usr/share/zoneinfo/America/Belize +usr/share/zoneinfo/America/Blanc-Sablon +usr/share/zoneinfo/America/Boa_Vista +usr/share/zoneinfo/America/Bogota +usr/share/zoneinfo/America/Boise +usr/share/zoneinfo/America/Buenos_Aires +usr/share/zoneinfo/America/Cambridge_Bay +usr/share/zoneinfo/America/Campo_Grande +usr/share/zoneinfo/America/Cancun +usr/share/zoneinfo/America/Caracas +usr/share/zoneinfo/America/Catamarca +usr/share/zoneinfo/America/Cayenne +usr/share/zoneinfo/America/Cayman +usr/share/zoneinfo/America/Chicago +usr/share/zoneinfo/America/Chihuahua +usr/share/zoneinfo/America/Coral_Harbour +usr/share/zoneinfo/America/Cordoba +usr/share/zoneinfo/America/Costa_Rica +usr/share/zoneinfo/America/Creston +usr/share/zoneinfo/America/Cuiaba +usr/share/zoneinfo/America/Curacao +usr/share/zoneinfo/America/Danmarkshavn +usr/share/zoneinfo/America/Dawson +usr/share/zoneinfo/America/Dawson_Creek +usr/share/zoneinfo/America/Denver +usr/share/zoneinfo/America/Detroit +usr/share/zoneinfo/America/Dominica +usr/share/zoneinfo/America/Edmonton +usr/share/zoneinfo/America/Eirunepe +usr/share/zoneinfo/America/El_Salvador +usr/share/zoneinfo/America/Ensenada +usr/share/zoneinfo/America/Fort_Nelson +usr/share/zoneinfo/America/Fort_Wayne +usr/share/zoneinfo/America/Fortaleza +usr/share/zoneinfo/America/Glace_Bay +usr/share/zoneinfo/America/Godthab +usr/share/zoneinfo/America/Goose_Bay +usr/share/zoneinfo/America/Grand_Turk +usr/share/zoneinfo/America/Grenada +usr/share/zoneinfo/America/Guadeloupe +usr/share/zoneinfo/America/Guatemala +usr/share/zoneinfo/America/Guayaquil +usr/share/zoneinfo/America/Guyana +usr/share/zoneinfo/America/Halifax +usr/share/zoneinfo/America/Havana +usr/share/zoneinfo/America/Hermosillo +usr/share/zoneinfo/America/Indiana/ +usr/share/zoneinfo/America/Indiana/Indianapolis +usr/share/zoneinfo/America/Indiana/Knox +usr/share/zoneinfo/America/Indiana/Marengo +usr/share/zoneinfo/America/Indiana/Petersburg +usr/share/zoneinfo/America/Indiana/Tell_City +usr/share/zoneinfo/America/Indiana/Vevay +usr/share/zoneinfo/America/Indiana/Vincennes +usr/share/zoneinfo/America/Indiana/Winamac +usr/share/zoneinfo/America/Indianapolis +usr/share/zoneinfo/America/Inuvik +usr/share/zoneinfo/America/Iqaluit +usr/share/zoneinfo/America/Jamaica +usr/share/zoneinfo/America/Jujuy +usr/share/zoneinfo/America/Juneau +usr/share/zoneinfo/America/Kentucky/ +usr/share/zoneinfo/America/Kentucky/Louisville +usr/share/zoneinfo/America/Kentucky/Monticello +usr/share/zoneinfo/America/Knox_IN +usr/share/zoneinfo/America/Kralendijk +usr/share/zoneinfo/America/La_Paz +usr/share/zoneinfo/America/Lima +usr/share/zoneinfo/America/Los_Angeles +usr/share/zoneinfo/America/Louisville +usr/share/zoneinfo/America/Lower_Princes +usr/share/zoneinfo/America/Maceio +usr/share/zoneinfo/America/Managua +usr/share/zoneinfo/America/Manaus +usr/share/zoneinfo/America/Marigot +usr/share/zoneinfo/America/Martinique +usr/share/zoneinfo/America/Matamoros +usr/share/zoneinfo/America/Mazatlan +usr/share/zoneinfo/America/Mendoza +usr/share/zoneinfo/America/Menominee +usr/share/zoneinfo/America/Merida +usr/share/zoneinfo/America/Metlakatla +usr/share/zoneinfo/America/Mexico_City +usr/share/zoneinfo/America/Miquelon +usr/share/zoneinfo/America/Moncton +usr/share/zoneinfo/America/Monterrey +usr/share/zoneinfo/America/Montevideo +usr/share/zoneinfo/America/Montreal +usr/share/zoneinfo/America/Montserrat +usr/share/zoneinfo/America/Nassau +usr/share/zoneinfo/America/New_York +usr/share/zoneinfo/America/Nipigon +usr/share/zoneinfo/America/Nome +usr/share/zoneinfo/America/Noronha +usr/share/zoneinfo/America/North_Dakota/ +usr/share/zoneinfo/America/North_Dakota/Beulah +usr/share/zoneinfo/America/North_Dakota/Center +usr/share/zoneinfo/America/North_Dakota/New_Salem +usr/share/zoneinfo/America/Ojinaga +usr/share/zoneinfo/America/Panama +usr/share/zoneinfo/America/Pangnirtung +usr/share/zoneinfo/America/Paramaribo +usr/share/zoneinfo/America/Phoenix +usr/share/zoneinfo/America/Port-au-Prince +usr/share/zoneinfo/America/Port_of_Spain +usr/share/zoneinfo/America/Porto_Acre +usr/share/zoneinfo/America/Porto_Velho +usr/share/zoneinfo/America/Puerto_Rico +usr/share/zoneinfo/America/Punta_Arenas +usr/share/zoneinfo/America/Rainy_River +usr/share/zoneinfo/America/Rankin_Inlet +usr/share/zoneinfo/America/Recife +usr/share/zoneinfo/America/Regina +usr/share/zoneinfo/America/Resolute +usr/share/zoneinfo/America/Rio_Branco +usr/share/zoneinfo/America/Rosario +usr/share/zoneinfo/America/Santa_Isabel +usr/share/zoneinfo/America/Santarem +usr/share/zoneinfo/America/Santiago +usr/share/zoneinfo/America/Santo_Domingo +usr/share/zoneinfo/America/Sao_Paulo +usr/share/zoneinfo/America/Scoresbysund +usr/share/zoneinfo/America/Shiprock +usr/share/zoneinfo/America/Sitka +usr/share/zoneinfo/America/St_Barthelemy +usr/share/zoneinfo/America/St_Johns +usr/share/zoneinfo/America/St_Kitts +usr/share/zoneinfo/America/St_Lucia +usr/share/zoneinfo/America/St_Thomas +usr/share/zoneinfo/America/St_Vincent +usr/share/zoneinfo/America/Swift_Current +usr/share/zoneinfo/America/Tegucigalpa +usr/share/zoneinfo/America/Thule +usr/share/zoneinfo/America/Thunder_Bay +usr/share/zoneinfo/America/Tijuana +usr/share/zoneinfo/America/Toronto +usr/share/zoneinfo/America/Tortola +usr/share/zoneinfo/America/Vancouver +usr/share/zoneinfo/America/Virgin +usr/share/zoneinfo/America/Whitehorse +usr/share/zoneinfo/America/Winnipeg +usr/share/zoneinfo/America/Yakutat +usr/share/zoneinfo/America/Yellowknife +usr/share/zoneinfo/Antarctica/ +usr/share/zoneinfo/Antarctica/Casey +usr/share/zoneinfo/Antarctica/Davis +usr/share/zoneinfo/Antarctica/DumontDUrville +usr/share/zoneinfo/Antarctica/Macquarie +usr/share/zoneinfo/Antarctica/Mawson +usr/share/zoneinfo/Antarctica/McMurdo +usr/share/zoneinfo/Antarctica/Palmer +usr/share/zoneinfo/Antarctica/Rothera +usr/share/zoneinfo/Antarctica/South_Pole +usr/share/zoneinfo/Antarctica/Syowa +usr/share/zoneinfo/Antarctica/Troll +usr/share/zoneinfo/Antarctica/Vostok +usr/share/zoneinfo/Arctic/ +usr/share/zoneinfo/Arctic/Longyearbyen +usr/share/zoneinfo/Asia/ +usr/share/zoneinfo/Asia/Aden +usr/share/zoneinfo/Asia/Almaty +usr/share/zoneinfo/Asia/Amman +usr/share/zoneinfo/Asia/Anadyr +usr/share/zoneinfo/Asia/Aqtau +usr/share/zoneinfo/Asia/Aqtobe +usr/share/zoneinfo/Asia/Ashgabat +usr/share/zoneinfo/Asia/Ashkhabad +usr/share/zoneinfo/Asia/Atyrau +usr/share/zoneinfo/Asia/Baghdad +usr/share/zoneinfo/Asia/Bahrain +usr/share/zoneinfo/Asia/Baku +usr/share/zoneinfo/Asia/Bangkok +usr/share/zoneinfo/Asia/Barnaul +usr/share/zoneinfo/Asia/Beirut +usr/share/zoneinfo/Asia/Bishkek +usr/share/zoneinfo/Asia/Brunei +usr/share/zoneinfo/Asia/Calcutta +usr/share/zoneinfo/Asia/Chita +usr/share/zoneinfo/Asia/Choibalsan +usr/share/zoneinfo/Asia/Chongqing +usr/share/zoneinfo/Asia/Chungking +usr/share/zoneinfo/Asia/Colombo +usr/share/zoneinfo/Asia/Dacca +usr/share/zoneinfo/Asia/Damascus +usr/share/zoneinfo/Asia/Dhaka +usr/share/zoneinfo/Asia/Dili +usr/share/zoneinfo/Asia/Dubai +usr/share/zoneinfo/Asia/Dushanbe +usr/share/zoneinfo/Asia/Famagusta +usr/share/zoneinfo/Asia/Gaza +usr/share/zoneinfo/Asia/Harbin +usr/share/zoneinfo/Asia/Hebron +usr/share/zoneinfo/Asia/Ho_Chi_Minh +usr/share/zoneinfo/Asia/Hong_Kong +usr/share/zoneinfo/Asia/Hovd +usr/share/zoneinfo/Asia/Irkutsk +usr/share/zoneinfo/Asia/Istanbul +usr/share/zoneinfo/Asia/Jakarta +usr/share/zoneinfo/Asia/Jayapura +usr/share/zoneinfo/Asia/Jerusalem +usr/share/zoneinfo/Asia/Kabul +usr/share/zoneinfo/Asia/Kamchatka +usr/share/zoneinfo/Asia/Karachi +usr/share/zoneinfo/Asia/Kashgar +usr/share/zoneinfo/Asia/Kathmandu +usr/share/zoneinfo/Asia/Katmandu +usr/share/zoneinfo/Asia/Khandyga +usr/share/zoneinfo/Asia/Kolkata +usr/share/zoneinfo/Asia/Krasnoyarsk +usr/share/zoneinfo/Asia/Kuala_Lumpur +usr/share/zoneinfo/Asia/Kuching +usr/share/zoneinfo/Asia/Kuwait +usr/share/zoneinfo/Asia/Macao +usr/share/zoneinfo/Asia/Macau +usr/share/zoneinfo/Asia/Magadan +usr/share/zoneinfo/Asia/Makassar +usr/share/zoneinfo/Asia/Manila +usr/share/zoneinfo/Asia/Muscat +usr/share/zoneinfo/Asia/Nicosia +usr/share/zoneinfo/Asia/Novokuznetsk +usr/share/zoneinfo/Asia/Novosibirsk +usr/share/zoneinfo/Asia/Omsk +usr/share/zoneinfo/Asia/Oral +usr/share/zoneinfo/Asia/Phnom_Penh +usr/share/zoneinfo/Asia/Pontianak +usr/share/zoneinfo/Asia/Pyongyang +usr/share/zoneinfo/Asia/Qatar +usr/share/zoneinfo/Asia/Qostanay +usr/share/zoneinfo/Asia/Qyzylorda +usr/share/zoneinfo/Asia/Rangoon +usr/share/zoneinfo/Asia/Riyadh +usr/share/zoneinfo/Asia/Saigon +usr/share/zoneinfo/Asia/Sakhalin +usr/share/zoneinfo/Asia/Samarkand +usr/share/zoneinfo/Asia/Seoul +usr/share/zoneinfo/Asia/Shanghai +usr/share/zoneinfo/Asia/Singapore +usr/share/zoneinfo/Asia/Srednekolymsk +usr/share/zoneinfo/Asia/Taipei +usr/share/zoneinfo/Asia/Tashkent +usr/share/zoneinfo/Asia/Tbilisi +usr/share/zoneinfo/Asia/Tehran +usr/share/zoneinfo/Asia/Tel_Aviv +usr/share/zoneinfo/Asia/Thimbu +usr/share/zoneinfo/Asia/Thimphu +usr/share/zoneinfo/Asia/Tokyo +usr/share/zoneinfo/Asia/Tomsk +usr/share/zoneinfo/Asia/Ujung_Pandang +usr/share/zoneinfo/Asia/Ulaanbaatar +usr/share/zoneinfo/Asia/Ulan_Bator +usr/share/zoneinfo/Asia/Urumqi +usr/share/zoneinfo/Asia/Ust-Nera +usr/share/zoneinfo/Asia/Vientiane +usr/share/zoneinfo/Asia/Vladivostok +usr/share/zoneinfo/Asia/Yakutsk +usr/share/zoneinfo/Asia/Yangon +usr/share/zoneinfo/Asia/Yekaterinburg +usr/share/zoneinfo/Asia/Yerevan +usr/share/zoneinfo/Atlantic/ +usr/share/zoneinfo/Atlantic/Azores +usr/share/zoneinfo/Atlantic/Bermuda +usr/share/zoneinfo/Atlantic/Canary +usr/share/zoneinfo/Atlantic/Cape_Verde +usr/share/zoneinfo/Atlantic/Faeroe +usr/share/zoneinfo/Atlantic/Faroe +usr/share/zoneinfo/Atlantic/Jan_Mayen +usr/share/zoneinfo/Atlantic/Madeira +usr/share/zoneinfo/Atlantic/Reykjavik +usr/share/zoneinfo/Atlantic/South_Georgia +usr/share/zoneinfo/Atlantic/St_Helena +usr/share/zoneinfo/Atlantic/Stanley +usr/share/zoneinfo/Australia/ +usr/share/zoneinfo/Australia/ACT +usr/share/zoneinfo/Australia/Adelaide +usr/share/zoneinfo/Australia/Brisbane +usr/share/zoneinfo/Australia/Broken_Hill +usr/share/zoneinfo/Australia/Canberra +usr/share/zoneinfo/Australia/Currie +usr/share/zoneinfo/Australia/Darwin +usr/share/zoneinfo/Australia/Eucla +usr/share/zoneinfo/Australia/Hobart +usr/share/zoneinfo/Australia/LHI +usr/share/zoneinfo/Australia/Lindeman +usr/share/zoneinfo/Australia/Lord_Howe +usr/share/zoneinfo/Australia/Melbourne +usr/share/zoneinfo/Australia/NSW +usr/share/zoneinfo/Australia/North +usr/share/zoneinfo/Australia/Perth +usr/share/zoneinfo/Australia/Queensland +usr/share/zoneinfo/Australia/South +usr/share/zoneinfo/Australia/Sydney +usr/share/zoneinfo/Australia/Tasmania +usr/share/zoneinfo/Australia/Victoria +usr/share/zoneinfo/Australia/West +usr/share/zoneinfo/Australia/Yancowinna +usr/share/zoneinfo/Brazil/ +usr/share/zoneinfo/Brazil/Acre +usr/share/zoneinfo/Brazil/DeNoronha +usr/share/zoneinfo/Brazil/East +usr/share/zoneinfo/Brazil/West +usr/share/zoneinfo/CET +usr/share/zoneinfo/CST6CDT +usr/share/zoneinfo/Canada/ +usr/share/zoneinfo/Canada/Atlantic +usr/share/zoneinfo/Canada/Central +usr/share/zoneinfo/Canada/Eastern +usr/share/zoneinfo/Canada/Mountain +usr/share/zoneinfo/Canada/Newfoundland +usr/share/zoneinfo/Canada/Pacific +usr/share/zoneinfo/Canada/Saskatchewan +usr/share/zoneinfo/Canada/Yukon +usr/share/zoneinfo/Chile/ +usr/share/zoneinfo/Chile/Continental +usr/share/zoneinfo/Chile/EasterIsland +usr/share/zoneinfo/Cuba +usr/share/zoneinfo/EET +usr/share/zoneinfo/EST +usr/share/zoneinfo/EST5EDT +usr/share/zoneinfo/Egypt +usr/share/zoneinfo/Eire +usr/share/zoneinfo/Etc/ +usr/share/zoneinfo/Etc/GMT +usr/share/zoneinfo/Etc/GMT+0 +usr/share/zoneinfo/Etc/GMT+1 +usr/share/zoneinfo/Etc/GMT+10 +usr/share/zoneinfo/Etc/GMT+11 +usr/share/zoneinfo/Etc/GMT+12 +usr/share/zoneinfo/Etc/GMT+2 +usr/share/zoneinfo/Etc/GMT+3 +usr/share/zoneinfo/Etc/GMT+4 +usr/share/zoneinfo/Etc/GMT+5 +usr/share/zoneinfo/Etc/GMT+6 +usr/share/zoneinfo/Etc/GMT+7 +usr/share/zoneinfo/Etc/GMT+8 +usr/share/zoneinfo/Etc/GMT+9 +usr/share/zoneinfo/Etc/GMT-0 +usr/share/zoneinfo/Etc/GMT-1 +usr/share/zoneinfo/Etc/GMT-10 +usr/share/zoneinfo/Etc/GMT-11 +usr/share/zoneinfo/Etc/GMT-12 +usr/share/zoneinfo/Etc/GMT-13 +usr/share/zoneinfo/Etc/GMT-14 +usr/share/zoneinfo/Etc/GMT-2 +usr/share/zoneinfo/Etc/GMT-3 +usr/share/zoneinfo/Etc/GMT-4 +usr/share/zoneinfo/Etc/GMT-5 +usr/share/zoneinfo/Etc/GMT-6 +usr/share/zoneinfo/Etc/GMT-7 +usr/share/zoneinfo/Etc/GMT-8 +usr/share/zoneinfo/Etc/GMT-9 +usr/share/zoneinfo/Etc/GMT0 +usr/share/zoneinfo/Etc/Greenwich +usr/share/zoneinfo/Etc/UCT +usr/share/zoneinfo/Etc/UTC +usr/share/zoneinfo/Etc/Universal +usr/share/zoneinfo/Etc/Zulu +usr/share/zoneinfo/Europe/ +usr/share/zoneinfo/Europe/Amsterdam +usr/share/zoneinfo/Europe/Andorra +usr/share/zoneinfo/Europe/Astrakhan +usr/share/zoneinfo/Europe/Athens +usr/share/zoneinfo/Europe/Belfast +usr/share/zoneinfo/Europe/Belgrade +usr/share/zoneinfo/Europe/Berlin +usr/share/zoneinfo/Europe/Bratislava +usr/share/zoneinfo/Europe/Brussels +usr/share/zoneinfo/Europe/Bucharest +usr/share/zoneinfo/Europe/Budapest +usr/share/zoneinfo/Europe/Busingen +usr/share/zoneinfo/Europe/Chisinau +usr/share/zoneinfo/Europe/Copenhagen +usr/share/zoneinfo/Europe/Dublin +usr/share/zoneinfo/Europe/Gibraltar +usr/share/zoneinfo/Europe/Guernsey +usr/share/zoneinfo/Europe/Helsinki +usr/share/zoneinfo/Europe/Isle_of_Man +usr/share/zoneinfo/Europe/Istanbul +usr/share/zoneinfo/Europe/Jersey +usr/share/zoneinfo/Europe/Kaliningrad +usr/share/zoneinfo/Europe/Kiev +usr/share/zoneinfo/Europe/Kirov +usr/share/zoneinfo/Europe/Lisbon +usr/share/zoneinfo/Europe/Ljubljana +usr/share/zoneinfo/Europe/London +usr/share/zoneinfo/Europe/Luxembourg +usr/share/zoneinfo/Europe/Madrid +usr/share/zoneinfo/Europe/Malta +usr/share/zoneinfo/Europe/Mariehamn +usr/share/zoneinfo/Europe/Minsk +usr/share/zoneinfo/Europe/Monaco +usr/share/zoneinfo/Europe/Moscow +usr/share/zoneinfo/Europe/Nicosia +usr/share/zoneinfo/Europe/Oslo +usr/share/zoneinfo/Europe/Paris +usr/share/zoneinfo/Europe/Podgorica +usr/share/zoneinfo/Europe/Prague +usr/share/zoneinfo/Europe/Riga +usr/share/zoneinfo/Europe/Rome +usr/share/zoneinfo/Europe/Samara +usr/share/zoneinfo/Europe/San_Marino +usr/share/zoneinfo/Europe/Sarajevo +usr/share/zoneinfo/Europe/Saratov +usr/share/zoneinfo/Europe/Simferopol +usr/share/zoneinfo/Europe/Skopje +usr/share/zoneinfo/Europe/Sofia +usr/share/zoneinfo/Europe/Stockholm +usr/share/zoneinfo/Europe/Tallinn +usr/share/zoneinfo/Europe/Tirane +usr/share/zoneinfo/Europe/Tiraspol +usr/share/zoneinfo/Europe/Ulyanovsk +usr/share/zoneinfo/Europe/Uzhgorod +usr/share/zoneinfo/Europe/Vaduz +usr/share/zoneinfo/Europe/Vatican +usr/share/zoneinfo/Europe/Vienna +usr/share/zoneinfo/Europe/Vilnius +usr/share/zoneinfo/Europe/Volgograd +usr/share/zoneinfo/Europe/Warsaw +usr/share/zoneinfo/Europe/Zagreb +usr/share/zoneinfo/Europe/Zaporozhye +usr/share/zoneinfo/Europe/Zurich +usr/share/zoneinfo/GB +usr/share/zoneinfo/GB-Eire +usr/share/zoneinfo/GMT +usr/share/zoneinfo/GMT+0 +usr/share/zoneinfo/GMT-0 +usr/share/zoneinfo/GMT0 +usr/share/zoneinfo/Greenwich +usr/share/zoneinfo/HST +usr/share/zoneinfo/Hongkong +usr/share/zoneinfo/Iceland +usr/share/zoneinfo/Indian/ +usr/share/zoneinfo/Indian/Antananarivo +usr/share/zoneinfo/Indian/Chagos +usr/share/zoneinfo/Indian/Christmas +usr/share/zoneinfo/Indian/Cocos +usr/share/zoneinfo/Indian/Comoro +usr/share/zoneinfo/Indian/Kerguelen +usr/share/zoneinfo/Indian/Mahe +usr/share/zoneinfo/Indian/Maldives +usr/share/zoneinfo/Indian/Mauritius +usr/share/zoneinfo/Indian/Mayotte +usr/share/zoneinfo/Indian/Reunion +usr/share/zoneinfo/Iran +usr/share/zoneinfo/Israel +usr/share/zoneinfo/Jamaica +usr/share/zoneinfo/Japan +usr/share/zoneinfo/Kwajalein +usr/share/zoneinfo/Libya +usr/share/zoneinfo/MET +usr/share/zoneinfo/MST +usr/share/zoneinfo/MST7MDT +usr/share/zoneinfo/Mexico/ +usr/share/zoneinfo/Mexico/BajaNorte +usr/share/zoneinfo/Mexico/BajaSur +usr/share/zoneinfo/Mexico/General +usr/share/zoneinfo/NZ +usr/share/zoneinfo/NZ-CHAT +usr/share/zoneinfo/Navajo +usr/share/zoneinfo/PRC +usr/share/zoneinfo/PST8PDT +usr/share/zoneinfo/Pacific/ +usr/share/zoneinfo/Pacific/Apia +usr/share/zoneinfo/Pacific/Auckland +usr/share/zoneinfo/Pacific/Bougainville +usr/share/zoneinfo/Pacific/Chatham +usr/share/zoneinfo/Pacific/Chuuk +usr/share/zoneinfo/Pacific/Easter +usr/share/zoneinfo/Pacific/Efate +usr/share/zoneinfo/Pacific/Enderbury +usr/share/zoneinfo/Pacific/Fakaofo +usr/share/zoneinfo/Pacific/Fiji +usr/share/zoneinfo/Pacific/Funafuti +usr/share/zoneinfo/Pacific/Galapagos +usr/share/zoneinfo/Pacific/Gambier +usr/share/zoneinfo/Pacific/Guadalcanal +usr/share/zoneinfo/Pacific/Guam +usr/share/zoneinfo/Pacific/Honolulu +usr/share/zoneinfo/Pacific/Johnston +usr/share/zoneinfo/Pacific/Kiritimati +usr/share/zoneinfo/Pacific/Kosrae +usr/share/zoneinfo/Pacific/Kwajalein +usr/share/zoneinfo/Pacific/Majuro +usr/share/zoneinfo/Pacific/Marquesas +usr/share/zoneinfo/Pacific/Midway +usr/share/zoneinfo/Pacific/Nauru +usr/share/zoneinfo/Pacific/Niue +usr/share/zoneinfo/Pacific/Norfolk +usr/share/zoneinfo/Pacific/Noumea +usr/share/zoneinfo/Pacific/Pago_Pago +usr/share/zoneinfo/Pacific/Palau +usr/share/zoneinfo/Pacific/Pitcairn +usr/share/zoneinfo/Pacific/Pohnpei +usr/share/zoneinfo/Pacific/Ponape +usr/share/zoneinfo/Pacific/Port_Moresby +usr/share/zoneinfo/Pacific/Rarotonga +usr/share/zoneinfo/Pacific/Saipan +usr/share/zoneinfo/Pacific/Samoa +usr/share/zoneinfo/Pacific/Tahiti +usr/share/zoneinfo/Pacific/Tarawa +usr/share/zoneinfo/Pacific/Tongatapu +usr/share/zoneinfo/Pacific/Truk +usr/share/zoneinfo/Pacific/Wake +usr/share/zoneinfo/Pacific/Wallis +usr/share/zoneinfo/Pacific/Yap +usr/share/zoneinfo/Poland +usr/share/zoneinfo/Portugal +usr/share/zoneinfo/ROC +usr/share/zoneinfo/ROK +usr/share/zoneinfo/Singapore +usr/share/zoneinfo/Turkey +usr/share/zoneinfo/UCT +usr/share/zoneinfo/US/ +usr/share/zoneinfo/US/Alaska +usr/share/zoneinfo/US/Aleutian +usr/share/zoneinfo/US/Arizona +usr/share/zoneinfo/US/Central +usr/share/zoneinfo/US/East-Indiana +usr/share/zoneinfo/US/Eastern +usr/share/zoneinfo/US/Hawaii +usr/share/zoneinfo/US/Indiana-Starke +usr/share/zoneinfo/US/Michigan +usr/share/zoneinfo/US/Mountain +usr/share/zoneinfo/US/Pacific +usr/share/zoneinfo/US/Pacific-New +usr/share/zoneinfo/US/Samoa +usr/share/zoneinfo/UTC +usr/share/zoneinfo/Universal +usr/share/zoneinfo/W-SU +usr/share/zoneinfo/WET +usr/share/zoneinfo/Zulu +usr/share/zoneinfo/iso3166.tab +usr/share/zoneinfo/leapseconds +usr/share/zoneinfo/posix/ +usr/share/zoneinfo/posix/Africa/ +usr/share/zoneinfo/posix/Africa/Abidjan +usr/share/zoneinfo/posix/Africa/Accra +usr/share/zoneinfo/posix/Africa/Addis_Ababa +usr/share/zoneinfo/posix/Africa/Algiers +usr/share/zoneinfo/posix/Africa/Asmara +usr/share/zoneinfo/posix/Africa/Asmera +usr/share/zoneinfo/posix/Africa/Bamako +usr/share/zoneinfo/posix/Africa/Bangui +usr/share/zoneinfo/posix/Africa/Banjul +usr/share/zoneinfo/posix/Africa/Bissau +usr/share/zoneinfo/posix/Africa/Blantyre +usr/share/zoneinfo/posix/Africa/Brazzaville +usr/share/zoneinfo/posix/Africa/Bujumbura +usr/share/zoneinfo/posix/Africa/Cairo +usr/share/zoneinfo/posix/Africa/Casablanca +usr/share/zoneinfo/posix/Africa/Ceuta +usr/share/zoneinfo/posix/Africa/Conakry +usr/share/zoneinfo/posix/Africa/Dakar +usr/share/zoneinfo/posix/Africa/Dar_es_Salaam +usr/share/zoneinfo/posix/Africa/Djibouti +usr/share/zoneinfo/posix/Africa/Douala +usr/share/zoneinfo/posix/Africa/El_Aaiun +usr/share/zoneinfo/posix/Africa/Freetown +usr/share/zoneinfo/posix/Africa/Gaborone +usr/share/zoneinfo/posix/Africa/Harare +usr/share/zoneinfo/posix/Africa/Johannesburg +usr/share/zoneinfo/posix/Africa/Juba +usr/share/zoneinfo/posix/Africa/Kampala +usr/share/zoneinfo/posix/Africa/Khartoum +usr/share/zoneinfo/posix/Africa/Kigali +usr/share/zoneinfo/posix/Africa/Kinshasa +usr/share/zoneinfo/posix/Africa/Lagos +usr/share/zoneinfo/posix/Africa/Libreville +usr/share/zoneinfo/posix/Africa/Lome +usr/share/zoneinfo/posix/Africa/Luanda +usr/share/zoneinfo/posix/Africa/Lubumbashi +usr/share/zoneinfo/posix/Africa/Lusaka +usr/share/zoneinfo/posix/Africa/Malabo +usr/share/zoneinfo/posix/Africa/Maputo +usr/share/zoneinfo/posix/Africa/Maseru +usr/share/zoneinfo/posix/Africa/Mbabane +usr/share/zoneinfo/posix/Africa/Mogadishu +usr/share/zoneinfo/posix/Africa/Monrovia +usr/share/zoneinfo/posix/Africa/Nairobi +usr/share/zoneinfo/posix/Africa/Ndjamena +usr/share/zoneinfo/posix/Africa/Niamey +usr/share/zoneinfo/posix/Africa/Nouakchott +usr/share/zoneinfo/posix/Africa/Ouagadougou +usr/share/zoneinfo/posix/Africa/Porto-Novo +usr/share/zoneinfo/posix/Africa/Sao_Tome +usr/share/zoneinfo/posix/Africa/Timbuktu +usr/share/zoneinfo/posix/Africa/Tripoli +usr/share/zoneinfo/posix/Africa/Tunis +usr/share/zoneinfo/posix/Africa/Windhoek +usr/share/zoneinfo/posix/America/ +usr/share/zoneinfo/posix/America/Adak +usr/share/zoneinfo/posix/America/Anchorage +usr/share/zoneinfo/posix/America/Anguilla +usr/share/zoneinfo/posix/America/Antigua +usr/share/zoneinfo/posix/America/Araguaina +usr/share/zoneinfo/posix/America/Argentina/ +usr/share/zoneinfo/posix/America/Argentina/Buenos_Aires +usr/share/zoneinfo/posix/America/Argentina/Catamarca +usr/share/zoneinfo/posix/America/Argentina/ComodRivadavia +usr/share/zoneinfo/posix/America/Argentina/Cordoba +usr/share/zoneinfo/posix/America/Argentina/Jujuy +usr/share/zoneinfo/posix/America/Argentina/La_Rioja +usr/share/zoneinfo/posix/America/Argentina/Mendoza +usr/share/zoneinfo/posix/America/Argentina/Rio_Gallegos +usr/share/zoneinfo/posix/America/Argentina/Salta +usr/share/zoneinfo/posix/America/Argentina/San_Juan +usr/share/zoneinfo/posix/America/Argentina/San_Luis +usr/share/zoneinfo/posix/America/Argentina/Tucuman +usr/share/zoneinfo/posix/America/Argentina/Ushuaia +usr/share/zoneinfo/posix/America/Aruba +usr/share/zoneinfo/posix/America/Asuncion +usr/share/zoneinfo/posix/America/Atikokan +usr/share/zoneinfo/posix/America/Atka +usr/share/zoneinfo/posix/America/Bahia +usr/share/zoneinfo/posix/America/Bahia_Banderas +usr/share/zoneinfo/posix/America/Barbados +usr/share/zoneinfo/posix/America/Belem +usr/share/zoneinfo/posix/America/Belize +usr/share/zoneinfo/posix/America/Blanc-Sablon +usr/share/zoneinfo/posix/America/Boa_Vista +usr/share/zoneinfo/posix/America/Bogota +usr/share/zoneinfo/posix/America/Boise +usr/share/zoneinfo/posix/America/Buenos_Aires +usr/share/zoneinfo/posix/America/Cambridge_Bay +usr/share/zoneinfo/posix/America/Campo_Grande +usr/share/zoneinfo/posix/America/Cancun +usr/share/zoneinfo/posix/America/Caracas +usr/share/zoneinfo/posix/America/Catamarca +usr/share/zoneinfo/posix/America/Cayenne +usr/share/zoneinfo/posix/America/Cayman +usr/share/zoneinfo/posix/America/Chicago +usr/share/zoneinfo/posix/America/Chihuahua +usr/share/zoneinfo/posix/America/Coral_Harbour +usr/share/zoneinfo/posix/America/Cordoba +usr/share/zoneinfo/posix/America/Costa_Rica +usr/share/zoneinfo/posix/America/Creston +usr/share/zoneinfo/posix/America/Cuiaba +usr/share/zoneinfo/posix/America/Curacao +usr/share/zoneinfo/posix/America/Danmarkshavn +usr/share/zoneinfo/posix/America/Dawson +usr/share/zoneinfo/posix/America/Dawson_Creek +usr/share/zoneinfo/posix/America/Denver +usr/share/zoneinfo/posix/America/Detroit +usr/share/zoneinfo/posix/America/Dominica +usr/share/zoneinfo/posix/America/Edmonton +usr/share/zoneinfo/posix/America/Eirunepe +usr/share/zoneinfo/posix/America/El_Salvador +usr/share/zoneinfo/posix/America/Ensenada +usr/share/zoneinfo/posix/America/Fort_Nelson +usr/share/zoneinfo/posix/America/Fort_Wayne +usr/share/zoneinfo/posix/America/Fortaleza +usr/share/zoneinfo/posix/America/Glace_Bay +usr/share/zoneinfo/posix/America/Godthab +usr/share/zoneinfo/posix/America/Goose_Bay +usr/share/zoneinfo/posix/America/Grand_Turk +usr/share/zoneinfo/posix/America/Grenada +usr/share/zoneinfo/posix/America/Guadeloupe +usr/share/zoneinfo/posix/America/Guatemala +usr/share/zoneinfo/posix/America/Guayaquil +usr/share/zoneinfo/posix/America/Guyana +usr/share/zoneinfo/posix/America/Halifax +usr/share/zoneinfo/posix/America/Havana +usr/share/zoneinfo/posix/America/Hermosillo +usr/share/zoneinfo/posix/America/Indiana/ +usr/share/zoneinfo/posix/America/Indiana/Indianapolis +usr/share/zoneinfo/posix/America/Indiana/Knox +usr/share/zoneinfo/posix/America/Indiana/Marengo +usr/share/zoneinfo/posix/America/Indiana/Petersburg +usr/share/zoneinfo/posix/America/Indiana/Tell_City +usr/share/zoneinfo/posix/America/Indiana/Vevay +usr/share/zoneinfo/posix/America/Indiana/Vincennes +usr/share/zoneinfo/posix/America/Indiana/Winamac +usr/share/zoneinfo/posix/America/Indianapolis +usr/share/zoneinfo/posix/America/Inuvik +usr/share/zoneinfo/posix/America/Iqaluit +usr/share/zoneinfo/posix/America/Jamaica +usr/share/zoneinfo/posix/America/Jujuy +usr/share/zoneinfo/posix/America/Juneau +usr/share/zoneinfo/posix/America/Kentucky/ +usr/share/zoneinfo/posix/America/Kentucky/Louisville +usr/share/zoneinfo/posix/America/Kentucky/Monticello +usr/share/zoneinfo/posix/America/Knox_IN +usr/share/zoneinfo/posix/America/Kralendijk +usr/share/zoneinfo/posix/America/La_Paz +usr/share/zoneinfo/posix/America/Lima +usr/share/zoneinfo/posix/America/Los_Angeles +usr/share/zoneinfo/posix/America/Louisville +usr/share/zoneinfo/posix/America/Lower_Princes +usr/share/zoneinfo/posix/America/Maceio +usr/share/zoneinfo/posix/America/Managua +usr/share/zoneinfo/posix/America/Manaus +usr/share/zoneinfo/posix/America/Marigot +usr/share/zoneinfo/posix/America/Martinique +usr/share/zoneinfo/posix/America/Matamoros +usr/share/zoneinfo/posix/America/Mazatlan +usr/share/zoneinfo/posix/America/Mendoza +usr/share/zoneinfo/posix/America/Menominee +usr/share/zoneinfo/posix/America/Merida +usr/share/zoneinfo/posix/America/Metlakatla +usr/share/zoneinfo/posix/America/Mexico_City +usr/share/zoneinfo/posix/America/Miquelon +usr/share/zoneinfo/posix/America/Moncton +usr/share/zoneinfo/posix/America/Monterrey +usr/share/zoneinfo/posix/America/Montevideo +usr/share/zoneinfo/posix/America/Montreal +usr/share/zoneinfo/posix/America/Montserrat +usr/share/zoneinfo/posix/America/Nassau +usr/share/zoneinfo/posix/America/New_York +usr/share/zoneinfo/posix/America/Nipigon +usr/share/zoneinfo/posix/America/Nome +usr/share/zoneinfo/posix/America/Noronha +usr/share/zoneinfo/posix/America/North_Dakota/ +usr/share/zoneinfo/posix/America/North_Dakota/Beulah +usr/share/zoneinfo/posix/America/North_Dakota/Center +usr/share/zoneinfo/posix/America/North_Dakota/New_Salem +usr/share/zoneinfo/posix/America/Ojinaga +usr/share/zoneinfo/posix/America/Panama +usr/share/zoneinfo/posix/America/Pangnirtung +usr/share/zoneinfo/posix/America/Paramaribo +usr/share/zoneinfo/posix/America/Phoenix +usr/share/zoneinfo/posix/America/Port-au-Prince +usr/share/zoneinfo/posix/America/Port_of_Spain +usr/share/zoneinfo/posix/America/Porto_Acre +usr/share/zoneinfo/posix/America/Porto_Velho +usr/share/zoneinfo/posix/America/Puerto_Rico +usr/share/zoneinfo/posix/America/Punta_Arenas +usr/share/zoneinfo/posix/America/Rainy_River +usr/share/zoneinfo/posix/America/Rankin_Inlet +usr/share/zoneinfo/posix/America/Recife +usr/share/zoneinfo/posix/America/Regina +usr/share/zoneinfo/posix/America/Resolute +usr/share/zoneinfo/posix/America/Rio_Branco +usr/share/zoneinfo/posix/America/Rosario +usr/share/zoneinfo/posix/America/Santa_Isabel +usr/share/zoneinfo/posix/America/Santarem +usr/share/zoneinfo/posix/America/Santiago +usr/share/zoneinfo/posix/America/Santo_Domingo +usr/share/zoneinfo/posix/America/Sao_Paulo +usr/share/zoneinfo/posix/America/Scoresbysund +usr/share/zoneinfo/posix/America/Shiprock +usr/share/zoneinfo/posix/America/Sitka +usr/share/zoneinfo/posix/America/St_Barthelemy +usr/share/zoneinfo/posix/America/St_Johns +usr/share/zoneinfo/posix/America/St_Kitts +usr/share/zoneinfo/posix/America/St_Lucia +usr/share/zoneinfo/posix/America/St_Thomas +usr/share/zoneinfo/posix/America/St_Vincent +usr/share/zoneinfo/posix/America/Swift_Current +usr/share/zoneinfo/posix/America/Tegucigalpa +usr/share/zoneinfo/posix/America/Thule +usr/share/zoneinfo/posix/America/Thunder_Bay +usr/share/zoneinfo/posix/America/Tijuana +usr/share/zoneinfo/posix/America/Toronto +usr/share/zoneinfo/posix/America/Tortola +usr/share/zoneinfo/posix/America/Vancouver +usr/share/zoneinfo/posix/America/Virgin +usr/share/zoneinfo/posix/America/Whitehorse +usr/share/zoneinfo/posix/America/Winnipeg +usr/share/zoneinfo/posix/America/Yakutat +usr/share/zoneinfo/posix/America/Yellowknife +usr/share/zoneinfo/posix/Antarctica/ +usr/share/zoneinfo/posix/Antarctica/Casey +usr/share/zoneinfo/posix/Antarctica/Davis +usr/share/zoneinfo/posix/Antarctica/DumontDUrville +usr/share/zoneinfo/posix/Antarctica/Macquarie +usr/share/zoneinfo/posix/Antarctica/Mawson +usr/share/zoneinfo/posix/Antarctica/McMurdo +usr/share/zoneinfo/posix/Antarctica/Palmer +usr/share/zoneinfo/posix/Antarctica/Rothera +usr/share/zoneinfo/posix/Antarctica/South_Pole +usr/share/zoneinfo/posix/Antarctica/Syowa +usr/share/zoneinfo/posix/Antarctica/Troll +usr/share/zoneinfo/posix/Antarctica/Vostok +usr/share/zoneinfo/posix/Arctic/ +usr/share/zoneinfo/posix/Arctic/Longyearbyen +usr/share/zoneinfo/posix/Asia/ +usr/share/zoneinfo/posix/Asia/Aden +usr/share/zoneinfo/posix/Asia/Almaty +usr/share/zoneinfo/posix/Asia/Amman +usr/share/zoneinfo/posix/Asia/Anadyr +usr/share/zoneinfo/posix/Asia/Aqtau +usr/share/zoneinfo/posix/Asia/Aqtobe +usr/share/zoneinfo/posix/Asia/Ashgabat +usr/share/zoneinfo/posix/Asia/Ashkhabad +usr/share/zoneinfo/posix/Asia/Atyrau +usr/share/zoneinfo/posix/Asia/Baghdad +usr/share/zoneinfo/posix/Asia/Bahrain +usr/share/zoneinfo/posix/Asia/Baku +usr/share/zoneinfo/posix/Asia/Bangkok +usr/share/zoneinfo/posix/Asia/Barnaul +usr/share/zoneinfo/posix/Asia/Beirut +usr/share/zoneinfo/posix/Asia/Bishkek +usr/share/zoneinfo/posix/Asia/Brunei +usr/share/zoneinfo/posix/Asia/Calcutta +usr/share/zoneinfo/posix/Asia/Chita +usr/share/zoneinfo/posix/Asia/Choibalsan +usr/share/zoneinfo/posix/Asia/Chongqing +usr/share/zoneinfo/posix/Asia/Chungking +usr/share/zoneinfo/posix/Asia/Colombo +usr/share/zoneinfo/posix/Asia/Dacca +usr/share/zoneinfo/posix/Asia/Damascus +usr/share/zoneinfo/posix/Asia/Dhaka +usr/share/zoneinfo/posix/Asia/Dili +usr/share/zoneinfo/posix/Asia/Dubai +usr/share/zoneinfo/posix/Asia/Dushanbe +usr/share/zoneinfo/posix/Asia/Famagusta +usr/share/zoneinfo/posix/Asia/Gaza +usr/share/zoneinfo/posix/Asia/Harbin +usr/share/zoneinfo/posix/Asia/Hebron +usr/share/zoneinfo/posix/Asia/Ho_Chi_Minh +usr/share/zoneinfo/posix/Asia/Hong_Kong +usr/share/zoneinfo/posix/Asia/Hovd +usr/share/zoneinfo/posix/Asia/Irkutsk +usr/share/zoneinfo/posix/Asia/Istanbul +usr/share/zoneinfo/posix/Asia/Jakarta +usr/share/zoneinfo/posix/Asia/Jayapura +usr/share/zoneinfo/posix/Asia/Jerusalem +usr/share/zoneinfo/posix/Asia/Kabul +usr/share/zoneinfo/posix/Asia/Kamchatka +usr/share/zoneinfo/posix/Asia/Karachi +usr/share/zoneinfo/posix/Asia/Kashgar +usr/share/zoneinfo/posix/Asia/Kathmandu +usr/share/zoneinfo/posix/Asia/Katmandu +usr/share/zoneinfo/posix/Asia/Khandyga +usr/share/zoneinfo/posix/Asia/Kolkata +usr/share/zoneinfo/posix/Asia/Krasnoyarsk +usr/share/zoneinfo/posix/Asia/Kuala_Lumpur +usr/share/zoneinfo/posix/Asia/Kuching +usr/share/zoneinfo/posix/Asia/Kuwait +usr/share/zoneinfo/posix/Asia/Macao +usr/share/zoneinfo/posix/Asia/Macau +usr/share/zoneinfo/posix/Asia/Magadan +usr/share/zoneinfo/posix/Asia/Makassar +usr/share/zoneinfo/posix/Asia/Manila +usr/share/zoneinfo/posix/Asia/Muscat +usr/share/zoneinfo/posix/Asia/Nicosia +usr/share/zoneinfo/posix/Asia/Novokuznetsk +usr/share/zoneinfo/posix/Asia/Novosibirsk +usr/share/zoneinfo/posix/Asia/Omsk +usr/share/zoneinfo/posix/Asia/Oral +usr/share/zoneinfo/posix/Asia/Phnom_Penh +usr/share/zoneinfo/posix/Asia/Pontianak +usr/share/zoneinfo/posix/Asia/Pyongyang +usr/share/zoneinfo/posix/Asia/Qatar +usr/share/zoneinfo/posix/Asia/Qostanay +usr/share/zoneinfo/posix/Asia/Qyzylorda +usr/share/zoneinfo/posix/Asia/Rangoon +usr/share/zoneinfo/posix/Asia/Riyadh +usr/share/zoneinfo/posix/Asia/Saigon +usr/share/zoneinfo/posix/Asia/Sakhalin +usr/share/zoneinfo/posix/Asia/Samarkand +usr/share/zoneinfo/posix/Asia/Seoul +usr/share/zoneinfo/posix/Asia/Shanghai +usr/share/zoneinfo/posix/Asia/Singapore +usr/share/zoneinfo/posix/Asia/Srednekolymsk +usr/share/zoneinfo/posix/Asia/Taipei +usr/share/zoneinfo/posix/Asia/Tashkent +usr/share/zoneinfo/posix/Asia/Tbilisi +usr/share/zoneinfo/posix/Asia/Tehran +usr/share/zoneinfo/posix/Asia/Tel_Aviv +usr/share/zoneinfo/posix/Asia/Thimbu +usr/share/zoneinfo/posix/Asia/Thimphu +usr/share/zoneinfo/posix/Asia/Tokyo +usr/share/zoneinfo/posix/Asia/Tomsk +usr/share/zoneinfo/posix/Asia/Ujung_Pandang +usr/share/zoneinfo/posix/Asia/Ulaanbaatar +usr/share/zoneinfo/posix/Asia/Ulan_Bator +usr/share/zoneinfo/posix/Asia/Urumqi +usr/share/zoneinfo/posix/Asia/Ust-Nera +usr/share/zoneinfo/posix/Asia/Vientiane +usr/share/zoneinfo/posix/Asia/Vladivostok +usr/share/zoneinfo/posix/Asia/Yakutsk +usr/share/zoneinfo/posix/Asia/Yangon +usr/share/zoneinfo/posix/Asia/Yekaterinburg +usr/share/zoneinfo/posix/Asia/Yerevan +usr/share/zoneinfo/posix/Atlantic/ +usr/share/zoneinfo/posix/Atlantic/Azores +usr/share/zoneinfo/posix/Atlantic/Bermuda +usr/share/zoneinfo/posix/Atlantic/Canary +usr/share/zoneinfo/posix/Atlantic/Cape_Verde +usr/share/zoneinfo/posix/Atlantic/Faeroe +usr/share/zoneinfo/posix/Atlantic/Faroe +usr/share/zoneinfo/posix/Atlantic/Jan_Mayen +usr/share/zoneinfo/posix/Atlantic/Madeira +usr/share/zoneinfo/posix/Atlantic/Reykjavik +usr/share/zoneinfo/posix/Atlantic/South_Georgia +usr/share/zoneinfo/posix/Atlantic/St_Helena +usr/share/zoneinfo/posix/Atlantic/Stanley +usr/share/zoneinfo/posix/Australia/ +usr/share/zoneinfo/posix/Australia/ACT +usr/share/zoneinfo/posix/Australia/Adelaide +usr/share/zoneinfo/posix/Australia/Brisbane +usr/share/zoneinfo/posix/Australia/Broken_Hill +usr/share/zoneinfo/posix/Australia/Canberra +usr/share/zoneinfo/posix/Australia/Currie +usr/share/zoneinfo/posix/Australia/Darwin +usr/share/zoneinfo/posix/Australia/Eucla +usr/share/zoneinfo/posix/Australia/Hobart +usr/share/zoneinfo/posix/Australia/LHI +usr/share/zoneinfo/posix/Australia/Lindeman +usr/share/zoneinfo/posix/Australia/Lord_Howe +usr/share/zoneinfo/posix/Australia/Melbourne +usr/share/zoneinfo/posix/Australia/NSW +usr/share/zoneinfo/posix/Australia/North +usr/share/zoneinfo/posix/Australia/Perth +usr/share/zoneinfo/posix/Australia/Queensland +usr/share/zoneinfo/posix/Australia/South +usr/share/zoneinfo/posix/Australia/Sydney +usr/share/zoneinfo/posix/Australia/Tasmania +usr/share/zoneinfo/posix/Australia/Victoria +usr/share/zoneinfo/posix/Australia/West +usr/share/zoneinfo/posix/Australia/Yancowinna +usr/share/zoneinfo/posix/Brazil/ +usr/share/zoneinfo/posix/Brazil/Acre +usr/share/zoneinfo/posix/Brazil/DeNoronha +usr/share/zoneinfo/posix/Brazil/East +usr/share/zoneinfo/posix/Brazil/West +usr/share/zoneinfo/posix/CET +usr/share/zoneinfo/posix/CST6CDT +usr/share/zoneinfo/posix/Canada/ +usr/share/zoneinfo/posix/Canada/Atlantic +usr/share/zoneinfo/posix/Canada/Central +usr/share/zoneinfo/posix/Canada/Eastern +usr/share/zoneinfo/posix/Canada/Mountain +usr/share/zoneinfo/posix/Canada/Newfoundland +usr/share/zoneinfo/posix/Canada/Pacific +usr/share/zoneinfo/posix/Canada/Saskatchewan +usr/share/zoneinfo/posix/Canada/Yukon +usr/share/zoneinfo/posix/Chile/ +usr/share/zoneinfo/posix/Chile/Continental +usr/share/zoneinfo/posix/Chile/EasterIsland +usr/share/zoneinfo/posix/Cuba +usr/share/zoneinfo/posix/EET +usr/share/zoneinfo/posix/EST +usr/share/zoneinfo/posix/EST5EDT +usr/share/zoneinfo/posix/Egypt +usr/share/zoneinfo/posix/Eire +usr/share/zoneinfo/posix/Etc/ +usr/share/zoneinfo/posix/Etc/GMT +usr/share/zoneinfo/posix/Etc/GMT+0 +usr/share/zoneinfo/posix/Etc/GMT+1 +usr/share/zoneinfo/posix/Etc/GMT+10 +usr/share/zoneinfo/posix/Etc/GMT+11 +usr/share/zoneinfo/posix/Etc/GMT+12 +usr/share/zoneinfo/posix/Etc/GMT+2 +usr/share/zoneinfo/posix/Etc/GMT+3 +usr/share/zoneinfo/posix/Etc/GMT+4 +usr/share/zoneinfo/posix/Etc/GMT+5 +usr/share/zoneinfo/posix/Etc/GMT+6 +usr/share/zoneinfo/posix/Etc/GMT+7 +usr/share/zoneinfo/posix/Etc/GMT+8 +usr/share/zoneinfo/posix/Etc/GMT+9 +usr/share/zoneinfo/posix/Etc/GMT-0 +usr/share/zoneinfo/posix/Etc/GMT-1 +usr/share/zoneinfo/posix/Etc/GMT-10 +usr/share/zoneinfo/posix/Etc/GMT-11 +usr/share/zoneinfo/posix/Etc/GMT-12 +usr/share/zoneinfo/posix/Etc/GMT-13 +usr/share/zoneinfo/posix/Etc/GMT-14 +usr/share/zoneinfo/posix/Etc/GMT-2 +usr/share/zoneinfo/posix/Etc/GMT-3 +usr/share/zoneinfo/posix/Etc/GMT-4 +usr/share/zoneinfo/posix/Etc/GMT-5 +usr/share/zoneinfo/posix/Etc/GMT-6 +usr/share/zoneinfo/posix/Etc/GMT-7 +usr/share/zoneinfo/posix/Etc/GMT-8 +usr/share/zoneinfo/posix/Etc/GMT-9 +usr/share/zoneinfo/posix/Etc/GMT0 +usr/share/zoneinfo/posix/Etc/Greenwich +usr/share/zoneinfo/posix/Etc/UCT +usr/share/zoneinfo/posix/Etc/UTC +usr/share/zoneinfo/posix/Etc/Universal +usr/share/zoneinfo/posix/Etc/Zulu +usr/share/zoneinfo/posix/Europe/ +usr/share/zoneinfo/posix/Europe/Amsterdam +usr/share/zoneinfo/posix/Europe/Andorra +usr/share/zoneinfo/posix/Europe/Astrakhan +usr/share/zoneinfo/posix/Europe/Athens +usr/share/zoneinfo/posix/Europe/Belfast +usr/share/zoneinfo/posix/Europe/Belgrade +usr/share/zoneinfo/posix/Europe/Berlin +usr/share/zoneinfo/posix/Europe/Bratislava +usr/share/zoneinfo/posix/Europe/Brussels +usr/share/zoneinfo/posix/Europe/Bucharest +usr/share/zoneinfo/posix/Europe/Budapest +usr/share/zoneinfo/posix/Europe/Busingen +usr/share/zoneinfo/posix/Europe/Chisinau +usr/share/zoneinfo/posix/Europe/Copenhagen +usr/share/zoneinfo/posix/Europe/Dublin +usr/share/zoneinfo/posix/Europe/Gibraltar +usr/share/zoneinfo/posix/Europe/Guernsey +usr/share/zoneinfo/posix/Europe/Helsinki +usr/share/zoneinfo/posix/Europe/Isle_of_Man +usr/share/zoneinfo/posix/Europe/Istanbul +usr/share/zoneinfo/posix/Europe/Jersey +usr/share/zoneinfo/posix/Europe/Kaliningrad +usr/share/zoneinfo/posix/Europe/Kiev +usr/share/zoneinfo/posix/Europe/Kirov +usr/share/zoneinfo/posix/Europe/Lisbon +usr/share/zoneinfo/posix/Europe/Ljubljana +usr/share/zoneinfo/posix/Europe/London +usr/share/zoneinfo/posix/Europe/Luxembourg +usr/share/zoneinfo/posix/Europe/Madrid +usr/share/zoneinfo/posix/Europe/Malta +usr/share/zoneinfo/posix/Europe/Mariehamn +usr/share/zoneinfo/posix/Europe/Minsk +usr/share/zoneinfo/posix/Europe/Monaco +usr/share/zoneinfo/posix/Europe/Moscow +usr/share/zoneinfo/posix/Europe/Nicosia +usr/share/zoneinfo/posix/Europe/Oslo +usr/share/zoneinfo/posix/Europe/Paris +usr/share/zoneinfo/posix/Europe/Podgorica +usr/share/zoneinfo/posix/Europe/Prague +usr/share/zoneinfo/posix/Europe/Riga +usr/share/zoneinfo/posix/Europe/Rome +usr/share/zoneinfo/posix/Europe/Samara +usr/share/zoneinfo/posix/Europe/San_Marino +usr/share/zoneinfo/posix/Europe/Sarajevo +usr/share/zoneinfo/posix/Europe/Saratov +usr/share/zoneinfo/posix/Europe/Simferopol +usr/share/zoneinfo/posix/Europe/Skopje +usr/share/zoneinfo/posix/Europe/Sofia +usr/share/zoneinfo/posix/Europe/Stockholm +usr/share/zoneinfo/posix/Europe/Tallinn +usr/share/zoneinfo/posix/Europe/Tirane +usr/share/zoneinfo/posix/Europe/Tiraspol +usr/share/zoneinfo/posix/Europe/Ulyanovsk +usr/share/zoneinfo/posix/Europe/Uzhgorod +usr/share/zoneinfo/posix/Europe/Vaduz +usr/share/zoneinfo/posix/Europe/Vatican +usr/share/zoneinfo/posix/Europe/Vienna +usr/share/zoneinfo/posix/Europe/Vilnius +usr/share/zoneinfo/posix/Europe/Volgograd +usr/share/zoneinfo/posix/Europe/Warsaw +usr/share/zoneinfo/posix/Europe/Zagreb +usr/share/zoneinfo/posix/Europe/Zaporozhye +usr/share/zoneinfo/posix/Europe/Zurich +usr/share/zoneinfo/posix/GB +usr/share/zoneinfo/posix/GB-Eire +usr/share/zoneinfo/posix/GMT +usr/share/zoneinfo/posix/GMT+0 +usr/share/zoneinfo/posix/GMT-0 +usr/share/zoneinfo/posix/GMT0 +usr/share/zoneinfo/posix/Greenwich +usr/share/zoneinfo/posix/HST +usr/share/zoneinfo/posix/Hongkong +usr/share/zoneinfo/posix/Iceland +usr/share/zoneinfo/posix/Indian/ +usr/share/zoneinfo/posix/Indian/Antananarivo +usr/share/zoneinfo/posix/Indian/Chagos +usr/share/zoneinfo/posix/Indian/Christmas +usr/share/zoneinfo/posix/Indian/Cocos +usr/share/zoneinfo/posix/Indian/Comoro +usr/share/zoneinfo/posix/Indian/Kerguelen +usr/share/zoneinfo/posix/Indian/Mahe +usr/share/zoneinfo/posix/Indian/Maldives +usr/share/zoneinfo/posix/Indian/Mauritius +usr/share/zoneinfo/posix/Indian/Mayotte +usr/share/zoneinfo/posix/Indian/Reunion +usr/share/zoneinfo/posix/Iran +usr/share/zoneinfo/posix/Israel +usr/share/zoneinfo/posix/Jamaica +usr/share/zoneinfo/posix/Japan +usr/share/zoneinfo/posix/Kwajalein +usr/share/zoneinfo/posix/Libya +usr/share/zoneinfo/posix/MET +usr/share/zoneinfo/posix/MST +usr/share/zoneinfo/posix/MST7MDT +usr/share/zoneinfo/posix/Mexico/ +usr/share/zoneinfo/posix/Mexico/BajaNorte +usr/share/zoneinfo/posix/Mexico/BajaSur +usr/share/zoneinfo/posix/Mexico/General +usr/share/zoneinfo/posix/NZ +usr/share/zoneinfo/posix/NZ-CHAT +usr/share/zoneinfo/posix/Navajo +usr/share/zoneinfo/posix/PRC +usr/share/zoneinfo/posix/PST8PDT +usr/share/zoneinfo/posix/Pacific/ +usr/share/zoneinfo/posix/Pacific/Apia +usr/share/zoneinfo/posix/Pacific/Auckland +usr/share/zoneinfo/posix/Pacific/Bougainville +usr/share/zoneinfo/posix/Pacific/Chatham +usr/share/zoneinfo/posix/Pacific/Chuuk +usr/share/zoneinfo/posix/Pacific/Easter +usr/share/zoneinfo/posix/Pacific/Efate +usr/share/zoneinfo/posix/Pacific/Enderbury +usr/share/zoneinfo/posix/Pacific/Fakaofo +usr/share/zoneinfo/posix/Pacific/Fiji +usr/share/zoneinfo/posix/Pacific/Funafuti +usr/share/zoneinfo/posix/Pacific/Galapagos +usr/share/zoneinfo/posix/Pacific/Gambier +usr/share/zoneinfo/posix/Pacific/Guadalcanal +usr/share/zoneinfo/posix/Pacific/Guam +usr/share/zoneinfo/posix/Pacific/Honolulu +usr/share/zoneinfo/posix/Pacific/Johnston +usr/share/zoneinfo/posix/Pacific/Kiritimati +usr/share/zoneinfo/posix/Pacific/Kosrae +usr/share/zoneinfo/posix/Pacific/Kwajalein +usr/share/zoneinfo/posix/Pacific/Majuro +usr/share/zoneinfo/posix/Pacific/Marquesas +usr/share/zoneinfo/posix/Pacific/Midway +usr/share/zoneinfo/posix/Pacific/Nauru +usr/share/zoneinfo/posix/Pacific/Niue +usr/share/zoneinfo/posix/Pacific/Norfolk +usr/share/zoneinfo/posix/Pacific/Noumea +usr/share/zoneinfo/posix/Pacific/Pago_Pago +usr/share/zoneinfo/posix/Pacific/Palau +usr/share/zoneinfo/posix/Pacific/Pitcairn +usr/share/zoneinfo/posix/Pacific/Pohnpei +usr/share/zoneinfo/posix/Pacific/Ponape +usr/share/zoneinfo/posix/Pacific/Port_Moresby +usr/share/zoneinfo/posix/Pacific/Rarotonga +usr/share/zoneinfo/posix/Pacific/Saipan +usr/share/zoneinfo/posix/Pacific/Samoa +usr/share/zoneinfo/posix/Pacific/Tahiti +usr/share/zoneinfo/posix/Pacific/Tarawa +usr/share/zoneinfo/posix/Pacific/Tongatapu +usr/share/zoneinfo/posix/Pacific/Truk +usr/share/zoneinfo/posix/Pacific/Wake +usr/share/zoneinfo/posix/Pacific/Wallis +usr/share/zoneinfo/posix/Pacific/Yap +usr/share/zoneinfo/posix/Poland +usr/share/zoneinfo/posix/Portugal +usr/share/zoneinfo/posix/ROC +usr/share/zoneinfo/posix/ROK +usr/share/zoneinfo/posix/Singapore +usr/share/zoneinfo/posix/Turkey +usr/share/zoneinfo/posix/UCT +usr/share/zoneinfo/posix/US/ +usr/share/zoneinfo/posix/US/Alaska +usr/share/zoneinfo/posix/US/Aleutian +usr/share/zoneinfo/posix/US/Arizona +usr/share/zoneinfo/posix/US/Central +usr/share/zoneinfo/posix/US/East-Indiana +usr/share/zoneinfo/posix/US/Eastern +usr/share/zoneinfo/posix/US/Hawaii +usr/share/zoneinfo/posix/US/Indiana-Starke +usr/share/zoneinfo/posix/US/Michigan +usr/share/zoneinfo/posix/US/Mountain +usr/share/zoneinfo/posix/US/Pacific +usr/share/zoneinfo/posix/US/Pacific-New +usr/share/zoneinfo/posix/US/Samoa +usr/share/zoneinfo/posix/UTC +usr/share/zoneinfo/posix/Universal +usr/share/zoneinfo/posix/W-SU +usr/share/zoneinfo/posix/WET +usr/share/zoneinfo/posix/Zulu +usr/share/zoneinfo/posixrules +usr/share/zoneinfo/right/ +usr/share/zoneinfo/right/Africa/ +usr/share/zoneinfo/right/Africa/Abidjan +usr/share/zoneinfo/right/Africa/Accra +usr/share/zoneinfo/right/Africa/Addis_Ababa +usr/share/zoneinfo/right/Africa/Algiers +usr/share/zoneinfo/right/Africa/Asmara +usr/share/zoneinfo/right/Africa/Asmera +usr/share/zoneinfo/right/Africa/Bamako +usr/share/zoneinfo/right/Africa/Bangui +usr/share/zoneinfo/right/Africa/Banjul +usr/share/zoneinfo/right/Africa/Bissau +usr/share/zoneinfo/right/Africa/Blantyre +usr/share/zoneinfo/right/Africa/Brazzaville +usr/share/zoneinfo/right/Africa/Bujumbura +usr/share/zoneinfo/right/Africa/Cairo +usr/share/zoneinfo/right/Africa/Casablanca +usr/share/zoneinfo/right/Africa/Ceuta +usr/share/zoneinfo/right/Africa/Conakry +usr/share/zoneinfo/right/Africa/Dakar +usr/share/zoneinfo/right/Africa/Dar_es_Salaam +usr/share/zoneinfo/right/Africa/Djibouti +usr/share/zoneinfo/right/Africa/Douala +usr/share/zoneinfo/right/Africa/El_Aaiun +usr/share/zoneinfo/right/Africa/Freetown +usr/share/zoneinfo/right/Africa/Gaborone +usr/share/zoneinfo/right/Africa/Harare +usr/share/zoneinfo/right/Africa/Johannesburg +usr/share/zoneinfo/right/Africa/Juba +usr/share/zoneinfo/right/Africa/Kampala +usr/share/zoneinfo/right/Africa/Khartoum +usr/share/zoneinfo/right/Africa/Kigali +usr/share/zoneinfo/right/Africa/Kinshasa +usr/share/zoneinfo/right/Africa/Lagos +usr/share/zoneinfo/right/Africa/Libreville +usr/share/zoneinfo/right/Africa/Lome +usr/share/zoneinfo/right/Africa/Luanda +usr/share/zoneinfo/right/Africa/Lubumbashi +usr/share/zoneinfo/right/Africa/Lusaka +usr/share/zoneinfo/right/Africa/Malabo +usr/share/zoneinfo/right/Africa/Maputo +usr/share/zoneinfo/right/Africa/Maseru +usr/share/zoneinfo/right/Africa/Mbabane +usr/share/zoneinfo/right/Africa/Mogadishu +usr/share/zoneinfo/right/Africa/Monrovia +usr/share/zoneinfo/right/Africa/Nairobi +usr/share/zoneinfo/right/Africa/Ndjamena +usr/share/zoneinfo/right/Africa/Niamey +usr/share/zoneinfo/right/Africa/Nouakchott +usr/share/zoneinfo/right/Africa/Ouagadougou +usr/share/zoneinfo/right/Africa/Porto-Novo +usr/share/zoneinfo/right/Africa/Sao_Tome +usr/share/zoneinfo/right/Africa/Timbuktu +usr/share/zoneinfo/right/Africa/Tripoli +usr/share/zoneinfo/right/Africa/Tunis +usr/share/zoneinfo/right/Africa/Windhoek +usr/share/zoneinfo/right/America/ +usr/share/zoneinfo/right/America/Adak +usr/share/zoneinfo/right/America/Anchorage +usr/share/zoneinfo/right/America/Anguilla +usr/share/zoneinfo/right/America/Antigua +usr/share/zoneinfo/right/America/Araguaina +usr/share/zoneinfo/right/America/Argentina/ +usr/share/zoneinfo/right/America/Argentina/Buenos_Aires +usr/share/zoneinfo/right/America/Argentina/Catamarca +usr/share/zoneinfo/right/America/Argentina/ComodRivadavia +usr/share/zoneinfo/right/America/Argentina/Cordoba +usr/share/zoneinfo/right/America/Argentina/Jujuy +usr/share/zoneinfo/right/America/Argentina/La_Rioja +usr/share/zoneinfo/right/America/Argentina/Mendoza +usr/share/zoneinfo/right/America/Argentina/Rio_Gallegos +usr/share/zoneinfo/right/America/Argentina/Salta +usr/share/zoneinfo/right/America/Argentina/San_Juan +usr/share/zoneinfo/right/America/Argentina/San_Luis +usr/share/zoneinfo/right/America/Argentina/Tucuman +usr/share/zoneinfo/right/America/Argentina/Ushuaia +usr/share/zoneinfo/right/America/Aruba +usr/share/zoneinfo/right/America/Asuncion +usr/share/zoneinfo/right/America/Atikokan +usr/share/zoneinfo/right/America/Atka +usr/share/zoneinfo/right/America/Bahia +usr/share/zoneinfo/right/America/Bahia_Banderas +usr/share/zoneinfo/right/America/Barbados +usr/share/zoneinfo/right/America/Belem +usr/share/zoneinfo/right/America/Belize +usr/share/zoneinfo/right/America/Blanc-Sablon +usr/share/zoneinfo/right/America/Boa_Vista +usr/share/zoneinfo/right/America/Bogota +usr/share/zoneinfo/right/America/Boise +usr/share/zoneinfo/right/America/Buenos_Aires +usr/share/zoneinfo/right/America/Cambridge_Bay +usr/share/zoneinfo/right/America/Campo_Grande +usr/share/zoneinfo/right/America/Cancun +usr/share/zoneinfo/right/America/Caracas +usr/share/zoneinfo/right/America/Catamarca +usr/share/zoneinfo/right/America/Cayenne +usr/share/zoneinfo/right/America/Cayman +usr/share/zoneinfo/right/America/Chicago +usr/share/zoneinfo/right/America/Chihuahua +usr/share/zoneinfo/right/America/Coral_Harbour +usr/share/zoneinfo/right/America/Cordoba +usr/share/zoneinfo/right/America/Costa_Rica +usr/share/zoneinfo/right/America/Creston +usr/share/zoneinfo/right/America/Cuiaba +usr/share/zoneinfo/right/America/Curacao +usr/share/zoneinfo/right/America/Danmarkshavn +usr/share/zoneinfo/right/America/Dawson +usr/share/zoneinfo/right/America/Dawson_Creek +usr/share/zoneinfo/right/America/Denver +usr/share/zoneinfo/right/America/Detroit +usr/share/zoneinfo/right/America/Dominica +usr/share/zoneinfo/right/America/Edmonton +usr/share/zoneinfo/right/America/Eirunepe +usr/share/zoneinfo/right/America/El_Salvador +usr/share/zoneinfo/right/America/Ensenada +usr/share/zoneinfo/right/America/Fort_Nelson +usr/share/zoneinfo/right/America/Fort_Wayne +usr/share/zoneinfo/right/America/Fortaleza +usr/share/zoneinfo/right/America/Glace_Bay +usr/share/zoneinfo/right/America/Godthab +usr/share/zoneinfo/right/America/Goose_Bay +usr/share/zoneinfo/right/America/Grand_Turk +usr/share/zoneinfo/right/America/Grenada +usr/share/zoneinfo/right/America/Guadeloupe +usr/share/zoneinfo/right/America/Guatemala +usr/share/zoneinfo/right/America/Guayaquil +usr/share/zoneinfo/right/America/Guyana +usr/share/zoneinfo/right/America/Halifax +usr/share/zoneinfo/right/America/Havana +usr/share/zoneinfo/right/America/Hermosillo +usr/share/zoneinfo/right/America/Indiana/ +usr/share/zoneinfo/right/America/Indiana/Indianapolis +usr/share/zoneinfo/right/America/Indiana/Knox +usr/share/zoneinfo/right/America/Indiana/Marengo +usr/share/zoneinfo/right/America/Indiana/Petersburg +usr/share/zoneinfo/right/America/Indiana/Tell_City +usr/share/zoneinfo/right/America/Indiana/Vevay +usr/share/zoneinfo/right/America/Indiana/Vincennes +usr/share/zoneinfo/right/America/Indiana/Winamac +usr/share/zoneinfo/right/America/Indianapolis +usr/share/zoneinfo/right/America/Inuvik +usr/share/zoneinfo/right/America/Iqaluit +usr/share/zoneinfo/right/America/Jamaica +usr/share/zoneinfo/right/America/Jujuy +usr/share/zoneinfo/right/America/Juneau +usr/share/zoneinfo/right/America/Kentucky/ +usr/share/zoneinfo/right/America/Kentucky/Louisville +usr/share/zoneinfo/right/America/Kentucky/Monticello +usr/share/zoneinfo/right/America/Knox_IN +usr/share/zoneinfo/right/America/Kralendijk +usr/share/zoneinfo/right/America/La_Paz +usr/share/zoneinfo/right/America/Lima +usr/share/zoneinfo/right/America/Los_Angeles +usr/share/zoneinfo/right/America/Louisville +usr/share/zoneinfo/right/America/Lower_Princes +usr/share/zoneinfo/right/America/Maceio +usr/share/zoneinfo/right/America/Managua +usr/share/zoneinfo/right/America/Manaus +usr/share/zoneinfo/right/America/Marigot +usr/share/zoneinfo/right/America/Martinique +usr/share/zoneinfo/right/America/Matamoros +usr/share/zoneinfo/right/America/Mazatlan +usr/share/zoneinfo/right/America/Mendoza +usr/share/zoneinfo/right/America/Menominee +usr/share/zoneinfo/right/America/Merida +usr/share/zoneinfo/right/America/Metlakatla +usr/share/zoneinfo/right/America/Mexico_City +usr/share/zoneinfo/right/America/Miquelon +usr/share/zoneinfo/right/America/Moncton +usr/share/zoneinfo/right/America/Monterrey +usr/share/zoneinfo/right/America/Montevideo +usr/share/zoneinfo/right/America/Montreal +usr/share/zoneinfo/right/America/Montserrat +usr/share/zoneinfo/right/America/Nassau +usr/share/zoneinfo/right/America/New_York +usr/share/zoneinfo/right/America/Nipigon +usr/share/zoneinfo/right/America/Nome +usr/share/zoneinfo/right/America/Noronha +usr/share/zoneinfo/right/America/North_Dakota/ +usr/share/zoneinfo/right/America/North_Dakota/Beulah +usr/share/zoneinfo/right/America/North_Dakota/Center +usr/share/zoneinfo/right/America/North_Dakota/New_Salem +usr/share/zoneinfo/right/America/Ojinaga +usr/share/zoneinfo/right/America/Panama +usr/share/zoneinfo/right/America/Pangnirtung +usr/share/zoneinfo/right/America/Paramaribo +usr/share/zoneinfo/right/America/Phoenix +usr/share/zoneinfo/right/America/Port-au-Prince +usr/share/zoneinfo/right/America/Port_of_Spain +usr/share/zoneinfo/right/America/Porto_Acre +usr/share/zoneinfo/right/America/Porto_Velho +usr/share/zoneinfo/right/America/Puerto_Rico +usr/share/zoneinfo/right/America/Punta_Arenas +usr/share/zoneinfo/right/America/Rainy_River +usr/share/zoneinfo/right/America/Rankin_Inlet +usr/share/zoneinfo/right/America/Recife +usr/share/zoneinfo/right/America/Regina +usr/share/zoneinfo/right/America/Resolute +usr/share/zoneinfo/right/America/Rio_Branco +usr/share/zoneinfo/right/America/Rosario +usr/share/zoneinfo/right/America/Santa_Isabel +usr/share/zoneinfo/right/America/Santarem +usr/share/zoneinfo/right/America/Santiago +usr/share/zoneinfo/right/America/Santo_Domingo +usr/share/zoneinfo/right/America/Sao_Paulo +usr/share/zoneinfo/right/America/Scoresbysund +usr/share/zoneinfo/right/America/Shiprock +usr/share/zoneinfo/right/America/Sitka +usr/share/zoneinfo/right/America/St_Barthelemy +usr/share/zoneinfo/right/America/St_Johns +usr/share/zoneinfo/right/America/St_Kitts +usr/share/zoneinfo/right/America/St_Lucia +usr/share/zoneinfo/right/America/St_Thomas +usr/share/zoneinfo/right/America/St_Vincent +usr/share/zoneinfo/right/America/Swift_Current +usr/share/zoneinfo/right/America/Tegucigalpa +usr/share/zoneinfo/right/America/Thule +usr/share/zoneinfo/right/America/Thunder_Bay +usr/share/zoneinfo/right/America/Tijuana +usr/share/zoneinfo/right/America/Toronto +usr/share/zoneinfo/right/America/Tortola +usr/share/zoneinfo/right/America/Vancouver +usr/share/zoneinfo/right/America/Virgin +usr/share/zoneinfo/right/America/Whitehorse +usr/share/zoneinfo/right/America/Winnipeg +usr/share/zoneinfo/right/America/Yakutat +usr/share/zoneinfo/right/America/Yellowknife +usr/share/zoneinfo/right/Antarctica/ +usr/share/zoneinfo/right/Antarctica/Casey +usr/share/zoneinfo/right/Antarctica/Davis +usr/share/zoneinfo/right/Antarctica/DumontDUrville +usr/share/zoneinfo/right/Antarctica/Macquarie +usr/share/zoneinfo/right/Antarctica/Mawson +usr/share/zoneinfo/right/Antarctica/McMurdo +usr/share/zoneinfo/right/Antarctica/Palmer +usr/share/zoneinfo/right/Antarctica/Rothera +usr/share/zoneinfo/right/Antarctica/South_Pole +usr/share/zoneinfo/right/Antarctica/Syowa +usr/share/zoneinfo/right/Antarctica/Troll +usr/share/zoneinfo/right/Antarctica/Vostok +usr/share/zoneinfo/right/Arctic/ +usr/share/zoneinfo/right/Arctic/Longyearbyen +usr/share/zoneinfo/right/Asia/ +usr/share/zoneinfo/right/Asia/Aden +usr/share/zoneinfo/right/Asia/Almaty +usr/share/zoneinfo/right/Asia/Amman +usr/share/zoneinfo/right/Asia/Anadyr +usr/share/zoneinfo/right/Asia/Aqtau +usr/share/zoneinfo/right/Asia/Aqtobe +usr/share/zoneinfo/right/Asia/Ashgabat +usr/share/zoneinfo/right/Asia/Ashkhabad +usr/share/zoneinfo/right/Asia/Atyrau +usr/share/zoneinfo/right/Asia/Baghdad +usr/share/zoneinfo/right/Asia/Bahrain +usr/share/zoneinfo/right/Asia/Baku +usr/share/zoneinfo/right/Asia/Bangkok +usr/share/zoneinfo/right/Asia/Barnaul +usr/share/zoneinfo/right/Asia/Beirut +usr/share/zoneinfo/right/Asia/Bishkek +usr/share/zoneinfo/right/Asia/Brunei +usr/share/zoneinfo/right/Asia/Calcutta +usr/share/zoneinfo/right/Asia/Chita +usr/share/zoneinfo/right/Asia/Choibalsan +usr/share/zoneinfo/right/Asia/Chongqing +usr/share/zoneinfo/right/Asia/Chungking +usr/share/zoneinfo/right/Asia/Colombo +usr/share/zoneinfo/right/Asia/Dacca +usr/share/zoneinfo/right/Asia/Damascus +usr/share/zoneinfo/right/Asia/Dhaka +usr/share/zoneinfo/right/Asia/Dili +usr/share/zoneinfo/right/Asia/Dubai +usr/share/zoneinfo/right/Asia/Dushanbe +usr/share/zoneinfo/right/Asia/Famagusta +usr/share/zoneinfo/right/Asia/Gaza +usr/share/zoneinfo/right/Asia/Harbin +usr/share/zoneinfo/right/Asia/Hebron +usr/share/zoneinfo/right/Asia/Ho_Chi_Minh +usr/share/zoneinfo/right/Asia/Hong_Kong +usr/share/zoneinfo/right/Asia/Hovd +usr/share/zoneinfo/right/Asia/Irkutsk +usr/share/zoneinfo/right/Asia/Istanbul +usr/share/zoneinfo/right/Asia/Jakarta +usr/share/zoneinfo/right/Asia/Jayapura +usr/share/zoneinfo/right/Asia/Jerusalem +usr/share/zoneinfo/right/Asia/Kabul +usr/share/zoneinfo/right/Asia/Kamchatka +usr/share/zoneinfo/right/Asia/Karachi +usr/share/zoneinfo/right/Asia/Kashgar +usr/share/zoneinfo/right/Asia/Kathmandu +usr/share/zoneinfo/right/Asia/Katmandu +usr/share/zoneinfo/right/Asia/Khandyga +usr/share/zoneinfo/right/Asia/Kolkata +usr/share/zoneinfo/right/Asia/Krasnoyarsk +usr/share/zoneinfo/right/Asia/Kuala_Lumpur +usr/share/zoneinfo/right/Asia/Kuching +usr/share/zoneinfo/right/Asia/Kuwait +usr/share/zoneinfo/right/Asia/Macao +usr/share/zoneinfo/right/Asia/Macau +usr/share/zoneinfo/right/Asia/Magadan +usr/share/zoneinfo/right/Asia/Makassar +usr/share/zoneinfo/right/Asia/Manila +usr/share/zoneinfo/right/Asia/Muscat +usr/share/zoneinfo/right/Asia/Nicosia +usr/share/zoneinfo/right/Asia/Novokuznetsk +usr/share/zoneinfo/right/Asia/Novosibirsk +usr/share/zoneinfo/right/Asia/Omsk +usr/share/zoneinfo/right/Asia/Oral +usr/share/zoneinfo/right/Asia/Phnom_Penh +usr/share/zoneinfo/right/Asia/Pontianak +usr/share/zoneinfo/right/Asia/Pyongyang +usr/share/zoneinfo/right/Asia/Qatar +usr/share/zoneinfo/right/Asia/Qostanay +usr/share/zoneinfo/right/Asia/Qyzylorda +usr/share/zoneinfo/right/Asia/Rangoon +usr/share/zoneinfo/right/Asia/Riyadh +usr/share/zoneinfo/right/Asia/Saigon +usr/share/zoneinfo/right/Asia/Sakhalin +usr/share/zoneinfo/right/Asia/Samarkand +usr/share/zoneinfo/right/Asia/Seoul +usr/share/zoneinfo/right/Asia/Shanghai +usr/share/zoneinfo/right/Asia/Singapore +usr/share/zoneinfo/right/Asia/Srednekolymsk +usr/share/zoneinfo/right/Asia/Taipei +usr/share/zoneinfo/right/Asia/Tashkent +usr/share/zoneinfo/right/Asia/Tbilisi +usr/share/zoneinfo/right/Asia/Tehran +usr/share/zoneinfo/right/Asia/Tel_Aviv +usr/share/zoneinfo/right/Asia/Thimbu +usr/share/zoneinfo/right/Asia/Thimphu +usr/share/zoneinfo/right/Asia/Tokyo +usr/share/zoneinfo/right/Asia/Tomsk +usr/share/zoneinfo/right/Asia/Ujung_Pandang +usr/share/zoneinfo/right/Asia/Ulaanbaatar +usr/share/zoneinfo/right/Asia/Ulan_Bator +usr/share/zoneinfo/right/Asia/Urumqi +usr/share/zoneinfo/right/Asia/Ust-Nera +usr/share/zoneinfo/right/Asia/Vientiane +usr/share/zoneinfo/right/Asia/Vladivostok +usr/share/zoneinfo/right/Asia/Yakutsk +usr/share/zoneinfo/right/Asia/Yangon +usr/share/zoneinfo/right/Asia/Yekaterinburg +usr/share/zoneinfo/right/Asia/Yerevan +usr/share/zoneinfo/right/Atlantic/ +usr/share/zoneinfo/right/Atlantic/Azores +usr/share/zoneinfo/right/Atlantic/Bermuda +usr/share/zoneinfo/right/Atlantic/Canary +usr/share/zoneinfo/right/Atlantic/Cape_Verde +usr/share/zoneinfo/right/Atlantic/Faeroe +usr/share/zoneinfo/right/Atlantic/Faroe +usr/share/zoneinfo/right/Atlantic/Jan_Mayen +usr/share/zoneinfo/right/Atlantic/Madeira +usr/share/zoneinfo/right/Atlantic/Reykjavik +usr/share/zoneinfo/right/Atlantic/South_Georgia +usr/share/zoneinfo/right/Atlantic/St_Helena +usr/share/zoneinfo/right/Atlantic/Stanley +usr/share/zoneinfo/right/Australia/ +usr/share/zoneinfo/right/Australia/ACT +usr/share/zoneinfo/right/Australia/Adelaide +usr/share/zoneinfo/right/Australia/Brisbane +usr/share/zoneinfo/right/Australia/Broken_Hill +usr/share/zoneinfo/right/Australia/Canberra +usr/share/zoneinfo/right/Australia/Currie +usr/share/zoneinfo/right/Australia/Darwin +usr/share/zoneinfo/right/Australia/Eucla +usr/share/zoneinfo/right/Australia/Hobart +usr/share/zoneinfo/right/Australia/LHI +usr/share/zoneinfo/right/Australia/Lindeman +usr/share/zoneinfo/right/Australia/Lord_Howe +usr/share/zoneinfo/right/Australia/Melbourne +usr/share/zoneinfo/right/Australia/NSW +usr/share/zoneinfo/right/Australia/North +usr/share/zoneinfo/right/Australia/Perth +usr/share/zoneinfo/right/Australia/Queensland +usr/share/zoneinfo/right/Australia/South +usr/share/zoneinfo/right/Australia/Sydney +usr/share/zoneinfo/right/Australia/Tasmania +usr/share/zoneinfo/right/Australia/Victoria +usr/share/zoneinfo/right/Australia/West +usr/share/zoneinfo/right/Australia/Yancowinna +usr/share/zoneinfo/right/Brazil/ +usr/share/zoneinfo/right/Brazil/Acre +usr/share/zoneinfo/right/Brazil/DeNoronha +usr/share/zoneinfo/right/Brazil/East +usr/share/zoneinfo/right/Brazil/West +usr/share/zoneinfo/right/CET +usr/share/zoneinfo/right/CST6CDT +usr/share/zoneinfo/right/Canada/ +usr/share/zoneinfo/right/Canada/Atlantic +usr/share/zoneinfo/right/Canada/Central +usr/share/zoneinfo/right/Canada/Eastern +usr/share/zoneinfo/right/Canada/Mountain +usr/share/zoneinfo/right/Canada/Newfoundland +usr/share/zoneinfo/right/Canada/Pacific +usr/share/zoneinfo/right/Canada/Saskatchewan +usr/share/zoneinfo/right/Canada/Yukon +usr/share/zoneinfo/right/Chile/ +usr/share/zoneinfo/right/Chile/Continental +usr/share/zoneinfo/right/Chile/EasterIsland +usr/share/zoneinfo/right/Cuba +usr/share/zoneinfo/right/EET +usr/share/zoneinfo/right/EST +usr/share/zoneinfo/right/EST5EDT +usr/share/zoneinfo/right/Egypt +usr/share/zoneinfo/right/Eire +usr/share/zoneinfo/right/Etc/ +usr/share/zoneinfo/right/Etc/GMT +usr/share/zoneinfo/right/Etc/GMT+0 +usr/share/zoneinfo/right/Etc/GMT+1 +usr/share/zoneinfo/right/Etc/GMT+10 +usr/share/zoneinfo/right/Etc/GMT+11 +usr/share/zoneinfo/right/Etc/GMT+12 +usr/share/zoneinfo/right/Etc/GMT+2 +usr/share/zoneinfo/right/Etc/GMT+3 +usr/share/zoneinfo/right/Etc/GMT+4 +usr/share/zoneinfo/right/Etc/GMT+5 +usr/share/zoneinfo/right/Etc/GMT+6 +usr/share/zoneinfo/right/Etc/GMT+7 +usr/share/zoneinfo/right/Etc/GMT+8 +usr/share/zoneinfo/right/Etc/GMT+9 +usr/share/zoneinfo/right/Etc/GMT-0 +usr/share/zoneinfo/right/Etc/GMT-1 +usr/share/zoneinfo/right/Etc/GMT-10 +usr/share/zoneinfo/right/Etc/GMT-11 +usr/share/zoneinfo/right/Etc/GMT-12 +usr/share/zoneinfo/right/Etc/GMT-13 +usr/share/zoneinfo/right/Etc/GMT-14 +usr/share/zoneinfo/right/Etc/GMT-2 +usr/share/zoneinfo/right/Etc/GMT-3 +usr/share/zoneinfo/right/Etc/GMT-4 +usr/share/zoneinfo/right/Etc/GMT-5 +usr/share/zoneinfo/right/Etc/GMT-6 +usr/share/zoneinfo/right/Etc/GMT-7 +usr/share/zoneinfo/right/Etc/GMT-8 +usr/share/zoneinfo/right/Etc/GMT-9 +usr/share/zoneinfo/right/Etc/GMT0 +usr/share/zoneinfo/right/Etc/Greenwich +usr/share/zoneinfo/right/Etc/UCT +usr/share/zoneinfo/right/Etc/UTC +usr/share/zoneinfo/right/Etc/Universal +usr/share/zoneinfo/right/Etc/Zulu +usr/share/zoneinfo/right/Europe/ +usr/share/zoneinfo/right/Europe/Amsterdam +usr/share/zoneinfo/right/Europe/Andorra +usr/share/zoneinfo/right/Europe/Astrakhan +usr/share/zoneinfo/right/Europe/Athens +usr/share/zoneinfo/right/Europe/Belfast +usr/share/zoneinfo/right/Europe/Belgrade +usr/share/zoneinfo/right/Europe/Berlin +usr/share/zoneinfo/right/Europe/Bratislava +usr/share/zoneinfo/right/Europe/Brussels +usr/share/zoneinfo/right/Europe/Bucharest +usr/share/zoneinfo/right/Europe/Budapest +usr/share/zoneinfo/right/Europe/Busingen +usr/share/zoneinfo/right/Europe/Chisinau +usr/share/zoneinfo/right/Europe/Copenhagen +usr/share/zoneinfo/right/Europe/Dublin +usr/share/zoneinfo/right/Europe/Gibraltar +usr/share/zoneinfo/right/Europe/Guernsey +usr/share/zoneinfo/right/Europe/Helsinki +usr/share/zoneinfo/right/Europe/Isle_of_Man +usr/share/zoneinfo/right/Europe/Istanbul +usr/share/zoneinfo/right/Europe/Jersey +usr/share/zoneinfo/right/Europe/Kaliningrad +usr/share/zoneinfo/right/Europe/Kiev +usr/share/zoneinfo/right/Europe/Kirov +usr/share/zoneinfo/right/Europe/Lisbon +usr/share/zoneinfo/right/Europe/Ljubljana +usr/share/zoneinfo/right/Europe/London +usr/share/zoneinfo/right/Europe/Luxembourg +usr/share/zoneinfo/right/Europe/Madrid +usr/share/zoneinfo/right/Europe/Malta +usr/share/zoneinfo/right/Europe/Mariehamn +usr/share/zoneinfo/right/Europe/Minsk +usr/share/zoneinfo/right/Europe/Monaco +usr/share/zoneinfo/right/Europe/Moscow +usr/share/zoneinfo/right/Europe/Nicosia +usr/share/zoneinfo/right/Europe/Oslo +usr/share/zoneinfo/right/Europe/Paris +usr/share/zoneinfo/right/Europe/Podgorica +usr/share/zoneinfo/right/Europe/Prague +usr/share/zoneinfo/right/Europe/Riga +usr/share/zoneinfo/right/Europe/Rome +usr/share/zoneinfo/right/Europe/Samara +usr/share/zoneinfo/right/Europe/San_Marino +usr/share/zoneinfo/right/Europe/Sarajevo +usr/share/zoneinfo/right/Europe/Saratov +usr/share/zoneinfo/right/Europe/Simferopol +usr/share/zoneinfo/right/Europe/Skopje +usr/share/zoneinfo/right/Europe/Sofia +usr/share/zoneinfo/right/Europe/Stockholm +usr/share/zoneinfo/right/Europe/Tallinn +usr/share/zoneinfo/right/Europe/Tirane +usr/share/zoneinfo/right/Europe/Tiraspol +usr/share/zoneinfo/right/Europe/Ulyanovsk +usr/share/zoneinfo/right/Europe/Uzhgorod +usr/share/zoneinfo/right/Europe/Vaduz +usr/share/zoneinfo/right/Europe/Vatican +usr/share/zoneinfo/right/Europe/Vienna +usr/share/zoneinfo/right/Europe/Vilnius +usr/share/zoneinfo/right/Europe/Volgograd +usr/share/zoneinfo/right/Europe/Warsaw +usr/share/zoneinfo/right/Europe/Zagreb +usr/share/zoneinfo/right/Europe/Zaporozhye +usr/share/zoneinfo/right/Europe/Zurich +usr/share/zoneinfo/right/GB +usr/share/zoneinfo/right/GB-Eire +usr/share/zoneinfo/right/GMT +usr/share/zoneinfo/right/GMT+0 +usr/share/zoneinfo/right/GMT-0 +usr/share/zoneinfo/right/GMT0 +usr/share/zoneinfo/right/Greenwich +usr/share/zoneinfo/right/HST +usr/share/zoneinfo/right/Hongkong +usr/share/zoneinfo/right/Iceland +usr/share/zoneinfo/right/Indian/ +usr/share/zoneinfo/right/Indian/Antananarivo +usr/share/zoneinfo/right/Indian/Chagos +usr/share/zoneinfo/right/Indian/Christmas +usr/share/zoneinfo/right/Indian/Cocos +usr/share/zoneinfo/right/Indian/Comoro +usr/share/zoneinfo/right/Indian/Kerguelen +usr/share/zoneinfo/right/Indian/Mahe +usr/share/zoneinfo/right/Indian/Maldives +usr/share/zoneinfo/right/Indian/Mauritius +usr/share/zoneinfo/right/Indian/Mayotte +usr/share/zoneinfo/right/Indian/Reunion +usr/share/zoneinfo/right/Iran +usr/share/zoneinfo/right/Israel +usr/share/zoneinfo/right/Jamaica +usr/share/zoneinfo/right/Japan +usr/share/zoneinfo/right/Kwajalein +usr/share/zoneinfo/right/Libya +usr/share/zoneinfo/right/MET +usr/share/zoneinfo/right/MST +usr/share/zoneinfo/right/MST7MDT +usr/share/zoneinfo/right/Mexico/ +usr/share/zoneinfo/right/Mexico/BajaNorte +usr/share/zoneinfo/right/Mexico/BajaSur +usr/share/zoneinfo/right/Mexico/General +usr/share/zoneinfo/right/NZ +usr/share/zoneinfo/right/NZ-CHAT +usr/share/zoneinfo/right/Navajo +usr/share/zoneinfo/right/PRC +usr/share/zoneinfo/right/PST8PDT +usr/share/zoneinfo/right/Pacific/ +usr/share/zoneinfo/right/Pacific/Apia +usr/share/zoneinfo/right/Pacific/Auckland +usr/share/zoneinfo/right/Pacific/Bougainville +usr/share/zoneinfo/right/Pacific/Chatham +usr/share/zoneinfo/right/Pacific/Chuuk +usr/share/zoneinfo/right/Pacific/Easter +usr/share/zoneinfo/right/Pacific/Efate +usr/share/zoneinfo/right/Pacific/Enderbury +usr/share/zoneinfo/right/Pacific/Fakaofo +usr/share/zoneinfo/right/Pacific/Fiji +usr/share/zoneinfo/right/Pacific/Funafuti +usr/share/zoneinfo/right/Pacific/Galapagos +usr/share/zoneinfo/right/Pacific/Gambier +usr/share/zoneinfo/right/Pacific/Guadalcanal +usr/share/zoneinfo/right/Pacific/Guam +usr/share/zoneinfo/right/Pacific/Honolulu +usr/share/zoneinfo/right/Pacific/Johnston +usr/share/zoneinfo/right/Pacific/Kiritimati +usr/share/zoneinfo/right/Pacific/Kosrae +usr/share/zoneinfo/right/Pacific/Kwajalein +usr/share/zoneinfo/right/Pacific/Majuro +usr/share/zoneinfo/right/Pacific/Marquesas +usr/share/zoneinfo/right/Pacific/Midway +usr/share/zoneinfo/right/Pacific/Nauru +usr/share/zoneinfo/right/Pacific/Niue +usr/share/zoneinfo/right/Pacific/Norfolk +usr/share/zoneinfo/right/Pacific/Noumea +usr/share/zoneinfo/right/Pacific/Pago_Pago +usr/share/zoneinfo/right/Pacific/Palau +usr/share/zoneinfo/right/Pacific/Pitcairn +usr/share/zoneinfo/right/Pacific/Pohnpei +usr/share/zoneinfo/right/Pacific/Ponape +usr/share/zoneinfo/right/Pacific/Port_Moresby +usr/share/zoneinfo/right/Pacific/Rarotonga +usr/share/zoneinfo/right/Pacific/Saipan +usr/share/zoneinfo/right/Pacific/Samoa +usr/share/zoneinfo/right/Pacific/Tahiti +usr/share/zoneinfo/right/Pacific/Tarawa +usr/share/zoneinfo/right/Pacific/Tongatapu +usr/share/zoneinfo/right/Pacific/Truk +usr/share/zoneinfo/right/Pacific/Wake +usr/share/zoneinfo/right/Pacific/Wallis +usr/share/zoneinfo/right/Pacific/Yap +usr/share/zoneinfo/right/Poland +usr/share/zoneinfo/right/Portugal +usr/share/zoneinfo/right/ROC +usr/share/zoneinfo/right/ROK +usr/share/zoneinfo/right/Singapore +usr/share/zoneinfo/right/Turkey +usr/share/zoneinfo/right/UCT +usr/share/zoneinfo/right/US/ +usr/share/zoneinfo/right/US/Alaska +usr/share/zoneinfo/right/US/Aleutian +usr/share/zoneinfo/right/US/Arizona +usr/share/zoneinfo/right/US/Central +usr/share/zoneinfo/right/US/East-Indiana +usr/share/zoneinfo/right/US/Eastern +usr/share/zoneinfo/right/US/Hawaii +usr/share/zoneinfo/right/US/Indiana-Starke +usr/share/zoneinfo/right/US/Michigan +usr/share/zoneinfo/right/US/Mountain +usr/share/zoneinfo/right/US/Pacific +usr/share/zoneinfo/right/US/Pacific-New +usr/share/zoneinfo/right/US/Samoa +usr/share/zoneinfo/right/UTC +usr/share/zoneinfo/right/Universal +usr/share/zoneinfo/right/W-SU +usr/share/zoneinfo/right/WET +usr/share/zoneinfo/right/Zulu +usr/share/zoneinfo/tzdata.zi +usr/share/zoneinfo/zone.tab +usr/share/zoneinfo/zone1970.tab +usr/src/ +usr/src/debug/ +usr/src/kernels/ +usr/tmp +var/ +var/adm/ +var/cache/ +var/cache/yum/ +var/cache/yum/x86_64/ +var/cache/yum/x86_64/2/ +var/cache/yum/x86_64/2/.gpgkeyschecked.yum +var/cache/yum/x86_64/2/amzn2-core-debuginfo/ +var/cache/yum/x86_64/2/amzn2-core-debuginfo/cachecookie +var/cache/yum/x86_64/2/amzn2-core-debuginfo/gen/ +var/cache/yum/x86_64/2/amzn2-core-debuginfo/gen/primary_db.sqlite +var/cache/yum/x86_64/2/amzn2-core-debuginfo/mirrorlist.txt +var/cache/yum/x86_64/2/amzn2-core-debuginfo/packages/ +var/cache/yum/x86_64/2/amzn2-core-debuginfo/primary.sqlite.gz +var/cache/yum/x86_64/2/amzn2-core-debuginfo/repomd.xml +var/cache/yum/x86_64/2/amzn2-core-source/ +var/cache/yum/x86_64/2/amzn2-core-source/cachecookie +var/cache/yum/x86_64/2/amzn2-core-source/gen/ +var/cache/yum/x86_64/2/amzn2-core-source/gen/primary_db.sqlite +var/cache/yum/x86_64/2/amzn2-core-source/mirrorlist.txt +var/cache/yum/x86_64/2/amzn2-core-source/packages/ +var/cache/yum/x86_64/2/amzn2-core-source/primary.sqlite.gz +var/cache/yum/x86_64/2/amzn2-core-source/repomd.xml +var/cache/yum/x86_64/2/amzn2-core/ +var/cache/yum/x86_64/2/amzn2-core/gen/ +var/cache/yum/x86_64/2/amzn2-core/packages/ +var/cache/yum/x86_64/2/timedhosts +var/db/ +var/empty/ +var/games/ +var/gopher/ +var/kerberos/ +var/kerberos/krb5/ +var/kerberos/krb5/user/ +var/lang/ +var/lib/ +var/lib/alternatives/ +var/lib/alternatives/libnssckbi.so.x86_64 +var/lib/games/ +var/lib/misc/ +var/lib/rpm-state/ +var/lib/rpm/ +var/lib/rpm/.dbenv.lock +var/lib/rpm/.rpm.lock +var/lib/rpm/Basenames +var/lib/rpm/Conflictname +var/lib/rpm/Dirnames +var/lib/rpm/Group +var/lib/rpm/Installtid +var/lib/rpm/Name +var/lib/rpm/Obsoletename +var/lib/rpm/Packages +var/lib/rpm/Providename +var/lib/rpm/Requirename +var/lib/rpm/Sha1header +var/lib/rpm/Sigmd5 +var/lib/rpm/Triggername +var/lib/yum/ +var/lib/yum/history/ +var/lib/yum/history/2019-04-17/ +var/lib/yum/repos/ +var/lib/yum/repos/x86_64/ +var/lib/yum/repos/x86_64/2/ +var/lib/yum/repos/x86_64/2/amzn2-core-debuginfo/ +var/lib/yum/repos/x86_64/2/amzn2-core-source/ +var/lib/yum/repos/x86_64/2/amzn2-core/ +var/lib/yum/rpmdb-indexes/ +var/lib/yum/uuid +var/lib/yum/yumdb/ +var/lib/yum/yumdb/b/ +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/ +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/checksum_data +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/checksum_type +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/command_line +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/from_repo +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/from_repo_revision +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/from_repo_timestamp +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/installed_by +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/origin_url +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/reason +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/releasever +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/var_awsdomain +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/var_awsregion +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/var_product +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/var_target +var/lib/yum/yumdb/b/abe9213729802ba0e84b05f37c998e44dbcd14ab-basesystem-10.0-7.amzn2.0.1-noarch/var_uuid +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/ +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/command_line +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/from_repo +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/installed_by +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/origin_url +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/reason +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/releasever +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/var_product +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/var_target +var/lib/yum/yumdb/b/f38c9497b7d2456be143df5a29777b037d409a0b-bash-4.2.46-30.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/c/ +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/c/51c0528864578eff88028cb4effceeac11e50c88-chkconfig-1.7.4-1.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/ +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/checksum_data +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/checksum_type +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/command_line +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/from_repo +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/from_repo_revision +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/from_repo_timestamp +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/installed_by +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/origin_url +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/reason +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/releasever +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/var_awsdomain +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/var_awsregion +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/var_product +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/var_target +var/lib/yum/yumdb/c/b67cb84c66af9eef603f938bdeb3532ff64b9aed-ca-certificates-2018.2.22-70.0.amzn2-noarch/var_uuid +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/ +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/command_line +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/from_repo +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/installed_by +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/origin_url +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/reason +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/releasever +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/var_product +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/var_target +var/lib/yum/yumdb/c/ee1646f4b53cae79a73d8a15fc6ce11e837c7636-coreutils-8.22-21.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/f/ +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/ +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/checksum_data +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/checksum_type +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/command_line +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/from_repo +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/from_repo_revision +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/from_repo_timestamp +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/installed_by +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/origin_url +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/reason +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/releasever +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/var_awsdomain +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/var_awsregion +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/var_product +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/var_target +var/lib/yum/yumdb/f/37e34aa0e10049bda7940b99b0a33f0f6d7573dc-filesystem-3.2-25.amzn2.0.4-x86_64/var_uuid +var/lib/yum/yumdb/g/ +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/ +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/checksum_data +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/checksum_type +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/command_line +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/from_repo +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/from_repo_revision +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/from_repo_timestamp +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/installed_by +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/origin_url +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/reason +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/releasever +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/var_awsdomain +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/var_awsregion +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/var_product +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/var_target +var/lib/yum/yumdb/g/08827a5383fae7bc558a018f860a1f56b2e12b70-glibc-minimal-langpack-2.26-32.amzn2.0.1-x86_64/var_uuid +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/ +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/checksum_data +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/checksum_type +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/command_line +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/from_repo +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/from_repo_revision +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/installed_by +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/origin_url +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/reason +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/releasever +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/var_awsdomain +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/var_awsregion +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/var_product +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/var_target +var/lib/yum/yumdb/g/25f8d0fdd0249e0d18751be11c0a59272a31e888-gawk-4.0.2-4.amzn2.1.2-x86_64/var_uuid +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/g/9e802914b5902cb280b41a72e98c92458d72e7c4-gmp-6.0.0-15.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/ +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/checksum_data +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/checksum_type +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/command_line +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/from_repo +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/from_repo_revision +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/from_repo_timestamp +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/installed_by +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/origin_url +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/reason +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/releasever +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/var_awsdomain +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/var_awsregion +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/var_product +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/var_target +var/lib/yum/yumdb/g/d5143d68c579aca6a94b542006a3302d442ead62-glibc-common-2.26-32.amzn2.0.1-x86_64/var_uuid +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/g/e50d2dbc5253bfdaa3bfc8075189181b849df402-grep-2.20-3.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/ +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/checksum_data +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/checksum_type +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/command_line +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/from_repo +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/from_repo_revision +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/from_repo_timestamp +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/installed_by +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/origin_url +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/reason +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/releasever +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/var_awsdomain +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/var_awsregion +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/var_product +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/var_target +var/lib/yum/yumdb/g/e754eca2bb053c341297995d7c2418cbee3bfedc-glibc-2.26-32.amzn2.0.1-x86_64/var_uuid +var/lib/yum/yumdb/i/ +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/ +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/command_line +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/from_repo +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/installed_by +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/origin_url +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/reason +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/releasever +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/var_product +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/var_target +var/lib/yum/yumdb/i/1485a43be531fbfd124383c181eb9541ef353ecc-info-5.1-5.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/k/ +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/k/0bbbe79087587bf8a850e36cb3be72287f6c286e-keyutils-libs-1.5.8-3.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/ +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/checksum_data +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/checksum_type +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/command_line +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/from_repo +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/from_repo_revision +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/from_repo_timestamp +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/installed_by +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/origin_url +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/reason +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/releasever +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/var_awsdomain +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/var_awsregion +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/var_product +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/var_target +var/lib/yum/yumdb/k/46d2b3b8789714a82c881f74df9d3288451efb46-krb5-libs-1.15.1-20.amzn2.0.1-x86_64/var_uuid +var/lib/yum/yumdb/l/ +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/01d9706a801aff995cac7c685da0d0d70487163b-libgcc-7.3.1-5.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/02094ebf8068422d950b9341b03337ca493f18f5-libattr-2.4.46-12.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/0d9d7009ca82361ff1a14a923e8a69e0f05c1ed6-libffi-3.0.13-18.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/3e5b9117e826c74df190bc44536d8c2eb1ded5fd-libcom_err-1.42.9-12.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/67c56e4ef3c5c67d6b7ef5214042754ec99c163e-libsepol-2.5-8.1.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/7bcb1f19f5e02fc6c06c843fb2589f629be26d91-libverto-0.2.5-4.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/ +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/command_line +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/from_repo +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/installed_by +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/origin_url +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/reason +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/releasever +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/var_product +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/var_target +var/lib/yum/yumdb/l/a7d00a39361cd9f8bf3f082c381bc8be064c7a1b-libacl-2.2.51-14.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/bbb319b7b97df7ceb9e9a627ef6d9321f546c859-libstdc++-7.3.1-5.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/dc768c264c8f1f522fde1bc7adf3e3bf6411ba83-libselinux-2.5-12.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/e30882c56b0d0aaf587b7dc54a12716053a5f2d7-libcap-2.22-9.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/l/fb0a29842c79aaed98a69a207a69db8bfc690ea8-libtasn1-4.10-1.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/n/ +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/ +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/checksum_data +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/checksum_type +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/command_line +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/from_repo +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/from_repo_revision +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/from_repo_timestamp +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/installed_by +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/origin_url +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/reason +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/releasever +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/var_awsdomain +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/var_awsregion +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/var_product +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/var_target +var/lib/yum/yumdb/n/18848c4b77546e0d0a6903f087e2d93351a875da-ncurses-base-6.0-8.20170212.amzn2.1.2-noarch/var_uuid +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/ +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/command_line +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/from_repo +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/installed_by +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/origin_url +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/reason +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/releasever +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/var_product +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/var_target +var/lib/yum/yumdb/n/3c4da0ea324860d493fb112daeb65a20c05c702f-nss-softokn-freebl-3.36.0-5.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/ +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/checksum_data +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/checksum_type +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/command_line +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/from_repo +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/from_repo_revision +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/installed_by +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/origin_url +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/reason +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/releasever +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/var_awsdomain +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/var_awsregion +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/var_product +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/var_target +var/lib/yum/yumdb/n/975470857966da6ba4cb56cda4d05bbc481023eb-ncurses-libs-6.0-8.20170212.amzn2.1.2-x86_64/var_uuid +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/ +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/command_line +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/from_repo +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/installed_by +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/origin_url +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/reason +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/releasever +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/var_product +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/var_target +var/lib/yum/yumdb/n/a54ddd8cbb47e1daf4d141ee41890e8ca8ce5c05-nss-util-3.36.0-1.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/ +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/command_line +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/from_repo +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/installed_by +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/origin_url +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/reason +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/releasever +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/var_product +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/var_target +var/lib/yum/yumdb/n/c2023f3183c41fefcd78162100dac046cc9d7339-nspr-4.19.0-1.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/ +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/checksum_data +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/checksum_type +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/command_line +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/from_repo +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/from_repo_revision +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/installed_by +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/origin_url +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/reason +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/releasever +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/var_awsdomain +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/var_awsregion +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/var_product +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/var_target +var/lib/yum/yumdb/n/eaf7b924b2ea7f2a05e5b7ff2703b6b68694b42b-ncurses-6.0-8.20170212.amzn2.1.2-x86_64/var_uuid +var/lib/yum/yumdb/o/ +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/ +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/checksum_data +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/checksum_type +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/command_line +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/from_repo +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/from_repo_revision +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/from_repo_timestamp +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/installed_by +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/origin_url +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/reason +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/releasever +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/var_awsdomain +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/var_awsregion +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/var_product +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/var_target +var/lib/yum/yumdb/o/6a059dc7cb60687169f7c9dd924d6d2a5910b717-openssl-libs-1.0.2k-16.amzn2.1.1-x86_64/var_uuid +var/lib/yum/yumdb/p/ +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/p/06a4fa049dd3ab93135eb7126d8d2575807f3efc-p11-kit-0.23.5-3.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/p/4d2ab69e625c5f687cdae3ed041b2f814cb03425-p11-kit-trust-0.23.5-3.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/p/cd5c0a9a33d1ee4fc15aeb60ea0527391a975cda-popt-1.13-16.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/p/f92ca6f8626bce847854023c5823242c7b972791-pcre-8.32-17.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/s/ +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/ +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/checksum_data +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/checksum_type +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/command_line +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/from_repo +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/from_repo_revision +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/from_repo_timestamp +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/installed_by +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/origin_url +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/reason +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/releasever +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/var_awsdomain +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/var_awsregion +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/var_product +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/var_target +var/lib/yum/yumdb/s/2a1614add581dc1f5554d85e2a5eb9270e6c18c1-setup-2.8.71-10.amzn2-noarch/var_uuid +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/s/cfb233165aa1699bf653b8e2084d60c134cc8cec-sed-4.2.2-5.amzn2.0.2-x86_64/var_uuid +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/ +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/checksum_data +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/checksum_type +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/command_line +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/from_repo +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/from_repo_revision +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/installed_by +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/origin_url +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/reason +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/releasever +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/var_awsdomain +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/var_awsregion +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/var_product +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/var_target +var/lib/yum/yumdb/s/f665c1cb1163ad21ab611daadab4874c66d0b29f-system-release-2-10.amzn2-x86_64/var_uuid +var/lib/yum/yumdb/t/ +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/ +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/checksum_data +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/checksum_type +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/command_line +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/from_repo +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/from_repo_revision +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/from_repo_timestamp +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/installed_by +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/origin_url +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/reason +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/releasever +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/var_awsdomain +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/var_awsregion +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/var_product +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/var_target +var/lib/yum/yumdb/t/95bee05b2a022a0d24fb86160571e2a1658d9288-tzdata-2018i-1.amzn2-noarch/var_uuid +var/lib/yum/yumdb/z/ +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/ +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/checksum_data +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/checksum_type +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/command_line +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/from_repo +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/from_repo_revision +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/from_repo_timestamp +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/installed_by +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/origin_url +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/reason +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/releasever +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/var_awsdomain +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/var_awsregion +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/var_product +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/var_target +var/lib/yum/yumdb/z/53438c664cc7f5a896e9a949326aeea69d4512cd-zlib-1.2.7-17.amzn2.0.2-x86_64/var_uuid +var/local/ +var/lock +var/log/ +var/mail +var/nis/ +var/opt/ +var/preserve/ +var/rapid/ +var/run +var/runtime/ +var/spool/ +var/spool/lpd/ +var/spool/mail/ +var/task/ +var/tmp/ +var/tracer/ +var/yp/ diff --git a/base/base-2/missing.txt b/base/base-2/missing.txt new file mode 100644 index 00000000..75028323 --- /dev/null +++ b/base/base-2/missing.txt @@ -0,0 +1,10 @@ +/etc/securetty +/etc/shadow +/etc/gshadow +/var/log/yum.log +/var/lib/yum/history/2019-04-17/1 +/var/lib/yum/history/history-2019-04-17.sqlite +/var/cache/ldconfig +/usr/sbin/build-locale-archive +/usr/sbin/glibc_post_upgrade.x86_64 +/root/ diff --git a/base/base-2/packages.txt b/base/base-2/packages.txt new file mode 100644 index 00000000..88d114d4 --- /dev/null +++ b/base/base-2/packages.txt @@ -0,0 +1,44 @@ +basesystem-10.0-7.amzn2.0.1.noarch +bash-4.2.46-34.amzn2.x86_64 +ca-certificates-2019.2.32-76.amzn2.0.3.noarch +chkconfig-1.7.4-1.amzn2.0.2.x86_64 +coreutils-8.22-24.amzn2.x86_64 +filesystem-3.2-25.amzn2.0.4.x86_64 +gawk-4.0.2-4.amzn2.1.2.x86_64 +glibc-2.26-38.amzn2.x86_64 +glibc-all-langpacks-2.26-38.amzn2.x86_64 +glibc-common-2.26-38.amzn2.x86_64 +glibc-minimal-langpack-2.26-38.amzn2.x86_64 +gmp-6.0.0-15.amzn2.0.2.x86_64 +grep-2.20-3.amzn2.0.2.x86_64 +info-5.1-5.amzn2.x86_64 +keyutils-libs-1.5.8-3.amzn2.0.2.x86_64 +krb5-libs-1.15.1-37.amzn2.2.2.x86_64 +libacl-2.2.51-14.amzn2.x86_64 +libattr-2.4.46-12.amzn2.0.2.x86_64 +libcap-2.22-9.amzn2.0.2.x86_64 +libcom_err-1.42.9-19.amzn2.x86_64 +libffi-3.0.13-18.amzn2.0.2.x86_64 +libgcc-7.3.1-9.amzn2.x86_64 +libicu-50.2-4.amzn2.x86_64 +libselinux-2.5-12.amzn2.0.2.x86_64 +libsepol-2.5-8.1.amzn2.0.2.x86_64 +libstdc++-7.3.1-9.amzn2.x86_64 +libtasn1-4.10-1.amzn2.0.2.x86_64 +libverto-0.2.5-4.amzn2.0.2.x86_64 +ncurses-6.0-8.20170212.amzn2.1.3.x86_64 +ncurses-base-6.0-8.20170212.amzn2.1.3.noarch +ncurses-libs-6.0-8.20170212.amzn2.1.3.x86_64 +nspr-4.25.0-2.amzn2.x86_64 +nss-softokn-freebl-3.53.1-6.amzn2.x86_64 +nss-util-3.53.1-1.amzn2.x86_64 +openssl-libs-1.0.2k-19.amzn2.0.3.x86_64 +p11-kit-0.23.21-2.amzn2.0.1.x86_64 +p11-kit-trust-0.23.21-2.amzn2.0.1.x86_64 +pcre-8.32-17.amzn2.0.2.x86_64 +popt-1.13-16.amzn2.0.2.x86_64 +sed-4.2.2-5.amzn2.0.2.x86_64 +setup-2.8.71-10.amzn2.0.1.noarch +system-release-2-12.amzn2.x86_64 +tzdata-2020a-1.amzn2.noarch +zlib-1.2.7-18.amzn2.x86_64 diff --git a/base/build-2/Dockerfile b/base/build-2/Dockerfile new file mode 100644 index 00000000..104c9db7 --- /dev/null +++ b/base/build-2/Dockerfile @@ -0,0 +1,25 @@ +FROM lambci/lambda-base-2 + +FROM amazonlinux:2 + +COPY --from=0 / /opt/ + +RUN yum --installroot=/opt install -y yum yum-plugin-ovl yum-plugin-priorities + +FROM lambci/lambda-base-2 + +ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin \ + PIPX_BIN_DIR=/usr/local/bin \ + PIPX_HOME=/usr/local/pipx + +COPY --from=1 /opt / + +RUN chown root:root /tmp && \ + chmod 1777 /tmp && \ + yum install -y glibc-langpack-en && \ + yum groupinstall -y development && \ + yum install -y which clang cmake python-devel python3-devel amazon-linux-extras && \ + amazon-linux-extras install -y docker && \ + yum clean all && \ + pip3 install -U pip setuptools wheel --no-cache-dir && \ + pip3 install pipx --no-cache-dir diff --git a/base/build-all-build.sh b/base/build-all-build.sh new file mode 100755 index 00000000..d5b958be --- /dev/null +++ b/base/build-all-build.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +source ${PWD}/runtimes.sh + +TOP_DIR="${PWD}/.." + +for RUNTIME in $RUNTIMES; do + echo build-${RUNTIME} + + cd ${TOP_DIR}/${RUNTIME}/build + + docker build -t lambci/lambda:build-${RUNTIME} . +done diff --git a/base/build-all-run.sh b/base/build-all-run.sh new file mode 100755 index 00000000..27abcaab --- /dev/null +++ b/base/build-all-run.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +source ${PWD}/runtimes.sh + +TOP_DIR="${PWD}/.." + +for RUNTIME in $RUNTIMES; do + echo $RUNTIME + + cd ${TOP_DIR}/${RUNTIME}/run + + [ -x ./update_libs.sh ] && ./update_libs.sh + + docker build --no-cache -t lambci/lambda:${RUNTIME} . +done diff --git a/base/build-all.sh b/base/build-all.sh index e1fc96cc..aeb952d8 100755 --- a/base/build-all.sh +++ b/base/build-all.sh @@ -1,25 +1,6 @@ #!/bin/bash +set -e -RUNTIMES="nodejs4.3 nodejs6.10 nodejs8.10 python2.7 python3.6 python3.7 ruby2.5 java8 go1.x dotnetcore2.0 dotnetcore2.1 provided" +${PWD}/build-all-run.sh -TOP_DIR="${PWD}/.." - -for RUNTIME in $RUNTIMES; do - echo $RUNTIME - - cd ${TOP_DIR}/${RUNTIME}/run - - [ -x ./update_libs.sh ] && ./update_libs.sh - - docker build --no-cache -t lambci/lambda:${RUNTIME} . -done -docker tag lambci/lambda:nodejs4.3 lambci/lambda:latest - -for RUNTIME in $RUNTIMES; do - echo build-${RUNTIME} - - cd ${TOP_DIR}/${RUNTIME}/build - - docker build --no-cache -t lambci/lambda:build-${RUNTIME} . -done -docker tag lambci/lambda:build-nodejs4.3 lambci/lambda:build +${PWD}/build-all-build.sh diff --git a/base/build/Dockerfile b/base/build/Dockerfile index 232cab55..3a61529f 100644 --- a/base/build/Dockerfile +++ b/base/build/Dockerfile @@ -1,38 +1,20 @@ FROM lambci/lambda-base -ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin +ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin \ + PIPX_BIN_DIR=/usr/local/bin \ + PIPX_HOME=/usr/local/pipx -# A couple of packages are either missing critical-ish files, or didn't make it into the tar -# Reinstalling filesystem might not succeed fully, but continue anyway -RUN chmod 1777 /tmp && \ - /usr/bin/python3 -c "from configparser import SafeConfigParser; \ -yum_conf = SafeConfigParser(); \ -yum_conf.read('/etc/yum.conf'); \ -yum_conf.has_section('main') or yum_conf.add_section('main'); \ -yum_conf.set('main', 'plugins', '1'); \ -f = open('/etc/yum.conf', 'w'); \ -yum_conf.write(f); \ -f.close();" && \ - rpm --rebuilddb && \ - yum install -y --releasever=latest yum-plugin-ovl && \ - yum clean all && \ - yum reinstall -y setup pam shadow-utils audit-libs iptables && \ - yum clean all && \ - yum reinstall -y --releasever=latest glibc glibc-common && \ - yum clean all && \ - yum list installed | grep installed | awk '{print $1}' | xargs yum reinstall -y && \ - yum clean all && \ - yum install -y --releasever=latest glibc-devel && \ - yum clean all && \ +RUN chown root:root /tmp && \ + chmod 1777 /tmp && \ + yum groups mark convert && \ yum groupinstall -y development && \ - yum install -y clang cmake docker libffi-devel python27-devel python34-devel \ - libmpc-devel mpfr-devel gmp-devel cairo-devel expat-devel libicu-devel lua-devel \ - ncurses-devel readline-devel db4-devel gdbm-devel sqlite-devel keyutils-libs-devel libcom_err-devel && \ - yum clean all && \ - yum install -y --releasever=latest pcre-devel ImageMagick-devel libxml2-devel libxslt-devel && \ - yum install -y --releasever=latest libcurl-devel-$(yum list installed | grep libcurl | awk '{print $2}') && \ - yum install -y --releasever=latest krb5-devel-$(yum list installed | grep krb5 | awk '{print $2}') && \ + yum install -y clang cmake docker python27-devel python36-devel \ + ImageMagick-devel-6.9.10.68 cairo-devel libssh2-devel libxslt-devel libmpc-devel readline-devel db4-devel \ + libffi-devel expat-devel libicu-devel lua-devel gdbm-devel sqlite-devel pcre-devel libcurl-devel && \ yum clean all && \ - yum install -y libssh2-devel && \ - rm -rf /var/cache/yum /var/lib/rpm/__db.* && \ - > /var/log/yum.log + alternatives --set gcc /usr/bin/gcc48 && \ + alternatives --set g++ /usr/bin/g++48 && \ + alternatives --set cpp /usr/bin/cpp48 && \ + python3 -m pip install -U pip setuptools wheel --no-cache-dir && \ + pip install pipx --no-cache-dir && \ + pipx run awscli==1.* 2>/dev/null || true diff --git a/base/create-base-2.sh b/base/create-base-2.sh new file mode 100755 index 00000000..b776e6a0 --- /dev/null +++ b/base/create-base-2.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +curl -O https://lambci.s3.amazonaws.com/fs/base-2.tgz + +docker build --squash -t lambci/lambda-base-2 -f ./base-2/Dockerfile . + +rm ./base-2.tgz diff --git a/base/create-build-2.sh b/base/create-build-2.sh new file mode 100755 index 00000000..bd848cf6 --- /dev/null +++ b/base/create-build-2.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +docker build --no-cache --squash -t lambci/lambda-base-2:build -f ./build-2/Dockerfile . diff --git a/base/diff.sh b/base/diff.sh deleted file mode 100755 index 3201d335..00000000 --- a/base/diff.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -RUNTIMES="nodejs4.3 nodejs6.10 nodejs8.10 python2.7 python3.6 python3.7 ruby2.5 java8 go1.x dotnetcore2.0 dotnetcore2.1 provided" - -rm -rf diff -mkdir -p diff - -for RUNTIME in $RUNTIMES; do - docker pull lambci/lambda:${RUNTIME} - - mkdir -p ./diff/${RUNTIME}/docker/var - CONTAINER=$(docker create lambci/lambda:${RUNTIME}) - docker cp ${CONTAINER}:/var/runtime ./diff/${RUNTIME}/docker/var - docker cp ${CONTAINER}:/var/lang ./diff/${RUNTIME}/docker/var - - curl https://lambci.s3.amazonaws.com/fs/${RUNTIME}.tgz > ./diff/${RUNTIME}.tgz - - mkdir -p ./diff/${RUNTIME}/lambda - tar -zxf ./diff/${RUNTIME}.tgz -C ./diff/${RUNTIME}/lambda -- var/runtime var/lang - - tar -ztf ./diff/${RUNTIME}.tgz | sed 's/\/$//' | sort > ./diff/${RUNTIME}/fs.lambda.txt - - curl https://lambci.s3.amazonaws.com/fs/${RUNTIME}.fs.txt > ./diff/${RUNTIME}/fs.full.lambda.txt -done - -docker run --rm --entrypoint find lambci/lambda:python2.7 / | sed 's/^\///' | sort > ./diff/python2.7/fs.docker.txt - -DIFF_DIR="${PWD}/diff" - -cd ${DIFF_DIR}/python2.7 -pwd -diff fs.docker.txt fs.lambda.txt | grep -v '^< dev/' | grep -v '^< proc/' | grep -v '^< sys/' | grep -v 'var/runtime/' -diff docker/var/runtime/awslambda/bootstrap.py lambda/var/runtime/awslambda/bootstrap.py -diff -qr docker lambda - -cd ${DIFF_DIR}/nodejs4.3 -pwd -diff docker/var/runtime/node_modules/awslambda/index.js lambda/var/runtime/node_modules/awslambda/index.js -diff -qr docker lambda - -cd ${DIFF_DIR}/nodejs6.10 -pwd -diff docker/var/runtime/node_modules/awslambda/index.js lambda/var/runtime/node_modules/awslambda/index.js -diff -qr docker lambda - -cd ${DIFF_DIR}/nodejs8.10 -pwd -diff docker/var/runtime/node_modules/awslambda/index.js lambda/var/runtime/node_modules/awslambda/index.js -diff -qr docker lambda - -cd ${DIFF_DIR}/python3.6 -pwd -diff docker/var/runtime/awslambda/bootstrap.py lambda/var/runtime/awslambda/bootstrap.py -diff -qr docker lambda | grep -v __pycache__ - -cd ${DIFF_DIR}/python3.7 -pwd -diff docker/var/runtime/bootstrap lambda/var/runtime/bootstrap -diff docker/var/runtime/bootstrap.py lambda/var/runtime/bootstrap.py -diff docker/var/runtime/lambda_runtime_client.py lambda/var/runtime/lambda_runtime_client.py -diff -qr docker lambda | grep -v __pycache__ - -cd ${DIFF_DIR}/ruby2.5 -pwd -diff docker/var/runtime/bootstrap lambda/var/runtime/bootstrap -diff docker/var/runtime/lib lambda/var/runtime/lib -diff -qr docker lambda - -cd ${DIFF_DIR}/java8 -pwd -diff -qr docker lambda - -cd ${DIFF_DIR}/go1.x -pwd -diff -qr docker lambda - -cd ${DIFF_DIR}/dotnetcore2.0 -pwd -diff -qr docker lambda - -cd ${DIFF_DIR}/dotnetcore2.1 -pwd -diff -qr docker lambda diff --git a/base/dump-dotnetcore20/dump-dotnetcore20.csproj b/base/dump-dotnetcore20/dump-dotnetcore20.csproj index b1b485c0..6d97431e 100644 --- a/base/dump-dotnetcore20/dump-dotnetcore20.csproj +++ b/base/dump-dotnetcore20/dump-dotnetcore20.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/base/dump-dotnetcore21/dump-dotnetcore21.csproj b/base/dump-dotnetcore21/dump-dotnetcore21.csproj index a592a6c3..300ceb9b 100644 --- a/base/dump-dotnetcore21/dump-dotnetcore21.csproj +++ b/base/dump-dotnetcore21/dump-dotnetcore21.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/base/dump-dotnetcore31/Function.cs b/base/dump-dotnetcore31/Function.cs new file mode 100644 index 00000000..6cf55546 --- /dev/null +++ b/base/dump-dotnetcore31/Function.cs @@ -0,0 +1,78 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Threading.Tasks; + +using Amazon.Lambda.Core; +using Amazon.S3; + +[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] + +namespace dump_dotnetcore31 +{ + public class Function + { + /// + /// Lambda function to dump the container directories /var/lang + /// and /var/runtime and upload the resulting archive to S3 + /// + /// + public async Task FunctionHandler(object invokeEvent, ILambdaContext context) + { + string filename = "dotnetcore3.1.tgz"; + string cmd = $"tar -cpzf /tmp/{filename} --numeric-owner --ignore-failed-read /var/runtime /var/lang"; + + Console.WriteLine($"invokeEvent: {invokeEvent}"); + Console.WriteLine($"context.RemainingTime: {context.RemainingTime}"); + + Console.WriteLine("Parent cmdline:"); + Console.WriteLine(File.ReadAllText("/proc/1/cmdline").Replace("\0", " ")); + + Console.WriteLine("Parent env:"); + RunShell("xargs --null --max-args=1 < /proc/1/environ"); + + Console.WriteLine("This cmdline:"); + Console.WriteLine(File.ReadAllText($"/proc/{Process.GetCurrentProcess().Id}/cmdline").Replace("\0", " ")); + + Console.WriteLine("This env:"); + RunShell($"xargs --null --max-args=1 < /proc/{Process.GetCurrentProcess().Id}/environ"); + + Console.WriteLine($"Current working directory: {Directory.GetCurrentDirectory()}"); + + RunShell(cmd); + + Console.WriteLine("Zipping done! Uploading..."); + + var s3Client = new AmazonS3Client(); + var response = await s3Client.PutObjectAsync(new Amazon.S3.Model.PutObjectRequest + { + BucketName = "lambci", + Key = $"fs/{filename}", + FilePath = $"/tmp/{filename}", + CannedACL = S3CannedACL.PublicRead, + }); + + Console.WriteLine("Uploading done!"); + + return response.HttpStatusCode.ToString(); + } + + private static Process RunShell(string cmd) + { + var escapedArgs = cmd.Replace("\"", "\\\""); + var process = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = "/bin/sh", + Arguments = $"-c \"{escapedArgs}\"", + UseShellExecute = false, + CreateNoWindow = true, + } + }; + process.Start(); + process.WaitForExit(); + return process; + } + } +} diff --git a/base/dump-dotnetcore31/aws-lambda-tools-defaults.json b/base/dump-dotnetcore31/aws-lambda-tools-defaults.json new file mode 100644 index 00000000..426ac9cb --- /dev/null +++ b/base/dump-dotnetcore31/aws-lambda-tools-defaults.json @@ -0,0 +1,8 @@ +{ + "configuration": "Release", + "framework": "netcoreapp3.1", + "function-runtime": "dotnetcore3.1", + "function-memory-size": 3008, + "function-timeout": 60, + "function-handler": "dump_dotnetcore31::dump_dotnetcore31.Function::FunctionHandler" +} diff --git a/base/dump-dotnetcore31/dump-dotnetcore31.csproj b/base/dump-dotnetcore31/dump-dotnetcore31.csproj new file mode 100644 index 00000000..8785cb12 --- /dev/null +++ b/base/dump-dotnetcore31/dump-dotnetcore31.csproj @@ -0,0 +1,20 @@ + + + + netcoreapp3.1 + dump_dotnetcore31 + true + dump_dotnetcore31 + + + + + + + + + + + + + diff --git a/base/dump-go1x.go b/base/dump-go1x/dump-go1x.go similarity index 91% rename from base/dump-go1x.go rename to base/dump-go1x/dump-go1x.go index 54c13b0a..25694be8 100644 --- a/base/dump-go1x.go +++ b/base/dump-go1x/dump-go1x.go @@ -12,10 +12,10 @@ import ( "os/exec" ) -func HandleRequest(ctx context.Context, event interface{}) (*s3.PutObjectOutput, error) { +func handleRequest(ctx context.Context, event interface{}) (*s3.PutObjectResponse, error) { filename := "go1.x.tgz" - RunShell("tar -cpzf /tmp/" + filename + " --numeric-owner --ignore-failed-read /var/runtime /var/lang") + runShell("tar -cpzf /tmp/" + filename + " --numeric-owner --ignore-failed-read /var/runtime /var/lang") fmt.Println("Zipping done! Uploading...") @@ -34,16 +34,16 @@ func HandleRequest(ctx context.Context, event interface{}) (*s3.PutObjectOutput, Body: file, Bucket: aws.String("lambci"), Key: aws.String("fs/" + filename), - }).Send() + }).Send(context.Background()) if err != nil { log.Fatal(err) } fmt.Println("Uploading done!") - RunShell("ps aux") + runShell("ps aux") - RunShell("xargs --null --max-args=1 < /proc/1/environ") + runShell("xargs --null --max-args=1 < /proc/1/environ") for _, a := range os.Args { fmt.Println(a) @@ -58,7 +58,7 @@ func HandleRequest(ctx context.Context, event interface{}) (*s3.PutObjectOutput, return resp, nil } -func RunShell(shellCmd string) { +func runShell(shellCmd string) { cmd := exec.Command("sh", "-c", shellCmd) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr @@ -66,7 +66,7 @@ func RunShell(shellCmd string) { } func main() { - lambda.Start(HandleRequest) + lambda.Start(handleRequest) } /* diff --git a/base/dump-go1x/go.mod b/base/dump-go1x/go.mod new file mode 100644 index 00000000..1dccccbe --- /dev/null +++ b/base/dump-go1x/go.mod @@ -0,0 +1,8 @@ +module dump-go1x + +require ( + github.com/aws/aws-lambda-go v1.13.3 + github.com/aws/aws-sdk-go-v2 v0.17.0 +) + +go 1.15 diff --git a/base/dump-go1x/go.sum b/base/dump-go1x/go.sum new file mode 100644 index 00000000..f6f122bc --- /dev/null +++ b/base/dump-go1x/go.sum @@ -0,0 +1,32 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aws/aws-lambda-go v1.13.2 h1:8lYuRVn6rESoUNZXdbCmtGB4bBk4vcVYojiHjE4mMrM= +github.com/aws/aws-lambda-go v1.13.2/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go-v2 v0.16.0 h1:X5pkFnjRNdDEX18NwDGWMaWL5ocNQX0qIYEhEcsTy64= +github.com/aws/aws-sdk-go-v2 v0.16.0/go.mod h1:pFLIN9LDjOEwHfruGweAXEq0XaD6uRkY8FsRkxhuBIg= +github.com/aws/aws-sdk-go-v2 v0.17.0 h1:b/9gp0SD6doAWv72f3ZwzFJSsWmUw9dM8wMNmf6OBws= +github.com/aws/aws-sdk-go-v2 v0.17.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/base/dump-java11/.classpath b/base/dump-java11/.classpath new file mode 100644 index 00000000..e16509f7 --- /dev/null +++ b/base/dump-java11/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/base/dump-java11/.project b/base/dump-java11/.project new file mode 100644 index 00000000..52873e92 --- /dev/null +++ b/base/dump-java11/.project @@ -0,0 +1,34 @@ + + + dump-java11 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1599680497019 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/base/dump-java11/.settings/org.eclipse.buildship.core.prefs b/base/dump-java11/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..39c6821c --- /dev/null +++ b/base/dump-java11/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0-20191016123526+0000)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home= +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/base/dump-java11/.settings/org.eclipse.jdt.core.prefs b/base/dump-java11/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..18ad8952 --- /dev/null +++ b/base/dump-java11/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.source=11 diff --git a/base/dump-java11/build.gradle b/base/dump-java11/build.gradle new file mode 100644 index 00000000..54e4b202 --- /dev/null +++ b/base/dump-java11/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'java' + +sourceCompatibility = '11' +targetCompatibility = '11' + +repositories { + mavenCentral() +} + +dependencies { + implementation ( + 'com.amazonaws:aws-lambda-java-core:1.2.0', + 'com.amazonaws:aws-lambda-java-events:2.2.7', + 'com.amazonaws:aws-java-sdk-s3:1.11.681' + ) +} + +task buildZip(type: Zip) { + from compileJava + from processResources + into('lib') { + from configurations.runtimeClasspath + } +} + +build.dependsOn buildZip + +// docker run --rm -v "$PWD":/app -w /app gradle:jdk11 gradle build diff --git a/base/dump-java11/src/main/java/org/lambci/lambda/DumpJava11.java b/base/dump-java11/src/main/java/org/lambci/lambda/DumpJava11.java new file mode 100644 index 00000000..f2f00f35 --- /dev/null +++ b/base/dump-java11/src/main/java/org/lambci/lambda/DumpJava11.java @@ -0,0 +1,66 @@ +package org.lambci.lambda; + +import java.io.File; +import java.lang.management.ManagementFactory; +import java.util.Map; +import java.util.Scanner; + +import com.amazonaws.services.lambda.runtime.Context; +import com.amazonaws.services.lambda.runtime.RequestHandler; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import com.amazonaws.services.s3.model.CannedAccessControlList; +import com.amazonaws.services.s3.model.PutObjectRequest; +import com.amazonaws.services.s3.model.PutObjectResult; + +public class DumpJava11 implements RequestHandler { + + @Override + public PutObjectResult handleRequest(Object input, Context context) { + String filename = "java11.tgz"; + String cmd = "tar -cpzf /tmp/" + filename + " --numeric-owner --ignore-failed-read /var/runtime /var/lang"; + AmazonS3 s3client = AmazonS3ClientBuilder.standard().withRegion("us-east-1").build(); + + System.out.println(ManagementFactory.getRuntimeMXBean().getInputArguments().toString()); + System.out.println(System.getProperty("sun.java.command")); + System.out.println(System.getProperty("java.home")); + System.out.println(System.getProperty("java.library.path")); + System.out.println(System.getProperty("java.class.path")); + System.out.println(System.getProperty("user.dir")); + System.out.println(System.getProperty("user.home")); + System.out.println(System.getProperty("user.name")); + System.out.println(new File(".").getAbsolutePath()); + Map env = System.getenv(); + for (String envName : env.keySet()) { + System.out.println(envName + "=" + env.get(envName)); + } + + try { + Process process = Runtime.getRuntime().exec(new String[] { "sh", "-c", cmd }); + + try (Scanner stdoutScanner = new Scanner(process.getInputStream()); + Scanner stderrScanner = new Scanner(process.getErrorStream())) { + // Echo all stdout first + while (stdoutScanner.hasNextLine()) { + System.out.println(stdoutScanner.nextLine()); + } + // Then echo stderr + while (stderrScanner.hasNextLine()) { + System.err.println(stderrScanner.nextLine()); + } + } + + process.waitFor(); + if (process.exitValue() != 0) { + return null; + } + + System.out.println("Zipping done! Uploading..."); + + return s3client.putObject(new PutObjectRequest("lambci", "fs/" + filename, new File("/tmp/" + filename)) + .withCannedAcl(CannedAccessControlList.PublicRead)); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/base/dump-java8/.classpath b/base/dump-java8/.classpath index 67bbbc76..4857be40 100644 --- a/base/dump-java8/.classpath +++ b/base/dump-java8/.classpath @@ -1,20 +1,12 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/base/dump-java8/.project b/base/dump-java8/.project index a2a50935..848abc21 100644 --- a/base/dump-java8/.project +++ b/base/dump-java8/.project @@ -1,23 +1,34 @@ - dump-java8 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - + dump-java8 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1599680497033 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/base/dump-java8/.settings/org.eclipse.buildship.core.prefs b/base/dump-java8/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..90865998 --- /dev/null +++ b/base/dump-java8/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home= +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/base/dump-java8/.settings/org.eclipse.core.resources.prefs b/base/dump-java8/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..2b763404 --- /dev/null +++ b/base/dump-java8/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 diff --git a/base/dump-java8/.settings/org.eclipse.jdt.core.prefs b/base/dump-java8/.settings/org.eclipse.jdt.core.prefs index 714351ae..2f5cc74c 100644 --- a/base/dump-java8/.settings/org.eclipse.jdt.core.prefs +++ b/base/dump-java8/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/base/dump-java8/build.gradle b/base/dump-java8/build.gradle new file mode 100644 index 00000000..77e5fb16 --- /dev/null +++ b/base/dump-java8/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'java' + +sourceCompatibility = '1.8' +targetCompatibility = '1.8' + +repositories { + mavenCentral() +} + +dependencies { + implementation ( + 'com.amazonaws:aws-lambda-java-core:1.2.0', + 'com.amazonaws:aws-lambda-java-events:2.2.7', + 'com.amazonaws:aws-java-sdk-s3:1.11.681' + ) +} + +task buildZip(type: Zip) { + from compileJava + from processResources + into('lib') { + from configurations.runtimeClasspath + } +} + +build.dependsOn buildZip + +// docker run --rm -v "$PWD":/app -w /app gradle:jdk8 gradle build diff --git a/base/dump-java8/dependency-reduced-pom.xml b/base/dump-java8/dependency-reduced-pom.xml deleted file mode 100644 index 3f463e17..00000000 --- a/base/dump-java8/dependency-reduced-pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - org.lambci.lambda - dump-java8 - 1.0.0 - - - - maven-compiler-plugin - 3.8.0 - - 1.8 - 1.8 - UTF-8 - true - - - - maven-shade-plugin - 3.2.0 - - - package - - shade - - - - - com.amazonaws:aws-lambda-java-events - com.amazonaws:aws-lambda-java-core - - - - - - - - - - - com.amazonaws - aws-lambda-java-events - 2.2.4 - compile - - - com.amazonaws - aws-lambda-java-core - 1.2.0 - compile - - - - - - com.amazonaws - aws-java-sdk-bom - 1.11.452 - pom - import - - - - diff --git a/base/dump-java8/pom.xml b/base/dump-java8/pom.xml deleted file mode 100644 index 56d4fa00..00000000 --- a/base/dump-java8/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - 4.0.0 - - org.lambci.lambda - dump-java8 - 1.0.0 - jar - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - 1.8 - 1.8 - UTF-8 - true - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.0 - - - package - - shade - - - - - com.amazonaws:aws-lambda-java-events - com.amazonaws:aws-lambda-java-core - - - - - - - - - - - - - com.amazonaws - aws-java-sdk-bom - 1.11.452 - pom - import - - - - - - - com.amazonaws - aws-java-sdk-s3 - - - com.amazonaws - aws-lambda-java-events - 2.2.4 - - - com.amazonaws - aws-lambda-java-core - 1.2.0 - - - diff --git a/base/dump-java8/src/main/java/org/lambci/lambda/DumpJava8.java b/base/dump-java8/src/main/java/org/lambci/lambda/DumpJava8.java index 46456a8c..c573ab05 100644 --- a/base/dump-java8/src/main/java/org/lambci/lambda/DumpJava8.java +++ b/base/dump-java8/src/main/java/org/lambci/lambda/DumpJava8.java @@ -19,8 +19,6 @@ public class DumpJava8 implements RequestHandler { public PutObjectResult handleRequest(Object input, Context context) { String filename = "java8.tgz"; String cmd = "tar -cpzf /tmp/" + filename + " --numeric-owner --ignore-failed-read /var/runtime /var/lang"; -// String filename = "java8.fs.txt"; -// String cmd = "find / -ls | grep -v /proc | grep -v /var/runtime | grep -v /var/task | grep -v /var/lang | sort -k11 > /tmp/" + filename; AmazonS3 s3client = AmazonS3ClientBuilder.standard().withRegion("us-east-1").build(); System.out.println(ManagementFactory.getRuntimeMXBean().getInputArguments().toString()); diff --git a/base/dump-java8al2/.classpath b/base/dump-java8al2/.classpath new file mode 100644 index 00000000..4857be40 --- /dev/null +++ b/base/dump-java8al2/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/base/dump-java8al2/.project b/base/dump-java8al2/.project new file mode 100644 index 00000000..b3dcbd7f --- /dev/null +++ b/base/dump-java8al2/.project @@ -0,0 +1,34 @@ + + + dump-java8 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1599680497040 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/base/dump-java8al2/.settings/org.eclipse.buildship.core.prefs b/base/dump-java8al2/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..90865998 --- /dev/null +++ b/base/dump-java8al2/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home= +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/base/dump-java8al2/.settings/org.eclipse.core.resources.prefs b/base/dump-java8al2/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..2b763404 --- /dev/null +++ b/base/dump-java8al2/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 diff --git a/base/dump-java8al2/.settings/org.eclipse.jdt.core.prefs b/base/dump-java8al2/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..2f5cc74c --- /dev/null +++ b/base/dump-java8al2/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/base/dump-java8al2/build.gradle b/base/dump-java8al2/build.gradle new file mode 100644 index 00000000..77e5fb16 --- /dev/null +++ b/base/dump-java8al2/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'java' + +sourceCompatibility = '1.8' +targetCompatibility = '1.8' + +repositories { + mavenCentral() +} + +dependencies { + implementation ( + 'com.amazonaws:aws-lambda-java-core:1.2.0', + 'com.amazonaws:aws-lambda-java-events:2.2.7', + 'com.amazonaws:aws-java-sdk-s3:1.11.681' + ) +} + +task buildZip(type: Zip) { + from compileJava + from processResources + into('lib') { + from configurations.runtimeClasspath + } +} + +build.dependsOn buildZip + +// docker run --rm -v "$PWD":/app -w /app gradle:jdk8 gradle build diff --git a/base/dump-java8al2/src/main/java/org/lambci/lambda/DumpJava8.java b/base/dump-java8al2/src/main/java/org/lambci/lambda/DumpJava8.java new file mode 100644 index 00000000..f842aa4a --- /dev/null +++ b/base/dump-java8al2/src/main/java/org/lambci/lambda/DumpJava8.java @@ -0,0 +1,88 @@ +package org.lambci.lambda; + +import java.io.File; +import java.io.IOException; +import java.lang.InterruptedException; +import java.lang.management.ManagementFactory; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.Map; +import java.util.Scanner; + +import com.amazonaws.services.lambda.runtime.Context; +import com.amazonaws.services.lambda.runtime.RequestHandler; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import com.amazonaws.services.s3.model.CannedAccessControlList; +import com.amazonaws.services.s3.model.PutObjectRequest; +import com.amazonaws.services.s3.model.PutObjectResult; + +public class DumpJava8 implements RequestHandler { + + @Override + public PutObjectResult handleRequest(Object input, Context context) { + String filename = "java8.al2.tgz"; + String cmd = "tar -cpzf /tmp/" + filename + " --numeric-owner --ignore-failed-read /var/runtime /var/lang"; + AmazonS3 s3client = AmazonS3ClientBuilder.standard().withRegion("us-east-1").build(); + + System.out.println(ManagementFactory.getRuntimeMXBean().getInputArguments().toString()); + System.out.println(System.getProperty("sun.java.command")); + System.out.println(System.getProperty("java.home")); + System.out.println(System.getProperty("java.library.path")); + System.out.println(System.getProperty("java.class.path")); + System.out.println(System.getProperty("user.dir")); + System.out.println(System.getProperty("user.home")); + System.out.println(System.getProperty("user.name")); + System.out.println(new File(".").getAbsolutePath()); + Map env = System.getenv(); + for (String envName : env.keySet()) { + System.out.println(envName + "=" + env.get(envName)); + } + + try { + int pid = Integer.parseInt(new File("/proc/self").getCanonicalFile().getName()); + + System.out.println("Parent cmdline:"); + System.out.println(new String(Files.readAllBytes(Paths.get("/proc/1/cmdline"))).replace("\0", " ")); + + System.out.println("Parent env:"); + runShell("xargs --null --max-args=1 < /proc/1/environ"); + + System.out.println("This cmdline:"); + System.out.println(new String(Files.readAllBytes(Paths.get("/proc/" + pid + "/cmdline"))).replace("\0", " ")); + + System.out.println("This env:"); + runShell("xargs --null --max-args=1 < /proc/" + pid + "/environ"); + + if (runShell(cmd) != 0) { + return null; + } + + System.out.println("Zipping done! Uploading..."); + + return s3client.putObject(new PutObjectRequest("lambci", "fs/" + filename, new File("/tmp/" + filename)) + .withCannedAcl(CannedAccessControlList.PublicRead)); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public static int runShell(String cmd) throws IOException, InterruptedException { + Process process = Runtime.getRuntime().exec(new String[] { "sh", "-c", cmd }); + + try (Scanner stdoutScanner = new Scanner(process.getInputStream()); + Scanner stderrScanner = new Scanner(process.getErrorStream())) { + // Echo all stdout first + while (stdoutScanner.hasNextLine()) { + System.out.println(stdoutScanner.nextLine()); + } + // Then echo stderr + while (stderrScanner.hasNextLine()) { + System.err.println(stderrScanner.nextLine()); + } + } + + process.waitFor(); + return process.exitValue(); + } +} diff --git a/base/dump-node10x.js b/base/dump-node10x.js new file mode 100644 index 00000000..a799e472 --- /dev/null +++ b/base/dump-node10x.js @@ -0,0 +1,56 @@ +const fs = require('fs') +const { execSync } = require('child_process') +const AWS = require('aws-sdk') +const s3 = new AWS.S3() + +// Depends on tar-find-layer for the tar/find/xargs binaries +exports.handler = async(event, context) => { + const execOpts = { stdio: 'inherit', maxBuffer: 16 * 1024 * 1024 } + + let filename = 'base-2.tgz' + let cmd = 'tar -cpzf /tmp/' + filename + + ' -C / --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/tmp ' + + '--exclude=/var/task/* --exclude=/var/runtime/* --exclude=/var/lang/* --exclude=/var/rapid/* --exclude=/opt/* ' + + '--numeric-owner --ignore-failed-read /' + + execSync(event.cmd || cmd, execOpts) + if (event.cmd) return + + console.log('Zipping done! Uploading...') + + let data = await s3.upload({ + Bucket: 'lambci', + Key: 'fs/' + filename, + Body: fs.createReadStream('/tmp/' + filename), + ACL: 'public-read', + }).promise() + + filename = 'nodejs10.x.tgz' + cmd = 'tar -cpzf /tmp/' + filename + + ' --numeric-owner --ignore-failed-read /var/runtime /var/lang /var/rapid' + + execSync(cmd, execOpts) + + console.log('Zipping done! Uploading...') + + data = await s3.upload({ + Bucket: 'lambci', + Key: 'fs/' + filename, + Body: fs.createReadStream('/tmp/' + filename), + ACL: 'public-read', + }).promise() + + console.log('Uploading done!') + + console.log(process.execPath) + console.log(process.execArgv) + console.log(process.argv) + console.log(process.cwd()) + console.log(__filename) + console.log(process.env) + execSync('echo /proc/1/environ; xargs -n 1 -0 < /proc/1/environ', execOpts) + execSync("bash -O extglob -c 'for cmd in /proc/+([0-9])/cmdline; do echo $cmd; xargs -n 1 -0 < $cmd; done'", execOpts) + console.log(context) + + return data +} diff --git a/base/dump-node12x.js b/base/dump-node12x.js new file mode 100644 index 00000000..765af273 --- /dev/null +++ b/base/dump-node12x.js @@ -0,0 +1,38 @@ +const fs = require('fs') +const { execSync } = require('child_process') +const AWS = require('aws-sdk') +const s3 = new AWS.S3() + +// Depends on tar-find-layer for the tar/find/xargs binaries +exports.handler = async(event, context) => { + const execOpts = { stdio: 'inherit', maxBuffer: 16 * 1024 * 1024 } + + let filename = 'nodejs12.x.tgz' + let cmd = 'tar -cpzf /tmp/' + filename + + ' --numeric-owner --ignore-failed-read /var/runtime /var/lang /var/rapid' + + execSync(cmd, execOpts) + + console.log('Zipping done! Uploading...') + + let data = await s3.upload({ + Bucket: 'lambci', + Key: 'fs/' + filename, + Body: fs.createReadStream('/tmp/' + filename), + ACL: 'public-read', + }).promise() + + console.log('Uploading done!') + + console.log(process.execPath) + console.log(process.execArgv) + console.log(process.argv) + console.log(process.cwd()) + console.log(__filename) + console.log(process.env) + execSync('echo /proc/1/environ; xargs -n 1 -0 < /proc/1/environ', execOpts) + execSync("bash -O extglob -c 'for cmd in /proc/+([0-9])/cmdline; do echo $cmd; xargs -n 1 -0 < $cmd; done'", execOpts) + console.log(context) + + return data +} diff --git a/base/dump-nodejs43.js b/base/dump-nodejs43.js index 7385e920..0d618643 100644 --- a/base/dump-nodejs43.js +++ b/base/dump-nodejs43.js @@ -45,15 +45,15 @@ exports.handler = function(event, context, cb) { }) } -// /usr/local/lib64/node-v4.3.x/bin/node -// [ '--max-old-space-size=1229', '--max-semi-space-size=76', '--max-executable-size=153', '--expose-gc' ] -// [ '/usr/local/lib64/node-v4.3.x/bin/node', '/var/runtime/node_modules/awslambda/index.js' ] +// /var/lang/bin/node +// [ '--max-old-space-size=2547', '--max-semi-space-size=150', '--max-executable-size=160', '--expose-gc' ] +// [ '/var/lang/bin/node', '/var/runtime/node_modules/awslambda/index.js' ] // /var/task // /var/task/index.js // { -// PATH: '/usr/local/lib64/node-v4.3.x/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin', +// PATH: '/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin', // LANG: 'en_US.UTF-8', -// LD_LIBRARY_PATH: '/usr/local/lib64/node-v4.3.x/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib', +// LD_LIBRARY_PATH: '/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib', // LAMBDA_TASK_ROOT: '/var/task', // LAMBDA_RUNTIME_DIR: '/var/runtime', // AWS_REGION: 'us-east-1', diff --git a/base/dump-packages.sh b/base/dump-packages.sh new file mode 100755 index 00000000..7e0f0cc1 --- /dev/null +++ b/base/dump-packages.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +curl https://lambci.s3.amazonaws.com/fs/base.tgz | tar -xz --strip-components=2 -- var/lib/rpm + +docker pull amazonlinux:1 +docker run -v "$PWD/rpm":/rpm --rm amazonlinux:1 rpm -qa --dbpath /rpm | grep -v ^gpg-pubkey- | sort > packages.txt +rm -rf rpm + +docker run --rm amazonlinux:1 bash -c 'yum upgrade -y > /dev/null && rpm -qa' | grep -v ^gpg-pubkey- | sort > amazonlinux1.txt + +diff -w -d amazonlinux1.txt packages.txt diff --git a/base/dump-provided.sh b/base/dump-provided.sh index 690ec844..9a3472f3 100755 --- a/base/dump-provided.sh +++ b/base/dump-provided.sh @@ -6,7 +6,7 @@ export HOME=/tmp export PATH=/tmp/.local/bin:$PATH cd /tmp -curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py +curl -sSL https://bootstrap.pypa.io/2.7/get-pip.py -o get-pip.py python get-pip.py --user pip install --user awscli diff --git a/base/dump-providedal2/bootstrap.go b/base/dump-providedal2/bootstrap.go new file mode 100644 index 00000000..a0f1d7b3 --- /dev/null +++ b/base/dump-providedal2/bootstrap.go @@ -0,0 +1,87 @@ +// docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c \ +// 'go mod download && go build -tags lambda.norpc -ldflags="-s -w" bootstrap.go' && \ +// zip bootstrap.zip bootstrap + +package main + +import ( + "context" + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "strings" + + "github.com/aws/aws-lambda-go/lambda" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/external" + "github.com/aws/aws-sdk-go-v2/service/s3" +) + +func handleRequest(ctx context.Context, event interface{}) (*s3.PutObjectResponse, error) { + filename := "provided.al2.tgz" + + runShell("tar -cpzf /tmp/" + filename + " --numeric-owner --ignore-failed-read /var/runtime /var/lang") + + fmt.Println("Zipping done! Uploading...") + + cfg, err := external.LoadDefaultAWSConfig() + if err != nil { + log.Fatal(err) + } + + file, err := os.Open("/tmp/" + filename) + if err != nil { + log.Fatal(err) + } + + resp, err := s3.New(cfg).PutObjectRequest(&s3.PutObjectInput{ + ACL: s3.ObjectCannedACLPublicRead, + Body: file, + Bucket: aws.String("lambci"), + Key: aws.String("fs/" + filename), + }).Send(context.Background()) + if err != nil { + log.Fatal(err) + } + + fmt.Println("Uploading done!") + + fmt.Println("Parent env:") + runShell("xargs --null --max-args=1 < /proc/1/environ") + + fmt.Println("Parent cmdline:") + content, err := ioutil.ReadFile("/proc/1/cmdline") + fmt.Println(strings.ReplaceAll(string(content), "\x00", " ")) + + fmt.Println("os.Args:") + for _, a := range os.Args { + fmt.Println(a) + } + + fmt.Println("os.Getwd:") + pwd, _ := os.Getwd() + fmt.Println(pwd) + + fmt.Println("os.Environ:") + for _, e := range os.Environ() { + fmt.Println(e) + } + + fmt.Println("ctx:") + fmt.Println(ctx) + + return resp, nil +} + +func runShell(shellCmd string) { + cmd := exec.Command("sh", "-c", shellCmd) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + cmd.Run() +} + +func main() { + lambda.Start(handleRequest) +} diff --git a/base/dump-providedal2/go.mod b/base/dump-providedal2/go.mod new file mode 100644 index 00000000..4fc94c95 --- /dev/null +++ b/base/dump-providedal2/go.mod @@ -0,0 +1,8 @@ +module bootstrap + +require ( + github.com/aws/aws-lambda-go v1.19.0 + github.com/aws/aws-sdk-go-v2 v0.24.0 +) + +go 1.15 diff --git a/base/dump-providedal2/go.sum b/base/dump-providedal2/go.sum new file mode 100644 index 00000000..0b1fc768 --- /dev/null +++ b/base/dump-providedal2/go.sum @@ -0,0 +1,26 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aws/aws-lambda-go v1.19.0/go.mod h1:jJmlefzPfGnckuHdXX7/80O3BvUUi12XOkbv4w9SGLU= +github.com/aws/aws-sdk-go-v2 v0.24.0/go.mod h1:2LhT7UgHOXK3UXONKI5OMgIyoQL6zTAw/jwIeX6yqzw= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/base/dump-python36.py b/base/dump-python36.py index ae34c129..6a123412 100644 --- a/base/dump-python36.py +++ b/base/dump-python36.py @@ -12,7 +12,7 @@ def lambda_handler(event, context): if 'cmd' in event: - return print(subprocess.check_output(['sh', '-c', event['cmd']])) + return print(subprocess.check_output(['sh', '-c', event['cmd']]).decode('utf-8')) filename = 'python3.6.tgz' diff --git a/base/dump-python37.py b/base/dump-python37.py index 0f25e987..fd9c5dca 100644 --- a/base/dump-python37.py +++ b/base/dump-python37.py @@ -12,7 +12,7 @@ def lambda_handler(event, context): if 'cmd' in event: - return print(subprocess.check_output(['sh', '-c', event['cmd']])) + return print(subprocess.check_output(['sh', '-c', event['cmd']]).decode('utf-8')) filename = 'python3.7.tgz' diff --git a/base/dump-python38.py b/base/dump-python38.py new file mode 100644 index 00000000..319fe042 --- /dev/null +++ b/base/dump-python38.py @@ -0,0 +1,43 @@ +from __future__ import print_function + +import os +import sys +import subprocess +import json +import boto3 +from boto3.s3.transfer import S3Transfer + +TRANSFER = S3Transfer(boto3.client('s3')) + + +def lambda_handler(event, context): + if 'cmd' in event: + return print(subprocess.check_output(['sh', '-c', event['cmd']]).decode('utf-8')) + + filename = 'python3.8.tgz' + + subprocess.call(['sh', '-c', f'tar -cpzf /tmp/{filename} --numeric-owner --ignore-failed-read ' + + '/var/runtime /var/lang /var/rapid']) + + print('Zipping done! Uploading...') + + TRANSFER.upload_file(f'/tmp/{filename}', 'lambci', + f'fs/{filename}', extra_args={'ACL': 'public-read'}) + + print('Uploading done!') + + info = {'sys.executable': sys.executable, + 'sys.argv': sys.argv, + 'sys.path': sys.path, + 'os.getcwd': os.getcwd(), + '__file__': __file__, + 'os.environ': {k: str(v) for k, v in os.environ.items()}, + 'context': {k: str(v) for k, v in context.__dict__.items()}, + 'proc environ': subprocess.check_output( + ['sh', '-c', 'echo /proc/1/environ; xargs -n 1 -0 < /proc/1/environ']).decode('utf-8').splitlines(), + 'ps aux': subprocess.check_output( + ['bash', '-O', 'extglob', '-c', 'for cmd in /proc/+([0-9])/cmdline; do echo $cmd; xargs -n 1 -0 < $cmd; done']).decode('utf-8').splitlines()} + + print(json.dumps(info, indent=2)) + + return info diff --git a/base/dump-ruby27.rb b/base/dump-ruby27.rb new file mode 100644 index 00000000..035f7988 --- /dev/null +++ b/base/dump-ruby27.rb @@ -0,0 +1,30 @@ +require 'json' +require 'aws-sdk-s3' + +S3_CLIENT = Aws::S3::Client.new({region: "us-east-1"}) + +def lambda_handler(event:, context:) + filename = 'ruby2.7.tgz' + + puts `tar -cpzf /tmp/#{filename} --numeric-owner --ignore-failed-read /var/runtime /var/lang /var/rapid` + + File.open("/tmp/#{filename}", 'rb') do |file| + S3_CLIENT.put_object({ + body: file, + bucket: 'lambci', + key: "fs/#{filename}", + acl: 'public-read', + }) + end + + info = { + 'ENV' => ENV.to_hash, + 'context' => context.instance_variables.each_with_object({}) { |k, h| h[k] = context.instance_variable_get k }, + 'ps aux' => `bash -O extglob -c 'for cmd in /proc/+([0-9])/cmdline; do echo $cmd; xargs -n 1 -0 < $cmd; done'`, + 'proc environ' => `xargs -n 1 -0 < /proc/1/environ`, + } + + print JSON.pretty_generate(info) + + return info +end diff --git a/base/dump.sh b/base/dump.sh index 98ae247d..944988d2 100755 --- a/base/dump.sh +++ b/base/dump.sh @@ -1,6 +1,6 @@ #!/bin/bash -RUNTIMES="node43 node610 node810 python27 python36 python37 ruby2.5 java8 go1x dotnetcore20 dotnetcore21 provided" +source ${PWD}/runtimes.sh for RUNTIME in $RUNTIMES; do echo $RUNTIME diff --git a/base/native-test.sh b/base/native-test.sh index 20477aa0..5d1a89ed 100755 --- a/base/native-test.sh +++ b/base/native-test.sh @@ -22,8 +22,8 @@ CMD="BUILD_ONLY=true npm install --build-from-source \ " docker run --rm \ - -e PATH=/usr/local/lib64/node-v4.3.x/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin \ - -e LD_LIBRARY_PATH=/usr/local/lib64/node-v4.3.x/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib \ + -e PATH=/var/lang/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin \ + -e LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib \ -e AWS_EXECUTION_ENV=AWS_Lambda_nodejs4.3 \ -e NODE_PATH=/var/runtime:/var/task:/var/runtime/node_modules \ -e npm_config_unsafe-perm=true \ diff --git a/base/packages.txt b/base/packages.txt new file mode 100644 index 00000000..7e5e4fb1 --- /dev/null +++ b/base/packages.txt @@ -0,0 +1,224 @@ +ImageMagick-6.9.10.68-3.22.amzn1.x86_64 +alsa-lib-1.0.22-3.9.amzn1.x86_64 +audit-libs-2.6.5-3.28.amzn1.x86_64 +avahi-libs-0.6.25-12.17.amzn1.x86_64 +basesystem-10.0-4.9.amzn1.noarch +bash-4.2.46-34.43.amzn1.x86_64 +binutils-2.25.1-31.base.66.amzn1.x86_64 +bzip2-1.0.6-8.12.amzn1.x86_64 +bzip2-libs-1.0.6-8.12.amzn1.x86_64 +ca-certificates-2018.2.22-65.1.22.amzn1.noarch +cairo-1.12.14-6.9.amzn1.x86_64 +chkconfig-1.3.49.3-2.14.amzn1.x86_64 +compat-gmp4-4.3.2-1.14.amzn1.x86_64 +copy-jdk-configs-3.3-10.3.amzn1.noarch +coreutils-8.22-15.52.amzn1.x86_64 +cpio-2.10-12.12.amzn1.x86_64 +cracklib-2.8.16-4.14.amzn1.x86_64 +cracklib-dicts-2.8.16-4.14.amzn1.x86_64 +cups-libs-1.4.2-67.21.amzn1.x86_64 +curl-7.61.1-12.95.amzn1.x86_64 +cyrus-sasl-lib-2.1.23-13.16.amzn1.x86_64 +db4-4.7.25-18.11.amzn1.x86_64 +db4-utils-4.7.25-18.11.amzn1.x86_64 +dbus-libs-1.6.12-14.29.amzn1.x86_64 +dejavu-fonts-common-2.33-6.6.amzn1.noarch +dejavu-sans-fonts-2.33-6.6.amzn1.noarch +dejavu-serif-fonts-2.33-6.6.amzn1.noarch +diffutils-3.3-4.15.amzn1.x86_64 +elfutils-libelf-0.168-8.19.amzn1.x86_64 +expat-2.1.0-11.22.amzn1.x86_64 +file-5.37-8.49.amzn1.x86_64 +file-libs-5.37-8.49.amzn1.x86_64 +filesystem-2.4.30-3.8.amzn1.x86_64 +findutils-4.4.2-6.9.amzn1.x86_64 +fontconfig-2.8.0-5.8.amzn1.x86_64 +fontpackages-filesystem-1.41-1.1.2.amzn1.noarch +freetype-2.3.11-19.15.amzn1.x86_64 +gawk-3.1.7-10.10.amzn1.x86_64 +gdbm-1.8.0-36.6.amzn1.x86_64 +ghostscript-fonts-5.50-23.2.7.amzn1.noarch +giflib-4.1.6-3.1.6.amzn1.x86_64 +glib2-2.36.3-5.21.amzn1.x86_64 +glibc-2.17-292.180.amzn1.x86_64 +glibc-common-2.17-292.180.amzn1.x86_64 +gmp-6.0.0-11.16.amzn1.x86_64 +gnupg2-2.0.28-2.33.amzn1.x86_64 +gnutls-2.12.23-21.18.amzn1.x86_64 +gpgme-1.4.3-5.15.amzn1.x86_64 +grep-2.20-3.18.amzn1.x86_64 +groff-base-1.22.2-8.11.amzn1.x86_64 +gzip-1.5-9.19.amzn1.x86_64 +hwdata-0.233-14.1.19.amzn1.noarch +info-5.1-4.10.amzn1.x86_64 +jasper-libs-1.900.1-21.9.amzn1.x86_64 +java-1.8.0-openjdk-1.8.0.201.b09-0.43.amzn1.x86_64 +java-1.8.0-openjdk-headless-1.8.0.201.b09-0.43.amzn1.x86_64 +javapackages-tools-0.9.1-1.5.amzn1.noarch +jbigkit-libs-2.0-11.4.amzn1.x86_64 +jpackage-utils-1.7.5-27.17.amzn1.noarch +keyutils-libs-1.5.8-3.12.amzn1.x86_64 +kmod-14-10.10.amzn1.x86_64 +kmod-libs-14-10.10.amzn1.x86_64 +krb5-libs-1.15.1-46.48.amzn1.x86_64 +lcms2-2.6-2.5.amzn1.x86_64 +libICE-1.0.6-1.4.amzn1.x86_64 +libSM-1.2.1-2.6.amzn1.x86_64 +libX11-1.6.0-2.2.12.amzn1.x86_64 +libX11-common-1.6.0-2.2.12.amzn1.x86_64 +libXau-1.0.6-4.9.amzn1.x86_64 +libXcomposite-0.4.3-4.6.amzn1.x86_64 +libXdamage-1.1.3-4.7.amzn1.x86_64 +libXext-1.3.2-2.1.10.amzn1.x86_64 +libXfixes-5.0.1-2.1.8.amzn1.x86_64 +libXfont-1.4.5-5.12.amzn1.x86_64 +libXi-1.7.2-2.2.9.amzn1.x86_64 +libXrender-0.9.8-2.1.9.amzn1.x86_64 +libXt-1.1.4-6.1.9.amzn1.x86_64 +libXtst-1.2.2-2.1.9.amzn1.x86_64 +libXxf86vm-1.1.3-2.1.9.amzn1.x86_64 +libacl-2.2.49-6.11.amzn1.x86_64 +libassuan-2.0.3-3.3.amzn1.x86_64 +libattr-2.4.46-12.10.amzn1.x86_64 +libblkid-2.23.2-59.29.amzn1.x86_64 +libcap-2.16-5.5.8.amzn1.x86_64 +libcap-ng-0.7.5-4.15.amzn1.x86_64 +libcom_err-1.43.5-2.43.amzn1.x86_64 +libcurl-7.61.1-12.95.amzn1.x86_64 +libdrm-2.4.82-1.14.amzn1.x86_64 +libffi-3.0.13-16.5.amzn1.x86_64 +libfontenc-1.0.5-2.6.amzn1.x86_64 +libgcc72-7.2.1-2.59.amzn1.x86_64 +libgcrypt-1.5.3-12.19.amzn1.x86_64 +libglvnd-0.2.999-14.20170308git8e6e102.3.amzn1.x86_64 +libglvnd-glx-0.2.999-14.20170308git8e6e102.3.amzn1.x86_64 +libgomp-6.4.1-1.45.amzn1.x86_64 +libgpg-error-1.11-1.12.amzn1.x86_64 +libicu-50.2-4.0.amzn1.x86_64 +libidn2-2.3.0-1.4.amzn1.x86_64 +libjpeg-turbo-1.2.90-8.16.amzn1.x86_64 +libmount-2.23.2-59.29.amzn1.x86_64 +libnghttp2-1.33.0-1.1.6.amzn1.x86_64 +libpciaccess-0.13.1-4.1.11.amzn1.x86_64 +libpng-1.2.49-2.14.amzn1.x86_64 +libpsl-0.6.2-1.2.amzn1.x86_64 +libpwquality-1.2.3-4.8.amzn1.x86_64 +libselinux-2.1.10-3.22.amzn1.x86_64 +libsepol-2.1.7-3.12.amzn1.x86_64 +libsmartcols-2.23.2-59.29.amzn1.x86_64 +libssh2-1.4.2-3.12.amzn1.x86_64 +libstdc++72-7.2.1-2.59.amzn1.x86_64 +libtasn1-2.3-6.6.amzn1.x86_64 +libtiff-4.0.3-35.36.amzn1.x86_64 +libtool-ltdl-2.4.2-20.4.8.5.32.amzn1.x86_64 +libudev-173-4.13.amzn1.x86_64 +libunistring-0.9.3-6.1.amzn1.x86_64 +libuser-0.60-7.23.amzn1.x86_64 +libutempter-1.1.5-4.1.6.amzn1.x86_64 +libuuid-2.23.2-59.29.amzn1.x86_64 +libverto-0.2.5-4.9.amzn1.x86_64 +libwmf-lite-0.2.8.4-41.13.amzn1.x86_64 +libxcb-1.11-2.21.amzn1.x86_64 +libxml2-2.9.1-6.4.41.amzn1.x86_64 +libxshmfence-1.2-1.4.amzn1.x86_64 +libxslt-1.1.28-5.13.amzn1.x86_64 +lksctp-tools-1.0.10-7.7.amzn1.x86_64 +lua-5.1.4-4.1.9.amzn1.x86_64 +make-3.82-21.10.amzn1.x86_64 +mesa-dri-drivers-17.1.5-2.41.amzn1.x86_64 +mesa-filesystem-17.1.5-2.41.amzn1.x86_64 +mesa-libGL-17.1.5-2.41.amzn1.x86_64 +mesa-libglapi-17.1.5-2.41.amzn1.x86_64 +ncurses-5.7-4.20090207.14.amzn1.x86_64 +ncurses-base-5.7-4.20090207.14.amzn1.x86_64 +ncurses-libs-5.7-4.20090207.14.amzn1.x86_64 +nspr-4.21.0-1.43.amzn1.x86_64 +nss-3.44.0-7.84.amzn1.x86_64 +nss-pem-1.0.3-4.3.amzn1.x86_64 +nss-softokn-3.44.0-8.44.amzn1.x86_64 +nss-softokn-freebl-3.44.0-8.44.amzn1.x86_64 +nss-sysinit-3.44.0-7.84.amzn1.x86_64 +nss-tools-3.44.0-7.84.amzn1.x86_64 +nss-util-3.44.0-4.56.amzn1.x86_64 +openldap-2.4.40-16.31.amzn1.x86_64 +openssl-1.0.2k-16.151.amzn1.x86_64 +p11-kit-0.18.5-2.3.amzn1.x86_64 +p11-kit-trust-0.18.5-2.3.amzn1.x86_64 +pam-1.1.8-12.33.amzn1.x86_64 +patch-2.7.1-12.14.amzn1.x86_64 +pcre-8.21-7.8.amzn1.x86_64 +perl-5.16.3-294.43.amzn1.x86_64 +perl-Carp-1.26-244.5.amzn1.noarch +perl-Encode-2.51-7.5.amzn1.x86_64 +perl-Exporter-5.68-3.5.amzn1.noarch +perl-File-Path-2.09-2.5.amzn1.noarch +perl-File-Temp-0.23.01-3.5.amzn1.noarch +perl-Filter-1.49-3.5.amzn1.x86_64 +perl-Getopt-Long-2.40-3.6.amzn1.noarch +perl-HTTP-Tiny-0.033-3.6.amzn1.noarch +perl-PathTools-3.40-5.5.amzn1.x86_64 +perl-Pod-Escapes-1.04-294.43.amzn1.noarch +perl-Pod-Perldoc-3.20-4.7.amzn1.noarch +perl-Pod-Simple-3.28-4.6.amzn1.noarch +perl-Pod-Usage-1.63-3.5.amzn1.noarch +perl-Scalar-List-Utils-1.27-248.5.amzn1.x86_64 +perl-Socket-2.010-3.5.amzn1.x86_64 +perl-Storable-2.45-3.5.amzn1.x86_64 +perl-Text-ParseWords-3.29-4.5.amzn1.noarch +perl-Time-HiRes-1.9725-272.5.amzn1.x86_64 +perl-Time-Local-1.2300-2.5.amzn1.noarch +perl-constant-1.27-2.5.amzn1.noarch +perl-libs-5.16.3-294.43.amzn1.x86_64 +perl-macros-5.16.3-294.43.amzn1.x86_64 +perl-parent-0.225-244.5.amzn1.noarch +perl-podlators-2.5.1-3.8.amzn1.noarch +perl-threads-1.87-4.5.amzn1.x86_64 +perl-threads-shared-1.43-6.5.amzn1.x86_64 +pinentry-0.7.6-6.11.amzn1.x86_64 +pixman-0.32.4-4.11.amzn1.x86_64 +pkgconfig-0.27.1-2.7.amzn1.x86_64 +popt-1.13-7.7.amzn1.x86_64 +procps-3.2.8-45.16.amzn1.x86_64 +psmisc-22.20-8.12.amzn1.x86_64 +pth-2.0.7-9.3.7.amzn1.x86_64 +python27-2.7.18-2.140.amzn1.x86_64 +python27-iniparse-0.3.1-2.1.9.amzn1.noarch +python27-libs-2.7.18-2.140.amzn1.x86_64 +python27-pycurl-7.19.0-17.12.amzn1.x86_64 +python27-pygpgme-0.3-9.12.amzn1.x86_64 +python27-pyliblzma-0.5.3-11.6.amzn1.x86_64 +python27-pyxattr-0.5.0-1.6.amzn1.x86_64 +python27-urlgrabber-3.10-8.16.amzn1.noarch +python36-3.6.12-1.19.amzn1.x86_64 +python36-libs-3.6.12-1.19.amzn1.x86_64 +python36-pip-9.0.3-1.27.amzn1.noarch +python36-setuptools-36.2.7-1.33.amzn1.noarch +readline-6.2-9.14.amzn1.x86_64 +rpm-4.11.3-40.78.amzn1.x86_64 +rpm-build-libs-4.11.3-40.78.amzn1.x86_64 +rpm-libs-4.11.3-40.78.amzn1.x86_64 +rpm-python27-4.11.3-40.78.amzn1.x86_64 +sed-4.2.1-10.10.amzn1.x86_64 +setup-2.8.14-20.12.amzn1.noarch +shadow-utils-4.1.4.2-13.10.amzn1.x86_64 +shared-mime-info-1.1-9.8.amzn1.x86_64 +sqlite-3.7.17-8.14.amzn1.x86_64 +sysctl-defaults-1.0-1.1.amzn1.noarch +system-release-2018.03-0.0.noarch +tar-1.26-31.22.amzn1.x86_64 +ttmkfdir-3.0.9-32.1.5.amzn1.x86_64 +tzdata-2020a-1.75.amzn1.noarch +tzdata-java-2020a-1.75.amzn1.noarch +unzip-6.0-4.10.amzn1.x86_64 +urw-fonts-2.4-10.7.amzn1.noarch +util-linux-2.23.2-59.29.amzn1.x86_64 +which-2.19-6.10.amzn1.x86_64 +xorg-x11-font-utils-7.2-11.5.amzn1.x86_64 +xorg-x11-fonts-Type1-7.2-9.1.5.amzn1.noarch +xz-5.2.2-1.13.amzn1.x86_64 +xz-libs-5.2.2-1.13.amzn1.x86_64 +yum-3.4.3-150.71.amzn1.noarch +yum-metadata-parser-1.1.4-10.20.amzn1.x86_64 +yum-plugin-ovl-1.1.31-46.30.amzn1.noarch +yum-plugin-priorities-1.1.31-46.30.amzn1.noarch +zlib-1.2.8-7.18.amzn1.x86_64 diff --git a/base/publish-all.sh b/base/publish-all.sh index 48535ddd..a2fb0c2b 100755 --- a/base/publish-all.sh +++ b/base/publish-all.sh @@ -1,17 +1,34 @@ #!/bin/bash -RUNTIMES="nodejs4.3 nodejs6.10 nodejs8.10 python2.7 python3.6 python3.7 ruby2.5 java8 go1.x dotnetcore2.0 dotnetcore2.1 provided" +source ${PWD}/runtimes.sh + +echo -n "Enter repository passphrase: " +read -s DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE +echo + +export DOCKER_CONTENT_TRUST=1 +export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE + +export PUBLISH_DATE=$(date "+%Y%m%d") docker push lambci/lambda-base +docker push lambci/lambda-base-2 for RUNTIME in $RUNTIMES; do echo $RUNTIME + docker tag lambci/lambda:${RUNTIME} lambci/lambda:${PUBLISH_DATE}-${RUNTIME} docker push lambci/lambda:${RUNTIME} + docker push lambci/lambda:${PUBLISH_DATE}-${RUNTIME} + docker rmi lambci/lambda:${PUBLISH_DATE}-${RUNTIME} done docker push lambci/lambda-base:build +docker push lambci/lambda-base-2:build for RUNTIME in $RUNTIMES; do echo build-${RUNTIME} + docker tag lambci/lambda:build-${RUNTIME} lambci/lambda:${PUBLISH_DATE}-build-${RUNTIME} docker push lambci/lambda:build-${RUNTIME} + docker push lambci/lambda:${PUBLISH_DATE}-build-${RUNTIME} + docker rmi lambci/lambda:${PUBLISH_DATE}-build-${RUNTIME} done diff --git a/base/runtimes.sh b/base/runtimes.sh new file mode 100644 index 00000000..80891dd4 --- /dev/null +++ b/base/runtimes.sh @@ -0,0 +1 @@ +RUNTIMES="provided go1.x nodejs4.3 nodejs6.10 nodejs8.10 python2.7 python3.6 python3.7 ruby2.5 java8 dotnetcore2.0 dotnetcore2.1 provided.al2 nodejs10.x nodejs12.x python3.8 ruby2.7 java8.al2 java11 dotnetcore3.1" diff --git a/base/tag-all.sh b/base/tag-all.sh index 20fbd65a..a8314ee9 100755 --- a/base/tag-all.sh +++ b/base/tag-all.sh @@ -1,6 +1,6 @@ #!/bin/bash -RUNTIMES="nodejs4.3 nodejs6.10 nodejs8.10 python2.7 python3.6 python3.7 ruby2.5 java8 go1.x dotnetcore2.0 dotnetcore2.1 provided" +source ${PWD}/runtimes.sh git tag -f latest diff --git a/base/tar-find-layer/build.sh b/base/tar-find-layer/build.sh new file mode 100755 index 00000000..6541fbe6 --- /dev/null +++ b/base/tar-find-layer/build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +rm layer.zip + +docker run --rm -v "$PWD":/tmp/layer lambci/yumda:2 bash -c " + yum install -y findutils gzip tar && \ + cd /lambda/opt && \ + zip -yr /tmp/layer/layer.zip . +" diff --git a/base/test-all.sh b/base/test-all.sh index a8aefafc..c6a40c0e 100755 --- a/base/test-all.sh +++ b/base/test-all.sh @@ -9,22 +9,35 @@ docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs8.10 cd ${EXAMPLES_DIR}/nodejs8.10 docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs8.10 +docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs10.x index.handler +docker run --rm -v "$PWD":/var/task lambci/lambda:nodejs12.x index.handler cd ${EXAMPLES_DIR}/nodejs-native-module -docker run --rm -v "$PWD":/var/task lambci/lambda:build-nodejs4.3 +npm install +npm run build npm test cd ${EXAMPLES_DIR}/python docker run --rm -v "$PWD":/var/task lambci/lambda:python2.7 docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6 docker run --rm -v "$PWD":/var/task lambci/lambda:python3.7 lambda_function.lambda_handler +docker run --rm -v "$PWD":/var/task lambci/lambda:python3.8 lambda_function.lambda_handler + +cd ${EXAMPLES_DIR}/python +docker run --rm -it lambci/lambda:build-python2.7 pip install marisa-trie +docker run --rm -it lambci/lambda:build-python3.6 pip install marisa-trie +docker run --rm -it lambci/lambda:build-python3.7 pip install marisa-trie +docker run --rm -it lambci/lambda:build-python3.8 pip install marisa-trie cd ${EXAMPLES_DIR}/ruby docker run --rm -v "$PWD":/var/task lambci/lambda:ruby2.5 lambda_function.lambda_handler +docker run --rm -v "$PWD":/var/task lambci/lambda:ruby2.7 lambda_function.lambda_handler cd ${EXAMPLES_DIR}/java -gradle build +docker run --rm -v "$PWD":/app -w /app lambci/lambda:build-java8 gradle build docker run --rm -v "$PWD/build/docker":/var/task lambci/lambda:java8 org.lambci.lambda.ExampleHandler '{"some": "event"}' +docker run --rm -v "$PWD/build/docker":/var/task lambci/lambda:java8.al2 org.lambci.lambda.ExampleHandler '{"some": "event"}' +docker run --rm -v "$PWD/build/docker":/var/task lambci/lambda:java11 org.lambci.lambda.ExampleHandler '{"some": "event"}' cd ${EXAMPLES_DIR}/dotnetcore2.0 docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore2.0 dotnet publish -c Release -o pub @@ -34,9 +47,22 @@ cd ${EXAMPLES_DIR}/dotnetcore2.1 docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore2.1 dotnet publish -c Release -o pub docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore2.1 test::test.Function::FunctionHandler '{"some": "event"}' +cd ${EXAMPLES_DIR}/dotnetcore3.1 +docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore3.1 dotnet publish -c Release -o pub +docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore3.1 test::test.Function::FunctionHandler '{"some": "event"}' + cd ${EXAMPLES_DIR}/go1.x -docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c 'dep ensure && go build handler.go' +docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c 'go mod download && go build handler.go' docker run --rm -v "$PWD":/var/task lambci/lambda:go1.x handler '{"Records": []}' cd ${EXAMPLES_DIR}/provided docker run --rm -v "$PWD":/var/task lambci/lambda:provided handler '{"some": "event"}' + +cd ${EXAMPLES_DIR}/provided.al2 +docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c 'go mod download && go build -tags lambda.norpc bootstrap.go' +docker run --rm -v "$PWD":/var/task lambci/lambda:provided.al2 handler '{"Records": []}' + +# To invoke and keep open: +# cd ${EXAMPLES_DIR}/ruby +# docker run --rm -v $PWD:/var/task -e DOCKER_LAMBDA_STAY_OPEN=1 -p 9001:9001 \ +# lambci/lambda:ruby2.5 lambda_function.lambda_handler diff --git a/docker-lambda.code-workspace b/docker-lambda.code-workspace new file mode 100644 index 00000000..975aee7f --- /dev/null +++ b/docker-lambda.code-workspace @@ -0,0 +1,61 @@ +{ + "folders": [ + { + "path": "." + }, + { + "path": "go1.x/run" + }, + { + "path": "provided/run" + }, + { + "path": "examples/go1.x" + }, + { + "path": "base/dump-go1x" + }, + { + "path": "base/dump-java11" + }, + { + "path": "base/dump-java8" + }, + { + "path": "base/dump-java8al2" + }, + { + "path": "examples/java" + }, + { + "path": "java8/run/lambda-runtime-mock" + }, + { + "path": "base/dump-dotnetcore20" + }, + { + "path": "base/dump-dotnetcore21" + }, + { + "path": "base/dump-dotnetcore31" + }, + { + "path": "examples/dotnetcore2.0" + }, + { + "path": "examples/dotnetcore2.1" + }, + { + "path": "examples/dotnetcore3.1" + }, + { + "path": "dotnetcore2.0/run/MockBootstraps" + }, + { + "path": "dotnetcore2.1/run/MockBootstraps" + } + ], + "settings": { + "java.configuration.updateBuildConfiguration": "automatic" + } +} diff --git a/dotnetcore2.0/build/Dockerfile b/dotnetcore2.0/build/Dockerfile index 07f09460..01474732 100644 --- a/dotnetcore2.0/build/Dockerfile +++ b/dotnetcore2.0/build/Dockerfile @@ -1,5 +1,9 @@ +FROM lambci/lambda:dotnetcore2.0 + FROM lambci/lambda-base:build +# Run: docker run --rm --entrypoint dotnet lambci/lambda:dotnetcore2.1 --info +# Check https://dotnet.microsoft.com/download/dotnet-core/2.0 for versions ENV PATH=/var/lang/bin:$PATH \ LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_dotnetcore2.0 \ @@ -7,10 +11,12 @@ ENV PATH=/var/lang/bin:$PATH \ DOTNET_CLI_TELEMETRY_OPTOUT=1 \ NUGET_XMLDOC_MODE=skip -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/dotnetcore2.0.tgz | tar -zx -C / && \ - yum install -y libunwind && \ - curl https://dot.net/v1/dotnet-install.sh | bash -s -- -v $DOTNET_SDK_VERSION -i /var/lang/bin && \ +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN yum install -y libunwind && \ + curl -L https://dot.net/v1/dotnet-install.sh | bash -s -- -v $DOTNET_SDK_VERSION -i /var/lang/bin && \ mkdir /tmp/warmup && \ cd /tmp/warmup && \ dotnet new && \ @@ -18,7 +24,12 @@ RUN rm -rf /var/runtime /var/lang && \ rm -rf /tmp/warmup /tmp/NuGetScratch # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U virtualenv pipenv awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install virtualenv && \ + pipx install pipenv && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 CMD ["dotnet", "build"] diff --git a/dotnetcore2.0/run/Dockerfile b/dotnetcore2.0/run/Dockerfile index 6f4b5d25..190e6767 100644 --- a/dotnetcore2.0/run/Dockerfile +++ b/dotnetcore2.0/run/Dockerfile @@ -10,6 +10,9 @@ COPY MockBootstraps/ . RUN dotnet publish --output /app/ --configuration Release +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV PATH=/var/lang/bin:$PATH \ @@ -21,4 +24,8 @@ RUN rm -rf /var/runtime /var/lang && \ COPY --from=0 /app/MockBootstraps.* /var/runtime/ +COPY --from=1 /var/runtime/init /var/runtime/mockserver + +USER sbx_user1051 + ENTRYPOINT ["/var/lang/bin/dotnet", "/var/runtime/MockBootstraps.dll"] diff --git a/dotnetcore2.0/run/MockBootstraps/MockBootstraps.csproj b/dotnetcore2.0/run/MockBootstraps/MockBootstraps.csproj index 6454122c..f3db9e50 100644 --- a/dotnetcore2.0/run/MockBootstraps/MockBootstraps.csproj +++ b/dotnetcore2.0/run/MockBootstraps/MockBootstraps.csproj @@ -4,14 +4,16 @@ Exe netcoreapp2.0 MockLambdaRuntime + true - - lib\Bootstrap.dll - - - lib\Amazon.Lambda.Core.dll - - + + lib\Bootstrap.dll + + + lib\Amazon.Lambda.Core.dll + + + diff --git a/dotnetcore2.0/run/MockBootstraps/MockLambdaContext.cs b/dotnetcore2.0/run/MockBootstraps/MockLambdaContext.cs index af405d9f..76d64ca8 100644 --- a/dotnetcore2.0/run/MockBootstraps/MockLambdaContext.cs +++ b/dotnetcore2.0/run/MockBootstraps/MockLambdaContext.cs @@ -14,12 +14,17 @@ public MockLambdaContext(string handler, string eventBody) { RequestId = Guid.NewGuid().ToString(); StartTime = DateTime.Now; - InputStream = new MemoryStream(); - OutputStream = new MemoryStream(); - - var eventData = Encoding.UTF8.GetBytes(eventBody); - InputStream.Write(eventData, 0, eventData.Length); - InputStream.Position = 0; + Body = eventBody; + Timeout = Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_TIMEOUT", "300")); + MemorySize = Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536")); + FunctionName = EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_NAME", "test"); + FunctionVersion = EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"); + LogGroup = EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_GROUP_NAME", $"/aws/lambda/{FunctionName}"); + LogStream = EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_STREAM_NAME", RandomLogStreamName); + Region = EnvHelper.GetOrDefault("AWS_REGION", EnvHelper.GetOrDefault("AWS_DEFAULT_REGION", "us-east-1")); + AccountId = EnvHelper.GetOrDefault("AWS_ACCOUNT_ID", "000000000000"); + Arn = EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_INVOKED_ARN", $"arn:aws:lambda:{Region}:{AccountId}:function:{FunctionName}"); + StayOpen = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOCKER_LAMBDA_STAY_OPEN")); Environment.SetEnvironmentVariable("AWS_LAMBDA_FUNCTION_NAME", FunctionName); Environment.SetEnvironmentVariable("AWS_LAMBDA_FUNCTION_VERSION", FunctionVersion); @@ -37,47 +42,49 @@ public TimeSpan RemainingTime() return StartTime + TimeSpan.FromSeconds(Timeout) - DateTime.Now; } - public long Duration => (long)(DateTime.Now - StartTime).TotalMilliseconds; - public long BilledDuration => (long)(Math.Ceiling((DateTime.Now - StartTime).TotalMilliseconds / 100)) * 100; - - public long MemoryUsed => Process.GetCurrentProcess().WorkingSet64; - - public Stream InputStream { get; } - - public Stream OutputStream { get; } + public long DeadlineMs + { + set + { + Timeout = (int)DateTimeOffset.FromUnixTimeMilliseconds(value).Subtract(DateTime.Now).TotalSeconds; + } + } - public string OutputText + public string Body { - get + set { - OutputStream.Position = 0; - using (TextReader reader = new StreamReader(OutputStream)) - { - return reader.ReadToEnd(); - } + InputStream = new MemoryStream(); + var eventData = Encoding.UTF8.GetBytes(value); + InputStream.Write(eventData, 0, eventData.Length); + InputStream.Position = 0; } } - public string RequestId { get; } - public DateTime StartTime { get; } + public Stream InputStream { get; set; } + + public string RequestId { get; set; } + public DateTime StartTime { get; set; } + + public int Timeout { get; set; } - public int Timeout => Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_TIMEOUT", "300")); + public int MemorySize { get; set; } - public int MemorySize => Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536")); + public string FunctionName { get; set; } - public string FunctionName => EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_NAME", "test"); + public string FunctionVersion { get; set; } - public string FunctionVersion => EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"); + public string LogGroup { get; set; } - public string LogGroup => EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_GROUP_NAME", $"/aws/lambda/{FunctionName}"); + public string LogStream { get; set; } - public string LogStream => EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_STREAM_NAME", RandomLogStreamName); + public string Region { get; set; } - public string Region => EnvHelper.GetOrDefault("AWS_REGION", EnvHelper.GetOrDefault("AWS_DEFAULT_REGION", "us-east-1")); + public string AccountId { get; set; } - public string AccountId => EnvHelper.GetOrDefault("AWS_ACCOUNT_ID", "000000000000"); + public string Arn { get; set; } - public string Arn => EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_INVOKED_ARN", $"arn:aws:lambda:{Region}:{AccountId}:function:{FunctionName}"); + public bool StayOpen { get; } string RandomLogStreamName => $"{DateTime.Now.ToString("yyyy/MM/dd")}/[{FunctionVersion}]{random.Next().ToString("x") + random.Next().ToString("x")}"; } diff --git a/dotnetcore2.0/run/MockBootstraps/MockRuntime.cs b/dotnetcore2.0/run/MockBootstraps/MockRuntime.cs new file mode 100644 index 00000000..7cff6ecc --- /dev/null +++ b/dotnetcore2.0/run/MockBootstraps/MockRuntime.cs @@ -0,0 +1,385 @@ +using AWSLambda.Internal.Bootstrap.Context; +using AWSLambda.Internal.Bootstrap.Interop.Structures; +using MockLambdaRuntime; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; + +namespace AWSLambda.Internal.Bootstrap +{ + internal class MockRuntime : ILambdaRuntime + { + private const string STACK_TRACE_INDENT = " "; + + private bool invoked; + + private bool logTail; + + private bool initTimeSent; + + private DateTimeOffset receivedInvokeAt = DateTimeOffset.MinValue; + + private string logs = ""; + + private Exception invokeError; + + private readonly IntPtr sharedMem = Marshal.AllocHGlobal(SBSharedMem.UnmanagedStructSize); + + private SBSharedMem curSBSharedMem; + + private readonly MockLambdaContext context; + + private static readonly HttpClient client = new HttpClient(); + + private readonly MockXRayProfiler xRayProfiler = new MockXRayProfiler(); + + public IEnvironment Environment { get; } = new SystemEnvironment(); + + public IXRayProfiler XRayProfiler { get { return xRayProfiler; } } + + public InitData InitData + { + get; + private set; + } + + public MockRuntime(string handler, string body) + { + context = new MockLambdaContext(handler, body); + InitData = new InitData + { + Handler = handler, + InvokeId = context.RequestId, + SuppressUserCodeInit = true, + ErrorCode = null + }; + invoked = false; + client.Timeout = Timeout.InfiniteTimeSpan; + } + + public bool KeepInvokeLoopRunning() + { + return true; + } + + public void Init() + { + var timeout = DateTimeOffset.Now.AddSeconds(1); + while (true) + { + try + { + var result = client.GetAsync("http://127.0.0.1:9001/2018-06-01/ping").Result; + if (result.StatusCode != HttpStatusCode.OK) + { + throw new Exception("Got a bad response from the bootstrap"); + } + break; + } + catch (Exception e) + { + if (DateTimeOffset.Now > timeout) + { + throw e; + } + } + Thread.Sleep(5); + } + } + + unsafe InvokeData ILambdaRuntime.ReceiveInvoke(IDictionary initialEnvironmentVariables, RuntimeReceiveInvokeBuffers buffers) + { + if (!invoked) + { + receivedInvokeAt = DateTimeOffset.Now; + invoked = true; + } + else + { + logs = ""; + } + HttpResponseMessage result = null; + try + { + result = client.GetAsync("http://127.0.0.1:9001/2018-06-01/runtime/invocation/next").Result; + } + catch (AggregateException ae) + { + if (ae.InnerException is HttpRequestException && ae.InnerException.InnerException != null && + (ae.InnerException.InnerException is SocketException || + // happens on dotnetcore2.0 + ae.InnerException.InnerException.GetType().ToString().Equals("System.Net.Http.CurlException"))) + { + System.Environment.Exit(context.StayOpen ? 2 : (invokeError == null ? 0 : 1)); + } + else + { + throw ae; + } + } + + if (result.StatusCode != HttpStatusCode.OK) + { + throw new Exception("Got a bad response from the bootstrap"); + } + + var requestId = result.Headers.GetValues("Lambda-Runtime-Aws-Request-Id").First(); + var deadlineMs = result.Headers.GetValues("Lambda-Runtime-Deadline-Ms").First(); + var functionArn = result.Headers.GetValues("Lambda-Runtime-Invoked-Function-Arn").First(); + var xAmznTraceId = result.Headers.GetValues("Lambda-Runtime-Trace-Id").First(); + var clientContext = HeaderHelper.GetFirstOrDefault(result.Headers, "Lambda-Runtime-Client-Context"); + var cognitoIdentity = HeaderHelper.GetFirstOrDefault(result.Headers, "Lambda-Runtime-Cognito-Identity"); + + logTail = HeaderHelper.GetFirstOrDefault(result.Headers, "Docker-Lambda-Log-Type") == "Tail"; + + var body = result.Content.ReadAsStringAsync().Result; + + context.StartTime = DateTime.Now; + context.RequestId = requestId; + context.DeadlineMs = long.Parse(deadlineMs); + context.Body = body; + + curSBSharedMem = new SBSharedMem(sharedMem); + return new InvokeData(curSBSharedMem) + { + RequestId = context.RequestId, + AwsCredentials = new AwsCredentials + { + AccessKeyId = System.Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID"), + SecretAccessKey = System.Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY"), + SessionToken = System.Environment.GetEnvironmentVariable("AWS_SESSION_TOKEN") + }, + XAmznTraceId = xAmznTraceId, + InputStream = context.InputStream, + OutputStream = new UnmanagedMemoryStream(curSBSharedMem.EventBody, 0, SBSharedMem.SizeOfEventBody, FileAccess.Write), + LambdaContextInternal = new LambdaContextInternal( + context.RemainingTime, + SendCustomerLogMessage, + GetCognitoClientContextInternalLazy(clientContext), + context.RequestId, + new Lazy(context.Arn), + GetCognitoIdentityIdLazy(cognitoIdentity), + GetCognitoIdentityPoolIdLazy(cognitoIdentity), + initialEnvironmentVariables + ) + }; + } + + public unsafe void ReportDone(string invokeId, string errorType, bool waitForExit) + { + if (!invoked && invokeError == null) return; + + var output = Interop.InteropUtils.ReadUTF8String(curSBSharedMem.EventBody, curSBSharedMem.ResponseBodyLen); + + var suffix = errorType == null ? "response" : "error"; + + Task task; + using (var requestMessage = new HttpRequestMessage(HttpMethod.Post, $"http://127.0.0.1:9001/2018-06-01/runtime/invocation/{context.RequestId}/{suffix}")) + { + if (logTail) + { + requestMessage.Headers.Add("Docker-Lambda-Log-Result", Convert.ToBase64String(LogsTail4k())); + } + if (!initTimeSent) + { + requestMessage.Headers.Add("Docker-Lambda-Invoke-Wait", receivedInvokeAt.ToUnixTimeMilliseconds().ToString()); + requestMessage.Headers.Add("Docker-Lambda-Init-End", xRayProfiler.InitEnd.ToUnixTimeMilliseconds().ToString()); + initTimeSent = true; + } + requestMessage.Content = new StringContent(output); + task = client.SendAsync(requestMessage); + try + { + task.Wait(); + } + catch (AggregateException ae) + { + if (ae.InnerException is HttpRequestException && ae.InnerException.InnerException != null && + (ae.InnerException.InnerException is SocketException || + // happens on dotnetcore2.0 + ae.InnerException.InnerException.GetType().ToString().Equals("System.Net.Http.CurlException"))) + { + System.Environment.Exit(context.StayOpen ? 2 : (string.IsNullOrEmpty(errorType) && invokeError == null ? 0 : 1)); + } + else + { + throw ae; + } + } + var response = task.Result; + if (response.StatusCode != HttpStatusCode.Accepted) + { + throw new Exception($"Unknown response from invocation: {response.StatusCode}"); + } + } + if (invokeError != null) + { + Console.Error.WriteLine(invokeError); + return; + } + } + + private byte[] LogsTail4k() + { + var logBuf = Encoding.UTF8.GetBytes(logs); + if (logBuf.Length <= 4096) + { + return logBuf; + } + var slicedLogBuf = new byte[4096]; + Array.Copy(logBuf, logBuf.Length - 4096, slicedLogBuf, 0, 4096); + return slicedLogBuf; + } + + public void ReportError(string invokeId, ExceptionResponse exceptionResponse) + { + invokeError = exceptionResponse.OriginalException; + + // XXX: For the future perhaps: + /* + StringBuilder stringBuilder = new StringBuilder(); + if (!string.IsNullOrEmpty(exceptionResponse.StackTrace)) + { + stringBuilder.AppendLine(exceptionResponse.StackTrace); + } + if (exceptionResponse.InnerException != null) + { + AppendStackTraceToStringBuilder(stringBuilder, exceptionResponse.InnerException); + } + */ + } + + /// Try to log everything to stderr except the function result + public void SendCustomerLogMessage(string message) + { + if (context.StayOpen) + { + if (logTail) + { + logs += message + System.Environment.NewLine; + } + Console.WriteLine(message); + } + else + { + Console.Error.WriteLine(message); + } + } + + private static void AppendStackTraceToStringBuilder(StringBuilder builder, ExceptionResponse ex) + { + if (!string.IsNullOrWhiteSpace(ex.StackTrace)) + { + foreach (var line in ex.StackTrace + .Split(new string[] { System.Environment.NewLine }, StringSplitOptions.None) + .Select(s => s.Trim()) + .Where(s => !string.IsNullOrWhiteSpace(s)) + .Select(s => STACK_TRACE_INDENT + s)) + { + builder.AppendLine(line); + } + } + if (ex.InnerException != null) + { + string errorMessage = ex.InnerException.ErrorMessage; + string errorType = ex.InnerException.ErrorType; + if (errorMessage != null) + { + builder.Append(errorMessage.Trim()); + builder.Append(": "); + } + builder.AppendLine(errorType); + AppendStackTraceToStringBuilder(builder, ex.InnerException); + } + } + + internal static Lazy GetCognitoIdentityIdLazy(string jsonStr) + { + return new Lazy(() => + { + var match = Regex.Match(jsonStr ?? "", "\"identity_id\":\"([^\"]+)\""); + return match.Success ? match.Groups[1].ToString() : string.Empty; + }); + } + + internal static Lazy GetCognitoIdentityPoolIdLazy(string jsonStr) + { + return new Lazy(() => + { + var match = Regex.Match(jsonStr ?? "", "\"identity_pool_id\":\"([^\"]+)\""); + return match.Success ? match.Groups[1].ToString() : string.Empty; + }); + } + + internal static Lazy GetCognitoClientContextInternalLazy(string text) + { + return new Lazy(() => + { + CognitoClientContextInternal result = null; + if (!string.IsNullOrEmpty(text)) + { + try + { + return CognitoClientContextInternal.FromJson(text); + } + catch (Exception innerException) + { + throw LambdaExceptions.ValidationException(innerException, "Unable to parse client context JSON string '{0}'.", text); + } + } + return result; + }); + } + } + + internal class MockXRayProfiler : IXRayProfiler + { + public DateTimeOffset InitEnd { get; private set; } + + public void ReportUserInitStart() + { + } + + public void ReportUserInitEnd() + { + InitEnd = DateTimeOffset.Now; + } + + public void ReportUserInvokeStart() + { + } + + public void ReportUserInvokeEnd() + { + } + + public void ReportError(ExceptionResponse exceptionResponse) + { + } + } + + class HeaderHelper + { + /// Gets the given environment variable with a fallback if it doesn't exist + public static string GetFirstOrDefault(HttpHeaders headers, string name) + { + if (headers.TryGetValues(name, out IEnumerable values)) + { + return values.FirstOrDefault(); + } + return null; + } + } + +} diff --git a/dotnetcore2.0/run/MockBootstraps/Program.cs b/dotnetcore2.0/run/MockBootstraps/Program.cs index da0fcd1f..df26073d 100644 --- a/dotnetcore2.0/run/MockBootstraps/Program.cs +++ b/dotnetcore2.0/run/MockBootstraps/Program.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; using System.Runtime.Loader; using AWSLambda.Internal.Bootstrap; -using AWSLambda.Internal.Bootstrap.Context; - +using AWSLambda.Internal.Bootstrap.ErrorHandling; + namespace MockLambdaRuntime { class Program @@ -14,16 +16,29 @@ class Program private const bool WaitForDebuggerFlagDefaultValue = false; /// Task root of lambda task - static string lambdaTaskRoot = EnvHelper.GetOrDefault("LAMBDA_TASK_ROOT", "/var/task"); + static readonly string lambdaTaskRoot = EnvHelper.GetOrDefault("LAMBDA_TASK_ROOT", "/var/task"); private static readonly TimeSpan _debuggerStatusQueryInterval = TimeSpan.FromMilliseconds(50); private static readonly TimeSpan _debuggerStatusQueryTimeout = TimeSpan.FromMinutes(10); + private static readonly IList assemblyDirs = new List { lambdaTaskRoot }; + /// Program entry point static void Main(string[] args) { + // Add all /var/lang/bin/shared/*/* directories to the search path + foreach (var di in new DirectoryInfo("/var/lang/bin/shared").EnumerateDirectories().SelectMany(di => di.EnumerateDirectories().Select(di2 => di2))) + { + assemblyDirs.Add(di.FullName); + } AssemblyLoadContext.Default.Resolving += OnAssemblyResolving; + //Console.CancelKeyPress += delegate { + // // call methods to clean up + //}; + + Process mockServer = null; + try { var shouldWaitForDebugger = GetShouldWaitForDebuggerFlag(args, out var positionalArgs); @@ -31,6 +46,18 @@ static void Main(string[] args) var handler = GetFunctionHandler(positionalArgs); var body = GetEventBody(positionalArgs); + var lambdaRuntime = new MockRuntime(handler, body); + + mockServer = new Process(); + mockServer.StartInfo.FileName = "/var/runtime/mockserver"; + mockServer.StartInfo.CreateNoWindow = true; + mockServer.StartInfo.RedirectStandardInput = true; + mockServer.StartInfo.Environment["DOCKER_LAMBDA_NO_BOOTSTRAP"] = "1"; + mockServer.StartInfo.Environment["DOCKER_LAMBDA_USE_STDIN"] = "1"; + mockServer.Start(); + mockServer.StandardInput.Write(body); + mockServer.StandardInput.Close(); + if (shouldWaitForDebugger) { Console.Error.WriteLine("Waiting for the debugger to attach..."); @@ -43,40 +70,10 @@ static void Main(string[] args) } } - var lambdaContext = new MockLambdaContext(handler, body); - - var userCodeLoader = new UserCodeLoader(handler, InternalLogger.NO_OP_LOGGER); - userCodeLoader.Init(Console.Error.WriteLine); - - var lambdaContextInternal = new LambdaContextInternal(lambdaContext.RemainingTime, - LogAction, new Lazy(), - lambdaContext.RequestId, - new Lazy(lambdaContext.Arn), - new Lazy(string.Empty), - new Lazy(string.Empty), - Environment.GetEnvironmentVariables()); - - Exception lambdaException = null; - - LogRequestStart(lambdaContext); - try - { - userCodeLoader.Invoke(lambdaContext.InputStream, lambdaContext.OutputStream, lambdaContextInternal); - } - catch (Exception ex) - { - lambdaException = ex; - } - LogRequestEnd(lambdaContext); - - if (lambdaException == null) - { - Console.WriteLine(lambdaContext.OutputText); - } - else - { - Console.Error.WriteLine(lambdaException); - } + var lambdaBootstrap = new LambdaBootstrap(lambdaRuntime, InternalLogger.NO_OP_LOGGER); + UnhandledExceptionLogger.Register(); + lambdaBootstrap.Initialize(); + lambdaBootstrap.Invoke(); } // Catch all unhandled exceptions from runtime, to prevent user from hanging on them while debugging @@ -84,18 +81,27 @@ static void Main(string[] args) { Console.Error.WriteLine($"\nUnhandled exception occured in runner:\n{ex}"); } + finally + { + if (mockServer != null) mockServer.Dispose(); + } } /// Called when an assembly could not be resolved - private static Assembly OnAssemblyResolving(AssemblyLoadContext context, AssemblyName assembly) - { - return context.LoadFromAssemblyPath(Path.Combine(lambdaTaskRoot, $"{assembly.Name}.dll")); - } - - /// Try to log everything to stderr except the function result - private static void LogAction(string text) + private static Assembly OnAssemblyResolving(AssemblyLoadContext context, AssemblyName assemblyName) { - Console.Error.WriteLine(text); + foreach (var dir in assemblyDirs) + { + try + { + return context.LoadFromAssemblyPath(Path.Combine(dir, $"{assemblyName.Name}.dll")); + } + catch (FileNotFoundException) + { + continue; + } + } + throw new FileNotFoundException($"{assemblyName.Name}.dll"); } /// @@ -125,22 +131,6 @@ private static bool GetShouldWaitForDebuggerFlag(string[] args, out string[] unp return flagValue; } - static void LogRequestStart(MockLambdaContext context) - { - Console.Error.WriteLine($"START RequestId: {context.RequestId} Version: {context.FunctionVersion}"); - } - - static void LogRequestEnd(MockLambdaContext context) - { - Console.Error.WriteLine($"END RequestId: {context.RequestId}"); - - Console.Error.WriteLine($"REPORT RequestId {context.RequestId}\t" + - $"Duration: {context.Duration} ms\t" + - $"Billed Duration: {context.BilledDuration} ms\t" + - $"Memory Size {context.MemorySize} MB\t" + - $"Max Memory Used: {context.MemoryUsed / (1024 * 1024)} MB"); - } - /// Gets the function handler from arguments or environment static string GetFunctionHandler(string[] args) { diff --git a/dotnetcore2.0/run/MockBootstraps/lib/Bootstrap.pdb b/dotnetcore2.0/run/MockBootstraps/lib/Bootstrap.pdb new file mode 100644 index 00000000..a00a5dee Binary files /dev/null and b/dotnetcore2.0/run/MockBootstraps/lib/Bootstrap.pdb differ diff --git a/dotnetcore2.0/run/update_libs.sh b/dotnetcore2.0/run/update_libs.sh index d306f55d..eb1dfc75 100755 --- a/dotnetcore2.0/run/update_libs.sh +++ b/dotnetcore2.0/run/update_libs.sh @@ -1,7 +1,7 @@ #!/bin/sh curl https://lambci.s3.amazonaws.com/fs/dotnetcore2.0.tgz | \ - tar -xz var/runtime/Amazon.Lambda.Core.dll var/runtime/Bootstrap.dll + tar -xz var/runtime/Amazon.Lambda.Core.dll var/runtime/Bootstrap.dll var/runtime/Bootstrap.pdb -mv ./var/runtime/*.dll ./MockBootstraps/lib/ +mv ./var/runtime/*.dll ./var/runtime/*.pdb ./MockBootstraps/lib/ rm -rf ./var diff --git a/dotnetcore2.1/build/Dockerfile b/dotnetcore2.1/build/Dockerfile index e6793d8f..b9aceba7 100644 --- a/dotnetcore2.1/build/Dockerfile +++ b/dotnetcore2.1/build/Dockerfile @@ -1,24 +1,37 @@ +FROM lambci/lambda:dotnetcore2.1 + FROM lambci/lambda-base:build -ENV PATH=/var/lang/bin:$PATH \ +# Run: docker run --rm --entrypoint dotnet lambci/lambda:dotnetcore2.1 --info +# Check https://dotnet.microsoft.com/download/dotnet-core/2.1 for versions +ENV DOTNET_ROOT=/var/lang/bin +ENV PATH=/root/.dotnet/tools:$DOTNET_ROOT:$PATH \ LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_dotnetcore2.1 \ - DOTNET_SDK_VERSION=2.1.401 \ + DOTNET_SDK_VERSION=2.1.803 \ DOTNET_CLI_TELEMETRY_OPTOUT=1 \ NUGET_XMLDOC_MODE=skip -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/dotnetcore2.1.tgz | tar -zx -C / && \ - yum install -y libunwind && \ - curl https://dot.net/v1/dotnet-install.sh | bash -s -- -v $DOTNET_SDK_VERSION -i /var/lang/bin && \ +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN yum install -y libunwind && \ + curl -L https://dot.net/v1/dotnet-install.sh | bash -s -- -v $DOTNET_SDK_VERSION -i $DOTNET_ROOT && \ mkdir /tmp/warmup && \ cd /tmp/warmup && \ dotnet new && \ cd / && \ - rm -rf /tmp/warmup /tmp/NuGetScratch + rm -rf /tmp/warmup /tmp/NuGetScratch /tmp/.dotnet # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U virtualenv pipenv awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install virtualenv && \ + pipx install pipenv && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 && \ + dotnet tool install --global Amazon.Lambda.Tools --version 3.3.1 CMD ["dotnet", "build"] diff --git a/dotnetcore2.1/run/Dockerfile b/dotnetcore2.1/run/Dockerfile index 2d442d23..8ea4836f 100644 --- a/dotnetcore2.1/run/Dockerfile +++ b/dotnetcore2.1/run/Dockerfile @@ -10,6 +10,9 @@ COPY MockBootstraps/ . RUN dotnet publish --output /app/ --configuration Release +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV PATH=/var/lang/bin:$PATH \ @@ -21,4 +24,8 @@ RUN rm -rf /var/runtime /var/lang && \ COPY --from=0 /app/MockBootstraps.* /var/runtime/ +COPY --from=1 /var/runtime/init /var/runtime/mockserver + +USER sbx_user1051 + ENTRYPOINT ["/var/lang/bin/dotnet", "/var/runtime/MockBootstraps.dll"] diff --git a/dotnetcore2.1/run/MockBootstraps/MockBootstraps.csproj b/dotnetcore2.1/run/MockBootstraps/MockBootstraps.csproj index 0f633077..ea15e720 100644 --- a/dotnetcore2.1/run/MockBootstraps/MockBootstraps.csproj +++ b/dotnetcore2.1/run/MockBootstraps/MockBootstraps.csproj @@ -4,14 +4,16 @@ Exe netcoreapp2.1 MockLambdaRuntime + true - - lib\Bootstrap.dll - - - lib\Amazon.Lambda.Core.dll - - + + lib\Bootstrap.dll + + + lib\Amazon.Lambda.Core.dll + + + diff --git a/dotnetcore2.1/run/MockBootstraps/MockLambdaContext.cs b/dotnetcore2.1/run/MockBootstraps/MockLambdaContext.cs index af405d9f..76d64ca8 100644 --- a/dotnetcore2.1/run/MockBootstraps/MockLambdaContext.cs +++ b/dotnetcore2.1/run/MockBootstraps/MockLambdaContext.cs @@ -14,12 +14,17 @@ public MockLambdaContext(string handler, string eventBody) { RequestId = Guid.NewGuid().ToString(); StartTime = DateTime.Now; - InputStream = new MemoryStream(); - OutputStream = new MemoryStream(); - - var eventData = Encoding.UTF8.GetBytes(eventBody); - InputStream.Write(eventData, 0, eventData.Length); - InputStream.Position = 0; + Body = eventBody; + Timeout = Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_TIMEOUT", "300")); + MemorySize = Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536")); + FunctionName = EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_NAME", "test"); + FunctionVersion = EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"); + LogGroup = EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_GROUP_NAME", $"/aws/lambda/{FunctionName}"); + LogStream = EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_STREAM_NAME", RandomLogStreamName); + Region = EnvHelper.GetOrDefault("AWS_REGION", EnvHelper.GetOrDefault("AWS_DEFAULT_REGION", "us-east-1")); + AccountId = EnvHelper.GetOrDefault("AWS_ACCOUNT_ID", "000000000000"); + Arn = EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_INVOKED_ARN", $"arn:aws:lambda:{Region}:{AccountId}:function:{FunctionName}"); + StayOpen = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOCKER_LAMBDA_STAY_OPEN")); Environment.SetEnvironmentVariable("AWS_LAMBDA_FUNCTION_NAME", FunctionName); Environment.SetEnvironmentVariable("AWS_LAMBDA_FUNCTION_VERSION", FunctionVersion); @@ -37,47 +42,49 @@ public TimeSpan RemainingTime() return StartTime + TimeSpan.FromSeconds(Timeout) - DateTime.Now; } - public long Duration => (long)(DateTime.Now - StartTime).TotalMilliseconds; - public long BilledDuration => (long)(Math.Ceiling((DateTime.Now - StartTime).TotalMilliseconds / 100)) * 100; - - public long MemoryUsed => Process.GetCurrentProcess().WorkingSet64; - - public Stream InputStream { get; } - - public Stream OutputStream { get; } + public long DeadlineMs + { + set + { + Timeout = (int)DateTimeOffset.FromUnixTimeMilliseconds(value).Subtract(DateTime.Now).TotalSeconds; + } + } - public string OutputText + public string Body { - get + set { - OutputStream.Position = 0; - using (TextReader reader = new StreamReader(OutputStream)) - { - return reader.ReadToEnd(); - } + InputStream = new MemoryStream(); + var eventData = Encoding.UTF8.GetBytes(value); + InputStream.Write(eventData, 0, eventData.Length); + InputStream.Position = 0; } } - public string RequestId { get; } - public DateTime StartTime { get; } + public Stream InputStream { get; set; } + + public string RequestId { get; set; } + public DateTime StartTime { get; set; } + + public int Timeout { get; set; } - public int Timeout => Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_TIMEOUT", "300")); + public int MemorySize { get; set; } - public int MemorySize => Convert.ToInt32(EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536")); + public string FunctionName { get; set; } - public string FunctionName => EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_NAME", "test"); + public string FunctionVersion { get; set; } - public string FunctionVersion => EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"); + public string LogGroup { get; set; } - public string LogGroup => EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_GROUP_NAME", $"/aws/lambda/{FunctionName}"); + public string LogStream { get; set; } - public string LogStream => EnvHelper.GetOrDefault("AWS_LAMBDA_LOG_STREAM_NAME", RandomLogStreamName); + public string Region { get; set; } - public string Region => EnvHelper.GetOrDefault("AWS_REGION", EnvHelper.GetOrDefault("AWS_DEFAULT_REGION", "us-east-1")); + public string AccountId { get; set; } - public string AccountId => EnvHelper.GetOrDefault("AWS_ACCOUNT_ID", "000000000000"); + public string Arn { get; set; } - public string Arn => EnvHelper.GetOrDefault("AWS_LAMBDA_FUNCTION_INVOKED_ARN", $"arn:aws:lambda:{Region}:{AccountId}:function:{FunctionName}"); + public bool StayOpen { get; } string RandomLogStreamName => $"{DateTime.Now.ToString("yyyy/MM/dd")}/[{FunctionVersion}]{random.Next().ToString("x") + random.Next().ToString("x")}"; } diff --git a/dotnetcore2.1/run/MockBootstraps/MockRuntime.cs b/dotnetcore2.1/run/MockBootstraps/MockRuntime.cs new file mode 100644 index 00000000..51ee0887 --- /dev/null +++ b/dotnetcore2.1/run/MockBootstraps/MockRuntime.cs @@ -0,0 +1,386 @@ +using AWSLambda.Internal.Bootstrap.Context; +using AWSLambda.Internal.Bootstrap.Interop.Structures; +using MockLambdaRuntime; +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; + +namespace AWSLambda.Internal.Bootstrap +{ + internal class MockRuntime : ILambdaRuntime + { + private const string STACK_TRACE_INDENT = " "; + + private bool invoked; + + private bool logTail; + + private bool initTimeSent; + + private DateTimeOffset receivedInvokeAt = DateTimeOffset.MinValue; + + private string logs = ""; + + private Exception invokeError; + + private readonly IntPtr sharedMem = Marshal.AllocHGlobal(SBSharedMem.UnmanagedStructSize); + + private SBSharedMem curSBSharedMem; + + private readonly MockLambdaContext context; + + private static readonly HttpClient client = new HttpClient(); + + private readonly MockXRayProfiler xRayProfiler = new MockXRayProfiler(); + + public IEnvironment Environment { get; } = new SystemEnvironment(); + + public IXRayProfiler XRayProfiler { get { return xRayProfiler; } } + + public InitData InitData + { + get; + private set; + } + + public MockRuntime(string handler, string body) + { + context = new MockLambdaContext(handler, body); + InitData = new InitData + { + Handler = handler, + InvokeId = context.RequestId, + SuppressUserCodeInit = true, + ErrorCode = null, + Throttled = false + }; + invoked = false; + client.Timeout = Timeout.InfiniteTimeSpan; + } + + public bool KeepInvokeLoopRunning() + { + return true; + } + + public void Init() + { + var timeout = DateTimeOffset.Now.AddSeconds(1); + while (true) + { + try + { + var result = client.GetAsync("http://127.0.0.1:9001/2018-06-01/ping").Result; + if (result.StatusCode != HttpStatusCode.OK) + { + throw new Exception("Got a bad response from the bootstrap"); + } + break; + } + catch (Exception e) + { + if (DateTimeOffset.Now > timeout) + { + throw e; + } + } + Thread.Sleep(5); + } + } + + unsafe InvokeData ILambdaRuntime.ReceiveInvoke(IDictionary initialEnvironmentVariables, RuntimeReceiveInvokeBuffers buffers) + { + if (!invoked) + { + receivedInvokeAt = DateTimeOffset.Now; + invoked = true; + } + else + { + logs = ""; + } + HttpResponseMessage result = null; + try + { + result = client.GetAsync("http://127.0.0.1:9001/2018-06-01/runtime/invocation/next").Result; + } + catch (AggregateException ae) + { + if (ae.InnerException is HttpRequestException && ae.InnerException.InnerException != null && + (ae.InnerException.InnerException is SocketException || + // happens on dotnetcore2.0 + ae.InnerException.InnerException.GetType().ToString().Equals("System.Net.Http.CurlException"))) + { + System.Environment.Exit(context.StayOpen ? 2 : (invokeError == null ? 0 : 1)); + } + else + { + throw ae; + } + } + + if (result.StatusCode != HttpStatusCode.OK) + { + throw new Exception("Got a bad response from the bootstrap"); + } + + var requestId = result.Headers.GetValues("Lambda-Runtime-Aws-Request-Id").First(); + var deadlineMs = result.Headers.GetValues("Lambda-Runtime-Deadline-Ms").First(); + var functionArn = result.Headers.GetValues("Lambda-Runtime-Invoked-Function-Arn").First(); + var xAmznTraceId = result.Headers.GetValues("Lambda-Runtime-Trace-Id").First(); + var clientContext = HeaderHelper.GetFirstOrDefault(result.Headers, "Lambda-Runtime-Client-Context"); + var cognitoIdentity = HeaderHelper.GetFirstOrDefault(result.Headers, "Lambda-Runtime-Cognito-Identity"); + + logTail = HeaderHelper.GetFirstOrDefault(result.Headers, "Docker-Lambda-Log-Type") == "Tail"; + + var body = result.Content.ReadAsStringAsync().Result; + + context.StartTime = DateTime.Now; + context.RequestId = requestId; + context.DeadlineMs = long.Parse(deadlineMs); + context.Body = body; + + curSBSharedMem = new SBSharedMem(sharedMem); + return new InvokeData(curSBSharedMem) + { + RequestId = context.RequestId, + AwsCredentials = new AwsCredentials + { + AccessKeyId = System.Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID"), + SecretAccessKey = System.Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY"), + SessionToken = System.Environment.GetEnvironmentVariable("AWS_SESSION_TOKEN") + }, + XAmznTraceId = xAmznTraceId, + InputStream = context.InputStream, + OutputStream = new UnmanagedMemoryStream(curSBSharedMem.EventBody, 0, SBSharedMem.SizeOfEventBody, FileAccess.Write), + LambdaContextInternal = new LambdaContextInternal( + context.RemainingTime, + SendCustomerLogMessage, + GetCognitoClientContextInternalLazy(clientContext), + context.RequestId, + new Lazy(context.Arn), + GetCognitoIdentityIdLazy(cognitoIdentity), + GetCognitoIdentityPoolIdLazy(cognitoIdentity), + initialEnvironmentVariables + ) + }; + } + + public unsafe void ReportDone(string invokeId, string errorType, bool waitForExit) + { + if (!invoked && invokeError == null) return; + + var output = Interop.InteropUtils.ReadUTF8String(curSBSharedMem.EventBody, curSBSharedMem.ResponseBodyLen); + + var suffix = errorType == null ? "response" : "error"; + + Task task; + using (var requestMessage = new HttpRequestMessage(HttpMethod.Post, $"http://127.0.0.1:9001/2018-06-01/runtime/invocation/{context.RequestId}/{suffix}")) + { + if (logTail) + { + requestMessage.Headers.Add("Docker-Lambda-Log-Result", Convert.ToBase64String(LogsTail4k())); + } + if (!initTimeSent) + { + requestMessage.Headers.Add("Docker-Lambda-Invoke-Wait", receivedInvokeAt.ToUnixTimeMilliseconds().ToString()); + requestMessage.Headers.Add("Docker-Lambda-Init-End", xRayProfiler.InitEnd.ToUnixTimeMilliseconds().ToString()); + initTimeSent = true; + } + requestMessage.Content = new StringContent(output); + task = client.SendAsync(requestMessage); + try + { + task.Wait(); + } + catch (AggregateException ae) + { + if (ae.InnerException is HttpRequestException && ae.InnerException.InnerException != null && + (ae.InnerException.InnerException is SocketException || + // happens on dotnetcore2.0 + ae.InnerException.InnerException.GetType().ToString().Equals("System.Net.Http.CurlException"))) + { + System.Environment.Exit(context.StayOpen ? 2 : (string.IsNullOrEmpty(errorType) && invokeError == null ? 0 : 1)); + } + else + { + throw ae; + } + } + var response = task.Result; + if (response.StatusCode != HttpStatusCode.Accepted) + { + throw new Exception($"Unknown response from invocation: {response.StatusCode}"); + } + } + if (invokeError != null) + { + Console.Error.WriteLine(invokeError); + return; + } + } + + private byte[] LogsTail4k() + { + var logBuf = Encoding.UTF8.GetBytes(logs); + if (logBuf.Length <= 4096) + { + return logBuf; + } + var slicedLogBuf = new byte[4096]; + Array.Copy(logBuf, logBuf.Length - 4096, slicedLogBuf, 0, 4096); + return slicedLogBuf; + } + + public void ReportError(string invokeId, ExceptionResponse exceptionResponse) + { + invokeError = exceptionResponse.OriginalException; + + // XXX: For the future perhaps: + /* + StringBuilder stringBuilder = new StringBuilder(); + if (!string.IsNullOrEmpty(exceptionResponse.StackTrace)) + { + stringBuilder.AppendLine(exceptionResponse.StackTrace); + } + if (exceptionResponse.InnerException != null) + { + AppendStackTraceToStringBuilder(stringBuilder, exceptionResponse.InnerException); + } + */ + } + + /// Try to log everything to stderr except the function result + public void SendCustomerLogMessage(string message) + { + if (context.StayOpen) + { + if (logTail) + { + logs += message + System.Environment.NewLine; + } + Console.WriteLine(message); + } + else + { + Console.Error.WriteLine(message); + } + } + + private static void AppendStackTraceToStringBuilder(StringBuilder builder, ExceptionResponse ex) + { + if (!string.IsNullOrWhiteSpace(ex.StackTrace)) + { + foreach (var line in ex.StackTrace + .Split(new string[] { System.Environment.NewLine }, StringSplitOptions.None) + .Select(s => s.Trim()) + .Where(s => !string.IsNullOrWhiteSpace(s)) + .Select(s => STACK_TRACE_INDENT + s)) + { + builder.AppendLine(line); + } + } + if (ex.InnerException != null) + { + string errorMessage = ex.InnerException.ErrorMessage; + string errorType = ex.InnerException.ErrorType; + if (errorMessage != null) + { + builder.Append(errorMessage.Trim()); + builder.Append(": "); + } + builder.AppendLine(errorType); + AppendStackTraceToStringBuilder(builder, ex.InnerException); + } + } + + internal static Lazy GetCognitoIdentityIdLazy(string jsonStr) + { + return new Lazy(() => + { + var match = Regex.Match(jsonStr ?? "", "\"identity_id\":\"([^\"]+)\""); + return match.Success ? match.Groups[1].ToString() : string.Empty; + }); + } + + internal static Lazy GetCognitoIdentityPoolIdLazy(string jsonStr) + { + return new Lazy(() => + { + var match = Regex.Match(jsonStr ?? "", "\"identity_pool_id\":\"([^\"]+)\""); + return match.Success ? match.Groups[1].ToString() : string.Empty; + }); + } + + internal static Lazy GetCognitoClientContextInternalLazy(string text) + { + return new Lazy(() => + { + CognitoClientContextInternal result = null; + if (!string.IsNullOrEmpty(text)) + { + try + { + return CognitoClientContextInternal.FromJson(text); + } + catch (Exception innerException) + { + throw LambdaExceptions.ValidationException(innerException, "Unable to parse client context JSON string '{0}'.", text); + } + } + return result; + }); + } + } + + internal class MockXRayProfiler : IXRayProfiler + { + public DateTimeOffset InitEnd { get; private set; } + + public void ReportUserInitStart() + { + } + + public void ReportUserInitEnd() + { + InitEnd = DateTimeOffset.Now; + } + + public void ReportUserInvokeStart() + { + } + + public void ReportUserInvokeEnd() + { + } + + public void ReportError(ExceptionResponse exceptionResponse) + { + } + } + + class HeaderHelper + { + /// Gets the given environment variable with a fallback if it doesn't exist + public static string GetFirstOrDefault(HttpHeaders headers, string name) + { + if (headers.TryGetValues(name, out IEnumerable values)) + { + return values.FirstOrDefault(); + } + return null; + } + } + +} diff --git a/dotnetcore2.1/run/MockBootstraps/Program.cs b/dotnetcore2.1/run/MockBootstraps/Program.cs index da0fcd1f..df26073d 100644 --- a/dotnetcore2.1/run/MockBootstraps/Program.cs +++ b/dotnetcore2.1/run/MockBootstraps/Program.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; using System.Runtime.Loader; using AWSLambda.Internal.Bootstrap; -using AWSLambda.Internal.Bootstrap.Context; - +using AWSLambda.Internal.Bootstrap.ErrorHandling; + namespace MockLambdaRuntime { class Program @@ -14,16 +16,29 @@ class Program private const bool WaitForDebuggerFlagDefaultValue = false; /// Task root of lambda task - static string lambdaTaskRoot = EnvHelper.GetOrDefault("LAMBDA_TASK_ROOT", "/var/task"); + static readonly string lambdaTaskRoot = EnvHelper.GetOrDefault("LAMBDA_TASK_ROOT", "/var/task"); private static readonly TimeSpan _debuggerStatusQueryInterval = TimeSpan.FromMilliseconds(50); private static readonly TimeSpan _debuggerStatusQueryTimeout = TimeSpan.FromMinutes(10); + private static readonly IList assemblyDirs = new List { lambdaTaskRoot }; + /// Program entry point static void Main(string[] args) { + // Add all /var/lang/bin/shared/*/* directories to the search path + foreach (var di in new DirectoryInfo("/var/lang/bin/shared").EnumerateDirectories().SelectMany(di => di.EnumerateDirectories().Select(di2 => di2))) + { + assemblyDirs.Add(di.FullName); + } AssemblyLoadContext.Default.Resolving += OnAssemblyResolving; + //Console.CancelKeyPress += delegate { + // // call methods to clean up + //}; + + Process mockServer = null; + try { var shouldWaitForDebugger = GetShouldWaitForDebuggerFlag(args, out var positionalArgs); @@ -31,6 +46,18 @@ static void Main(string[] args) var handler = GetFunctionHandler(positionalArgs); var body = GetEventBody(positionalArgs); + var lambdaRuntime = new MockRuntime(handler, body); + + mockServer = new Process(); + mockServer.StartInfo.FileName = "/var/runtime/mockserver"; + mockServer.StartInfo.CreateNoWindow = true; + mockServer.StartInfo.RedirectStandardInput = true; + mockServer.StartInfo.Environment["DOCKER_LAMBDA_NO_BOOTSTRAP"] = "1"; + mockServer.StartInfo.Environment["DOCKER_LAMBDA_USE_STDIN"] = "1"; + mockServer.Start(); + mockServer.StandardInput.Write(body); + mockServer.StandardInput.Close(); + if (shouldWaitForDebugger) { Console.Error.WriteLine("Waiting for the debugger to attach..."); @@ -43,40 +70,10 @@ static void Main(string[] args) } } - var lambdaContext = new MockLambdaContext(handler, body); - - var userCodeLoader = new UserCodeLoader(handler, InternalLogger.NO_OP_LOGGER); - userCodeLoader.Init(Console.Error.WriteLine); - - var lambdaContextInternal = new LambdaContextInternal(lambdaContext.RemainingTime, - LogAction, new Lazy(), - lambdaContext.RequestId, - new Lazy(lambdaContext.Arn), - new Lazy(string.Empty), - new Lazy(string.Empty), - Environment.GetEnvironmentVariables()); - - Exception lambdaException = null; - - LogRequestStart(lambdaContext); - try - { - userCodeLoader.Invoke(lambdaContext.InputStream, lambdaContext.OutputStream, lambdaContextInternal); - } - catch (Exception ex) - { - lambdaException = ex; - } - LogRequestEnd(lambdaContext); - - if (lambdaException == null) - { - Console.WriteLine(lambdaContext.OutputText); - } - else - { - Console.Error.WriteLine(lambdaException); - } + var lambdaBootstrap = new LambdaBootstrap(lambdaRuntime, InternalLogger.NO_OP_LOGGER); + UnhandledExceptionLogger.Register(); + lambdaBootstrap.Initialize(); + lambdaBootstrap.Invoke(); } // Catch all unhandled exceptions from runtime, to prevent user from hanging on them while debugging @@ -84,18 +81,27 @@ static void Main(string[] args) { Console.Error.WriteLine($"\nUnhandled exception occured in runner:\n{ex}"); } + finally + { + if (mockServer != null) mockServer.Dispose(); + } } /// Called when an assembly could not be resolved - private static Assembly OnAssemblyResolving(AssemblyLoadContext context, AssemblyName assembly) - { - return context.LoadFromAssemblyPath(Path.Combine(lambdaTaskRoot, $"{assembly.Name}.dll")); - } - - /// Try to log everything to stderr except the function result - private static void LogAction(string text) + private static Assembly OnAssemblyResolving(AssemblyLoadContext context, AssemblyName assemblyName) { - Console.Error.WriteLine(text); + foreach (var dir in assemblyDirs) + { + try + { + return context.LoadFromAssemblyPath(Path.Combine(dir, $"{assemblyName.Name}.dll")); + } + catch (FileNotFoundException) + { + continue; + } + } + throw new FileNotFoundException($"{assemblyName.Name}.dll"); } /// @@ -125,22 +131,6 @@ private static bool GetShouldWaitForDebuggerFlag(string[] args, out string[] unp return flagValue; } - static void LogRequestStart(MockLambdaContext context) - { - Console.Error.WriteLine($"START RequestId: {context.RequestId} Version: {context.FunctionVersion}"); - } - - static void LogRequestEnd(MockLambdaContext context) - { - Console.Error.WriteLine($"END RequestId: {context.RequestId}"); - - Console.Error.WriteLine($"REPORT RequestId {context.RequestId}\t" + - $"Duration: {context.Duration} ms\t" + - $"Billed Duration: {context.BilledDuration} ms\t" + - $"Memory Size {context.MemorySize} MB\t" + - $"Max Memory Used: {context.MemoryUsed / (1024 * 1024)} MB"); - } - /// Gets the function handler from arguments or environment static string GetFunctionHandler(string[] args) { diff --git a/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.dll b/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.dll index 33616baf..0711afac 100644 Binary files a/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.dll and b/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.dll differ diff --git a/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.pdb b/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.pdb new file mode 100644 index 00000000..ddc2c4d4 Binary files /dev/null and b/dotnetcore2.1/run/MockBootstraps/lib/Bootstrap.pdb differ diff --git a/dotnetcore2.1/run/update_libs.sh b/dotnetcore2.1/run/update_libs.sh index d6ca17dd..024c526e 100755 --- a/dotnetcore2.1/run/update_libs.sh +++ b/dotnetcore2.1/run/update_libs.sh @@ -1,7 +1,7 @@ #!/bin/sh curl https://lambci.s3.amazonaws.com/fs/dotnetcore2.1.tgz | \ - tar -xz var/runtime/Amazon.Lambda.Core.dll var/runtime/Bootstrap.dll + tar -xz var/runtime/Amazon.Lambda.Core.dll var/runtime/Bootstrap.dll var/runtime/Bootstrap.pdb -mv ./var/runtime/*.dll ./MockBootstraps/lib/ +mv ./var/runtime/*.dll ./var/runtime/*.pdb ./MockBootstraps/lib/ rm -rf ./var diff --git a/dotnetcore3.1/build/Dockerfile b/dotnetcore3.1/build/Dockerfile new file mode 100644 index 00000000..5952e362 --- /dev/null +++ b/dotnetcore3.1/build/Dockerfile @@ -0,0 +1,32 @@ +FROM lambci/lambda:dotnetcore3.1 + +FROM lambci/lambda-base-2:build + +# Run: docker run --rm --entrypoint dotnet lambci/lambda:dotnetcore3.1 --info +# Check https://dotnet.microsoft.com/download/dotnet-core/3.1 for versions +ENV DOTNET_ROOT=/var/lang/bin +ENV PATH=/root/.dotnet/tools:$DOTNET_ROOT:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_dotnetcore3.1 \ + DOTNET_SDK_VERSION=3.1.405 \ + DOTNET_CLI_TELEMETRY_OPTOUT=1 \ + NUGET_XMLDOC_MODE=skip + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN curl -L https://dot.net/v1/dotnet-install.sh | bash -s -- -v $DOTNET_SDK_VERSION -i $DOTNET_ROOT && \ + mkdir /tmp/warmup && \ + cd /tmp/warmup && \ + dotnet new && \ + cd / && \ + rm -rf /tmp/warmup /tmp/NuGetScratch /tmp/.dotnet + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 && \ + dotnet tool install --global Amazon.Lambda.Tools --version 4.0.0 + +CMD ["dotnet", "build"] diff --git a/dotnetcore3.1/run/Dockerfile b/dotnetcore3.1/run/Dockerfile new file mode 100644 index 00000000..8209ebd4 --- /dev/null +++ b/dotnetcore3.1/run/Dockerfile @@ -0,0 +1,21 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/dotnetcore3.1.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_dotnetcore3.1 + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap", "--enable-msg-logs"] diff --git a/examples/dotnetcore2.0/test.csproj b/examples/dotnetcore2.0/test.csproj index af1afa1a..bf608d81 100644 --- a/examples/dotnetcore2.0/test.csproj +++ b/examples/dotnetcore2.0/test.csproj @@ -6,12 +6,8 @@ - - - - - - + + diff --git a/examples/dotnetcore2.1/test.csproj b/examples/dotnetcore2.1/test.csproj index 4bcdab03..62b530d4 100644 --- a/examples/dotnetcore2.1/test.csproj +++ b/examples/dotnetcore2.1/test.csproj @@ -6,12 +6,8 @@ - - - - - - + + diff --git a/examples/dotnetcore2.1/test.sln b/examples/dotnetcore2.1/test.sln new file mode 100644 index 00000000..47c8aa8e --- /dev/null +++ b/examples/dotnetcore2.1/test.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test.csproj", "{0A83D120-2336-4F30-86F1-DC045C3C9B90}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/examples/dotnetcore3.1/Function.cs b/examples/dotnetcore3.1/Function.cs new file mode 100644 index 00000000..4a4ea534 --- /dev/null +++ b/examples/dotnetcore3.1/Function.cs @@ -0,0 +1,30 @@ +// Compile with: +// docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore3.1 dotnet publish -c Release -o pub + +// Run with: +// docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore3.1 test::test.Function::FunctionHandler '{"some": "event"}' + +using System; +using System.Collections; +using Amazon.Lambda.Core; + +[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] + +namespace test +{ + public class Function + { + public string FunctionHandler(object inputEvent, ILambdaContext context) + { + Console.WriteLine($"inputEvent: {inputEvent}"); + Console.WriteLine($"RemainingTime: {context.RemainingTime}"); + + foreach (DictionaryEntry kv in Environment.GetEnvironmentVariables()) + { + Console.WriteLine($"{kv.Key}={kv.Value}"); + } + + return "Hello World!"; + } + } +} diff --git a/examples/dotnetcore3.1/README.md b/examples/dotnetcore3.1/README.md new file mode 100644 index 00000000..cdc506a2 --- /dev/null +++ b/examples/dotnetcore3.1/README.md @@ -0,0 +1,9 @@ +# .NET Core 3.1 docker-lambda example + +```sh +# Will place the compiled code in `./pub` +docker run --rm -v "$PWD":/var/task lambci/lambda:build-dotnetcore3.1 dotnet publish -c Release -o pub + +# Then you can run using that as the task directory +docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore3.1 test::test.Function::FunctionHandler '{"some": "event"}' +``` diff --git a/examples/dotnetcore3.1/test.csproj b/examples/dotnetcore3.1/test.csproj new file mode 100644 index 00000000..ade4bc4c --- /dev/null +++ b/examples/dotnetcore3.1/test.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp3.1 + true + + + + + + + + diff --git a/examples/dotnetcore3.1/test.sln b/examples/dotnetcore3.1/test.sln new file mode 100644 index 00000000..2de30541 --- /dev/null +++ b/examples/dotnetcore3.1/test.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test.csproj", "{0A83D120-2336-4F30-86F1-DC045C3C9B90}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A83D120-2336-4F30-86F1-DC045C3C9B90}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/examples/go1.x/Gopkg.lock b/examples/go1.x/Gopkg.lock deleted file mode 100644 index 04cbf573..00000000 --- a/examples/go1.x/Gopkg.lock +++ /dev/null @@ -1,25 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:8b55da6790eeade578c1fd4ebaa5b0e641072172e1d743f3cb945ae73af463f9" - name = "github.com/aws/aws-lambda-go" - packages = [ - "events", - "lambda", - "lambda/messages", - "lambdacontext", - ] - pruneopts = "" - revision = "2d482ef09017ae953b1e8d5a6ddac5b696663a3c" - version = "v1.6.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/aws/aws-lambda-go/events", - "github.com/aws/aws-lambda-go/lambda", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/examples/go1.x/Gopkg.toml b/examples/go1.x/Gopkg.toml deleted file mode 100644 index 149d48d7..00000000 --- a/examples/go1.x/Gopkg.toml +++ /dev/null @@ -1,3 +0,0 @@ -[[constraint]] - name = "github.com/aws/aws-lambda-go" - version = "1.6.0" diff --git a/examples/go1.x/go.mod b/examples/go1.x/go.mod new file mode 100644 index 00000000..bcc119a6 --- /dev/null +++ b/examples/go1.x/go.mod @@ -0,0 +1,5 @@ +module handler + +require github.com/aws/aws-lambda-go v1.13.3 + +go 1.15 diff --git a/examples/go1.x/go.sum b/examples/go1.x/go.sum new file mode 100644 index 00000000..01282a39 --- /dev/null +++ b/examples/go1.x/go.sum @@ -0,0 +1,13 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/examples/go1.x/handler.go b/examples/go1.x/handler.go index 69ce5aae..29f361a0 100644 --- a/examples/go1.x/handler.go +++ b/examples/go1.x/handler.go @@ -1,5 +1,5 @@ // Compile with: -// docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c 'dep ensure && go build handler.go' +// docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c 'go mod download && go build handler.go' // Run with: // docker run --rm -v "$PWD":/var/task lambci/lambda:go1.x handler '{"Records": []}' @@ -9,11 +9,12 @@ package main import ( "context" "fmt" + "github.com/aws/aws-lambda-go/events" "github.com/aws/aws-lambda-go/lambda" ) -func HandleRequest(ctx context.Context, event events.S3Event) (string, error) { +func handleRequest(ctx context.Context, event events.S3Event) (string, error) { fmt.Println(ctx) fmt.Println(event) @@ -22,5 +23,5 @@ func HandleRequest(ctx context.Context, event events.S3Event) (string, error) { } func main() { - lambda.Start(HandleRequest) + lambda.Start(handleRequest) } diff --git a/examples/java/.classpath b/examples/java/.classpath index 67bbbc76..4857be40 100644 --- a/examples/java/.classpath +++ b/examples/java/.classpath @@ -1,20 +1,12 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + diff --git a/examples/java/.project b/examples/java/.project index c305363a..123c68bd 100644 --- a/examples/java/.project +++ b/examples/java/.project @@ -1,23 +1,34 @@ - example-handler - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - + example-handler + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1599680497045 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/examples/java/.settings/org.eclipse.buildship.core.prefs b/examples/java/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..90865998 --- /dev/null +++ b/examples/java/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home= +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/examples/java/.settings/org.eclipse.core.resources.prefs b/examples/java/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..2b763404 --- /dev/null +++ b/examples/java/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 diff --git a/examples/java/.settings/org.eclipse.jdt.core.prefs b/examples/java/.settings/org.eclipse.jdt.core.prefs index 714351ae..2f5cc74c 100644 --- a/examples/java/.settings/org.eclipse.jdt.core.prefs +++ b/examples/java/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,8 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/examples/java/README.md b/examples/java/README.md index 4f69c6d8..7ebb7a0e 100644 --- a/examples/java/README.md +++ b/examples/java/README.md @@ -1,14 +1,14 @@ # Java 8 docker-lambda example -This example requires [Gradle](https://gradle.org/) to be installed to build -and layout the classes and jars correctly. - Run with: ```sh # Will place the compiled code in `./build/docker` -gradle build +docker run --rm -v "$PWD":/app -w /app gradle:6.0 gradle build # Then you can run using that directory as the task directory docker run --rm -v "$PWD/build/docker":/var/task lambci/lambda:java8 org.lambci.lambda.ExampleHandler '{"some": "event"}' + +# OR +docker run --rm -v "$PWD/build/docker":/var/task lambci/lambda:java11 org.lambci.lambda.ExampleHandler '{"some": "event"}' ``` diff --git a/examples/java/build.gradle b/examples/java/build.gradle index 09fb11af..6d496c49 100644 --- a/examples/java/build.gradle +++ b/examples/java/build.gradle @@ -1,13 +1,16 @@ apply plugin: 'java' +sourceCompatibility = '1.8' +targetCompatibility = '1.8' + repositories { mavenCentral() } dependencies { - compile ( - 'com.amazonaws:aws-lambda-java-core:1.1.0', - 'com.amazonaws:aws-lambda-java-events:1.1.0' + implementation ( + 'com.amazonaws:aws-lambda-java-core:1.2.0', + 'com.amazonaws:aws-lambda-java-events:2.2.7' ) } @@ -15,7 +18,7 @@ task buildZip(type: Zip) { from compileJava from processResources into('lib') { - from configurations.runtime + from configurations.runtimeClasspath } } @@ -23,7 +26,7 @@ task buildDocker(type: Copy) { from compileJava from processResources into('lib') { - from configurations.runtime + from configurations.runtimeClasspath } into 'build/docker' } diff --git a/examples/java/pom.xml b/examples/java/pom.xml deleted file mode 100644 index ece4ba18..00000000 --- a/examples/java/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - 4.0.0 - - org.lambci.lambda - example-handler - 1.0.0 - jar - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.0 - - 1.8 - 1.8 - UTF-8 - true - - - - org.apache.maven.plugins - maven-shade-plugin - 3.0.0 - - - package - - shade - - - - - com.amazonaws:aws-lambda-java-events - com.amazonaws:aws-lambda-java-core - - - - - - - - - - - - - com.amazonaws - aws-java-sdk-bom - 1.11.124 - pom - import - - - - - - - com.amazonaws - aws-lambda-java-events - 1.3.0 - - - com.amazonaws - aws-lambda-java-core - 1.1.0 - - - diff --git a/examples/java/src/main/java/org/lambci/lambda/ExampleHandler.java b/examples/java/src/main/java/org/lambci/lambda/ExampleHandler.java index 42ab8ad9..98c2b01b 100644 --- a/examples/java/src/main/java/org/lambci/lambda/ExampleHandler.java +++ b/examples/java/src/main/java/org/lambci/lambda/ExampleHandler.java @@ -36,8 +36,10 @@ public String handleRequest(Object input, Context context) { logger.log(context.getInvokedFunctionArn() + "\n"); logger.log(context.getLogGroupName() + "\n"); logger.log(context.getLogStreamName() + "\n"); - logger.log(context.getIdentity().getIdentityId() + "\n"); - logger.log(context.getIdentity().getIdentityPoolId() + "\n"); + if (context.getIdentity() != null) { + logger.log(context.getIdentity().getIdentityId() + "\n"); + logger.log(context.getIdentity().getIdentityPoolId() + "\n"); + } logger.log(context.getClientContext() + "\n"); logger.log(context.getMemoryLimitInMB() + "\n"); logger.log(context.getRemainingTimeInMillis() + "\n"); diff --git a/examples/nodejs-native-module/package-lock.json b/examples/nodejs-native-module/package-lock.json new file mode 100644 index 00000000..1beaa4c1 --- /dev/null +++ b/examples/nodejs-native-module/package-lock.json @@ -0,0 +1,493 @@ +{ + "name": "module-native", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.0.tgz", + "integrity": "sha512-jB0yCBl4W/kVHM2whjfyqnxTmOHkCX4kHEa5nYKSoGeYe8YrjTYTc87/6bwt1g8cmV0QrbhKriETg9jWtcREhg==", + "requires": { + "node-addon-api": "^3.0.0", + "node-pre-gyp": "0.15.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "needle": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz", + "integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==", + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-addon-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.0.tgz", + "integrity": "sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg==" + }, + "node-pre-gyp": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz", + "integrity": "sha512-7QcZa8/fpaU/BKenjcaeFF9hLz2+7S9AqyXFhlH/rilsQ/hPZKK32RtR5EQHJElgu+q5RfbJ34KriI79UWaorA==", + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.3", + "needle": "^2.5.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" + }, + "npm-packlist": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } +} diff --git a/examples/nodejs-native-module/package.json b/examples/nodejs-native-module/package.json index c996b394..1917e45b 100644 --- a/examples/nodejs-native-module/package.json +++ b/examples/nodejs-native-module/package.json @@ -3,10 +3,10 @@ "version": "1.0.0", "main": "index.js", "scripts": { - "build": "docker run --rm -v \"$PWD\":/var/task lambci/lambda:build-nodejs4.3", + "build": "docker run --rm -v \"$PWD\":/var/task lambci/lambda:build-nodejs12.x npm rebuild --build-from-source", "test": "node test.js" }, "dependencies": { - "bcrypt": "^0.8.6" + "bcrypt": "^5.0.0" } } diff --git a/examples/nodejs-native-module/test.js b/examples/nodejs-native-module/test.js index 70416838..539cbcf7 100644 --- a/examples/nodejs-native-module/test.js +++ b/examples/nodejs-native-module/test.js @@ -1,10 +1,9 @@ var dockerLambda = require('../..') -var match = dockerLambda({event: {password: 'lambda-docker'}}) +var match = dockerLambda({ event: { password: 'lambda-docker' }, dockerImage: 'lambci/lambda:nodejs12.x' }) console.log(match === 'Matches!' ? 'Match Passed' : 'Match Failed: ' + match) - -var nonMatch = dockerLambda({event: {password: 'lambda-mocker'}}) +var nonMatch = dockerLambda({ event: { password: 'lambda-mocker' }, dockerImage: 'lambci/lambda:nodejs12.x' }) console.log(nonMatch === 'NopeNopeNope' ? 'Non-Match Passed' : 'Non-Match Failed: ' + nonMatch) diff --git a/examples/post.lua b/examples/post.lua new file mode 100644 index 00000000..9066aac1 --- /dev/null +++ b/examples/post.lua @@ -0,0 +1,5 @@ +-- Run with: +-- wrk -s post.lua 'http://localhost:9001/2015-03-31/functions/myfunction/invocations' +wrk.method = "POST" +wrk.body = "{}" +wrk.headers["Content-Type"] = "application/json" diff --git a/examples/provided.al2/bootstrap.go b/examples/provided.al2/bootstrap.go new file mode 100644 index 00000000..e71e3518 --- /dev/null +++ b/examples/provided.al2/bootstrap.go @@ -0,0 +1,27 @@ +// Compile with: +// docker run --rm -v "$PWD":/go/src/handler lambci/lambda:build-go1.x sh -c 'go mod download && go build -tags lambda.norpc bootstrap.go' + +// Run with: +// docker run --rm -v "$PWD":/var/task lambci/lambda:provided.al2 handler '{"Records": []}' + +package main + +import ( + "context" + "fmt" + + "github.com/aws/aws-lambda-go/events" + "github.com/aws/aws-lambda-go/lambda" +) + +func handleRequest(ctx context.Context, event events.S3Event) (string, error) { + fmt.Println(ctx) + + fmt.Println(event) + + return "Hello World!", nil +} + +func main() { + lambda.Start(handleRequest) +} diff --git a/examples/provided.al2/go.mod b/examples/provided.al2/go.mod new file mode 100644 index 00000000..4fc94c95 --- /dev/null +++ b/examples/provided.al2/go.mod @@ -0,0 +1,8 @@ +module bootstrap + +require ( + github.com/aws/aws-lambda-go v1.19.0 + github.com/aws/aws-sdk-go-v2 v0.24.0 +) + +go 1.15 diff --git a/examples/provided.al2/go.sum b/examples/provided.al2/go.sum new file mode 100644 index 00000000..8da6f30f --- /dev/null +++ b/examples/provided.al2/go.sum @@ -0,0 +1,27 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aws/aws-lambda-go v1.19.0 h1:Cn28zA8Mic4NpR7p4IlaEW2srI+U3+I7tRqjFMpt/fs= +github.com/aws/aws-lambda-go v1.19.0/go.mod h1:jJmlefzPfGnckuHdXX7/80O3BvUUi12XOkbv4w9SGLU= +github.com/aws/aws-sdk-go-v2 v0.24.0/go.mod h1:2LhT7UgHOXK3UXONKI5OMgIyoQL6zTAw/jwIeX6yqzw= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/examples/python/lambda_function.py b/examples/python/lambda_function.py index 651e749c..ffe1d550 100644 --- a/examples/python/lambda_function.py +++ b/examples/python/lambda_function.py @@ -29,6 +29,5 @@ def lambda_handler(event, context): "__file__": str(__file__), "os.environ": str(os.environ), "context.__dict__": str(context.__dict__), - "ps aux": str(subprocess.check_output(['ps', 'aux'])), "event": event } diff --git a/examples/ruby/lambda_function.rb b/examples/ruby/lambda_function.rb index e8287485..9e09a34f 100644 --- a/examples/ruby/lambda_function.rb +++ b/examples/ruby/lambda_function.rb @@ -1,13 +1,14 @@ require 'pp' # docker run --rm -v "$PWD":/var/task lambci/lambda:ruby2.5 lambda_function.lambda_handler +# docker run --rm -v "$PWD":/var/task lambci/lambda:ruby2.7 lambda_function.lambda_handler def lambda_handler(event:, context:) info = { 'event' => event, 'ENV' => ENV.to_hash, 'context' => context.instance_variables.each_with_object({}) { |k, h| h[k] = context.instance_variable_get k }, - 'ps aux' => `ps aux`, + 'ps aux' => `bash -O extglob -c 'for cmd in /proc/+([0-9])/cmdline; do echo $cmd; xargs -n 1 -0 < $cmd; done'`, 'proc environ' => `xargs -n 1 -0 < /proc/1/environ`, } diff --git a/examples/terminal.png b/examples/terminal.png deleted file mode 100644 index 57a19a48..00000000 Binary files a/examples/terminal.png and /dev/null differ diff --git a/examples/terminal3.png b/examples/terminal3.png new file mode 100644 index 00000000..5cf9e6ea Binary files /dev/null and b/examples/terminal3.png differ diff --git a/go1.x/build/Dockerfile b/go1.x/build/Dockerfile index 27576df0..87ffda03 100644 --- a/go1.x/build/Dockerfile +++ b/go1.x/build/Dockerfile @@ -1,21 +1,29 @@ +FROM lambci/lambda:go1.x + FROM lambci/lambda-base:build -ENV GOLANG_VERSION=1.11.2 \ +# https://golang.org/doc/devel/release.html +ENV GOLANG_VERSION=1.15 \ GOPATH=/go \ PATH=/go/bin:/usr/local/go/bin:$PATH \ AWS_EXECUTION_ENV=AWS_Lambda_go1.x WORKDIR /go/src/handler -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/go1.x.tgz | tar -zx -C / && \ - curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz | tar -zx -C /usr/local && \ +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz | tar -zx -C /usr/local && \ go get github.com/golang/dep/cmd/dep && \ go install github.com/golang/dep/cmd/dep && \ go get golang.org/x/vgo # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 CMD ["dep", "ensure"] diff --git a/go1.x/run/Dockerfile b/go1.x/run/Dockerfile index 49789687..b804db69 100644 --- a/go1.x/run/Dockerfile +++ b/go1.x/run/Dockerfile @@ -1,11 +1,14 @@ FROM golang:1 -WORKDIR /go/src/github.com/lambci/docker-lambda -RUN curl -sSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && chmod +x /usr/local/bin/dep -COPY aws-lambda-mock.go Gopkg.toml Gopkg.lock ./ -RUN dep ensure +WORKDIR /app +COPY go.mod go.sum ./ +RUN go mod download +COPY aws-lambda-mock.go ./ RUN GOARCH=amd64 GOOS=linux go build aws-lambda-mock.go +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV AWS_EXECUTION_ENV=AWS_Lambda_go1.x @@ -13,7 +16,9 @@ ENV AWS_EXECUTION_ENV=AWS_Lambda_go1.x RUN rm -rf /var/runtime /var/lang && \ curl https://lambci.s3.amazonaws.com/fs/go1.x.tgz | tar -zx -C / -COPY --from=0 /go/src/github.com/lambci/docker-lambda/aws-lambda-mock /var/runtime/aws-lambda-go +COPY --from=0 /app/aws-lambda-mock /var/runtime/aws-lambda-go + +COPY --from=1 /var/runtime/init /var/runtime/mockserver USER sbx_user1051 diff --git a/go1.x/run/Gopkg.lock b/go1.x/run/Gopkg.lock deleted file mode 100644 index 9969ecf5..00000000 --- a/go1.x/run/Gopkg.lock +++ /dev/null @@ -1,15 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/aws/aws-lambda-go" - packages = ["lambda/messages"] - revision = "fafa7e49388b8991caf99308e80655ba91816b72" - version = "v1.1.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "3c793d7717a79ec1be981b49c1a1d884b15056f98188d915ec4b154f296eeceb" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/go1.x/run/Gopkg.toml b/go1.x/run/Gopkg.toml deleted file mode 100644 index 97ec5bc8..00000000 --- a/go1.x/run/Gopkg.toml +++ /dev/null @@ -1,3 +0,0 @@ -[[constraint]] - name = "github.com/aws/aws-lambda-go" - version = "1.1.0" diff --git a/go1.x/run/aws-lambda-mock.go b/go1.x/run/aws-lambda-mock.go index 6f17be1b..885f0200 100644 --- a/go1.x/run/aws-lambda-mock.go +++ b/go1.x/run/aws-lambda-mock.go @@ -1,35 +1,44 @@ package main import ( - "bufio" "bytes" + "encoding/base64" "encoding/hex" "encoding/json" "flag" "fmt" - "github.com/aws/aws-lambda-go/lambda/messages" + "io" "io/ioutil" - "math" + "log" "math/rand" "net" + "net/http" "net/rpc" + "net/url" "os" "os/exec" + "os/signal" "reflect" "regexp" "strconv" "syscall" "time" + + "github.com/aws/aws-lambda-go/lambda/messages" ) +var apiBase = "http://127.0.0.1:9001/2018-06-01" + func main() { rand.Seed(time.Now().UTC().UnixNano()) debugMode := flag.Bool("debug", false, "enables delve debugging") delvePath := flag.String("delvePath", "/tmp/lambci_debug_files/dlv", "path to delve") delvePort := flag.String("delvePort", "5985", "port to start delve server on") + delveAPI := flag.String("delveAPI", "1", "delve api version") flag.Parse() positionalArgs := flag.Args() + var handler string if len(positionalArgs) > 0 { handler = positionalArgs[0] @@ -52,22 +61,23 @@ func main() { } } - mockContext := &MockLambdaContext{ - RequestId: fakeGuid(), + stayOpen := os.Getenv("DOCKER_LAMBDA_STAY_OPEN") != "" + + mockContext := &mockLambdaContext{ + RequestID: fakeGUID(), EventBody: eventBody, FnName: getEnv("AWS_LAMBDA_FUNCTION_NAME", "test"), Version: getEnv("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"), MemSize: getEnv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536"), Timeout: getEnv("AWS_LAMBDA_FUNCTION_TIMEOUT", "300"), Region: getEnv("AWS_REGION", getEnv("AWS_DEFAULT_REGION", "us-east-1")), - AccountId: getEnv("AWS_ACCOUNT_ID", strconv.FormatInt(int64(rand.Int31()), 10)), + AccountID: getEnv("AWS_ACCOUNT_ID", strconv.FormatInt(int64(rand.Int31()), 10)), Start: time.Now(), - Pid: 1, } mockContext.ParseTimeout() - awsAccessKey := getEnv("AWS_ACCESS_KEY", getEnv("AWS_ACCESS_KEY_ID", "SOME_ACCESS_KEY_ID")) - awsSecretKey := getEnv("AWS_SECRET_KEY", getEnv("AWS_SECRET_ACCESS_KEY", "SOME_SECRET_ACCESS_KEY")) + awsAccessKey := getEnv("AWS_ACCESS_KEY", os.Getenv("AWS_ACCESS_KEY_ID")) + awsSecretKey := getEnv("AWS_SECRET_KEY", os.Getenv("AWS_SECRET_ACCESS_KEY")) awsSessionToken := getEnv("AWS_SESSION_TOKEN", os.Getenv("AWS_SECURITY_TOKEN")) port := getEnv("_LAMBDA_SERVER_PORT", "54321") @@ -80,12 +90,52 @@ func main() { os.Setenv("AWS_DEFAULT_REGION", mockContext.Region) os.Setenv("_HANDLER", handler) + var err error + var errored bool + + var mockServerCmd = exec.Command("/var/runtime/mockserver") + mockServerCmd.Env = append(os.Environ(), + "DOCKER_LAMBDA_NO_BOOTSTRAP=1", + "DOCKER_LAMBDA_USE_STDIN=1", + ) + mockServerCmd.Stdout = os.Stdout + mockServerCmd.Stderr = os.Stderr + stdin, _ := mockServerCmd.StdinPipe() + if err = mockServerCmd.Start(); err != nil { + log.Fatalf("Error starting mock server: %s", err.Error()) + return + } + stdin.Write([]byte(eventBody)) + stdin.Close() + + defer mockServerCmd.Wait() + + pingTimeout := time.Now().Add(1 * time.Second) + + for { + resp, err := http.Get(apiBase + "/ping") + if err != nil { + if time.Now().After(pingTimeout) { + log.Fatal("Mock server did not start in time") + return + } + time.Sleep(5 * time.Millisecond) + continue + } + if resp.StatusCode != 200 { + log.Fatal("Non 200 status code from local server") + return + } + resp.Body.Close() + break + } + var cmd *exec.Cmd if *debugMode == true { delveArgs := []string{ "--listen=:" + *delvePort, "--headless=true", - "--api-version=1", + "--api-version=" + *delveAPI, "--log", "exec", "/var/task/" + handler, @@ -108,26 +158,31 @@ func main() { "AWS_SECURITY_TOKEN="+awsSessionToken, ) } - cmd.Stdout = os.Stderr - cmd.Stderr = os.Stderr - cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} - var err error + var logsBuf bytes.Buffer + + if stayOpen { + cmd.Stdout = io.MultiWriter(os.Stdout, &logsBuf) + cmd.Stderr = io.MultiWriter(os.Stderr, &logsBuf) + } else { + cmd.Stdout = os.Stderr + cmd.Stderr = os.Stderr + } + + cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} if err = cmd.Start(); err != nil { - defer abortRequest(mockContext, err) + defer abortInit(mockContext, err) return } - mockContext.Pid = cmd.Process.Pid - - defer syscall.Kill(-mockContext.Pid, syscall.SIGKILL) + defer syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) var conn net.Conn for { conn, err = net.Dial("tcp", ":"+port) if mockContext.HasExpired() { - defer abortRequest(mockContext, mockContext.TimeoutErr()) + defer abortInit(mockContext, mockContext.TimeoutErr()) return } if err == nil { @@ -140,7 +195,7 @@ func main() { continue } } - defer abortRequest(mockContext, err) + defer abortInit(mockContext, err) return } @@ -149,7 +204,7 @@ func main() { for { err = client.Call("Function.Ping", messages.PingRequest{}, &messages.PingResponse{}) if mockContext.HasExpired() { - defer abortRequest(mockContext, mockContext.TimeoutErr()) + defer abortInit(mockContext, mockContext.TimeoutErr()) return } if err == nil { @@ -158,65 +213,190 @@ func main() { time.Sleep(5 * time.Millisecond) } - // XXX: The Go runtime seems to amortize the startup time, reset it here - mockContext.Start = time.Now() + sighupReceiver := make(chan os.Signal, 1) + signal.Notify(sighupReceiver, syscall.SIGHUP) + go func() { + <-sighupReceiver + fmt.Fprintln(os.Stderr, ("SIGHUP received, exiting runtime...")) + os.Exit(2) + }() - logStartRequest(mockContext) + var initEndSent bool + var invoked bool + var receivedInvokeAt time.Time - err = client.Call("Function.Invoke", mockContext.Request(), &mockContext.Reply) + for { + if !invoked { + receivedInvokeAt = time.Now() + invoked = true + } else { + logsBuf.Reset() + } - // We want the process killed before this, so defer it - defer logEndRequest(mockContext, err) -} + resp, err := http.Get(apiBase + "/runtime/invocation/next") + if err != nil { + if uerr, ok := err.(*url.Error); ok { + if uerr.Unwrap().Error() == "EOF" { + if stayOpen { + os.Exit(2) + } else if errored { + os.Exit(1) + } else { + os.Exit(0) + } + return + } + } + log.Fatal(err) + return + } + if resp.StatusCode != 200 { + log.Fatal("Non 200 status code from local server") + return + } + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + log.Fatal(err) + return + } + resp.Body.Close() + + deadlineMs, _ := strconv.ParseInt(resp.Header.Get("Lambda-Runtime-Deadline-Ms"), 10, 64) + deadline := time.Unix(0, deadlineMs*int64(time.Millisecond)) + + var invokeRequest = &messages.InvokeRequest{ + Payload: body, + RequestId: resp.Header.Get("Lambda-Runtime-Aws-Request-Id"), + XAmznTraceId: resp.Header.Get("Lambda-Runtime-Trace-Id"), + InvokedFunctionArn: resp.Header.Get("Lambda-Runtime-Invoked-Function-Arn"), + Deadline: messages.InvokeRequest_Timestamp{ + Seconds: deadline.Unix(), + Nanos: int64(deadline.Nanosecond()), + }, + ClientContext: []byte(resp.Header.Get("Lambda-Runtime-Client-Context")), + } -func abortRequest(mockContext *MockLambdaContext, err error) { - logStartRequest(mockContext) - logEndRequest(mockContext, err) -} + cognitoIdentityHeader := []byte(resp.Header.Get("Lambda-Runtime-Cognito-Identity")) + if len(cognitoIdentityHeader) > 0 { + var identityObj *cognitoIdentity + err := json.Unmarshal(cognitoIdentityHeader, &identityObj) + if err != nil { + log.Fatal(err) + return + } + invokeRequest.CognitoIdentityId = identityObj.IdentityID + invokeRequest.CognitoIdentityPoolId = identityObj.IdentityPoolID + } -func logStartRequest(mockContext *MockLambdaContext) { - systemLog("START RequestId: " + mockContext.RequestId + " Version: " + mockContext.Version) -} + logTail := resp.Header.Get("Docker-Lambda-Log-Type") == "Tail" -func logEndRequest(mockContext *MockLambdaContext, err error) { - curMem, _ := calculateMemoryInMb(mockContext.Pid) - diffMs := math.Min(float64(time.Now().Sub(mockContext.Start).Nanoseconds()), - float64(mockContext.TimeoutDuration.Nanoseconds())) / 1e6 - - systemLog("END RequestId: " + mockContext.RequestId) - systemLog(fmt.Sprintf( - "REPORT RequestId: %s\t"+ - "Duration: %.2f ms\t"+ - "Billed Duration: %.f ms\t"+ - "Memory Size: %s MB\t"+ - "Max Memory Used: %d MB\t", - mockContext.RequestId, diffMs, math.Ceil(diffMs/100)*100, mockContext.MemSize, curMem)) - - if err == nil && mockContext.HasExpired() { - err = mockContext.TimeoutErr() - } + var initEnd time.Time + if !initEndSent { + initEnd = time.Now() + } - if err != nil { - responseErr := messages.InvokeResponse_Error{ - Message: err.Error(), - Type: getErrorType(err), + errored = false + + var reply *messages.InvokeResponse + err = client.Call("Function.Invoke", invokeRequest, &reply) + + suffix := "/response" + payload := reply.Payload + if err != nil || reply.Error != nil { + errored = true + suffix = "/error" + var lambdaErr lambdaError + if err != nil { + lambdaErr = toLambdaError(mockContext, err) + } else if reply.Error != nil { + lambdaErr = convertInvokeResponseError(reply.Error) + } + payload, _ = json.Marshal(lambdaErr) } - if responseErr.Type == "errorString" { - responseErr.Type = "" - if responseErr.Message == "unexpected EOF" { - responseErr.Message = "RequestId: " + mockContext.RequestId + " Process exited before completing request" + req, err := http.NewRequest("POST", apiBase+"/runtime/invocation/"+invokeRequest.RequestId+suffix, bytes.NewBuffer(payload)) + if err != nil { + log.Fatal(err) + return + } + + if logTail { + // This is very annoying but seems to be necessary to ensure we get all the stdout/stderr from the process + time.Sleep(1 * time.Millisecond) + + logs := logsBuf.Bytes() + + if len(logs) > 0 { + if len(logs) > 4096 { + logs = logs[len(logs)-4096:] + } + req.Header.Add("Docker-Lambda-Log-Result", base64.StdEncoding.EncodeToString(logs)) } } - systemErr(&responseErr) - os.Exit(1) + + if !initEndSent { + req.Header.Add("Docker-Lambda-Invoke-Wait", strconv.FormatInt(receivedInvokeAt.UnixNano()/int64(time.Millisecond), 10)) + req.Header.Add("Docker-Lambda-Init-End", strconv.FormatInt(initEnd.UnixNano()/int64(time.Millisecond), 10)) + initEndSent = true + } + + resp, err = http.DefaultClient.Do(req) + if err != nil { + log.Fatal(err) + return + } + if resp.StatusCode != 202 { + log.Printf("Non 202 status code from local server: %d\n", resp.StatusCode) + body, _ = ioutil.ReadAll(resp.Body) + log.Println(string(body)) + log.Println("When trying to send payload:") + log.Println(string(payload)) + if resp.StatusCode >= 300 { + os.Exit(1) + return + } + } + resp.Body.Close() + } +} + +func abortInit(mockContext *mockLambdaContext, err error) { + lambdaErr := toLambdaError(mockContext, err) + jsonBytes, _ := json.Marshal(lambdaErr) + resp, err := http.Post(apiBase+"/runtime/init/error", "application/json", bytes.NewBuffer(jsonBytes)) + if err != nil { + log.Fatal(err) + return } + resp.Body.Close() +} - if mockContext.Reply.Error != nil { - systemErr(mockContext.Reply.Error) - os.Exit(1) +func toLambdaError(mockContext *mockLambdaContext, exitErr error) lambdaError { + err := &exitError{err: exitErr, context: mockContext} + responseErr := lambdaError{ + Message: err.Error(), + Type: getErrorType(err), + } + if responseErr.Type == "errorString" { + responseErr.Type = "" + if responseErr.Message == "unexpected EOF" { + responseErr.Message = "RequestId: " + mockContext.RequestID + " Process exited before completing request" + } + } else if responseErr.Type == "ExitError" { + responseErr.Type = "Runtime.ExitError" // XXX: Hack to add 'Runtime.' to error type } + return responseErr +} - fmt.Println(string(mockContext.Reply.Payload)) +func convertInvokeResponseError(err *messages.InvokeResponse_Error) lambdaError { + var stackTrace []string + for _, v := range err.StackTrace { + stackTrace = append(stackTrace, fmt.Sprintf("%s:%d %s", v.Path, v.Line, v.Label)) + } + return lambdaError{ + Message: err.Message, + Type: err.Type, + StackTrace: stackTrace, + } } func getEnv(key, fallback string) string { @@ -227,7 +407,7 @@ func getEnv(key, fallback string) string { return fallback } -func fakeGuid() string { +func fakeGUID() string { randBuf := make([]byte, 16) rand.Read(randBuf) @@ -258,84 +438,48 @@ func logStreamName(version string) string { return time.Now().Format("2006/01/02") + "/[" + version + "]" + string(hexBuf) } -func arn(region string, accountId string, fnName string) string { +func arn(region string, accountID string, fnName string) string { nonDigit := regexp.MustCompile(`[^\d]`) - return "arn:aws:lambda:" + region + ":" + nonDigit.ReplaceAllString(accountId, "") + ":function:" + fnName -} - -// Thanks to https://stackoverflow.com/a/31881979 -func calculateMemoryInMb(pid int) (uint64, error) { - f, err := os.Open(fmt.Sprintf("/proc/%d/smaps", pid)) - if err != nil { - return 0, err - } - defer f.Close() - - res := uint64(0) - pfx := []byte("Pss:") - r := bufio.NewScanner(f) - for r.Scan() { - line := r.Bytes() - if bytes.HasPrefix(line, pfx) { - var size uint64 - _, err := fmt.Sscanf(string(line[4:]), "%d", &size) - if err != nil { - return 0, err - } - res += size - } - } - if err := r.Err(); err != nil { - return 0, err - } - - return res / 1024, nil + return "arn:aws:lambda:" + region + ":" + nonDigit.ReplaceAllString(accountID, "") + ":function:" + fnName } func getErrorType(err interface{}) string { - if errorType := reflect.TypeOf(err); errorType.Kind() == reflect.Ptr { + errorType := reflect.TypeOf(err) + if errorType.Kind() == reflect.Ptr { return errorType.Elem().Name() - } else { - return errorType.Name() } + return errorType.Name() } -func systemLog(msg string) { - fmt.Fprintln(os.Stderr, "\033[32m"+msg+"\033[0m") +type lambdaError struct { + Message string `json:"errorMessage"` + Type string `json:"errorType,omitempty"` + StackTrace []string `json:"stackTrace,omitempty"` } -// Try to match the output of the Lambda web console -func systemErr(err *messages.InvokeResponse_Error) { - jsonBytes, _ := json.MarshalIndent(LambdaError{ - Message: err.Message, - Type: err.Type, - StackTrace: err.StackTrace, - }, "", " ") - fmt.Fprintln(os.Stderr, "\033[31m"+string(jsonBytes)+"\033[0m") +type exitError struct { + err error + context *mockLambdaContext } -type LambdaError struct { - Message string `json:"errorMessage"` - Type string `json:"errorType,omitempty"` - StackTrace []*messages.InvokeResponse_Error_StackFrame `json:"stackTrace,omitempty"` +func (e *exitError) Error() string { + return fmt.Sprintf("RequestId: %s Error: %s", e.context.RequestID, e.err.Error()) } -type MockLambdaContext struct { - RequestId string +type mockLambdaContext struct { + RequestID string EventBody string FnName string Version string MemSize string Timeout string Region string - AccountId string + AccountID string Start time.Time TimeoutDuration time.Duration - Pid int - Reply *messages.InvokeResponse } -func (mc *MockLambdaContext) ParseTimeout() { +func (mc *mockLambdaContext) ParseTimeout() { timeoutDuration, err := time.ParseDuration(mc.Timeout + "s") if err != nil { panic(err) @@ -343,20 +487,20 @@ func (mc *MockLambdaContext) ParseTimeout() { mc.TimeoutDuration = timeoutDuration } -func (mc *MockLambdaContext) Deadline() time.Time { +func (mc *mockLambdaContext) Deadline() time.Time { return mc.Start.Add(mc.TimeoutDuration) } -func (mc *MockLambdaContext) HasExpired() bool { +func (mc *mockLambdaContext) HasExpired() bool { return time.Now().After(mc.Deadline()) } -func (mc *MockLambdaContext) Request() *messages.InvokeRequest { +func (mc *mockLambdaContext) Request() *messages.InvokeRequest { return &messages.InvokeRequest{ Payload: []byte(mc.EventBody), - RequestId: mc.RequestId, + RequestId: mc.RequestID, XAmznTraceId: getEnv("_X_AMZN_TRACE_ID", ""), - InvokedFunctionArn: getEnv("AWS_LAMBDA_FUNCTION_INVOKED_ARN", arn(mc.Region, mc.AccountId, mc.FnName)), + InvokedFunctionArn: getEnv("AWS_LAMBDA_FUNCTION_INVOKED_ARN", arn(mc.Region, mc.AccountID, mc.FnName)), Deadline: messages.InvokeRequest_Timestamp{ Seconds: mc.Deadline().Unix(), Nanos: int64(mc.Deadline().Nanosecond()), @@ -364,7 +508,12 @@ func (mc *MockLambdaContext) Request() *messages.InvokeRequest { } } -func (mc *MockLambdaContext) TimeoutErr() error { +func (mc *mockLambdaContext) TimeoutErr() error { return fmt.Errorf("%s %s Task timed out after %s.00 seconds", time.Now().Format("2006-01-02T15:04:05.999Z"), - mc.RequestId, mc.Timeout) + mc.RequestID, mc.Timeout) +} + +type cognitoIdentity struct { + IdentityID string `json:"identity_id,omitempty"` + IdentityPoolID string `json:"identity_pool_id,omitempty"` } diff --git a/go1.x/run/go.mod b/go1.x/run/go.mod new file mode 100644 index 00000000..182b72af --- /dev/null +++ b/go1.x/run/go.mod @@ -0,0 +1,5 @@ +module aws-lambda-mock + +require github.com/aws/aws-lambda-go v1.13.3 + +go 1.15 diff --git a/go1.x/run/go.sum b/go1.x/run/go.sum new file mode 100644 index 00000000..f0a554a8 --- /dev/null +++ b/go1.x/run/go.sum @@ -0,0 +1,15 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aws/aws-lambda-go v1.13.2 h1:8lYuRVn6rESoUNZXdbCmtGB4bBk4vcVYojiHjE4mMrM= +github.com/aws/aws-lambda-go v1.13.2/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/java11/build/Dockerfile b/java11/build/Dockerfile new file mode 100644 index 00000000..6b2f3c90 --- /dev/null +++ b/java11/build/Dockerfile @@ -0,0 +1,23 @@ +FROM lambci/lambda:java11 + +FROM lambci/lambda-base-2:build + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_java11 + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN mkdir /usr/local/gradle && curl -L -o gradle.zip https://services.gradle.org/distributions/gradle-6.8.1-bin.zip && \ + unzip -qd /usr/local/gradle gradle.zip && rm gradle.zip && mkdir /usr/local/maven && \ + curl -L http://mirror.cc.columbia.edu/pub/software/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | \ + tar -zx -C /usr/local/maven + +ENV PATH="/usr/local/gradle/gradle-6.8.1/bin:/usr/local/maven/apache-maven-3.6.3/bin:${PATH}" + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/java11/run/Dockerfile b/java11/run/Dockerfile new file mode 100644 index 00000000..77148fc1 --- /dev/null +++ b/java11/run/Dockerfile @@ -0,0 +1,22 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/java11.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_java11 + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap", "--enable-msg-logs"] + diff --git a/java8.al2/build/Dockerfile b/java8.al2/build/Dockerfile new file mode 100644 index 00000000..0edeb604 --- /dev/null +++ b/java8.al2/build/Dockerfile @@ -0,0 +1,26 @@ +FROM lambci/lambda:java8.al2 + +FROM lambci/lambda-base-2:build + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_rapid + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN rm -rf /var/lang/* && \ + curl -sSL https://corretto.aws/downloads/resources/8.265.01.1/amazon-corretto-8.265.01.1-linux-x64.tar.gz | tar -xz --strip-components=1 -C /var/lang && \ + rm -rf /var/lang/*.zip && \ + mkdir /usr/local/gradle && curl -L -o gradle.zip https://services.gradle.org/distributions/gradle-6.8.1-bin.zip && \ + unzip -qd /usr/local/gradle gradle.zip && rm gradle.zip && mkdir /usr/local/maven && \ + curl -L http://mirror.cc.columbia.edu/pub/software/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | \ + tar -zx -C /usr/local/maven + +ENV PATH="/usr/local/gradle/gradle-6.8.1/bin:/usr/local/maven/apache-maven-3.6.3/bin:${PATH}" + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/java8.al2/run/Dockerfile b/java8.al2/run/Dockerfile new file mode 100644 index 00000000..7c912988 --- /dev/null +++ b/java8.al2/run/Dockerfile @@ -0,0 +1,21 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/java8.al2.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_rapid + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap", "--enable-msg-logs"] diff --git a/java8/build/Dockerfile b/java8/build/Dockerfile index de1ee2dd..25e65cd4 100644 --- a/java8/build/Dockerfile +++ b/java8/build/Dockerfile @@ -1,19 +1,26 @@ +FROM lambci/lambda:java8 + FROM lambci/lambda-base:build ENV AWS_EXECUTION_ENV=AWS_Lambda_java8 WORKDIR / -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/java8.tgz | tar -zx -C / && \ - yum install -y --releasever=latest java-1.8.0-openjdk-devel-1.8.0.181 && \ - mkdir /usr/local/gradle && curl -L -o gradle.zip https://services.gradle.org/distributions/gradle-5.2-bin.zip && \ - unzip -d /usr/local/gradle gradle.zip && rm gradle.zip && mkdir /usr/local/maven && \ - curl -L http://mirror.metrocast.net/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz | \ +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +RUN yum install -y java-1.8.0-openjdk-devel && \ + mkdir /usr/local/gradle && curl -L -o gradle.zip https://services.gradle.org/distributions/gradle-6.8.1-bin.zip && \ + unzip -qd /usr/local/gradle gradle.zip && rm gradle.zip && mkdir /usr/local/maven && \ + curl -L http://mirror.cc.columbia.edu/pub/software/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | \ tar -zx -C /usr/local/maven -ENV PATH="/usr/local/gradle/gradle-5.2/bin:/usr/local/maven/apache-maven-3.6.0/bin:${PATH}" +ENV PATH="/usr/local/gradle/gradle-6.8.1/bin:/usr/local/maven/apache-maven-3.6.3/bin:${PATH}" # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/java8/run/Dockerfile b/java8/run/Dockerfile index c3bed260..0bfbe07a 100644 --- a/java8/run/Dockerfile +++ b/java8/run/Dockerfile @@ -4,6 +4,9 @@ COPY ./lambda-runtime-mock /src RUN apk add --no-cache curl && ./build.sh +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV AWS_EXECUTION_ENV=AWS_Lambda_java8 @@ -13,6 +16,8 @@ RUN rm -rf /var/runtime /var/lang && \ COPY --from=0 /src/LambdaSandboxJava-1.0.jar /var/runtime/lib/ +COPY --from=1 /var/runtime/init /var/runtime/mockserver + WORKDIR / USER sbx_user1051 diff --git a/java8/run/lambda-runtime-mock/.classpath b/java8/run/lambda-runtime-mock/.classpath index 73aea907..ed03251e 100644 --- a/java8/run/lambda-runtime-mock/.classpath +++ b/java8/run/lambda-runtime-mock/.classpath @@ -1,6 +1,7 @@ - - - + + + + diff --git a/java8/run/lambda-runtime-mock/.project b/java8/run/lambda-runtime-mock/.project index e2f6a921..f980c6e2 100644 --- a/java8/run/lambda-runtime-mock/.project +++ b/java8/run/lambda-runtime-mock/.project @@ -1,17 +1,28 @@ - lambda-runtime-mock - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - + lambda-runtime-mock + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1599680497051 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/java8/run/lambda-runtime-mock/LambdaSandboxJava-1.0.jar b/java8/run/lambda-runtime-mock/LambdaSandboxJava-1.0.jar deleted file mode 100644 index f47d2040..00000000 Binary files a/java8/run/lambda-runtime-mock/LambdaSandboxJava-1.0.jar and /dev/null differ diff --git a/java8/run/lambda-runtime-mock/build.sh b/java8/run/lambda-runtime-mock/build.sh index de4ae4e0..466f7e70 100755 --- a/java8/run/lambda-runtime-mock/build.sh +++ b/java8/run/lambda-runtime-mock/build.sh @@ -2,13 +2,14 @@ cd $(dirname "$0") -mkdir -p ./target/classes +curl -s https://lambci.s3.amazonaws.com/fs/java8.tgz | tar -zx -- var/runtime/lib + +mv var/runtime/lib/LambdaSandboxJava-1.0.jar var/runtime/lib/gson-*.jar ./ -javac -target 1.8 -d ./target/classes ./src/main/java/lambdainternal/LambdaRuntime.java +mkdir -p ./target/classes -curl -s https://lambci.s3.amazonaws.com/fs/java8.tgz | tar -zx -- var/runtime/lib/LambdaSandboxJava-1.0.jar +javac -target 1.8 -cp ./gson-*.jar -d ./target/classes ./src/main/java/lambdainternal/LambdaRuntime.java -mv var/runtime/lib/LambdaSandboxJava-1.0.jar ./ cp -R ./target/classes/lambdainternal ./ jar uf LambdaSandboxJava-1.0.jar lambdainternal/LambdaRuntime*.class diff --git a/java8/run/lambda-runtime-mock/gson-2.3.1.jar b/java8/run/lambda-runtime-mock/gson-2.3.1.jar new file mode 100644 index 00000000..f0350575 Binary files /dev/null and b/java8/run/lambda-runtime-mock/gson-2.3.1.jar differ diff --git a/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.java b/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.java index 156f70db..d7999155 100644 --- a/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.java +++ b/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.java @@ -1,21 +1,37 @@ package lambdainternal; +import java.io.ByteArrayOutputStream; +import java.io.OutputStream; +import java.io.PrintStream; +import java.lang.ProcessBuilder.Redirect; import java.lang.reflect.Field; import java.math.BigInteger; +import java.net.ConnectException; +import java.net.HttpURLConnection; +import java.net.URL; import java.nio.charset.StandardCharsets; import java.text.SimpleDateFormat; -import java.util.Collections; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Base64; import java.util.Date; import java.util.Map; import java.util.Random; import java.util.Scanner; import java.util.UUID; +import com.google.gson.Gson; +import com.google.gson.JsonObject; + import sun.misc.Unsafe; +import sun.misc.Signal; +@SuppressWarnings("restriction") public class LambdaRuntime { private static Unsafe unsafe; + private static final String API_BASE = "http://127.0.0.1:9001/2018-06-01"; + private static final boolean STAY_OPEN = !isNullOrEmpty(getEnv("DOCKER_LAMBDA_STAY_OPEN")); private static final String INVOKE_ID = UUID.randomUUID().toString(); private static final String AWS_ACCESS_KEY_ID; private static final String AWS_SECRET_ACCESS_KEY; @@ -23,22 +39,22 @@ public class LambdaRuntime { private static final String AWS_REGION; private static final String HANDLER; private static final String EVENT_BODY; - private static final int TIMEOUT; - private static final String X_AMZN_TRACE_ID; - private static final String CLIENT_CONTEXT = null; - private static final String COGNITO_IDENTITY_ID = ""; - private static final String COGNITO_IDENTITY_POOL_ID = ""; - private static final String FUNCTION_ARN; - private static final String ACCOUNT_ID; - private static boolean alreadyInvoked = false; - private static long invokeStart; + private static final PrintStream ORIG_STDERR = System.err; + private static final ByteArrayOutputStream LOGS = new ByteArrayOutputStream(); + private static long deadlineMs; + private static boolean invoked = false; + private static boolean errored = false; + private static String errorMsg = ""; + private static boolean initEndSent = false; + private static long initEnd; + private static long receivedInvokeAt; public static final int MEMORY_LIMIT; public static final String LOG_GROUP_NAME; public static final String LOG_STREAM_NAME; public static final String FUNCTION_NAME; public static final String FUNCTION_VERSION; - public static volatile boolean needsDebugLogs; + public static volatile boolean needsDebugLogs = false; static { try { @@ -49,27 +65,23 @@ public class LambdaRuntime { throw new RuntimeException(e); } - TIMEOUT = Integer.parseInt(getEnvOrDefault("AWS_LAMBDA_FUNCTION_TIMEOUT", "300")); + deadlineMs = System.currentTimeMillis() + + (1000 * Long.parseLong(getEnvOrDefault("AWS_LAMBDA_FUNCTION_TIMEOUT", "300"))); MEMORY_LIMIT = Integer.parseInt(getEnvOrDefault("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536")); FUNCTION_NAME = getEnvOrDefault("AWS_LAMBDA_FUNCTION_NAME", "test"); FUNCTION_VERSION = getEnvOrDefault("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"); LOG_GROUP_NAME = getEnvOrDefault("AWS_LAMBDA_LOG_GROUP_NAME", "/aws/lambda/" + FUNCTION_NAME); LOG_STREAM_NAME = getEnvOrDefault("AWS_LAMBDA_LOG_STREAM_NAME", randomLogStreamName(FUNCTION_VERSION)); - AWS_ACCESS_KEY_ID = getEnvOrDefault("AWS_ACCESS_KEY_ID", "SOME_ACCESS_KEY_ID"); - AWS_SECRET_ACCESS_KEY = getEnvOrDefault("AWS_SECRET_ACCESS_KEY", "SOME_SECRET_ACCESS_KEY"); + AWS_ACCESS_KEY_ID = getEnv("AWS_ACCESS_KEY_ID"); + AWS_SECRET_ACCESS_KEY = getEnv("AWS_SECRET_ACCESS_KEY"); AWS_SESSION_TOKEN = getEnv("AWS_SESSION_TOKEN"); AWS_REGION = getEnvOrDefault("AWS_REGION", getEnvOrDefault("AWS_DEFAULT_REGION", "us-east-1")); - ACCOUNT_ID = getEnvOrDefault("AWS_ACCOUNT_ID", "000000000000"); - FUNCTION_ARN = getEnvOrDefault("AWS_LAMBDA_FUNCTION_INVOKED_ARN", - "arn:aws:lambda:" + AWS_REGION + ":" + ACCOUNT_ID + ":function:" + FUNCTION_NAME); - X_AMZN_TRACE_ID = getEnvOrDefault("_X_AMZN_TRACE_ID", ""); String[] args = getCmdLineArgs(); - HANDLER = args.length > 1 ? args[1] : getEnvOrDefault("AWS_LAMBDA_FUNCTION_HANDLER", getEnvOrDefault("_HANDLER", "index.Handler")); + HANDLER = args.length > 1 ? args[1] + : getEnvOrDefault("AWS_LAMBDA_FUNCTION_HANDLER", getEnvOrDefault("_HANDLER", "index.Handler")); EVENT_BODY = args.length > 2 ? args[2] : getEventBody(); - LambdaRuntime.needsDebugLogs = false; - setenv("AWS_LAMBDA_FUNCTION_NAME", FUNCTION_NAME, 1); setenv("AWS_LAMBDA_FUNCTION_VERSION", FUNCTION_VERSION, 1); setenv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", Integer.toString(MEMORY_LIMIT), 1); @@ -78,75 +90,196 @@ public class LambdaRuntime { setenv("AWS_REGION", AWS_REGION, 1); setenv("AWS_DEFAULT_REGION", AWS_REGION, 1); setenv("_HANDLER", HANDLER, 1); + + try { + ProcessBuilder pb = new ProcessBuilder("/var/runtime/mockserver").redirectInput(Redirect.PIPE) + .redirectOutput(Redirect.INHERIT).redirectError(Redirect.INHERIT); + Map mockEnv = pb.environment(); + mockEnv.put("DOCKER_LAMBDA_NO_BOOTSTRAP", "1"); + mockEnv.put("DOCKER_LAMBDA_USE_STDIN", "1"); + Process mockServer = pb.start(); + mockServer.getOutputStream().write(EVENT_BODY.getBytes(StandardCharsets.UTF_8)); + mockServer.getOutputStream().close(); + } catch (Exception e) { + throw new RuntimeException(e); + } + + Signal.handle(new Signal("HUP"), (Signal signal) -> { + if (STAY_OPEN) { + systemErr("SIGHUP received, exiting runtime..."); + System.exit(2); + } + }); } - private static String getEventBody() { - String eventBody = getEnv("AWS_LAMBDA_EVENT_BODY"); - if (eventBody == null) { - eventBody = getEnv("DOCKER_LAMBDA_USE_STDIN") != null ? - new Scanner(System.in).useDelimiter("\\A").next() : "{}"; + public static void initRuntime() { + long pingTimeout = System.currentTimeMillis() + 1000; + while (true) { + try { + HttpURLConnection conn = (HttpURLConnection) new URL(API_BASE + "/ping").openConnection(); + int responseCode = conn.getResponseCode(); + if (responseCode != 200) { + throw new RuntimeException("Unexpected status code from ping: " + responseCode); + } + break; + } catch (Exception e) { + if (System.currentTimeMillis() < pingTimeout) + continue; + throw new RuntimeException(e); + } } - return eventBody; } - private static String getEnvOrDefault(String key, String defaultVal) { - String envVal = getEnv(key); - return envVal != null ? envVal : defaultVal; + public static WaitForStartResult waitForStart() { + if (!STAY_OPEN) { + System.setOut(ORIG_STDERR); + System.setErr(ORIG_STDERR); + } + return new WaitForStartResult(INVOKE_ID, HANDLER, "event", AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, + AWS_SESSION_TOKEN, true, false); } - private static String randomLogStreamName(String functionVersion) { - byte[] randomBuf = new byte[16]; - new Random().nextBytes(randomBuf); - return String.format("%s/[%s]%016x", new SimpleDateFormat("yyyy/MM/dd").format(new Date()), functionVersion, - new BigInteger(1, randomBuf)); + public static InvokeRequest waitForInvoke() { + if (!invoked) { + receivedInvokeAt = System.currentTimeMillis(); + invoked = true; + } else { + LOGS.reset(); + } + try { + HttpURLConnection conn = (HttpURLConnection) new URL(API_BASE + "/runtime/invocation/next") + .openConnection(); + try { + int responseCode = conn.getResponseCode(); + if (responseCode != 200) { + throw new RuntimeException("Unexpected status code from invocation/next: " + responseCode); + } + } catch (ConnectException e) { + System.exit(STAY_OPEN ? 2 : (errored ? 1 : 0)); + } + String requestId = conn.getHeaderField("Lambda-Runtime-Aws-Request-Id"); + deadlineMs = Long.parseLong(conn.getHeaderField("Lambda-Runtime-Deadline-Ms")); + String functionArn = conn.getHeaderField("Lambda-Runtime-Invoked-Function-Arn"); + String xAmznTraceId = conn.getHeaderField("Lambda-Runtime-Trace-Id"); + String clientContext = conn.getHeaderField("Lambda-Runtime-Client-Context"); + String cognitoIdentity = conn.getHeaderField("Lambda-Runtime-Cognito-Identity"); + + CognitoIdentity cognitoIdentityObj = new CognitoIdentity(); + if (!isNullOrEmpty(cognitoIdentity)) { + cognitoIdentityObj = new Gson().fromJson(cognitoIdentity, CognitoIdentity.class); + } + + needsDebugLogs = "Tail".equals(conn.getHeaderField("Docker-Lambda-Log-Type")); + + String responseBody = ""; + try (Scanner scanner = new Scanner(conn.getInputStream())) { + responseBody = scanner.useDelimiter("\\A").next(); + } + long eventBodyAddress = 0; + byte[] eventBodyBytes = responseBody.getBytes(StandardCharsets.UTF_8); + eventBodyAddress = unsafe.allocateMemory(eventBodyBytes.length); + for (int i = 0; i < eventBodyBytes.length; i++) { + unsafe.putByte(eventBodyAddress + i, eventBodyBytes[i]); + } + + return new InvokeRequest(-1, requestId, xAmznTraceId, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, + AWS_SESSION_TOKEN, clientContext, cognitoIdentityObj.identity_id, + cognitoIdentityObj.identity_pool_id, eventBodyAddress, eventBodyBytes.length, needsDebugLogs, + functionArn); + } catch (Exception e) { + throw new RuntimeException(e); + } } - private static void systemLog(String str) { - System.err.println("\033[32m" + str + "\033[0m"); + public static void reportDone(final String invokeid, final byte[] result, final int resultLength, + final int waitForExitFlag) { + if (!invoked) { + return; + } + String invokeType = errored ? "/error" : "/response"; + try { + HttpURLConnection conn = (HttpURLConnection) new URL( + API_BASE + "/runtime/invocation/" + invokeid + invokeType).openConnection(); + conn.setRequestMethod("POST"); + conn.setDoOutput(true); + + byte[] logs = LOGS.toByteArray(); + if (logs.length > 0) { + if (logs.length > 4096) { + logs = Arrays.copyOfRange(logs, logs.length - 4096, logs.length); + } + conn.setRequestProperty("Docker-Lambda-Log-Result", Base64.getEncoder().encodeToString(logs)); + } + + if (!initEndSent) { + conn.setRequestProperty("Docker-Lambda-Invoke-Wait", Long.toString(receivedInvokeAt)); + conn.setRequestProperty("Docker-Lambda-Init-End", Long.toString(initEnd)); + initEndSent = true; + } + + byte[] resultCopy = result == null ? new byte[0] + : new String(result, 0, resultLength).getBytes(StandardCharsets.UTF_8); + + if (errored && resultCopy.length == 0) { + JsonObject errObject = new JsonObject(); + errObject.addProperty("errorMessage", !isNullOrEmpty(errorMsg) ? errorMsg : "Unknown error"); + resultCopy = errObject.toString().getBytes(StandardCharsets.UTF_8); + } + + try (OutputStream os = conn.getOutputStream()) { + os.write(resultCopy); + } + int responseCode = conn.getResponseCode(); + if (responseCode != 202) { + throw new RuntimeException("Unexpected status code from invocation/response: " + responseCode); + } + } catch (Exception e) { + throw new RuntimeException(e); + } } - private static void systemErr(String str) { - System.err.println("\033[31m" + str + "\033[0m"); + public static void reportFault(final String invokeid, final String msg, final String exceptionClass, + final String stack) { + errored = true; + ArrayList errorPieces = new ArrayList(); + if (exceptionClass != null) { + systemErr(exceptionClass); + errorPieces.add(exceptionClass); + } + if (msg != null) { + systemErr(msg); + errorPieces.add(msg); + } + if (stack != null) { + systemErr(stack); + errorPieces.add(stack); + } + errorMsg = String.join("\n", errorPieces); } - public static String getEnv(final String envVariableName) { - return System.getenv(envVariableName); + public static int getRemainingTime() { + return (int) (deadlineMs - System.currentTimeMillis()); } - public static void initRuntime() { + public static void sendContextLogs(final byte[] msg, final int length) { + (STAY_OPEN ? System.out : System.err).print(new String(msg, 0, length, StandardCharsets.UTF_8)); } - public static void reportRunning(final String p0) { + public static synchronized void streamLogsToSlicer(final byte[] msg, final int offset, final int length) { + LOGS.write(msg, offset, length); } - public static void reportDone(final String invokeid, final byte[] result, final int resultLength, final int p3) { - if (!alreadyInvoked) { - return; - } - double durationMs = (System.nanoTime() - invokeStart) / 1_000_000d; - long billedMs = Math.min(100 * ((long) Math.floor(durationMs / 100) + 1), TIMEOUT * 1000); - long maxMemory = Math.round((Runtime.getRuntime().totalMemory() - - Runtime.getRuntime().freeMemory()) / (1024 * 1024)); - systemLog("END RequestId: " + invokeid); - systemLog(String.join("\t", - "REPORT RequestId: " + invokeid, - "Duration: " + String.format("%.2f", durationMs) + " ms", - "Billed Duration: " + billedMs + " ms", - "Memory Size: " + MEMORY_LIMIT + " MB", - "Max Memory Used: " + maxMemory + " MB", - "")); - if (result != null) { - System.out.println("\n" + new String(result, 0, resultLength)); - } + public static void reportRunning(final String invokeId) { } - public static void reportException(final String p0) { + public static void reportException(final String xrayJsonException) { } public static void reportUserInitStart() { } public static void reportUserInitEnd() { + initEnd = System.currentTimeMillis(); } public static void reportUserInvokeStart() { @@ -155,80 +288,66 @@ public static void reportUserInvokeStart() { public static void reportUserInvokeEnd() { } - public static void reportFault(final String invokeid, final String msg, final String exceptionClass, - final String stack) { - systemErr(stack); - } - - public static void setenv(final String key, final String val, final int p2) { - getMutableEnv().put(key, val); + public static void writeSandboxLog(String msg) { } - public static void unsetenv(final String key) { - getMutableEnv().remove(key); + public static String getEnv(final String key) { + return System.getenv(key); } - public static WaitForStartResult waitForStart() { - return new WaitForStartResult(INVOKE_ID, HANDLER, "event", AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, - AWS_SESSION_TOKEN, false); - } - - public static InvokeRequest waitForInvoke() { - if (alreadyInvoked) { - System.exit(0); - } - alreadyInvoked = true; - long address = 0; - byte[] eventBodyBytes = EVENT_BODY.getBytes(StandardCharsets.UTF_8); + @SuppressWarnings("unchecked") + public static void setenv(final String key, final String val, final int flag) { try { - address = unsafe.allocateMemory(eventBodyBytes.length); - for (int i = 0; i < eventBodyBytes.length; i++) { - unsafe.putByte(address + i, eventBodyBytes[i]); - } + Map env = System.getenv(); + Field field = env.getClass().getDeclaredField("m"); + field.setAccessible(true); + ((Map) field.get(env)).put(key, val); + field.setAccessible(false); } catch (Exception e) { - // Not sure, could happen if memory is exhausted? + // Should never happen on Lambda throw new RuntimeException(e); } - invokeStart = System.nanoTime(); - systemLog("START RequestId: " + INVOKE_ID + " Version: " + FUNCTION_VERSION); - return new InvokeRequest(-1, INVOKE_ID, X_AMZN_TRACE_ID, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, - AWS_SESSION_TOKEN, CLIENT_CONTEXT, COGNITO_IDENTITY_ID, COGNITO_IDENTITY_POOL_ID, address, - eventBodyBytes.length, false, FUNCTION_ARN); } - public static int getRemainingTime() { - return (int) ((TIMEOUT * 1000) - Math.round((System.nanoTime() - invokeStart) / 1_000_000d)); + private static String getEventBody() { + String eventBody = getEnv("AWS_LAMBDA_EVENT_BODY"); + if (eventBody == null) { + eventBody = getEnv("DOCKER_LAMBDA_USE_STDIN") != null ? new Scanner(System.in).useDelimiter("\\A").next() + : "{}"; + } + return eventBody; } - public static void sendContextLogs(final byte[] msg, final int length) { - System.err.print(new String(msg, 0, length, StandardCharsets.UTF_8)); + private static String getEnvOrDefault(String key, String defaultVal) { + String envVal = getEnv(key); + return envVal != null ? envVal : defaultVal; } - public static synchronized void streamLogsToSlicer(final byte[] p0, final int p1, final int p2) { + private static String randomLogStreamName(String functionVersion) { + byte[] randomBuf = new byte[16]; + new Random().nextBytes(randomBuf); + return String.format("%s/[%s]%016x", new SimpleDateFormat("yyyy/MM/dd").format(new Date()), functionVersion, + new BigInteger(1, randomBuf)); + } + + private static void systemErr(String str) { + ORIG_STDERR.println("\033[31m" + str + "\033[0m"); } private static String[] getCmdLineArgs() { return System.getProperty("sun.java.command").split(" ", 3); } - private static Map getMutableEnv() { - Class[] classes = Collections.class.getDeclaredClasses(); - Map env = System.getenv(); - for (Class cl : classes) { - if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) { - try { - Field field = cl.getDeclaredField("m"); - field.setAccessible(true); - Object obj = field.get(env); - return (Map) obj; - } catch (Exception e) { - // Should never happen on Lambda - throw new RuntimeException(e); - } - } + private static boolean isNullOrEmpty(String str) { + return str == null || str.isEmpty(); + } + + private static class CognitoIdentity { + private final String identity_id = null; + private final String identity_pool_id = null; + + private CognitoIdentity() { } - // Should never happen on Lambda - throw new RuntimeException("Could not find java.util.Collections$UnmodifiableMap class"); } public static class AWSCredentials { @@ -280,14 +399,16 @@ public static class WaitForStartResult { public final String mode; public final AWSCredentials credentials; public final boolean suppressInit; + public final boolean throttled; public WaitForStartResult(final String invokeid, final String handler, final String mode, final String awskey, - final String awssecret, final String awssession, final boolean suppressInit) { + final String awssecret, final String awssession, final boolean suppressInit, boolean throttled) { this.invokeid = invokeid; this.handler = handler; this.mode = mode; this.credentials = new AWSCredentials(awskey, awssecret, awssession); this.suppressInit = suppressInit; + this.throttled = throttled; } } } diff --git a/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.orig.java b/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.orig.java deleted file mode 100644 index e1b39bd7..00000000 --- a/java8/run/lambda-runtime-mock/src/main/java/lambdainternal/LambdaRuntime.orig.java +++ /dev/null @@ -1,112 +0,0 @@ -package lambdainternal; - -public class LambdaRuntime -{ - public static final int MEMORY_LIMIT = Integer.parseInt(getEnv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE")); - public static final String LOG_GROUP_NAME = getEnv("AWS_LAMBDA_LOG_GROUP_NAME"); - public static final String LOG_STREAM_NAME = getEnv("AWS_LAMBDA_LOG_STREAM_NAME"); - public static final String FUNCTION_NAME = getEnv("AWS_LAMBDA_FUNCTION_NAME"); - public static final String FUNCTION_VERSION = getEnv("AWS_LAMBDA_FUNCTION_VERSION"); - public static volatile boolean needsDebugLogs = false; - - public static String getEnv(String envVariableName) - { - return System.getenv(envVariableName); - } - - public static native void initRuntime(); - - public static native void reportRunning(String paramString); - - public static native void reportDone(String paramString, byte[] paramArrayOfByte, int paramInt1, int paramInt2); - - public static native void reportException(String paramString); - - public static native void reportUserInitStart(); - - public static native void reportUserInitEnd(); - - public static native void reportUserInvokeStart(); - - public static native void reportUserInvokeEnd(); - - public static native void reportFault(String paramString1, String paramString2, String paramString3, String paramString4); - - public static native void setenv(String paramString1, String paramString2, int paramInt); - - public static native void unsetenv(String paramString); - - public static native WaitForStartResult waitForStart(); - - public static native InvokeRequest waitForInvoke(); - - public static native int getRemainingTime(); - - public static native void sendContextLogs(byte[] paramArrayOfByte, int paramInt); - - public static synchronized native void streamLogsToSlicer(byte[] paramArrayOfByte, int paramInt1, int paramInt2); - - public static class AWSCredentials - { - public final String key; - public final String secret; - public final String session; - - public AWSCredentials(String key, String secret, String session) - { - this.key = key; - this.secret = secret; - this.session = session; - } - } - - public static class InvokeRequest - { - public final int sockfd; - public final String invokeid; - public final String xAmznTraceId; - public final LambdaRuntime.AWSCredentials credentials; - public final String clientContext; - public final String cognitoIdentityId; - public final String cognitoPoolId; - public final long eventBodyAddr; - public final int eventBodyLen; - public final boolean needsDebugLogs; - public final String invokedFunctionArn; - - public InvokeRequest(int sockfd, String invokeid, String xAmznTraceId, - String awskey, String awssecret, String awssession, String - clientcontext, String cognitoidentityid, String cognitopoolid, long - addr, int len, boolean needsDebugLogs, String invokedFunctionArn) { - this.sockfd = sockfd; - this.invokeid = invokeid; - this.xAmznTraceId = xAmznTraceId; - this.eventBodyAddr = addr; - this.eventBodyLen = len; - this.clientContext = clientcontext; - this.cognitoIdentityId = cognitoidentityid; - this.cognitoPoolId = cognitopoolid; - this.credentials = new LambdaRuntime.AWSCredentials(awskey, awssecret, awssession); - this.needsDebugLogs = needsDebugLogs; - this.invokedFunctionArn = invokedFunctionArn; - } - } - - public static class WaitForStartResult - { - public final String invokeid; - public final String handler; - public final String mode; - public final LambdaRuntime.AWSCredentials credentials; - public final boolean suppressInit; - - public WaitForStartResult(String invokeid, String handler, String mode, String awskey, String awssecret, String awssession, boolean suppressInit) - { - this.invokeid = invokeid; - this.handler = handler; - this.mode = mode; - this.credentials = new LambdaRuntime.AWSCredentials(awskey, awssecret, awssession); - this.suppressInit = suppressInit; - } - } -} diff --git a/nodejs10.x/build/Dockerfile b/nodejs10.x/build/Dockerfile new file mode 100644 index 00000000..4b7bb8ff --- /dev/null +++ b/nodejs10.x/build/Dockerfile @@ -0,0 +1,17 @@ +FROM lambci/lambda:nodejs10.x + +FROM lambci/lambda-base-2:build + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_nodejs10.x \ + NODE_PATH=/opt/nodejs/node10/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/nodejs10.x/run/Dockerfile b/nodejs10.x/run/Dockerfile new file mode 100644 index 00000000..50e783fc --- /dev/null +++ b/nodejs10.x/run/Dockerfile @@ -0,0 +1,21 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/nodejs10.x.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_nodejs10.x + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap"] diff --git a/nodejs12.x/build/Dockerfile b/nodejs12.x/build/Dockerfile new file mode 100644 index 00000000..98833ba5 --- /dev/null +++ b/nodejs12.x/build/Dockerfile @@ -0,0 +1,17 @@ +FROM lambci/lambda:nodejs12.x + +FROM lambci/lambda-base-2:build + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_nodejs12.x \ + NODE_PATH=/opt/nodejs/node12/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/nodejs12.x/run/Dockerfile b/nodejs12.x/run/Dockerfile new file mode 100644 index 00000000..9864f768 --- /dev/null +++ b/nodejs12.x/run/Dockerfile @@ -0,0 +1,21 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/nodejs12.x.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_nodejs12.x + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap", "--enable-msg-logs"] diff --git a/nodejs4.3/build/Dockerfile b/nodejs4.3/build/Dockerfile index 9a078440..c971ca69 100644 --- a/nodejs4.3/build/Dockerfile +++ b/nodejs4.3/build/Dockerfile @@ -1,16 +1,22 @@ +FROM lambci/lambda:nodejs4.3 + FROM lambci/lambda-base:build -ENV PATH=/usr/local/lib64/node-v4.3.x/bin:$PATH \ - LD_LIBRARY_PATH=/usr/local/lib64/node-v4.3.x/lib:$LD_LIBRARY_PATH \ +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_nodejs4.3 \ NODE_PATH=/var/runtime:/var/task:/var/runtime/node_modules \ npm_config_unsafe-perm=true -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/nodejs4.3.tgz | tar -zx -C / +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 CMD ["npm", "rebuild"] diff --git a/nodejs4.3/run/Dockerfile b/nodejs4.3/run/Dockerfile index 07fad17e..9f1e318f 100644 --- a/nodejs4.3/run/Dockerfile +++ b/nodejs4.3/run/Dockerfile @@ -1,7 +1,10 @@ +FROM lambci/lambda:provided + + FROM lambci/lambda-base -ENV PATH=/usr/local/lib64/node-v4.3.x/bin:$PATH \ - LD_LIBRARY_PATH=/usr/local/lib64/node-v4.3.x/lib:$LD_LIBRARY_PATH \ +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_nodejs4.3 \ NODE_PATH=/var/runtime:/var/task:/var/runtime/node_modules @@ -10,8 +13,10 @@ RUN rm -rf /var/runtime /var/lang && \ COPY awslambda-mock.js /var/runtime/node_modules/awslambda/build/Release/awslambda.js +COPY --from=0 /var/runtime/init /var/runtime/mockserver + USER sbx_user1051 -ENTRYPOINT ["/usr/local/lib64/node-v4.3.x/bin/node", "--expose-gc", "--max-executable-size=160", "--max-semi-space-size=150", "--max-old-space-size=2547", \ +ENTRYPOINT ["/var/lang/bin/node", "--expose-gc", "--max-executable-size=160", "--max-semi-space-size=150", "--max-old-space-size=2547", \ "/var/runtime/node_modules/awslambda/index.js"] diff --git a/nodejs4.3/run/awslambda-mock.js b/nodejs4.3/run/awslambda-mock.js index 1d014d9e..254062e3 100644 --- a/nodejs4.3/run/awslambda-mock.js +++ b/nodejs4.3/run/awslambda-mock.js @@ -1,5 +1,15 @@ var fs = require('fs') var crypto = require('crypto') +var http = require('http') +var child_process = require('child_process') + +var PING_RETRIES = 20 + +var LOGS = '' +var LOG_TAIL = false +var HAS_BUFFER_FROM = Buffer.from && Buffer.from !== Uint8Array.from + +var STAY_OPEN = process.env.DOCKER_LAMBDA_STAY_OPEN var HANDLER = process.argv[2] || process.env.AWS_LAMBDA_FUNCTION_HANDLER || process.env._HANDLER || 'index.handler' var EVENT_BODY = process.argv[3] || process.env.AWS_LAMBDA_EVENT_BODY || @@ -11,30 +21,23 @@ var MEM_SIZE = process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE || '1536' var TIMEOUT = process.env.AWS_LAMBDA_FUNCTION_TIMEOUT || '300' var REGION = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || 'us-east-1' var ACCOUNT_ID = process.env.AWS_ACCOUNT_ID || randomAccountId() -var ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID || 'SOME_ACCESS_KEY_ID' -var SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY || 'SOME_SECRET_ACCESS_KEY' +var ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID +var SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY var SESSION_TOKEN = process.env.AWS_SESSION_TOKEN var INVOKED_ARN = process.env.AWS_LAMBDA_FUNCTION_INVOKED_ARN || arn(REGION, ACCOUNT_ID, FN_NAME) - -function consoleLog(str) { - process.stderr.write(formatConsole(str)) -} - -function systemLog(str) { - process.stderr.write(formatSystem(str) + '\n') -} - -function systemErr(str) { - process.stderr.write(formatErr(str) + '\n') -} - -function handleResult(resultStr, cb) { - if (!process.stdout.write('\n' + resultStr + '\n')) { - process.stdout.once('drain', cb) - } else { - process.nextTick(cb) - } -} +var TRACE_ID = process.env._X_AMZN_TRACE_ID +var CLIENT_CONTEXT = process.env.AWS_LAMBDA_CLIENT_CONTEXT +var COGNITO_IDENTITY = process.env.AWS_LAMBDA_COGNITO_IDENTITY +var COGNITO_IDENTITY_ID = (tryParse(COGNITO_IDENTITY) || {}).identity_id +var COGNITO_IDENTITY_POOL_ID = (tryParse(COGNITO_IDENTITY) || {}).identity_pool_id +var DEADLINE_MS = Date.now() + (TIMEOUT * 1000) + +process.on('SIGINT', () => process.exit(0)) +process.on('SIGTERM', () => process.exit(0)) +process.on('SIGHUP', () => { + systemErr("SIGHUP received, exiting runtime...") + process.exit(2) +}) // Don't think this can be done in the Docker image process.umask(2) @@ -49,8 +52,18 @@ process.env.AWS_REGION = REGION process.env.AWS_DEFAULT_REGION = REGION process.env._HANDLER = HANDLER +var mockServerProcess = child_process.spawn('/var/runtime/mockserver', { + stdio: ['pipe', 'inherit', 'inherit'], + env: Object.assign({ + DOCKER_LAMBDA_NO_BOOTSTRAP: 1, + DOCKER_LAMBDA_USE_STDIN: 1, + }, process.env) +}) +mockServerProcess.on('error', console.error) +mockServerProcess.stdin.end(EVENT_BODY) +mockServerProcess.unref() + var OPTIONS = { - initInvokeId: uuid(), invokeId: uuid(), handler: HANDLER, suppressInit: true, @@ -61,11 +74,12 @@ var OPTIONS = { }, eventBody: EVENT_BODY, contextObjects: { - // clientContext: '{}', - // cognitoIdentityId: undefined, - // cognitoPoolId: undefined, + clientContext: CLIENT_CONTEXT, + cognitoIdentityId: COGNITO_IDENTITY_ID, + cognitoPoolId: COGNITO_IDENTITY_POOL_ID, }, invokedFunctionArn: INVOKED_ARN, + 'x-amzn-trace-id': TRACE_ID } // Some weird spelling error in the source? @@ -73,70 +87,150 @@ OPTIONS.invokeid = OPTIONS.invokeId var invoked = false var errored = false -var start = null +var initEndSent = false +var receivedInvokeAt +var initEnd +var pingPromise +var reportDonePromise module.exports = { - initRuntime: function() { return OPTIONS }, - waitForInvoke: function(fn) { - if (invoked) return - systemLog('START RequestId: ' + OPTIONS.invokeId + ' Version: ' + VERSION) - start = process.hrtime() - invoked = true - fn(OPTIONS) + initRuntime: function () { + pingPromise = new Promise(resolve => ping(Date.now() + 1000, resolve)) + reportDonePromise = new Promise(resolve => resolve()) + return OPTIONS + }, + waitForInvoke: function (cb) { + Promise.all([pingPromise, reportDonePromise]).then(() => { + if (!invoked) { + receivedInvokeAt = Date.now() + invoked = true + } else { + LOGS = '' + } + http.get({ + hostname: '127.0.0.1', + port: 9001, + path: '/2018-06-01/runtime/invocation/next', + }, res => { + if (res.statusCode !== 200) { + console.error(`Mock server invocation/next returned a ${res.statusCode} response`) + return process.exit(1) + } + OPTIONS.invokeId = OPTIONS.initInvokeId = OPTIONS.invokeid = res.headers['lambda-runtime-aws-request-id'] + OPTIONS.invokedFunctionArn = res.headers['lambda-runtime-invoked-function-arn'] + OPTIONS['x-amzn-trace-id'] = res.headers['lambda-runtime-trace-id'] + DEADLINE_MS = +res.headers['lambda-runtime-deadline-ms'] + + OPTIONS.contextObjects.clientContext = res.headers['lambda-runtime-client-context'] + var cognitoIdentity = tryParse(res.headers['lambda-runtime-cognito-identity']) || {} + OPTIONS.contextObjects.cognitoIdentityId = cognitoIdentity.identity_id + OPTIONS.contextObjects.cognitoPoolId = cognitoIdentity.identity_pool_id + + LOG_TAIL = res.headers['docker-lambda-log-type'] === 'Tail' + + OPTIONS.eventBody = '' + res.setEncoding('utf8') + .on('data', data => OPTIONS.eventBody += data) + .on('end', () => cb(OPTIONS)) + .on('error', function (err) { + console.error(err) + process.exit(1) + }) + }).on('error', err => { + if (err.code === 'ECONNRESET') { + return process.exit(STAY_OPEN ? 2 : (errored ? 1 : 0)) + } + console.error(err) + process.exit(1) + }) + }) }, - reportRunning: function(invokeId) {}, // eslint-disable-line no-unused-vars - reportDone: function(invokeId, errType, resultStr) { + reportRunning: function (invokeId) { }, // eslint-disable-line no-unused-vars + reportDone: function (invokeId, errType, resultStr) { if (!invoked) return - var diffMs = hrTimeMs(process.hrtime(start)) - var billedMs = Math.min(100 * (Math.floor(diffMs / 100) + 1), TIMEOUT * 1000) - systemLog('END RequestId: ' + invokeId) - systemLog([ - 'REPORT RequestId: ' + invokeId, - 'Duration: ' + diffMs.toFixed(2) + ' ms', - 'Billed Duration: ' + billedMs + ' ms', - 'Memory Size: ' + MEM_SIZE + ' MB', - 'Max Memory Used: ' + Math.round(process.memoryUsage().rss / (1024 * 1024)) + ' MB', - '', - ].join('\t')) - - var exitCode = errored || errType ? 1 : 0 - if (typeof resultStr === 'string') { - handleResult(resultStr, function() { process.exit(exitCode) }) - } else { - process.exit(exitCode) - } + if (errType) errored = true + reportDonePromise = new Promise(resolve => { + var headers = {} + if (LOG_TAIL) { + headers['Docker-Lambda-Log-Result'] = newBuffer(LOGS).slice(-4096).toString('base64') + } + if (!initEndSent) { + headers['Docker-Lambda-Invoke-Wait'] = receivedInvokeAt + headers['Docker-Lambda-Init-End'] = initEnd + initEndSent = true + } + http.request({ + method: 'POST', + hostname: '127.0.0.1', + port: 9001, + path: '/2018-06-01/runtime/invocation/' + invokeId + (errType == null ? '/response' : '/error'), + headers, + }, res => { + if (res.statusCode !== 202) { + console.error(err || 'Got status code: ' + res.statusCode) + process.exit(1) + } + resolve() + }).on('error', err => { + console.error(err) + process.exit(1) + }).end(resultStr) + }) }, - reportFault: function(invokeId, msg, errName, errStack) { + reportFault: function (invokeId, msg, errName, errStack) { errored = true systemErr(msg + (errName ? ': ' + errName : '')) if (errStack) systemErr(errStack) }, - reportUserInitStart: function() {}, - reportUserInitEnd: function() {}, - reportUserInvokeStart: function() {}, - reportUserInvokeEnd: function() {}, - reportException: function() {}, - getRemainingTime: function() { - return (TIMEOUT * 1000) - Math.floor(hrTimeMs(process.hrtime(start))) - }, + reportUserInitStart: function () { }, + reportUserInitEnd: function () { initEnd = Date.now() }, + reportUserInvokeStart: function () { }, + reportUserInvokeEnd: function () { }, + reportException: function () { }, + getRemainingTime: function () { return DEADLINE_MS - Date.now() }, sendConsoleLogs: consoleLog, maxLoggerErrorSize: 256 * 1024, } -function formatConsole(str) { - return str.replace(/^[0-9TZ:.-]+\t[0-9a-f-]+\t/, '\u001b[34m$&\u001b[0m') +function ping(timeout, cb) { + http.get({ hostname: '127.0.0.1', port: 9001, path: '/2018-06-01/runtime/ping' }, cb).on('error', () => { + if (Date.now() > timeout) { + console.error('Mock server did not respond to pings in time') + process.exit(1) + } + setTimeout(ping, 5, timeout, cb) + }) } -function formatSystem(str) { - return '\u001b[32m' + str + '\u001b[0m' +function tryParse(cognitoIdentity) { + try { + return JSON.parse(cognitoIdentity) + } catch (e) { + return null + } } -function formatErr(str) { - return '\u001b[31m' + str + '\u001b[0m' +function consoleLog(str) { + if (STAY_OPEN) { + if (LOG_TAIL) { + LOGS += str + } + process.stdout.write(str) + } else { + process.stderr.write(formatConsole(str)) + } } -function hrTimeMs(hrtime) { - return (hrtime[0] * 1e9 + hrtime[1]) / 1e6 +function systemErr(str) { + process.stderr.write(formatErr(str) + '\n') +} + +function formatConsole(str) { + return str.replace(/^[0-9TZ:.-]+\t[0-9a-f-]+\t/, '\u001b[34m$&\u001b[0m') +} + +function formatErr(str) { + return '\u001b[31m' + str + '\u001b[0m' } // Approximates the look of a v1 UUID @@ -155,3 +249,7 @@ function randomAccountId() { function arn(region, accountId, fnName) { return 'arn:aws:lambda:' + region + ':' + accountId.replace(/[^\d]/g, '') + ':function:' + fnName } + +function newBuffer(str) { + return HAS_BUFFER_FROM ? Buffer.from(str) : new Buffer(str) +} diff --git a/nodejs6.10/build/Dockerfile b/nodejs6.10/build/Dockerfile index 03af6fea..a544d6f7 100644 --- a/nodejs6.10/build/Dockerfile +++ b/nodejs6.10/build/Dockerfile @@ -1,3 +1,5 @@ +FROM lambci/lambda:nodejs6.10 + FROM lambci/lambda-base:build ENV PATH=/var/lang/bin:$PATH \ @@ -6,11 +8,15 @@ ENV PATH=/var/lang/bin:$PATH \ NODE_PATH=/opt/nodejs/node6/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules:/var/runtime:/var/task:/var/runtime/node_modules \ npm_config_unsafe-perm=true -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/nodejs6.10.tgz | tar -zx -C / +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 CMD ["npm", "rebuild"] diff --git a/nodejs6.10/run/Dockerfile b/nodejs6.10/run/Dockerfile index 9f3d4028..280cce30 100644 --- a/nodejs6.10/run/Dockerfile +++ b/nodejs6.10/run/Dockerfile @@ -1,3 +1,6 @@ +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV PATH=/var/lang/bin:$PATH \ @@ -10,6 +13,8 @@ RUN rm -rf /var/runtime /var/lang && \ COPY awslambda-mock.js /var/runtime/node_modules/awslambda/build/Release/awslambda.js +COPY --from=0 /var/runtime/init /var/runtime/mockserver + USER sbx_user1051 ENTRYPOINT ["/var/lang/bin/node", "--expose-gc", "--max-executable-size=160", "--max-semi-space-size=150", "--max-old-space-size=2547", \ diff --git a/nodejs6.10/run/awslambda-mock.js b/nodejs6.10/run/awslambda-mock.js index 1d014d9e..254062e3 100644 --- a/nodejs6.10/run/awslambda-mock.js +++ b/nodejs6.10/run/awslambda-mock.js @@ -1,5 +1,15 @@ var fs = require('fs') var crypto = require('crypto') +var http = require('http') +var child_process = require('child_process') + +var PING_RETRIES = 20 + +var LOGS = '' +var LOG_TAIL = false +var HAS_BUFFER_FROM = Buffer.from && Buffer.from !== Uint8Array.from + +var STAY_OPEN = process.env.DOCKER_LAMBDA_STAY_OPEN var HANDLER = process.argv[2] || process.env.AWS_LAMBDA_FUNCTION_HANDLER || process.env._HANDLER || 'index.handler' var EVENT_BODY = process.argv[3] || process.env.AWS_LAMBDA_EVENT_BODY || @@ -11,30 +21,23 @@ var MEM_SIZE = process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE || '1536' var TIMEOUT = process.env.AWS_LAMBDA_FUNCTION_TIMEOUT || '300' var REGION = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || 'us-east-1' var ACCOUNT_ID = process.env.AWS_ACCOUNT_ID || randomAccountId() -var ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID || 'SOME_ACCESS_KEY_ID' -var SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY || 'SOME_SECRET_ACCESS_KEY' +var ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID +var SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY var SESSION_TOKEN = process.env.AWS_SESSION_TOKEN var INVOKED_ARN = process.env.AWS_LAMBDA_FUNCTION_INVOKED_ARN || arn(REGION, ACCOUNT_ID, FN_NAME) - -function consoleLog(str) { - process.stderr.write(formatConsole(str)) -} - -function systemLog(str) { - process.stderr.write(formatSystem(str) + '\n') -} - -function systemErr(str) { - process.stderr.write(formatErr(str) + '\n') -} - -function handleResult(resultStr, cb) { - if (!process.stdout.write('\n' + resultStr + '\n')) { - process.stdout.once('drain', cb) - } else { - process.nextTick(cb) - } -} +var TRACE_ID = process.env._X_AMZN_TRACE_ID +var CLIENT_CONTEXT = process.env.AWS_LAMBDA_CLIENT_CONTEXT +var COGNITO_IDENTITY = process.env.AWS_LAMBDA_COGNITO_IDENTITY +var COGNITO_IDENTITY_ID = (tryParse(COGNITO_IDENTITY) || {}).identity_id +var COGNITO_IDENTITY_POOL_ID = (tryParse(COGNITO_IDENTITY) || {}).identity_pool_id +var DEADLINE_MS = Date.now() + (TIMEOUT * 1000) + +process.on('SIGINT', () => process.exit(0)) +process.on('SIGTERM', () => process.exit(0)) +process.on('SIGHUP', () => { + systemErr("SIGHUP received, exiting runtime...") + process.exit(2) +}) // Don't think this can be done in the Docker image process.umask(2) @@ -49,8 +52,18 @@ process.env.AWS_REGION = REGION process.env.AWS_DEFAULT_REGION = REGION process.env._HANDLER = HANDLER +var mockServerProcess = child_process.spawn('/var/runtime/mockserver', { + stdio: ['pipe', 'inherit', 'inherit'], + env: Object.assign({ + DOCKER_LAMBDA_NO_BOOTSTRAP: 1, + DOCKER_LAMBDA_USE_STDIN: 1, + }, process.env) +}) +mockServerProcess.on('error', console.error) +mockServerProcess.stdin.end(EVENT_BODY) +mockServerProcess.unref() + var OPTIONS = { - initInvokeId: uuid(), invokeId: uuid(), handler: HANDLER, suppressInit: true, @@ -61,11 +74,12 @@ var OPTIONS = { }, eventBody: EVENT_BODY, contextObjects: { - // clientContext: '{}', - // cognitoIdentityId: undefined, - // cognitoPoolId: undefined, + clientContext: CLIENT_CONTEXT, + cognitoIdentityId: COGNITO_IDENTITY_ID, + cognitoPoolId: COGNITO_IDENTITY_POOL_ID, }, invokedFunctionArn: INVOKED_ARN, + 'x-amzn-trace-id': TRACE_ID } // Some weird spelling error in the source? @@ -73,70 +87,150 @@ OPTIONS.invokeid = OPTIONS.invokeId var invoked = false var errored = false -var start = null +var initEndSent = false +var receivedInvokeAt +var initEnd +var pingPromise +var reportDonePromise module.exports = { - initRuntime: function() { return OPTIONS }, - waitForInvoke: function(fn) { - if (invoked) return - systemLog('START RequestId: ' + OPTIONS.invokeId + ' Version: ' + VERSION) - start = process.hrtime() - invoked = true - fn(OPTIONS) + initRuntime: function () { + pingPromise = new Promise(resolve => ping(Date.now() + 1000, resolve)) + reportDonePromise = new Promise(resolve => resolve()) + return OPTIONS + }, + waitForInvoke: function (cb) { + Promise.all([pingPromise, reportDonePromise]).then(() => { + if (!invoked) { + receivedInvokeAt = Date.now() + invoked = true + } else { + LOGS = '' + } + http.get({ + hostname: '127.0.0.1', + port: 9001, + path: '/2018-06-01/runtime/invocation/next', + }, res => { + if (res.statusCode !== 200) { + console.error(`Mock server invocation/next returned a ${res.statusCode} response`) + return process.exit(1) + } + OPTIONS.invokeId = OPTIONS.initInvokeId = OPTIONS.invokeid = res.headers['lambda-runtime-aws-request-id'] + OPTIONS.invokedFunctionArn = res.headers['lambda-runtime-invoked-function-arn'] + OPTIONS['x-amzn-trace-id'] = res.headers['lambda-runtime-trace-id'] + DEADLINE_MS = +res.headers['lambda-runtime-deadline-ms'] + + OPTIONS.contextObjects.clientContext = res.headers['lambda-runtime-client-context'] + var cognitoIdentity = tryParse(res.headers['lambda-runtime-cognito-identity']) || {} + OPTIONS.contextObjects.cognitoIdentityId = cognitoIdentity.identity_id + OPTIONS.contextObjects.cognitoPoolId = cognitoIdentity.identity_pool_id + + LOG_TAIL = res.headers['docker-lambda-log-type'] === 'Tail' + + OPTIONS.eventBody = '' + res.setEncoding('utf8') + .on('data', data => OPTIONS.eventBody += data) + .on('end', () => cb(OPTIONS)) + .on('error', function (err) { + console.error(err) + process.exit(1) + }) + }).on('error', err => { + if (err.code === 'ECONNRESET') { + return process.exit(STAY_OPEN ? 2 : (errored ? 1 : 0)) + } + console.error(err) + process.exit(1) + }) + }) }, - reportRunning: function(invokeId) {}, // eslint-disable-line no-unused-vars - reportDone: function(invokeId, errType, resultStr) { + reportRunning: function (invokeId) { }, // eslint-disable-line no-unused-vars + reportDone: function (invokeId, errType, resultStr) { if (!invoked) return - var diffMs = hrTimeMs(process.hrtime(start)) - var billedMs = Math.min(100 * (Math.floor(diffMs / 100) + 1), TIMEOUT * 1000) - systemLog('END RequestId: ' + invokeId) - systemLog([ - 'REPORT RequestId: ' + invokeId, - 'Duration: ' + diffMs.toFixed(2) + ' ms', - 'Billed Duration: ' + billedMs + ' ms', - 'Memory Size: ' + MEM_SIZE + ' MB', - 'Max Memory Used: ' + Math.round(process.memoryUsage().rss / (1024 * 1024)) + ' MB', - '', - ].join('\t')) - - var exitCode = errored || errType ? 1 : 0 - if (typeof resultStr === 'string') { - handleResult(resultStr, function() { process.exit(exitCode) }) - } else { - process.exit(exitCode) - } + if (errType) errored = true + reportDonePromise = new Promise(resolve => { + var headers = {} + if (LOG_TAIL) { + headers['Docker-Lambda-Log-Result'] = newBuffer(LOGS).slice(-4096).toString('base64') + } + if (!initEndSent) { + headers['Docker-Lambda-Invoke-Wait'] = receivedInvokeAt + headers['Docker-Lambda-Init-End'] = initEnd + initEndSent = true + } + http.request({ + method: 'POST', + hostname: '127.0.0.1', + port: 9001, + path: '/2018-06-01/runtime/invocation/' + invokeId + (errType == null ? '/response' : '/error'), + headers, + }, res => { + if (res.statusCode !== 202) { + console.error(err || 'Got status code: ' + res.statusCode) + process.exit(1) + } + resolve() + }).on('error', err => { + console.error(err) + process.exit(1) + }).end(resultStr) + }) }, - reportFault: function(invokeId, msg, errName, errStack) { + reportFault: function (invokeId, msg, errName, errStack) { errored = true systemErr(msg + (errName ? ': ' + errName : '')) if (errStack) systemErr(errStack) }, - reportUserInitStart: function() {}, - reportUserInitEnd: function() {}, - reportUserInvokeStart: function() {}, - reportUserInvokeEnd: function() {}, - reportException: function() {}, - getRemainingTime: function() { - return (TIMEOUT * 1000) - Math.floor(hrTimeMs(process.hrtime(start))) - }, + reportUserInitStart: function () { }, + reportUserInitEnd: function () { initEnd = Date.now() }, + reportUserInvokeStart: function () { }, + reportUserInvokeEnd: function () { }, + reportException: function () { }, + getRemainingTime: function () { return DEADLINE_MS - Date.now() }, sendConsoleLogs: consoleLog, maxLoggerErrorSize: 256 * 1024, } -function formatConsole(str) { - return str.replace(/^[0-9TZ:.-]+\t[0-9a-f-]+\t/, '\u001b[34m$&\u001b[0m') +function ping(timeout, cb) { + http.get({ hostname: '127.0.0.1', port: 9001, path: '/2018-06-01/runtime/ping' }, cb).on('error', () => { + if (Date.now() > timeout) { + console.error('Mock server did not respond to pings in time') + process.exit(1) + } + setTimeout(ping, 5, timeout, cb) + }) } -function formatSystem(str) { - return '\u001b[32m' + str + '\u001b[0m' +function tryParse(cognitoIdentity) { + try { + return JSON.parse(cognitoIdentity) + } catch (e) { + return null + } } -function formatErr(str) { - return '\u001b[31m' + str + '\u001b[0m' +function consoleLog(str) { + if (STAY_OPEN) { + if (LOG_TAIL) { + LOGS += str + } + process.stdout.write(str) + } else { + process.stderr.write(formatConsole(str)) + } } -function hrTimeMs(hrtime) { - return (hrtime[0] * 1e9 + hrtime[1]) / 1e6 +function systemErr(str) { + process.stderr.write(formatErr(str) + '\n') +} + +function formatConsole(str) { + return str.replace(/^[0-9TZ:.-]+\t[0-9a-f-]+\t/, '\u001b[34m$&\u001b[0m') +} + +function formatErr(str) { + return '\u001b[31m' + str + '\u001b[0m' } // Approximates the look of a v1 UUID @@ -155,3 +249,7 @@ function randomAccountId() { function arn(region, accountId, fnName) { return 'arn:aws:lambda:' + region + ':' + accountId.replace(/[^\d]/g, '') + ':function:' + fnName } + +function newBuffer(str) { + return HAS_BUFFER_FROM ? Buffer.from(str) : new Buffer(str) +} diff --git a/nodejs8.10/build/Dockerfile b/nodejs8.10/build/Dockerfile index 651538b5..f87e8a22 100644 --- a/nodejs8.10/build/Dockerfile +++ b/nodejs8.10/build/Dockerfile @@ -1,3 +1,5 @@ +FROM lambci/lambda:nodejs8.10 + FROM lambci/lambda-base:build ENV PATH=/var/lang/bin:$PATH \ @@ -6,11 +8,15 @@ ENV PATH=/var/lang/bin:$PATH \ NODE_PATH=/opt/nodejs/node8/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules:/var/runtime:/var/task:/var/runtime/node_modules \ npm_config_unsafe-perm=true -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/nodejs8.10.tgz | tar -zx -C / +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 CMD ["npm", "rebuild"] diff --git a/nodejs8.10/run/Dockerfile b/nodejs8.10/run/Dockerfile index 10e21894..ff6b8f1c 100644 --- a/nodejs8.10/run/Dockerfile +++ b/nodejs8.10/run/Dockerfile @@ -1,3 +1,6 @@ +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin \ @@ -10,6 +13,8 @@ RUN rm -rf /var/runtime /var/lang && \ COPY awslambda-mock.js /var/runtime/node_modules/awslambda/build/Release/awslambda.js +COPY --from=0 /var/runtime/init /var/runtime/mockserver + USER sbx_user1051 ENTRYPOINT ["/var/lang/bin/node", "--expose-gc", "--max-semi-space-size=150", "--max-old-space-size=2707", \ diff --git a/nodejs8.10/run/awslambda-mock.js b/nodejs8.10/run/awslambda-mock.js index 1d014d9e..ca25a49e 100644 --- a/nodejs8.10/run/awslambda-mock.js +++ b/nodejs8.10/run/awslambda-mock.js @@ -1,5 +1,15 @@ var fs = require('fs') var crypto = require('crypto') +var http = require('http') +var child_process = require('child_process') + +var PING_RETRIES = 20 + +var LOGS = '' +var LOG_TAIL = false +var HAS_BUFFER_FROM = Buffer.from && Buffer.from !== Uint8Array.from + +var STAY_OPEN = process.env.DOCKER_LAMBDA_STAY_OPEN var HANDLER = process.argv[2] || process.env.AWS_LAMBDA_FUNCTION_HANDLER || process.env._HANDLER || 'index.handler' var EVENT_BODY = process.argv[3] || process.env.AWS_LAMBDA_EVENT_BODY || @@ -11,30 +21,23 @@ var MEM_SIZE = process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE || '1536' var TIMEOUT = process.env.AWS_LAMBDA_FUNCTION_TIMEOUT || '300' var REGION = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || 'us-east-1' var ACCOUNT_ID = process.env.AWS_ACCOUNT_ID || randomAccountId() -var ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID || 'SOME_ACCESS_KEY_ID' -var SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY || 'SOME_SECRET_ACCESS_KEY' +var ACCESS_KEY_ID = process.env.AWS_ACCESS_KEY_ID +var SECRET_ACCESS_KEY = process.env.AWS_SECRET_ACCESS_KEY var SESSION_TOKEN = process.env.AWS_SESSION_TOKEN var INVOKED_ARN = process.env.AWS_LAMBDA_FUNCTION_INVOKED_ARN || arn(REGION, ACCOUNT_ID, FN_NAME) +var TRACE_ID = process.env._X_AMZN_TRACE_ID +var CLIENT_CONTEXT = process.env.AWS_LAMBDA_CLIENT_CONTEXT +var COGNITO_IDENTITY = process.env.AWS_LAMBDA_COGNITO_IDENTITY +var COGNITO_IDENTITY_ID = (tryParse(COGNITO_IDENTITY) || {}).identity_id +var COGNITO_IDENTITY_POOL_ID = (tryParse(COGNITO_IDENTITY) || {}).identity_pool_id +var DEADLINE_MS = Date.now() + (TIMEOUT * 1000) -function consoleLog(str) { - process.stderr.write(formatConsole(str)) -} - -function systemLog(str) { - process.stderr.write(formatSystem(str) + '\n') -} - -function systemErr(str) { - process.stderr.write(formatErr(str) + '\n') -} - -function handleResult(resultStr, cb) { - if (!process.stdout.write('\n' + resultStr + '\n')) { - process.stdout.once('drain', cb) - } else { - process.nextTick(cb) - } -} +process.on('SIGINT', () => process.exit(0)) +process.on('SIGTERM', () => process.exit(0)) +process.on('SIGHUP', () => { + systemErr("SIGHUP received, exiting runtime...") + process.exit(2) +}) // Don't think this can be done in the Docker image process.umask(2) @@ -49,11 +52,22 @@ process.env.AWS_REGION = REGION process.env.AWS_DEFAULT_REGION = REGION process.env._HANDLER = HANDLER +var mockServerProcess = child_process.spawn('/var/runtime/mockserver', { + stdio: ['pipe', 'inherit', 'inherit'], + env: Object.assign({ + DOCKER_LAMBDA_NO_BOOTSTRAP: 1, + DOCKER_LAMBDA_USE_STDIN: 1, + }, process.env) +}) +mockServerProcess.on('error', console.error) +mockServerProcess.stdin.end(EVENT_BODY) +mockServerProcess.unref() + var OPTIONS = { - initInvokeId: uuid(), invokeId: uuid(), handler: HANDLER, suppressInit: true, + throttled: false, credentials: { key: ACCESS_KEY_ID, secret: SECRET_ACCESS_KEY, @@ -61,11 +75,12 @@ var OPTIONS = { }, eventBody: EVENT_BODY, contextObjects: { - // clientContext: '{}', - // cognitoIdentityId: undefined, - // cognitoPoolId: undefined, + clientContext: CLIENT_CONTEXT, + cognitoIdentityId: COGNITO_IDENTITY_ID, + cognitoPoolId: COGNITO_IDENTITY_POOL_ID, }, invokedFunctionArn: INVOKED_ARN, + 'x-amzn-trace-id': TRACE_ID } // Some weird spelling error in the source? @@ -73,70 +88,150 @@ OPTIONS.invokeid = OPTIONS.invokeId var invoked = false var errored = false -var start = null +var initEndSent = false +var receivedInvokeAt +var initEnd +var pingPromise +var reportDonePromise module.exports = { - initRuntime: function() { return OPTIONS }, - waitForInvoke: function(fn) { - if (invoked) return - systemLog('START RequestId: ' + OPTIONS.invokeId + ' Version: ' + VERSION) - start = process.hrtime() - invoked = true - fn(OPTIONS) + initRuntime: function () { + pingPromise = new Promise(resolve => ping(Date.now() + 1000, resolve)) + reportDonePromise = new Promise(resolve => resolve()) + return OPTIONS }, - reportRunning: function(invokeId) {}, // eslint-disable-line no-unused-vars - reportDone: function(invokeId, errType, resultStr) { + waitForInvoke: function (cb) { + Promise.all([pingPromise, reportDonePromise]).then(() => { + if (!invoked) { + receivedInvokeAt = Date.now() + invoked = true + } else { + LOGS = '' + } + http.get({ + hostname: '127.0.0.1', + port: 9001, + path: '/2018-06-01/runtime/invocation/next', + }, res => { + if (res.statusCode !== 200) { + console.error(`Mock server invocation/next returned a ${res.statusCode} response`) + return process.exit(1) + } + OPTIONS.invokeId = OPTIONS.initInvokeId = OPTIONS.invokeid = res.headers['lambda-runtime-aws-request-id'] + OPTIONS.invokedFunctionArn = res.headers['lambda-runtime-invoked-function-arn'] + OPTIONS['x-amzn-trace-id'] = res.headers['lambda-runtime-trace-id'] + DEADLINE_MS = +res.headers['lambda-runtime-deadline-ms'] + + OPTIONS.contextObjects.clientContext = res.headers['lambda-runtime-client-context'] + var cognitoIdentity = tryParse(res.headers['lambda-runtime-cognito-identity']) || {} + OPTIONS.contextObjects.cognitoIdentityId = cognitoIdentity.identity_id + OPTIONS.contextObjects.cognitoPoolId = cognitoIdentity.identity_pool_id + + LOG_TAIL = res.headers['docker-lambda-log-type'] === 'Tail' + + OPTIONS.eventBody = '' + res.setEncoding('utf8') + .on('data', data => OPTIONS.eventBody += data) + .on('end', () => cb(OPTIONS)) + .on('error', function (err) { + console.error(err) + process.exit(1) + }) + }).on('error', err => { + if (err.code === 'ECONNRESET') { + return process.exit(STAY_OPEN ? 2 : (errored ? 1 : 0)) + } + console.error(err) + process.exit(1) + }) + }) + }, + reportRunning: function (invokeId) { }, // eslint-disable-line no-unused-vars + reportDone: function (invokeId, errType, resultStr) { if (!invoked) return - var diffMs = hrTimeMs(process.hrtime(start)) - var billedMs = Math.min(100 * (Math.floor(diffMs / 100) + 1), TIMEOUT * 1000) - systemLog('END RequestId: ' + invokeId) - systemLog([ - 'REPORT RequestId: ' + invokeId, - 'Duration: ' + diffMs.toFixed(2) + ' ms', - 'Billed Duration: ' + billedMs + ' ms', - 'Memory Size: ' + MEM_SIZE + ' MB', - 'Max Memory Used: ' + Math.round(process.memoryUsage().rss / (1024 * 1024)) + ' MB', - '', - ].join('\t')) - - var exitCode = errored || errType ? 1 : 0 - if (typeof resultStr === 'string') { - handleResult(resultStr, function() { process.exit(exitCode) }) - } else { - process.exit(exitCode) - } + if (errType) errored = true + reportDonePromise = new Promise(resolve => { + var headers = {} + if (LOG_TAIL) { + headers['Docker-Lambda-Log-Result'] = newBuffer(LOGS).slice(-4096).toString('base64') + } + if (!initEndSent) { + headers['Docker-Lambda-Invoke-Wait'] = receivedInvokeAt + headers['Docker-Lambda-Init-End'] = initEnd + initEndSent = true + } + http.request({ + method: 'POST', + hostname: '127.0.0.1', + port: 9001, + path: '/2018-06-01/runtime/invocation/' + invokeId + (errType == null ? '/response' : '/error'), + headers, + }, res => { + if (res.statusCode !== 202) { + console.error(err || 'Got status code: ' + res.statusCode) + process.exit(1) + } + resolve() + }).on('error', err => { + console.error(err) + process.exit(1) + }).end(resultStr) + }) }, - reportFault: function(invokeId, msg, errName, errStack) { + reportFault: function (invokeId, msg, errName, errStack) { errored = true systemErr(msg + (errName ? ': ' + errName : '')) if (errStack) systemErr(errStack) }, - reportUserInitStart: function() {}, - reportUserInitEnd: function() {}, - reportUserInvokeStart: function() {}, - reportUserInvokeEnd: function() {}, - reportException: function() {}, - getRemainingTime: function() { - return (TIMEOUT * 1000) - Math.floor(hrTimeMs(process.hrtime(start))) - }, + reportUserInitStart: function () { }, + reportUserInitEnd: function () { initEnd = Date.now() }, + reportUserInvokeStart: function () { }, + reportUserInvokeEnd: function () { }, + reportException: function () { }, + getRemainingTime: function () { return DEADLINE_MS - Date.now() }, sendConsoleLogs: consoleLog, maxLoggerErrorSize: 256 * 1024, } -function formatConsole(str) { - return str.replace(/^[0-9TZ:.-]+\t[0-9a-f-]+\t/, '\u001b[34m$&\u001b[0m') +function ping(timeout, cb) { + http.get({ hostname: '127.0.0.1', port: 9001, path: '/2018-06-01/runtime/ping' }, cb).on('error', () => { + if (Date.now() > timeout) { + console.error('Mock server did not respond to pings in time') + process.exit(1) + } + setTimeout(ping, 5, timeout, cb) + }) } -function formatSystem(str) { - return '\u001b[32m' + str + '\u001b[0m' +function tryParse(cognitoIdentity) { + try { + return JSON.parse(cognitoIdentity) + } catch (e) { + return null + } } -function formatErr(str) { - return '\u001b[31m' + str + '\u001b[0m' +function consoleLog(str) { + if (STAY_OPEN) { + if (LOG_TAIL) { + LOGS += str + } + process.stdout.write(str) + } else { + process.stderr.write(formatConsole(str)) + } +} + +function systemErr(str) { + process.stderr.write(formatErr(str) + '\n') } -function hrTimeMs(hrtime) { - return (hrtime[0] * 1e9 + hrtime[1]) / 1e6 +function formatConsole(str) { + return str.replace(/^[0-9TZ:.-]+\t[0-9a-f-]+\t/, '\u001b[34m$&\u001b[0m') +} + +function formatErr(str) { + return '\u001b[31m' + str + '\u001b[0m' } // Approximates the look of a v1 UUID @@ -155,3 +250,7 @@ function randomAccountId() { function arn(region, accountId, fnName) { return 'arn:aws:lambda:' + region + ':' + accountId.replace(/[^\d]/g, '') + ':function:' + fnName } + +function newBuffer(str) { + return HAS_BUFFER_FROM ? Buffer.from(str) : new Buffer(str) +} diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index fb3fd99b..00000000 --- a/package-lock.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "docker-lambda", - "version": "0.15.3", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "should": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/should/-/should-8.4.0.tgz", - "integrity": "sha1-XmCInT5kS73Tl6MM00+tKPz5C8A=", - "dev": true, - "requires": { - "should-equal": "0.8.0", - "should-format": "0.3.2", - "should-type": "0.2.0" - } - }, - "should-equal": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-0.8.0.tgz", - "integrity": "sha1-o/BXMv9FusG3ukEvhAiFaBlkEpk=", - "dev": true, - "requires": { - "should-type": "0.2.0" - } - }, - "should-format": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/should-format/-/should-format-0.3.2.tgz", - "integrity": "sha1-pZgx4Bot3uFJkRvHFIvlyAMZ4f8=", - "dev": true, - "requires": { - "should-type": "0.2.0" - } - }, - "should-type": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/should-type/-/should-type-0.2.0.tgz", - "integrity": "sha1-ZwfvlVKdmJ3MCY/gdTqx+RNrt/Y=", - "dev": true - } - } -} diff --git a/provided.al2/build/Dockerfile b/provided.al2/build/Dockerfile new file mode 100644 index 00000000..214706da --- /dev/null +++ b/provided.al2/build/Dockerfile @@ -0,0 +1,12 @@ +FROM lambci/lambda:provided.al2 + +FROM lambci/lambda-base-2:build + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/provided.al2/run/Dockerfile b/provided.al2/run/Dockerfile new file mode 100644 index 00000000..19e39287 --- /dev/null +++ b/provided.al2/run/Dockerfile @@ -0,0 +1,13 @@ +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH + +COPY --from=0 /var/runtime/init /var/runtime/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/runtime/init"] diff --git a/provided/build/Dockerfile b/provided/build/Dockerfile index c3f7d31a..47474a12 100644 --- a/provided/build/Dockerfile +++ b/provided/build/Dockerfile @@ -1,5 +1,14 @@ +FROM lambci/lambda:provided + FROM lambci/lambda-base:build +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/provided/run/Dockerfile b/provided/run/Dockerfile index 42c4da70..c7b1f41c 100644 --- a/provided/run/Dockerfile +++ b/provided/run/Dockerfile @@ -1,6 +1,6 @@ FROM golang:1 WORKDIR /app -COPY go.mod ./ +COPY go.mod go.sum ./ RUN go mod download COPY init.go ./ RUN GOARCH=amd64 GOOS=linux go build init.go diff --git a/provided/run/go.mod b/provided/run/go.mod index d2cabad7..28c72849 100644 --- a/provided/run/go.mod +++ b/provided/run/go.mod @@ -1,6 +1,9 @@ module init require ( - github.com/go-chi/chi v3.3.3+incompatible + github.com/go-chi/chi v4.0.2+incompatible github.com/go-chi/render v1.0.1 + github.com/rjeczalik/notify v0.9.2 ) + +go 1.15 diff --git a/provided/run/go.sum b/provided/run/go.sum new file mode 100644 index 00000000..beef513a --- /dev/null +++ b/provided/run/go.sum @@ -0,0 +1,8 @@ +github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= +github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8= +github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= +github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= +github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= +golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7 h1:bit1t3mgdR35yN0cX0G8orgLtOuyL9Wqxa1mccLB0ig= +golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/provided/run/init.go b/provided/run/init.go index 115a05f0..62cdff6a 100644 --- a/provided/run/init.go +++ b/provided/run/init.go @@ -4,129 +4,460 @@ import ( "bufio" "bytes" "context" + "encoding/base64" "encoding/hex" "encoding/json" "flag" "fmt" - "github.com/go-chi/chi" - "github.com/go-chi/render" + "io" "io/ioutil" + "log" "math" "math/rand" "net" "net/http" "os" "os/exec" + "os/signal" "reflect" "regexp" "strconv" + "sync" "syscall" "time" + + "github.com/go-chi/chi" + "github.com/go-chi/render" + "github.com/rjeczalik/notify" ) -var okStatusResponse = &StatusResponse{Status: "OK", HTTPStatusCode: 202} +var logDebug = os.Getenv("DOCKER_LAMBDA_DEBUG") != "" +var stayOpen = os.Getenv("DOCKER_LAMBDA_STAY_OPEN") != "" +var noBootstrap = os.Getenv("DOCKER_LAMBDA_NO_BOOTSTRAP") != "" +var apiPort = getEnv("DOCKER_LAMBDA_API_PORT", "9001") +var runtimePort = getEnv("DOCKER_LAMBDA_RUNTIME_PORT", "9001") +var useStdin = os.Getenv("DOCKER_LAMBDA_USE_STDIN") != "" +var noModifyLogs = os.Getenv("DOCKER_LAMBDA_NO_MODIFY_LOGS") != "" +var watchMode = os.Getenv("DOCKER_LAMBDA_WATCH") != "" -var curRequestID = fakeGuid() var curState = "STATE_INIT" var transitions = map[string]map[string]bool{ - "STATE_INIT_ERROR": map[string]bool{"STATE_INIT": true}, - "STATE_INVOKE_NEXT": map[string]bool{"STATE_INIT": true, "STATE_INVOKE_NEXT": true, "STATE_INVOKE_RESPONSE": true, "STATE_INVOKE_ERROR": true}, - "STATE_INVOKE_RESPONSE": map[string]bool{"STATE_INVOKE_NEXT": true}, - "STATE_INVOKE_ERROR": map[string]bool{"STATE_INVOKE_NEXT": true}, + "STATE_INIT_ERROR": {"STATE_INIT": true}, + "STATE_INVOKE_NEXT": {"STATE_INIT": true, "STATE_INVOKE_NEXT": true, "STATE_INVOKE_RESPONSE": true, "STATE_INVOKE_ERROR": true}, + "STATE_INVOKE_RESPONSE": {"STATE_INVOKE_NEXT": true}, + "STATE_INVOKE_ERROR": {"STATE_INVOKE_NEXT": true}, +} + +var acceptedResponse = &statusResponse{Status: "OK", HTTPStatusCode: 202} + +var curContext *mockLambdaContext +var bootstrapCmd *exec.Cmd +var initPrinted bool +var eventChan chan *mockLambdaContext +var bootstrapExitedGracefully bool +var bootstrapIsRunning bool +var bootstrapPath *string +var bootstrapArgs []string +var bootstrapMutex sync.Mutex +var logsBuf bytes.Buffer +var serverInitEnd time.Time + +func newContext() *mockLambdaContext { + context := &mockLambdaContext{ + RequestID: fakeGUID(), + FnName: getEnv("AWS_LAMBDA_FUNCTION_NAME", "test"), + Version: getEnv("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"), + MemSize: getEnv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536"), + Timeout: getEnv("AWS_LAMBDA_FUNCTION_TIMEOUT", "300"), + Region: getEnv("AWS_REGION", getEnv("AWS_DEFAULT_REGION", "us-east-1")), + AccountID: getEnv("AWS_ACCOUNT_ID", strconv.FormatInt(int64(rand.Int31()), 10)), + XAmznTraceID: getEnv("_X_AMZN_TRACE_ID", ""), + ClientContext: getEnv("AWS_LAMBDA_CLIENT_CONTEXT", ""), + CognitoIdentity: getEnv("AWS_LAMBDA_COGNITO_IDENTITY", ""), + Start: time.Now(), + Done: make(chan bool), + } + context.ParseTimeout() + context.ParseFunctionArn() + return context } -var mockContext = &MockLambdaContext{} +type key int + +const ( + keyRequestID key = iota +) func main() { rand.Seed(time.Now().UTC().UnixNano()) + log.SetOutput(os.Stderr) + + interrupt := make(chan os.Signal, 1) + signal.Notify(interrupt, os.Interrupt) - bootstrapPath := flag.String("bootstrap", "/var/runtime/bootstrap", "path to bootstrap") + render.Respond = renderJSON + + eventChan = make(chan *mockLambdaContext) + + bootstrapPath = flag.String("bootstrap", "/var/runtime/bootstrap", "path to bootstrap") + bootstrapArgsString := flag.String("bootstrap-args", "[]", "additional arguments passed to bootstrap, as a stringified JSON Array") + flag.Bool("enable-msg-logs", false, "enable message logs") flag.Parse() positionalArgs := flag.Args() + if err := json.Unmarshal([]byte(*bootstrapArgsString), &bootstrapArgs); err != nil { + log.Fatal(fmt.Errorf("Value of --bootstrap-args should be a JSON Array. Error: %s", err)) + return + } + var handler string if len(positionalArgs) > 0 { handler = positionalArgs[0] } else { handler = getEnv("AWS_LAMBDA_FUNCTION_HANDLER", getEnv("_HANDLER", "handler")) } + os.Setenv("_HANDLER", handler) - var eventBody string + var eventBody []byte if len(positionalArgs) > 1 { - eventBody = positionalArgs[1] + eventBody = []byte(positionalArgs[1]) } else { - eventBody = os.Getenv("AWS_LAMBDA_EVENT_BODY") - if eventBody == "" { - if os.Getenv("DOCKER_LAMBDA_USE_STDIN") != "" { - stdin, _ := ioutil.ReadAll(os.Stdin) - eventBody = string(stdin) + eventBody = []byte(os.Getenv("AWS_LAMBDA_EVENT_BODY")) + if len(eventBody) == 0 { + if useStdin { + eventBody, _ = ioutil.ReadAll(os.Stdin) } else { - eventBody = "{}" + eventBody = []byte("{}") } } } - mockContext = &MockLambdaContext{ - EventBody: eventBody, - FnName: getEnv("AWS_LAMBDA_FUNCTION_NAME", "test"), - Version: getEnv("AWS_LAMBDA_FUNCTION_VERSION", "$LATEST"), - MemSize: getEnv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "1536"), - Timeout: getEnv("AWS_LAMBDA_FUNCTION_TIMEOUT", "300"), - Region: getEnv("AWS_REGION", getEnv("AWS_DEFAULT_REGION", "us-east-1")), - AccountId: getEnv("AWS_ACCOUNT_ID", strconv.FormatInt(int64(rand.Int31()), 10)), - XAmznTraceId: getEnv("_X_AMZN_TRACE_ID", ""), - ClientContext: getEnv("AWS_LAMBDA_CLIENT_CONTEXT", ""), - CognitoIdentity: getEnv("AWS_LAMBDA_COGNITO_IDENTITY", ""), - Start: time.Now(), - Pid: 1, - Done: make(chan bool), + curContext = newContext() + + os.Setenv("AWS_LAMBDA_FUNCTION_NAME", curContext.FnName) + os.Setenv("AWS_LAMBDA_FUNCTION_VERSION", curContext.Version) + os.Setenv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", curContext.MemSize) + os.Setenv("AWS_LAMBDA_LOG_GROUP_NAME", "/aws/lambda/"+curContext.FnName) + os.Setenv("AWS_LAMBDA_LOG_STREAM_NAME", logStreamName(curContext.Version)) + os.Setenv("AWS_REGION", curContext.Region) + os.Setenv("AWS_DEFAULT_REGION", curContext.Region) + os.Setenv("_X_AMZN_TRACE_ID", curContext.XAmznTraceID) + + runtimeAddress := ":" + runtimePort + if apiPort != runtimePort { + // We can restrict runtime to 127.0.0.1 if we don't need the port for the Lambda API + runtimeAddress = "127.0.0.1" + runtimeAddress + } + runtimeListener, err := net.Listen("tcp", runtimeAddress) + if err != nil { + log.Fatal(err) + return } - mockContext.ParseTimeout() - mockContext.ParseFunctionArn() - awsAccessKey := getEnv("AWS_ACCESS_KEY", getEnv("AWS_ACCESS_KEY_ID", "SOME_ACCESS_KEY_ID")) - awsSecretKey := getEnv("AWS_SECRET_KEY", getEnv("AWS_SECRET_ACCESS_KEY", "SOME_SECRET_ACCESS_KEY")) - awsSessionToken := getEnv("AWS_SESSION_TOKEN", os.Getenv("AWS_SECURITY_TOKEN")) + var runtimeServer *http.Server - os.Setenv("AWS_LAMBDA_FUNCTION_NAME", mockContext.FnName) - os.Setenv("AWS_LAMBDA_FUNCTION_VERSION", mockContext.Version) - os.Setenv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", mockContext.MemSize) - os.Setenv("AWS_LAMBDA_LOG_GROUP_NAME", "/aws/lambda/"+mockContext.FnName) - os.Setenv("AWS_LAMBDA_LOG_STREAM_NAME", logStreamName(mockContext.Version)) - os.Setenv("AWS_REGION", mockContext.Region) - os.Setenv("AWS_DEFAULT_REGION", mockContext.Region) - os.Setenv("_X_AMZN_TRACE_ID", mockContext.XAmznTraceId) - os.Setenv("_HANDLER", handler) + runtimeRouter := createRuntimeRouter() + runtimeServer = &http.Server{Handler: addAPIRoutes(runtimeRouter)} + + go runtimeServer.Serve(runtimeListener) + + exitCode := 0 + + serverInitEnd = time.Now() + + if stayOpen { + if watchMode { + setupFileWatchers() + } + setupSighupHandler() + systemLog(fmt.Sprintf("Lambda API listening on port %s...", apiPort)) + <-interrupt + } else { + res, err := http.Post( + "http://127.0.0.1:"+runtimePort+"/2015-03-31/functions/"+curContext.FnName+"/invocations", + "application/json", + bytes.NewBuffer(eventBody), + ) + if err != nil { + log.Fatal(err) + return + } + functionError := res.Header.Get("X-Amz-Function-Error") + + body, err := ioutil.ReadAll(res.Body) + if err != nil { + log.Fatal(err) + return + } + res.Body.Close() + + fmt.Println("\n" + formatOneLineJSON(body)) + + if functionError != "" { + exitCode = 1 + } + } + + exit(exitCode) +} + +func setupSighupHandler() { + sighupReceiver := make(chan os.Signal, 1) + signal.Notify(sighupReceiver, syscall.SIGHUP) + go func() { + for { + <-sighupReceiver + systemLog(fmt.Sprintf("SIGHUP received, restarting bootstrap...")) + reboot() + } + }() +} + +func setupFileWatchers() { + fileWatcher := make(chan notify.EventInfo, 1) + if err := notify.Watch("/var/task/...", fileWatcher, notify.All); err != nil { + log.Fatal(err) + } + if err := notify.Watch("/opt/...", fileWatcher, notify.All); err != nil { + log.Fatal(err) + } + go func() { + for { + ei := <-fileWatcher + debug("Received notify event: ", ei) + systemLog(fmt.Sprintf("Handler/layer file changed, restarting bootstrap...")) + reboot() + } + }() +} + +func formatOneLineJSON(body []byte) string { + payloadObj := &json.RawMessage{} + if json.Unmarshal(body, payloadObj) == nil { + if formattedPayload, err := json.Marshal(payloadObj); err == nil { + body = formattedPayload + } + } + return string(body) +} - var cmd *exec.Cmd +func ensureBootstrapIsRunning(context *mockLambdaContext) error { + if noBootstrap || bootstrapIsRunning { + return nil + } + bootstrapMutex.Lock() + defer bootstrapMutex.Unlock() + if bootstrapIsRunning { + return nil + } for _, cmdPath := range []string{*bootstrapPath, "/var/task/bootstrap", "/opt/bootstrap"} { if fi, err := os.Stat(cmdPath); err == nil && !fi.IsDir() { - cmd = exec.Command(cmdPath) + bootstrapCmd = exec.Command(cmdPath, bootstrapArgs...) break } } - if cmd == nil { - abortRequest(fmt.Errorf("Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap]")) + if bootstrapCmd == nil { + return fmt.Errorf("Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap]") } - cmd.Env = append(os.Environ(), - "AWS_LAMBDA_RUNTIME_API=127.0.0.1:9001", + awsAccessKey := getEnv("AWS_ACCESS_KEY", os.Getenv("AWS_ACCESS_KEY_ID")) + awsSecretKey := getEnv("AWS_SECRET_KEY", os.Getenv("AWS_SECRET_ACCESS_KEY")) + awsSessionToken := getEnv("AWS_SESSION_TOKEN", os.Getenv("AWS_SECURITY_TOKEN")) + + bootstrapCmd.Env = append(os.Environ(), + "AWS_LAMBDA_RUNTIME_API=127.0.0.1:"+runtimePort, "AWS_ACCESS_KEY_ID="+awsAccessKey, "AWS_SECRET_ACCESS_KEY="+awsSecretKey, ) if len(awsSessionToken) > 0 { - cmd.Env = append(cmd.Env, "AWS_SESSION_TOKEN="+awsSessionToken) + bootstrapCmd.Env = append(bootstrapCmd.Env, "AWS_SESSION_TOKEN="+awsSessionToken) + } + + if stayOpen { + bootstrapCmd.Stdout = io.MultiWriter(os.Stdout, &logsBuf) + bootstrapCmd.Stderr = io.MultiWriter(os.Stderr, &logsBuf) + } else { + bootstrapCmd.Stdout = os.Stderr + bootstrapCmd.Stderr = os.Stderr + } + if !noModifyLogs { + bootstrapCmd.Stdout = &replaceWriter{writer: bootstrapCmd.Stdout, old: []byte("\r"), new: []byte("\n")} + bootstrapCmd.Stderr = &replaceWriter{writer: bootstrapCmd.Stderr, old: []byte("\r"), new: []byte("\n")} + } + + bootstrapCmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} + + if err := bootstrapCmd.Start(); err != nil { + return err + } + + bootstrapIsRunning = true + bootstrapExitedGracefully = false + + // Get an initial read of memory, and update when we finish + context.MaxMem, _ = allProcsMemoryInMb() + + go func() { + bootstrapCmd.Wait() + bootstrapIsRunning = false + curState = "STATE_INIT" + if !bootstrapExitedGracefully { + // context may have changed, use curContext instead + curContext.SetError(fmt.Errorf("Runtime exited without providing a reason")) + } + }() + + return nil +} + +func exit(exitCode int) { + killBootstrap() + os.Exit(exitCode) +} + +func reboot() { + if noBootstrap { + os.Exit(2) + } else { + killBootstrap() } - cmd.Stdout = os.Stderr - cmd.Stderr = os.Stderr - cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} +} + +func killBootstrap() { + bootstrapExitedGracefully = true + if bootstrapCmd != nil && bootstrapCmd.Process != nil { + syscall.Kill(-bootstrapCmd.Process.Pid, syscall.SIGKILL) + } +} + +func waitForContext(context *mockLambdaContext) { + if err := ensureBootstrapIsRunning(context); err != nil { + context.EndInvoke(err) + } else { + eventChan <- context + <-context.Done + } +} - mockContext.Cmd = cmd +func addAPIRoutes(r *chi.Mux) *chi.Mux { + r.Options("/*", func(w http.ResponseWriter, r *http.Request) { + if r.Header.Get("Origin") == "" { + w.WriteHeader(403) + return + } + w.Header().Set("x-amzn-requestid", fakeGUID()) + w.Header().Set("access-control-allow-origin", "*") + w.Header().Set("access-control-expose-headers", "x-amzn-RequestId,x-amzn-ErrorType,x-amzn-ErrorMessage,Date,x-amz-log-result,x-amz-function-error") + w.Header().Set("access-control-max-age", "172800") + if r.Header.Get("Access-Control-Request-Headers") != "" { + w.Header().Set("access-control-allow-headers", r.Header.Get("Access-Control-Request-Headers")) + } + if r.Header.Get("Access-Control-Request-Method") != "" { + w.Header().Set("access-control-allow-methods", r.Header.Get("Access-Control-Request-Method")) + } + w.WriteHeader(200) + }) + + r.Post("/2015-03-31/functions/{function}/invocations", func(w http.ResponseWriter, r *http.Request) { + context := newContext() + + if r.Header.Get("Origin") != "" { + w.Header().Set("access-control-allow-origin", "*") + w.Header().Set("access-control-expose-headers", "x-amzn-RequestId,x-amzn-ErrorType,x-amzn-ErrorMessage,Date,x-amz-log-result,x-amz-function-error") + } + + if r.Header.Get("X-Amz-Invocation-Type") != "" { + context.InvocationType = r.Header.Get("X-Amz-Invocation-Type") + } + if r.Header.Get("X-Amz-Client-Context") != "" { + buf, err := base64.StdEncoding.DecodeString(r.Header.Get("X-Amz-Client-Context")) + if err != nil { + render.Render(w, r, &errResponse{ + HTTPStatusCode: 400, + ErrorType: "ClientContextDecodingError", + ErrorMessage: err.Error(), + }) + return + } + context.ClientContext = string(buf) + } + if r.Header.Get("X-Amz-Log-Type") != "" { + context.LogType = r.Header.Get("X-Amz-Log-Type") + } + + if context.InvocationType == "DryRun" { + w.Header().Set("x-amzn-RequestId", context.RequestID) + w.Header().Set("x-amzn-Remapped-Content-Length", "0") + w.WriteHeader(204) + return + } + + if body, err := ioutil.ReadAll(r.Body); err == nil { + context.EventBody = string(body) + } else { + render.Render(w, r, &errResponse{ + HTTPStatusCode: 500, + ErrorType: "BodyReadError", + ErrorMessage: err.Error(), + }) + return + } + r.Body.Close() + + if context.InvocationType == "Event" { + w.Header().Set("x-amzn-RequestId", context.RequestID) + w.Header().Set("x-amzn-Remapped-Content-Length", "0") + w.Header().Set("X-Amzn-Trace-Id", context.XAmznTraceID) + w.WriteHeader(202) + go waitForContext(context) + return + } + + waitForContext(context) + + w.Header().Set("Content-Type", "application/json") + w.Header().Set("x-amzn-RequestId", context.RequestID) + w.Header().Set("x-amzn-Remapped-Content-Length", "0") + w.Header().Set("X-Amz-Executed-Version", context.Version) + w.Header().Set("X-Amzn-Trace-Id", context.XAmznTraceID) - render.Respond = renderJson + if context.LogType == "Tail" { + // We assume context.LogTail is already base64 encoded + w.Header().Set("X-Amz-Log-Result", context.LogTail) + } + + if context.Reply.Error != nil { + errorType := "Unhandled" + if context.ErrorType != "" { + errorType = context.ErrorType + } + w.Header().Set("X-Amz-Function-Error", errorType) + } + + // Lambda will usually return the payload instead of an error if the payload exists + if len(context.Reply.Payload) > 0 { + w.Header().Set("Content-Length", strconv.FormatInt(int64(len(context.Reply.Payload)), 10)) + w.Write(context.Reply.Payload) + return + } + + if payload, err := json.Marshal(context.Reply.Error); err == nil { + w.Header().Set("Content-Length", strconv.FormatInt(int64(len(payload)), 10)) + w.Write(payload) + } else { + render.Render(w, r, &errResponse{ + HTTPStatusCode: 500, + ErrorType: "ErrorMarshalError", + ErrorMessage: err.Error(), + }) + } + }) + return r +} +func createRuntimeRouter() *chi.Mux { r := chi.NewRouter() r.Route("/2018-06-01", func(r chi.Router) { @@ -137,34 +468,58 @@ func main() { r.Route("/runtime", func(r chi.Router) { r. With(updateState("STATE_INIT_ERROR")). - Post("/init/error", handleErrorRequest) + Post("/init/error", func(w http.ResponseWriter, r *http.Request) { + debug("In /init/error") + curContext = <-eventChan + handleErrorRequest(w, r) + curContext.EndInvoke(nil) + }) r. With(updateState("STATE_INVOKE_NEXT")). Get("/invocation/next", func(w http.ResponseWriter, r *http.Request) { - if mockContext.RequestId == "" { - mockContext.RequestId = curRequestID - mockContext.InitEnd = time.Now() - logStartRequest() - } else if mockContext.Reply != nil { - endInvoke(nil) + debug("In /invocation/next") + + if curContext.Reply != nil { + debug("Reply is not nil") + curContext.EndInvoke(nil) + } + + closeNotify := w.(http.CloseNotifier).CloseNotify() + go func() { + <-closeNotify + debug("Connection closed, sending ignore event") + eventChan <- &mockLambdaContext{Ignore: true} + }() + + debug("Waiting for next event...") + context := <-eventChan + if context.Ignore { + debug("Ignore event received, returning") + w.Write([]byte{}) return } + curContext = context + context.LogStartRequest() w.Header().Set("Content-Type", "application/json") - w.Header().Set("Lambda-Runtime-Aws-Request-Id", curRequestID) - w.Header().Set("Lambda-Runtime-Deadline-Ms", strconv.FormatInt(mockContext.Deadline().UnixNano()/1e6, 10)) - w.Header().Set("Lambda-Runtime-Invoked-Function-Arn", mockContext.InvokedFunctionArn) - w.Header().Set("Lambda-Runtime-Trace-Id", mockContext.XAmznTraceId) + w.Header().Set("Lambda-Runtime-Aws-Request-Id", context.RequestID) + w.Header().Set("Lambda-Runtime-Deadline-Ms", strconv.FormatInt(context.Deadline().UnixNano()/int64(time.Millisecond), 10)) + w.Header().Set("Lambda-Runtime-Invoked-Function-Arn", context.InvokedFunctionArn) + w.Header().Set("Lambda-Runtime-Trace-Id", context.XAmznTraceID) - if mockContext.ClientContext != "" { - w.Header().Set("Lambda-Runtime-Client-Context", mockContext.ClientContext) + if context.ClientContext != "" { + w.Header().Set("Lambda-Runtime-Client-Context", context.ClientContext) } - if mockContext.CognitoIdentity != "" { - w.Header().Set("Lambda-Runtime-Cognito-Identity", mockContext.CognitoIdentity) + if context.CognitoIdentity != "" { + w.Header().Set("Lambda-Runtime-Cognito-Identity", context.CognitoIdentity) + } + + if context.LogType != "" { + w.Header().Set("Docker-Lambda-Log-Type", context.LogType) } - w.Write([]byte(eventBody)) + w.Write([]byte(context.EventBody)) }) r.Route("/invocation/{requestID}", func(r chi.Router) { @@ -175,17 +530,22 @@ func main() { Post("/response", func(w http.ResponseWriter, r *http.Request) { body, err := ioutil.ReadAll(r.Body) if err != nil { - render.Render(w, r, &ErrResponse{ + render.Render(w, r, &errResponse{ HTTPStatusCode: 500, - ErrorType: "BodyReadError", // TODO: not sure what this would be in production? + ErrorType: "BodyReadError", // Not sure what this would be in production? ErrorMessage: err.Error(), }) return } + r.Body.Close() - mockContext.Reply = &InvokeResponse{Payload: body} + debug("Setting Reply in /response") + curContext.Reply = &invokeResponse{Payload: body} - render.Render(w, r, okStatusResponse) + curContext.SetLogTail(r) + curContext.SetInitEnd(r) + + render.Render(w, r, acceptedResponse) w.(http.Flusher).Flush() }) @@ -195,69 +555,46 @@ func main() { }) }) }) - - listener, err := net.Listen("tcp", ":9001") - if err != nil { - abortRequest(err) - return - } - - server := &http.Server{Handler: r} - - go server.Serve(listener) - - res, err := http.Get("http://" + listener.Addr().String() + "/2018-06-01/ping") - if err != nil { - abortRequest(err) - return - } - body, err := ioutil.ReadAll(res.Body) - if err != nil || string(body) != "pong" { - abortRequest(err) - return - } - - if err := cmd.Start(); err != nil { - abortRequest(err) - return - } - go func() { - cmd.Wait() - if mockContext.Reply == nil { - abortRequest(fmt.Errorf("Runtime exited without providing a reason")) - } - }() - - <-mockContext.Done + return r } func handleErrorRequest(w http.ResponseWriter, r *http.Request) { - lambdaErr := &LambdaError{} - statusResponse := okStatusResponse + lambdaErr := &lambdaError{} + response := acceptedResponse body, err := ioutil.ReadAll(r.Body) if err != nil || json.Unmarshal(body, lambdaErr) != nil { - statusResponse = &StatusResponse{Status: "InvalidErrorShape", HTTPStatusCode: 299} + debug("Could not parse error body as JSON") + debug(body) + response = &statusResponse{Status: "InvalidErrorShape", HTTPStatusCode: 299} + lambdaErr = &lambdaError{Message: "InvalidErrorShape"} } + r.Body.Close() errorType := r.Header.Get("Lambda-Runtime-Function-Error-Type") if errorType != "" { - lambdaErr.Type = errorType + curContext.ErrorType = errorType } - mockContext.Reply = &InvokeResponse{Error: lambdaErr} + // TODO: Figure out whether we want to handle Lambda-Runtime-Function-XRay-Error-Cause - render.Render(w, r, statusResponse) - w.(http.Flusher).Flush() + debug("Setting Reply in handleErrorRequest") + debug(lambdaErr) + + curContext.Reply = &invokeResponse{Error: lambdaErr} + + curContext.SetLogTail(r) + curContext.SetInitEnd(r) - endInvoke(nil) + render.Render(w, r, response) + w.(http.Flusher).Flush() } func updateState(nextState string) func(http.Handler) http.Handler { return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if _, ok := transitions[nextState][curState]; !ok { - render.Render(w, r, &ErrResponse{ + render.Render(w, r, &errResponse{ HTTPStatusCode: 403, ErrorType: "InvalidStateTransition", ErrorMessage: fmt.Sprintf("Transition from %s to %s is not allowed.", curState, nextState), @@ -274,8 +611,8 @@ func awsRequestIDValidator(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { requestID := chi.URLParam(r, "requestID") - if requestID != curRequestID { - render.Render(w, r, &ErrResponse{ + if requestID != curContext.RequestID { + render.Render(w, r, &errResponse{ HTTPStatusCode: 400, ErrorType: "InvalidRequestID", ErrorMessage: "Invalid request ID", @@ -283,34 +620,34 @@ func awsRequestIDValidator(next http.Handler) http.Handler { return } - ctx := context.WithValue(r.Context(), "requestID", requestID) + ctx := context.WithValue(r.Context(), keyRequestID, requestID) next.ServeHTTP(w, r.WithContext(ctx)) }) } -type StatusResponse struct { +type statusResponse struct { HTTPStatusCode int `json:"-"` Status string `json:"status"` } -func (sr *StatusResponse) Render(w http.ResponseWriter, r *http.Request) error { +func (sr *statusResponse) Render(w http.ResponseWriter, r *http.Request) error { render.Status(r, sr.HTTPStatusCode) return nil } -type ErrResponse struct { +type errResponse struct { HTTPStatusCode int `json:"-"` ErrorType string `json:"errorType,omitempty"` ErrorMessage string `json:"errorMessage"` } -func (e *ErrResponse) Render(w http.ResponseWriter, r *http.Request) error { +func (e *errResponse) Render(w http.ResponseWriter, r *http.Request) error { render.Status(r, e.HTTPStatusCode) return nil } -func renderJson(w http.ResponseWriter, r *http.Request, v interface{}) { +func renderJSON(w http.ResponseWriter, r *http.Request, v interface{}) { buf := &bytes.Buffer{} enc := json.NewEncoder(buf) enc.SetEscapeHTML(true) @@ -326,95 +663,6 @@ func renderJson(w http.ResponseWriter, r *http.Request, v interface{}) { w.Write(buf.Bytes()) } -func abortRequest(err error) { - endInvoke(&ExitError{err: err}) -} - -func endInvoke(err error) { - logStart := false - if mockContext.RequestId == "" { - mockContext.RequestId = curRequestID - logStart = true - } - mockContext.MaxMem, _ = allProcsMemoryInMb() - if mockContext.Cmd != nil && mockContext.Cmd.Process != nil { - syscall.Kill(-mockContext.Cmd.Process.Pid, syscall.SIGKILL) - } - if logStart { - logStartRequest() - } - logEndRequest(err) - mockContext.Done <- true -} - -func logStartRequest() { - systemLog("START RequestId: " + mockContext.RequestId + " Version: " + mockContext.Version) -} - -func logEndRequest(err error) { - if mockContext.InitEnd.IsZero() { - mockContext.InitEnd = time.Now() - } - - initDiffMs := math.Min(float64(mockContext.InitEnd.Sub(mockContext.Start).Nanoseconds()), - float64(mockContext.TimeoutDuration.Nanoseconds())) / 1e6 - - diffMs := math.Min(float64(time.Now().Sub(mockContext.InitEnd).Nanoseconds()), - float64(mockContext.TimeoutDuration.Nanoseconds())) / 1e6 - - initStr := "" - if mockContext.Cmd != nil && mockContext.Cmd.Path != "/var/runtime/bootstrap" { - initStr = fmt.Sprintf("Init Duration: %.2f ms\t", initDiffMs) - } - - systemLog("END RequestId: " + mockContext.RequestId) - systemLog(fmt.Sprintf( - "REPORT RequestId: %s\t"+ - initStr+ - "Duration: %.2f ms\t"+ - "Billed Duration: %.f ms\t"+ - "Memory Size: %s MB\t"+ - "Max Memory Used: %d MB\t", - mockContext.RequestId, diffMs, math.Ceil(diffMs/100)*100, mockContext.MemSize, mockContext.MaxMem)) - - if err == nil && mockContext.HasExpired() { - err = mockContext.TimeoutErr() - } - - if err != nil { - responseErr := LambdaError{ - Message: err.Error(), - Type: getErrorType(err), - } - if responseErr.Type == "errorString" { - responseErr.Type = "" - if responseErr.Message == "unexpected EOF" { - responseErr.Message = "RequestId: " + mockContext.RequestId + " Process exited before completing request" - } - } else if responseErr.Type == "ExitError" { - responseErr.Type = "Runtime.ExitError" // XXX: Hack to add 'Runtime.' to error type - } - systemErr(&responseErr) - os.Exit(1) - } - - if mockContext.Reply.Error != nil { - systemErr(mockContext.Reply.Error) - os.Exit(1) - } - - // Try to format json as one line – if it's json - payload := mockContext.Reply.Payload - payloadObj := &json.RawMessage{} - if json.Unmarshal(payload, payloadObj) == nil { - if formattedPayload, err := json.Marshal(payloadObj); err == nil { - payload = formattedPayload - } - } - - fmt.Println(string(payload)) -} - func getEnv(key, fallback string) string { value := os.Getenv(key) if value != "" { @@ -423,7 +671,7 @@ func getEnv(key, fallback string) string { return fallback } -func fakeGuid() string { +func fakeGUID() string { randBuf := make([]byte, 16) rand.Read(randBuf) @@ -454,9 +702,9 @@ func logStreamName(version string) string { return time.Now().Format("2006/01/02") + "/[" + version + "]" + string(hexBuf) } -func arn(region string, accountId string, fnName string) string { +func arn(region string, accountID string, fnName string) string { nonDigit := regexp.MustCompile(`[^\d]`) - return "arn:aws:lambda:" + region + ":" + nonDigit.ReplaceAllString(accountId, "") + ":function:" + fnName + return "arn:aws:lambda:" + region + ":" + nonDigit.ReplaceAllString(accountID, "") + ":function:" + fnName } func allProcsMemoryInMb() (uint64, error) { @@ -507,61 +755,68 @@ func calculateMemoryInKb(pid int) (uint64, error) { } func getErrorType(err interface{}) string { - if errorType := reflect.TypeOf(err); errorType.Kind() == reflect.Ptr { + errorType := reflect.TypeOf(err) + if errorType.Kind() == reflect.Ptr { return errorType.Elem().Name() - } else { - return errorType.Name() } + return errorType.Name() } -func systemLog(msg string) { - fmt.Fprintln(os.Stderr, "\033[32m"+msg+"\033[0m") +func debug(v ...interface{}) { + if logDebug { + log.Println(v...) + } } -// Try to match the output of the Lambda web console -func systemErr(err *LambdaError) { - jsonBytes, _ := json.MarshalIndent(err, "", " ") - fmt.Fprintln(os.Stderr, "\033[31m"+string(jsonBytes)+"\033[0m") +func systemLog(msg string) { + fmt.Fprintln(os.Stderr, "\033[32m"+msg+"\033[0m") } -type ExitError struct { - err error +type exitError struct { + err error + context *mockLambdaContext } -func (e *ExitError) Error() string { - return fmt.Sprintf("RequestId: %s Error: %s", curRequestID, e.err.Error()) +func (e *exitError) Error() string { + return fmt.Sprintf("RequestId: %s Error: %s", e.context.RequestID, e.err.Error()) } -type LambdaError struct { - Type string `json:"errorType,omitempty"` - Message string `json:"errorMessage"` - StackTrace []*string `json:"stackTrace,omitempty"` +type lambdaError struct { + Type string `json:"errorType,omitempty"` + Message string `json:"errorMessage"` + StackTrace []*string `json:"stackTrace,omitempty"` + Cause *lambdaError `json:"cause,omitempty"` } -type MockLambdaContext struct { - RequestId string +type mockLambdaContext struct { + RequestID string EventBody string FnName string Version string MemSize string Timeout string Region string - AccountId string - XAmznTraceId string + AccountID string + XAmznTraceID string InvokedFunctionArn string ClientContext string CognitoIdentity string Start time.Time + InvokeWait time.Time InitEnd time.Time TimeoutDuration time.Duration - Pid int - Reply *InvokeResponse + Reply *invokeResponse Done chan bool - Cmd *exec.Cmd MaxMem uint64 + InvocationType string + LogType string + LogTail string // base64 encoded tail, no greater than 4096 bytes + ErrorType string // Unhandled vs Handled + Ended bool + Ignore bool } -func (mc *MockLambdaContext) ParseTimeout() { +func (mc *mockLambdaContext) ParseTimeout() { timeoutDuration, err := time.ParseDuration(mc.Timeout + "s") if err != nil { panic(err) @@ -569,24 +824,174 @@ func (mc *MockLambdaContext) ParseTimeout() { mc.TimeoutDuration = timeoutDuration } -func (mc *MockLambdaContext) ParseFunctionArn() { - mc.InvokedFunctionArn = getEnv("AWS_LAMBDA_FUNCTION_INVOKED_ARN", arn(mc.Region, mc.AccountId, mc.FnName)) +func (mc *mockLambdaContext) ParseFunctionArn() { + mc.InvokedFunctionArn = getEnv("AWS_LAMBDA_FUNCTION_INVOKED_ARN", arn(mc.Region, mc.AccountID, mc.FnName)) } -func (mc *MockLambdaContext) Deadline() time.Time { +func (mc *mockLambdaContext) Deadline() time.Time { return mc.Start.Add(mc.TimeoutDuration) } -func (mc *MockLambdaContext) HasExpired() bool { +func (mc *mockLambdaContext) HasExpired() bool { return time.Now().After(mc.Deadline()) } -func (mc *MockLambdaContext) TimeoutErr() error { +func (mc *mockLambdaContext) TimeoutErr() error { return fmt.Errorf("%s %s Task timed out after %s.00 seconds", time.Now().Format("2006-01-02T15:04:05.999Z"), - mc.RequestId, mc.Timeout) + mc.RequestID, mc.Timeout) +} + +func (mc *mockLambdaContext) SetLogTail(r *http.Request) { + defer logsBuf.Reset() + + mc.LogTail = "" + + if mc.LogType != "Tail" { + return + } + if noBootstrap { + mc.LogTail = r.Header.Get("Docker-Lambda-Log-Result") + return + } + + // This is very annoying but seems to be necessary to ensure we get all the stdout/stderr from the subprocess + time.Sleep(1 * time.Millisecond) + + logs := logsBuf.Bytes() + + if len(logs) == 0 { + return + } + + if len(logs) > 4096 { + logs = logs[len(logs)-4096:] + } + mc.LogTail = base64.StdEncoding.EncodeToString(logs) +} + +func (mc *mockLambdaContext) SetInitEnd(r *http.Request) { + invokeWaitHeader := r.Header.Get("Docker-Lambda-Invoke-Wait") + if invokeWaitHeader != "" { + invokeWaitMs, err := strconv.ParseInt(invokeWaitHeader, 10, 64) + if err != nil { + log.Fatal(fmt.Errorf("Could not parse Docker-Lambda-Invoke-Wait header as int. Error: %s", err)) + return + } + mc.InvokeWait = time.Unix(0, invokeWaitMs*int64(time.Millisecond)) + } + initEndHeader := r.Header.Get("Docker-Lambda-Init-End") + if initEndHeader != "" { + initEndMs, err := strconv.ParseInt(initEndHeader, 10, 64) + if err != nil { + log.Fatal(fmt.Errorf("Could not parse Docker-Lambda-Init-End header as int. Error: %s", err)) + return + } + mc.InitEnd = time.Unix(0, initEndMs*int64(time.Millisecond)) + } +} + +func (mc *mockLambdaContext) SetError(exitErr error) { + err := &exitError{err: exitErr, context: mc} + responseErr := lambdaError{ + Message: err.Error(), + Type: getErrorType(err), + } + if responseErr.Type == "errorString" { + responseErr.Type = "" + if responseErr.Message == "unexpected EOF" { + responseErr.Message = "RequestId: " + mc.RequestID + " Process exited before completing request" + } + } else if responseErr.Type == "ExitError" { + responseErr.Type = "Runtime.ExitError" // XXX: Hack to add 'Runtime.' to error type + } + debug("Setting Reply in SetError") + debug(responseErr) + if mc.Reply == nil { + mc.Reply = &invokeResponse{Error: &responseErr} + } else { + mc.Reply.Error = &responseErr + } +} + +func (mc *mockLambdaContext) EndInvoke(exitErr error) { + debug("EndInvoke()") + if mc.Ended { + return + } + mc.Ended = true + if exitErr != nil { + debug(exitErr) + mc.SetError(exitErr) + } else if (mc.Reply == nil || mc.Reply.Error == nil) && mc.HasExpired() { + mc.Reply = &invokeResponse{ + Error: &lambdaError{ + Message: mc.TimeoutErr().Error(), + }, + } + } + if mc.InitEnd.IsZero() { + mc.LogStartRequest() + } + + mc.LogEndRequest() + + if exitErr == nil { + mc.Done <- true + } +} + +func (mc *mockLambdaContext) LogStartRequest() { + mc.InitEnd = time.Now() + systemLog("START RequestId: " + mc.RequestID + " Version: " + mc.Version) +} + +func (mc *mockLambdaContext) LogEndRequest() { + maxMem, _ := allProcsMemoryInMb() + if maxMem > mc.MaxMem { + mc.MaxMem = maxMem + } + + diffMs := math.Min(float64(time.Now().Sub(mc.InitEnd).Nanoseconds()), + float64(mc.TimeoutDuration.Nanoseconds())) / float64(time.Millisecond) + + initStr := "" + if !initPrinted { + proc1stat, _ := os.Stat("/proc/1") + processStartTime := proc1stat.ModTime() + if mc.InvokeWait.IsZero() { + mc.InvokeWait = serverInitEnd + } + if mc.InvokeWait.Before(processStartTime) { + mc.InvokeWait = processStartTime + } + initDiffNs := mc.InvokeWait.Sub(proc1stat.ModTime()).Nanoseconds() + mc.InitEnd.Sub(mc.Start).Nanoseconds() + initDiffMs := math.Min(float64(initDiffNs), float64(mc.TimeoutDuration.Nanoseconds())) / float64(time.Millisecond) + initStr = fmt.Sprintf("Init Duration: %.2f ms\t", initDiffMs) + initPrinted = true + } + + systemLog("END RequestId: " + mc.RequestID) + systemLog(fmt.Sprintf( + "REPORT RequestId: %s\t"+ + initStr+ + "Duration: %.2f ms\t"+ + "Billed Duration: %.f ms\t"+ + "Memory Size: %s MB\t"+ + "Max Memory Used: %d MB\t", + mc.RequestID, diffMs, math.Ceil(diffMs), mc.MemSize, mc.MaxMem)) } -type InvokeResponse struct { +type invokeResponse struct { Payload []byte - Error *LambdaError + Error *lambdaError +} + +type replaceWriter struct { + writer io.Writer + old []byte + new []byte +} + +func (r *replaceWriter) Write(p []byte) (n int, err error) { + return r.writer.Write(bytes.ReplaceAll(p, r.old, r.new)) } diff --git a/python2.7/build/Dockerfile b/python2.7/build/Dockerfile index 04da0df6..520142fd 100644 --- a/python2.7/build/Dockerfile +++ b/python2.7/build/Dockerfile @@ -1,12 +1,17 @@ +FROM lambci/lambda:python2.7 + FROM lambci/lambda-base:build -ENV AWS_EXECUTION_ENV=AWS_Lambda_python2.7 \ - PYTHONPATH=/var/runtime +ENV AWS_EXECUTION_ENV=AWS_Lambda_python2.7 -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/python2.7.tgz | tar -zx -C / +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid # Add these as a separate layer as they get updated frequently -RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U virtualenv pipenv --no-cache-dir && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/2.7/get-pip.py | python && \ + pip install -U 'virtualenv>=16.0.0,<20.0.0' pipenv wheel --no-cache-dir && \ + curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/1.1.4/get-poetry.py | POETRY_VERSION=1.1.4 python && \ + pip install -U awscli boto3 aws-sam-cli==0.22.0 aws-lambda-builders==0.4.0 --no-cache-dir + +ENV PATH=/root/.poetry/bin:$PATH diff --git a/python2.7/run/Dockerfile b/python2.7/run/Dockerfile index 17e68bd4..d90f8827 100644 --- a/python2.7/run/Dockerfile +++ b/python2.7/run/Dockerfile @@ -1,3 +1,6 @@ +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV AWS_EXECUTION_ENV=AWS_Lambda_python2.7 @@ -6,7 +9,9 @@ RUN rm -rf /var/runtime /var/lang && \ curl https://lambci.s3.amazonaws.com/fs/python2.7.tgz | tar -zx -C / RUN rm /var/runtime/awslambda/runtime.so -COPY runtime-mock.py /var/runtime/awslambda/runtime.py +COPY runtime_mock.py /var/runtime/awslambda/runtime.py + +COPY --from=0 /var/runtime/init /var/runtime/mockserver USER sbx_user1051 diff --git a/python2.7/run/runtime-mock.py b/python2.7/run/runtime-mock.py deleted file mode 100644 index fc590f8a..00000000 --- a/python2.7/run/runtime-mock.py +++ /dev/null @@ -1,174 +0,0 @@ -from __future__ import print_function -import sys -import os -import random -import uuid -import time -import resource -import datetime - -orig_stdout = sys.stdout -orig_stderr = sys.stderr - -def eprint(*args, **kwargs): - print(*args, file=orig_stderr, **kwargs) - -def _random_account_id(): - return random.randint(100000000000, 999999999999) - -def _random_invoke_id(): - return str(uuid.uuid4()) - -def _arn(region, account_id, fct_name): - return 'arn:aws:lambda:%s:%s:function:%s' % (region, account_id, fct_name) - -_GLOBAL_HANDLER = sys.argv[1] if len(sys.argv) > 1 else os.environ.get('AWS_LAMBDA_FUNCTION_HANDLER', - os.environ.get('_HANDLER', 'lambda_function.lambda_handler')) -_GLOBAL_EVENT_BODY = sys.argv[2] if len(sys.argv) > 2 else os.environ.get('AWS_LAMBDA_EVENT_BODY', - (sys.stdin.read() if os.environ.get('DOCKER_LAMBDA_USE_STDIN', False) else '{}')) -_GLOBAL_FCT_NAME = os.environ.get('AWS_LAMBDA_FUNCTION_NAME', 'test') -_GLOBAL_VERSION = os.environ.get('AWS_LAMBDA_FUNCTION_VERSION', '$LATEST') -_GLOBAL_MEM_SIZE = os.environ.get('AWS_LAMBDA_FUNCTION_MEMORY_SIZE', '1536') -_GLOBAL_TIMEOUT = int(os.environ.get('AWS_LAMBDA_FUNCTION_TIMEOUT', '300')) -_GLOBAL_REGION = os.environ.get('AWS_REGION', os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')) -_GLOBAL_ACCOUNT_ID = os.environ.get('AWS_ACCOUNT_ID', _random_account_id()) -_GLOBAL_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', 'SOME_ACCESS_KEY_ID') -_GLOBAL_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', 'SOME_SECRET_ACCESS_KEY') -_GLOBAL_SESSION_TOKEN = os.environ.get('AWS_SESSION_TOKEN', None) - -_GLOBAL_INVOKEID = _random_invoke_id() -_GLOBAL_MODE = 'event' # Either 'http' or 'event' -_GLOBAL_SUPRESS_INIT = True # Forces calling _get_handlers_delayed() -_GLOBAL_DATA_SOCK = -1 -_GLOBAL_CONTEXT_OBJS = { - 'clientcontext': None, - 'cognitoidentityid': None, - 'cognitopoolid': None, -} -_GLOBAL_CREDENTIALS = { - 'key': _GLOBAL_ACCESS_KEY_ID, - 'secret': _GLOBAL_SECRET_ACCESS_KEY, - 'session': _GLOBAL_SESSION_TOKEN -} -_GLOBAL_INVOKED_FUNCTION_ARN = os.environ.get('AWS_LAMBDA_FUNCTION_INVOKED_ARN', _arn(_GLOBAL_REGION, _GLOBAL_ACCOUNT_ID, _GLOBAL_FCT_NAME)) -_GLOBAL_XRAY_TRACE_ID = os.environ.get('_X_AMZN_TRACE_ID', None) -_GLOBAL_XRAY_PARENT_ID = None -_GLOBAL_XRAY_SAMPLED = None -_GLOBAL_X_AMZN_TRACE_ID = None -_GLOBAL_INVOKED = False -_GLOBAL_ERRORED = False -_GLOBAL_START_TIME = None -_GLOBAL_TODAY = datetime.date.today() -# export needed stuff -os.environ['AWS_LAMBDA_LOG_GROUP_NAME'] = '/aws/lambda/%s' % _GLOBAL_FCT_NAME -os.environ['AWS_LAMBDA_LOG_STREAM_NAME'] = "%s/%s/%s/[%s]%s" % ( - _GLOBAL_TODAY.year, - _GLOBAL_TODAY.month, - _GLOBAL_TODAY.day, - _GLOBAL_VERSION, - '%016x' % random.randrange(16**16) - ) -os.environ["AWS_LAMBDA_FUNCTION_NAME"] = _GLOBAL_FCT_NAME -os.environ['AWS_LAMBDA_FUNCTION_MEMORY_SIZE'] = _GLOBAL_MEM_SIZE -os.environ['AWS_LAMBDA_FUNCTION_VERSION'] = _GLOBAL_VERSION -os.environ['AWS_REGION'] = _GLOBAL_REGION -os.environ['AWS_DEFAULT_REGION'] = _GLOBAL_REGION -os.environ['_HANDLER'] = _GLOBAL_HANDLER - -def report_user_init_start(): - return - -def report_user_init_end(): - return - -def report_user_invoke_start(): - return - -def report_user_invoke_end(): - return - -def receive_start(): - sys.stdout = orig_stderr - sys.stderr = orig_stderr - return ( - _GLOBAL_INVOKEID, - _GLOBAL_MODE, - _GLOBAL_HANDLER, - _GLOBAL_SUPRESS_INIT, - _GLOBAL_CREDENTIALS - ) - -def report_running(invokeid): - return - -def receive_invoke(): - global _GLOBAL_INVOKED - global _GLOBAL_START_TIME - - if not _GLOBAL_INVOKED: - eprint( - "START RequestId: %s Version: %s" % - (_GLOBAL_INVOKEID, _GLOBAL_VERSION) - ) - _GLOBAL_INVOKED = True - _GLOBAL_START_TIME = time.time() - - return ( - _GLOBAL_INVOKEID, - _GLOBAL_DATA_SOCK, - _GLOBAL_CREDENTIALS, - _GLOBAL_EVENT_BODY, - _GLOBAL_CONTEXT_OBJS, - _GLOBAL_INVOKED_FUNCTION_ARN, - _GLOBAL_XRAY_TRACE_ID, - ) - -def report_fault(invokeid, msg, except_value, trace): - global _GLOBAL_ERRORED - - _GLOBAL_ERRORED = True - - if msg and except_value: - eprint('%s: %s' % (msg, except_value)) - if trace: - eprint('%s' % trace) - return - -def report_done(invokeid, errortype, result, is_fatal): - global _GLOBAL_INVOKED - global _GLOBAL_ERRORED - - if _GLOBAL_INVOKED: - eprint("END RequestId: %s" % invokeid) - - duration = int((time.time() - _GLOBAL_START_TIME) * 1000) - billed_duration = min(100 * int((duration / 100) + 1), _GLOBAL_TIMEOUT * 1000) - max_mem = int(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024) - - eprint( - "REPORT RequestId: %s Duration: %s ms Billed Duration: %s ms Memory Size: %s MB Max Memory Used: %s MB" % ( - invokeid, duration, billed_duration, _GLOBAL_MEM_SIZE, max_mem - ) - ) - if result: - print('\n' + result, file=orig_stdout) - sys.exit(1 if _GLOBAL_ERRORED else 0) - else: - return - -def report_xray_exception(xray_json): - return - -def log_bytes(msg, fileno): - eprint(msg) - return - -def log_sb(msg): - return - -def get_remaining_time(): - return ((_GLOBAL_TIMEOUT * 1000) - int((time.time() - _GLOBAL_START_TIME) * 1000)) - -def send_console_message(msg, byte_length): - eprint(msg) - return diff --git a/python2.7/run/runtime_mock.py b/python2.7/run/runtime_mock.py new file mode 100644 index 00000000..a52ffe80 --- /dev/null +++ b/python2.7/run/runtime_mock.py @@ -0,0 +1,286 @@ +# pylint: disable=missing-docstring, global-statement, unused-argument, broad-except + +from __future__ import print_function +import sys +import os +import random +import uuid +import time +import datetime +import subprocess +import json +import traceback +import base64 +import signal +try: + # for python 3 + from http.client import HTTPConnection +except ImportError: + # for python 2 + from httplib import HTTPConnection + + +ORIG_STDOUT = sys.stdout +ORIG_STDERR = sys.stderr + +LOGS = '' +LOG_TAIL = False + +STAY_OPEN = os.environ.get('DOCKER_LAMBDA_STAY_OPEN', '') + +HANDLER = sys.argv[1] if len(sys.argv) > 1 else os.environ.get('AWS_LAMBDA_FUNCTION_HANDLER', \ + os.environ.get('_HANDLER', 'lambda_function.lambda_handler')) +EVENT_BODY = sys.argv[2] if len(sys.argv) > 2 else os.environ.get('AWS_LAMBDA_EVENT_BODY', \ + (sys.stdin.read() if os.environ.get('DOCKER_LAMBDA_USE_STDIN', False) else '{}')) +FUNCTION_NAME = os.environ.get('AWS_LAMBDA_FUNCTION_NAME', 'test') +FUNCTION_VERSION = os.environ.get('AWS_LAMBDA_FUNCTION_VERSION', '$LATEST') +MEM_SIZE = os.environ.get('AWS_LAMBDA_FUNCTION_MEMORY_SIZE', '1536') +DEADLINE_MS = int(time.time() * 1000) + int(os.environ.get('AWS_LAMBDA_FUNCTION_TIMEOUT', '300')) +REGION = os.environ.get('AWS_REGION', os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')) +ACCOUNT_ID = os.environ.get('AWS_ACCOUNT_ID', random.randint(100000000000, 999999999999)) +ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', None) +SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', None) +SESSION_TOKEN = os.environ.get('AWS_SESSION_TOKEN', None) + +INVOKEID = str(uuid.uuid4()) +INVOKE_MODE = 'event' # Either 'http' or 'event' +SUPPRESS_INIT = True # Forces calling _get_handlers_delayed() +THROTTLED = False +DATA_SOCK = -1 +CONTEXT_OBJS = { + 'clientcontext': None, + 'cognitoidentityid': None, + 'cognitopoolid': None, +} +CREDENTIALS = { + 'key': ACCESS_KEY_ID, + 'secret': SECRET_ACCESS_KEY, + 'session': SESSION_TOKEN +} +INVOKED_FUNCTION_ARN = os.environ.get('AWS_LAMBDA_FUNCTION_INVOKED_ARN', \ + 'arn:aws:lambda:%s:%s:function:%s' % (REGION, ACCOUNT_ID, FUNCTION_NAME)) +XRAY_TRACE_ID = os.environ.get('_X_AMZN_TRACE_ID', None) +XRAY_PARENT_ID = None +XRAY_SAMPLED = None +TRACE_ID = None +INVOKED = False +ERRORED = False +INIT_END_SENT = False +INIT_END = time.time() +RECEIVED_INVOKE_AT = time.time() +TODAY = datetime.date.today() +# export needed stuff +os.environ['AWS_LAMBDA_LOG_GROUP_NAME'] = '/aws/lambda/%s' % FUNCTION_NAME +os.environ['AWS_LAMBDA_LOG_STREAM_NAME'] = "%s/%s/%s/[%s]%s" % ( + TODAY.year, + TODAY.month, + TODAY.day, + FUNCTION_VERSION, + '%016x' % random.randrange(16**16) +) +os.environ["AWS_LAMBDA_FUNCTION_NAME"] = FUNCTION_NAME +os.environ['AWS_LAMBDA_FUNCTION_MEMORY_SIZE'] = MEM_SIZE +os.environ['AWS_LAMBDA_FUNCTION_VERSION'] = FUNCTION_VERSION +os.environ['AWS_REGION'] = REGION +os.environ['AWS_DEFAULT_REGION'] = REGION +os.environ['_HANDLER'] = HANDLER + +MOCKSERVER_ENV = os.environ.copy() +MOCKSERVER_ENV['DOCKER_LAMBDA_NO_BOOTSTRAP'] = '1' +MOCKSERVER_ENV['DOCKER_LAMBDA_USE_STDIN'] = '1' + +MOCKSERVER_PROCESS = subprocess.Popen( + '/var/runtime/mockserver', stdin=subprocess.PIPE, env=MOCKSERVER_ENV) +MOCKSERVER_PROCESS.stdin.write(EVENT_BODY.encode()) +MOCKSERVER_PROCESS.stdin.close() + +MOCKSERVER_CONN = HTTPConnection("127.0.0.1", 9001) + + +def sighup_handler(signum, frame): + eprint("SIGHUP received, exiting runtime...") + sys.exit(2) + +signal.signal(signal.SIGINT, lambda x, y: sys.exit(0)) +signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0)) +signal.signal(signal.SIGHUP, sighup_handler) + + +def eprint(*args, **kwargs): + print(*args, file=ORIG_STDERR, **kwargs) + + +def report_user_init_start(): + return + + +def report_user_init_end(): + global INIT_END + INIT_END = time.time() + + +def report_user_invoke_start(): + return + + +def report_user_invoke_end(): + return + + +def receive_start(): + global MOCKSERVER_CONN + + ping_timeout = time.time() + 1 + while True: + try: + MOCKSERVER_CONN = HTTPConnection("127.0.0.1", 9001) + MOCKSERVER_CONN.request("GET", "/2018-06-01/ping") + resp = MOCKSERVER_CONN.getresponse() + if resp.status != 200: + raise Exception("Mock server returned %d" % resp.status) + resp.read() + break + except Exception: + if time.time() > ping_timeout: + raise + else: + time.sleep(.005) + continue + return ( + INVOKEID, + INVOKE_MODE, + HANDLER, + SUPPRESS_INIT, + THROTTLED, + CREDENTIALS + ) + + +def report_running(invokeid): + return + + +def receive_invoke(): + global INVOKED + global INVOKEID + global DEADLINE_MS + global INVOKED_FUNCTION_ARN + global XRAY_TRACE_ID + global EVENT_BODY + global CONTEXT_OBJS + global LOGS + global LOG_TAIL + global RECEIVED_INVOKE_AT + + ORIG_STDOUT.flush() + ORIG_STDERR.flush() + + if not INVOKED: + RECEIVED_INVOKE_AT = time.time() + INVOKED = True + else: + LOGS = "" + + try: + MOCKSERVER_CONN.request("GET", "/2018-06-01/runtime/invocation/next") + resp = MOCKSERVER_CONN.getresponse() + if resp.status != 200: + raise Exception("/invocation/next return status %d" % resp.status) + except Exception: + sys.exit(2 if STAY_OPEN else (1 if ERRORED else 0)) + return () + + INVOKEID = resp.getheader('Lambda-Runtime-Aws-Request-Id') + DEADLINE_MS = int(resp.getheader('Lambda-Runtime-Deadline-Ms')) + INVOKED_FUNCTION_ARN = resp.getheader( + 'Lambda-Runtime-Invoked-Function-Arn') + XRAY_TRACE_ID = resp.getheader('Lambda-Runtime-Trace-Id') + cognito_identity = json.loads(resp.getheader( + 'Lambda-Runtime-Cognito-Identity', '{}')) + CONTEXT_OBJS['cognitoidentityid'] = cognito_identity.get('identity_id') + CONTEXT_OBJS['cognitopoolid'] = cognito_identity.get('identity_pool_id') + CONTEXT_OBJS['clientcontext'] = resp.getheader( + 'Lambda-Runtime-Client-Context') + + LOG_TAIL = resp.getheader('docker-lambda-log-type') == 'Tail' + + EVENT_BODY = resp.read() + + return ( + INVOKEID, + DATA_SOCK, + CREDENTIALS, + EVENT_BODY, + CONTEXT_OBJS, + INVOKED_FUNCTION_ARN, + XRAY_TRACE_ID, + ) + + +def report_fault(invokeid, msg, except_value, trace): + global ERRORED + + ERRORED = True + + if msg and except_value: + eprint('%s: %s' % (msg, except_value)) + if trace: + eprint('%s' % trace) + + +def report_done(invokeid, errortype, result, is_fatal): + global ERRORED + global INIT_END_SENT + + if not INVOKED: + return + + if errortype is not None: + ERRORED = True + result_obj = json.loads(result) + stack_trace = result_obj.get('stackTrace') + if stack_trace is not None: + result_obj['stackTrace'] = traceback.format_list(stack_trace) + result = json.dumps(result_obj) + + headers = {} + if LOG_TAIL: + headers['Docker-Lambda-Log-Result'] = base64.b64encode(LOGS.encode()) + if not INIT_END_SENT: + headers['Docker-Lambda-Invoke-Wait'] = int(RECEIVED_INVOKE_AT * 1000) + headers['Docker-Lambda-Init-End'] = int(INIT_END * 1000) + INIT_END_SENT = True + + MOCKSERVER_CONN.request("POST", "/2018-06-01/runtime/invocation/%s/%s" % \ + (invokeid, "response" if errortype is None else "error"), result, headers) + resp = MOCKSERVER_CONN.getresponse() + if resp.status != 202: + raise Exception("/invocation/response return status %d" % resp.status) + resp.read() + + +def report_xray_exception(xray_json): + return + + +def log_bytes(msg, fileno): + global LOGS + + if STAY_OPEN: + if LOG_TAIL: + LOGS += msg + (ORIG_STDOUT if fileno == 1 else ORIG_STDERR).write(msg) + else: + ORIG_STDERR.write(msg) + + +def log_sb(msg): + return + + +def get_remaining_time(): + return DEADLINE_MS - int(time.time() * 1000) + + +def send_console_message(msg, byte_length): + log_bytes(msg + '\n', 1) diff --git a/python3.6/build/Dockerfile b/python3.6/build/Dockerfile index 63e3e865..3da42ff5 100644 --- a/python3.6/build/Dockerfile +++ b/python3.6/build/Dockerfile @@ -1,22 +1,33 @@ +FROM lambci/lambda:python3.6 + FROM lambci/lambda-base:build ENV PATH=/var/lang/bin:$PATH \ LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_python3.6 \ - PYTHONPATH=/var/runtime \ - PKG_CONFIG_PATH=/var/lang/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig + PKG_CONFIG_PATH=/var/lang/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig \ + PIPX_BIN_DIR=/var/lang/bin \ + PIPX_HOME=/var/lang/pipx + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid -RUN rm -rf /var/runtime /var/lang && \ - curl https://lambci.s3.amazonaws.com/fs/python3.6.tgz | tar -xz -C / && \ +RUN export PYTHON_VERSION=3.6.12 && \ sed -i '/^prefix=/c\prefix=/var/lang' /var/lang/lib/pkgconfig/python-3.6.pc && \ - curl https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz | tar -xJ && \ - cd Python-3.6.8 && \ + curl https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz | tar -xJ && \ + cd Python-${PYTHON_VERSION} && \ LIBS="$LIBS -lutil -lrt" ./configure --prefix=/var/lang && \ make -j$(getconf _NPROCESSORS_ONLN) libinstall libainstall inclinstall && \ cd .. && \ - rm -rf Python-3.6.8 + rm -rf Python-${PYTHON_VERSION} # Add these as a separate layer as they get updated frequently -RUN pip install -U pip setuptools --no-cache-dir && \ - pip install -U virtualenv pipenv --no-cache-dir && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +RUN pip install -U pip setuptools wheel --no-cache-dir && \ + pip install pipx --no-cache-dir && \ + pipx install virtualenv && \ + pipx install pipenv && \ + pipx install poetry==1.1.4 && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/python3.6/run/Dockerfile b/python3.6/run/Dockerfile index b894c7e3..86dcdfe0 100644 --- a/python3.6/run/Dockerfile +++ b/python3.6/run/Dockerfile @@ -1,3 +1,6 @@ +FROM lambci/lambda:provided + + FROM lambci/lambda-base ENV PATH=/var/lang/bin:$PATH \ @@ -8,7 +11,9 @@ RUN rm -rf /var/runtime /var/lang && \ curl https://lambci.s3.amazonaws.com/fs/python3.6.tgz | tar -zx -C / RUN rm /var/runtime/awslambda/runtime.cpython-36m-x86_64-linux-gnu.so -COPY runtime-mock.py /var/runtime/awslambda/runtime.py +COPY runtime_mock.py /var/runtime/awslambda/runtime.py + +COPY --from=0 /var/runtime/init /var/runtime/mockserver USER sbx_user1051 diff --git a/python3.6/run/runtime-mock.py b/python3.6/run/runtime-mock.py deleted file mode 100644 index fc590f8a..00000000 --- a/python3.6/run/runtime-mock.py +++ /dev/null @@ -1,174 +0,0 @@ -from __future__ import print_function -import sys -import os -import random -import uuid -import time -import resource -import datetime - -orig_stdout = sys.stdout -orig_stderr = sys.stderr - -def eprint(*args, **kwargs): - print(*args, file=orig_stderr, **kwargs) - -def _random_account_id(): - return random.randint(100000000000, 999999999999) - -def _random_invoke_id(): - return str(uuid.uuid4()) - -def _arn(region, account_id, fct_name): - return 'arn:aws:lambda:%s:%s:function:%s' % (region, account_id, fct_name) - -_GLOBAL_HANDLER = sys.argv[1] if len(sys.argv) > 1 else os.environ.get('AWS_LAMBDA_FUNCTION_HANDLER', - os.environ.get('_HANDLER', 'lambda_function.lambda_handler')) -_GLOBAL_EVENT_BODY = sys.argv[2] if len(sys.argv) > 2 else os.environ.get('AWS_LAMBDA_EVENT_BODY', - (sys.stdin.read() if os.environ.get('DOCKER_LAMBDA_USE_STDIN', False) else '{}')) -_GLOBAL_FCT_NAME = os.environ.get('AWS_LAMBDA_FUNCTION_NAME', 'test') -_GLOBAL_VERSION = os.environ.get('AWS_LAMBDA_FUNCTION_VERSION', '$LATEST') -_GLOBAL_MEM_SIZE = os.environ.get('AWS_LAMBDA_FUNCTION_MEMORY_SIZE', '1536') -_GLOBAL_TIMEOUT = int(os.environ.get('AWS_LAMBDA_FUNCTION_TIMEOUT', '300')) -_GLOBAL_REGION = os.environ.get('AWS_REGION', os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')) -_GLOBAL_ACCOUNT_ID = os.environ.get('AWS_ACCOUNT_ID', _random_account_id()) -_GLOBAL_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', 'SOME_ACCESS_KEY_ID') -_GLOBAL_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', 'SOME_SECRET_ACCESS_KEY') -_GLOBAL_SESSION_TOKEN = os.environ.get('AWS_SESSION_TOKEN', None) - -_GLOBAL_INVOKEID = _random_invoke_id() -_GLOBAL_MODE = 'event' # Either 'http' or 'event' -_GLOBAL_SUPRESS_INIT = True # Forces calling _get_handlers_delayed() -_GLOBAL_DATA_SOCK = -1 -_GLOBAL_CONTEXT_OBJS = { - 'clientcontext': None, - 'cognitoidentityid': None, - 'cognitopoolid': None, -} -_GLOBAL_CREDENTIALS = { - 'key': _GLOBAL_ACCESS_KEY_ID, - 'secret': _GLOBAL_SECRET_ACCESS_KEY, - 'session': _GLOBAL_SESSION_TOKEN -} -_GLOBAL_INVOKED_FUNCTION_ARN = os.environ.get('AWS_LAMBDA_FUNCTION_INVOKED_ARN', _arn(_GLOBAL_REGION, _GLOBAL_ACCOUNT_ID, _GLOBAL_FCT_NAME)) -_GLOBAL_XRAY_TRACE_ID = os.environ.get('_X_AMZN_TRACE_ID', None) -_GLOBAL_XRAY_PARENT_ID = None -_GLOBAL_XRAY_SAMPLED = None -_GLOBAL_X_AMZN_TRACE_ID = None -_GLOBAL_INVOKED = False -_GLOBAL_ERRORED = False -_GLOBAL_START_TIME = None -_GLOBAL_TODAY = datetime.date.today() -# export needed stuff -os.environ['AWS_LAMBDA_LOG_GROUP_NAME'] = '/aws/lambda/%s' % _GLOBAL_FCT_NAME -os.environ['AWS_LAMBDA_LOG_STREAM_NAME'] = "%s/%s/%s/[%s]%s" % ( - _GLOBAL_TODAY.year, - _GLOBAL_TODAY.month, - _GLOBAL_TODAY.day, - _GLOBAL_VERSION, - '%016x' % random.randrange(16**16) - ) -os.environ["AWS_LAMBDA_FUNCTION_NAME"] = _GLOBAL_FCT_NAME -os.environ['AWS_LAMBDA_FUNCTION_MEMORY_SIZE'] = _GLOBAL_MEM_SIZE -os.environ['AWS_LAMBDA_FUNCTION_VERSION'] = _GLOBAL_VERSION -os.environ['AWS_REGION'] = _GLOBAL_REGION -os.environ['AWS_DEFAULT_REGION'] = _GLOBAL_REGION -os.environ['_HANDLER'] = _GLOBAL_HANDLER - -def report_user_init_start(): - return - -def report_user_init_end(): - return - -def report_user_invoke_start(): - return - -def report_user_invoke_end(): - return - -def receive_start(): - sys.stdout = orig_stderr - sys.stderr = orig_stderr - return ( - _GLOBAL_INVOKEID, - _GLOBAL_MODE, - _GLOBAL_HANDLER, - _GLOBAL_SUPRESS_INIT, - _GLOBAL_CREDENTIALS - ) - -def report_running(invokeid): - return - -def receive_invoke(): - global _GLOBAL_INVOKED - global _GLOBAL_START_TIME - - if not _GLOBAL_INVOKED: - eprint( - "START RequestId: %s Version: %s" % - (_GLOBAL_INVOKEID, _GLOBAL_VERSION) - ) - _GLOBAL_INVOKED = True - _GLOBAL_START_TIME = time.time() - - return ( - _GLOBAL_INVOKEID, - _GLOBAL_DATA_SOCK, - _GLOBAL_CREDENTIALS, - _GLOBAL_EVENT_BODY, - _GLOBAL_CONTEXT_OBJS, - _GLOBAL_INVOKED_FUNCTION_ARN, - _GLOBAL_XRAY_TRACE_ID, - ) - -def report_fault(invokeid, msg, except_value, trace): - global _GLOBAL_ERRORED - - _GLOBAL_ERRORED = True - - if msg and except_value: - eprint('%s: %s' % (msg, except_value)) - if trace: - eprint('%s' % trace) - return - -def report_done(invokeid, errortype, result, is_fatal): - global _GLOBAL_INVOKED - global _GLOBAL_ERRORED - - if _GLOBAL_INVOKED: - eprint("END RequestId: %s" % invokeid) - - duration = int((time.time() - _GLOBAL_START_TIME) * 1000) - billed_duration = min(100 * int((duration / 100) + 1), _GLOBAL_TIMEOUT * 1000) - max_mem = int(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024) - - eprint( - "REPORT RequestId: %s Duration: %s ms Billed Duration: %s ms Memory Size: %s MB Max Memory Used: %s MB" % ( - invokeid, duration, billed_duration, _GLOBAL_MEM_SIZE, max_mem - ) - ) - if result: - print('\n' + result, file=orig_stdout) - sys.exit(1 if _GLOBAL_ERRORED else 0) - else: - return - -def report_xray_exception(xray_json): - return - -def log_bytes(msg, fileno): - eprint(msg) - return - -def log_sb(msg): - return - -def get_remaining_time(): - return ((_GLOBAL_TIMEOUT * 1000) - int((time.time() - _GLOBAL_START_TIME) * 1000)) - -def send_console_message(msg, byte_length): - eprint(msg) - return diff --git a/python3.6/run/runtime_mock.py b/python3.6/run/runtime_mock.py new file mode 100644 index 00000000..a52ffe80 --- /dev/null +++ b/python3.6/run/runtime_mock.py @@ -0,0 +1,286 @@ +# pylint: disable=missing-docstring, global-statement, unused-argument, broad-except + +from __future__ import print_function +import sys +import os +import random +import uuid +import time +import datetime +import subprocess +import json +import traceback +import base64 +import signal +try: + # for python 3 + from http.client import HTTPConnection +except ImportError: + # for python 2 + from httplib import HTTPConnection + + +ORIG_STDOUT = sys.stdout +ORIG_STDERR = sys.stderr + +LOGS = '' +LOG_TAIL = False + +STAY_OPEN = os.environ.get('DOCKER_LAMBDA_STAY_OPEN', '') + +HANDLER = sys.argv[1] if len(sys.argv) > 1 else os.environ.get('AWS_LAMBDA_FUNCTION_HANDLER', \ + os.environ.get('_HANDLER', 'lambda_function.lambda_handler')) +EVENT_BODY = sys.argv[2] if len(sys.argv) > 2 else os.environ.get('AWS_LAMBDA_EVENT_BODY', \ + (sys.stdin.read() if os.environ.get('DOCKER_LAMBDA_USE_STDIN', False) else '{}')) +FUNCTION_NAME = os.environ.get('AWS_LAMBDA_FUNCTION_NAME', 'test') +FUNCTION_VERSION = os.environ.get('AWS_LAMBDA_FUNCTION_VERSION', '$LATEST') +MEM_SIZE = os.environ.get('AWS_LAMBDA_FUNCTION_MEMORY_SIZE', '1536') +DEADLINE_MS = int(time.time() * 1000) + int(os.environ.get('AWS_LAMBDA_FUNCTION_TIMEOUT', '300')) +REGION = os.environ.get('AWS_REGION', os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')) +ACCOUNT_ID = os.environ.get('AWS_ACCOUNT_ID', random.randint(100000000000, 999999999999)) +ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', None) +SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', None) +SESSION_TOKEN = os.environ.get('AWS_SESSION_TOKEN', None) + +INVOKEID = str(uuid.uuid4()) +INVOKE_MODE = 'event' # Either 'http' or 'event' +SUPPRESS_INIT = True # Forces calling _get_handlers_delayed() +THROTTLED = False +DATA_SOCK = -1 +CONTEXT_OBJS = { + 'clientcontext': None, + 'cognitoidentityid': None, + 'cognitopoolid': None, +} +CREDENTIALS = { + 'key': ACCESS_KEY_ID, + 'secret': SECRET_ACCESS_KEY, + 'session': SESSION_TOKEN +} +INVOKED_FUNCTION_ARN = os.environ.get('AWS_LAMBDA_FUNCTION_INVOKED_ARN', \ + 'arn:aws:lambda:%s:%s:function:%s' % (REGION, ACCOUNT_ID, FUNCTION_NAME)) +XRAY_TRACE_ID = os.environ.get('_X_AMZN_TRACE_ID', None) +XRAY_PARENT_ID = None +XRAY_SAMPLED = None +TRACE_ID = None +INVOKED = False +ERRORED = False +INIT_END_SENT = False +INIT_END = time.time() +RECEIVED_INVOKE_AT = time.time() +TODAY = datetime.date.today() +# export needed stuff +os.environ['AWS_LAMBDA_LOG_GROUP_NAME'] = '/aws/lambda/%s' % FUNCTION_NAME +os.environ['AWS_LAMBDA_LOG_STREAM_NAME'] = "%s/%s/%s/[%s]%s" % ( + TODAY.year, + TODAY.month, + TODAY.day, + FUNCTION_VERSION, + '%016x' % random.randrange(16**16) +) +os.environ["AWS_LAMBDA_FUNCTION_NAME"] = FUNCTION_NAME +os.environ['AWS_LAMBDA_FUNCTION_MEMORY_SIZE'] = MEM_SIZE +os.environ['AWS_LAMBDA_FUNCTION_VERSION'] = FUNCTION_VERSION +os.environ['AWS_REGION'] = REGION +os.environ['AWS_DEFAULT_REGION'] = REGION +os.environ['_HANDLER'] = HANDLER + +MOCKSERVER_ENV = os.environ.copy() +MOCKSERVER_ENV['DOCKER_LAMBDA_NO_BOOTSTRAP'] = '1' +MOCKSERVER_ENV['DOCKER_LAMBDA_USE_STDIN'] = '1' + +MOCKSERVER_PROCESS = subprocess.Popen( + '/var/runtime/mockserver', stdin=subprocess.PIPE, env=MOCKSERVER_ENV) +MOCKSERVER_PROCESS.stdin.write(EVENT_BODY.encode()) +MOCKSERVER_PROCESS.stdin.close() + +MOCKSERVER_CONN = HTTPConnection("127.0.0.1", 9001) + + +def sighup_handler(signum, frame): + eprint("SIGHUP received, exiting runtime...") + sys.exit(2) + +signal.signal(signal.SIGINT, lambda x, y: sys.exit(0)) +signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0)) +signal.signal(signal.SIGHUP, sighup_handler) + + +def eprint(*args, **kwargs): + print(*args, file=ORIG_STDERR, **kwargs) + + +def report_user_init_start(): + return + + +def report_user_init_end(): + global INIT_END + INIT_END = time.time() + + +def report_user_invoke_start(): + return + + +def report_user_invoke_end(): + return + + +def receive_start(): + global MOCKSERVER_CONN + + ping_timeout = time.time() + 1 + while True: + try: + MOCKSERVER_CONN = HTTPConnection("127.0.0.1", 9001) + MOCKSERVER_CONN.request("GET", "/2018-06-01/ping") + resp = MOCKSERVER_CONN.getresponse() + if resp.status != 200: + raise Exception("Mock server returned %d" % resp.status) + resp.read() + break + except Exception: + if time.time() > ping_timeout: + raise + else: + time.sleep(.005) + continue + return ( + INVOKEID, + INVOKE_MODE, + HANDLER, + SUPPRESS_INIT, + THROTTLED, + CREDENTIALS + ) + + +def report_running(invokeid): + return + + +def receive_invoke(): + global INVOKED + global INVOKEID + global DEADLINE_MS + global INVOKED_FUNCTION_ARN + global XRAY_TRACE_ID + global EVENT_BODY + global CONTEXT_OBJS + global LOGS + global LOG_TAIL + global RECEIVED_INVOKE_AT + + ORIG_STDOUT.flush() + ORIG_STDERR.flush() + + if not INVOKED: + RECEIVED_INVOKE_AT = time.time() + INVOKED = True + else: + LOGS = "" + + try: + MOCKSERVER_CONN.request("GET", "/2018-06-01/runtime/invocation/next") + resp = MOCKSERVER_CONN.getresponse() + if resp.status != 200: + raise Exception("/invocation/next return status %d" % resp.status) + except Exception: + sys.exit(2 if STAY_OPEN else (1 if ERRORED else 0)) + return () + + INVOKEID = resp.getheader('Lambda-Runtime-Aws-Request-Id') + DEADLINE_MS = int(resp.getheader('Lambda-Runtime-Deadline-Ms')) + INVOKED_FUNCTION_ARN = resp.getheader( + 'Lambda-Runtime-Invoked-Function-Arn') + XRAY_TRACE_ID = resp.getheader('Lambda-Runtime-Trace-Id') + cognito_identity = json.loads(resp.getheader( + 'Lambda-Runtime-Cognito-Identity', '{}')) + CONTEXT_OBJS['cognitoidentityid'] = cognito_identity.get('identity_id') + CONTEXT_OBJS['cognitopoolid'] = cognito_identity.get('identity_pool_id') + CONTEXT_OBJS['clientcontext'] = resp.getheader( + 'Lambda-Runtime-Client-Context') + + LOG_TAIL = resp.getheader('docker-lambda-log-type') == 'Tail' + + EVENT_BODY = resp.read() + + return ( + INVOKEID, + DATA_SOCK, + CREDENTIALS, + EVENT_BODY, + CONTEXT_OBJS, + INVOKED_FUNCTION_ARN, + XRAY_TRACE_ID, + ) + + +def report_fault(invokeid, msg, except_value, trace): + global ERRORED + + ERRORED = True + + if msg and except_value: + eprint('%s: %s' % (msg, except_value)) + if trace: + eprint('%s' % trace) + + +def report_done(invokeid, errortype, result, is_fatal): + global ERRORED + global INIT_END_SENT + + if not INVOKED: + return + + if errortype is not None: + ERRORED = True + result_obj = json.loads(result) + stack_trace = result_obj.get('stackTrace') + if stack_trace is not None: + result_obj['stackTrace'] = traceback.format_list(stack_trace) + result = json.dumps(result_obj) + + headers = {} + if LOG_TAIL: + headers['Docker-Lambda-Log-Result'] = base64.b64encode(LOGS.encode()) + if not INIT_END_SENT: + headers['Docker-Lambda-Invoke-Wait'] = int(RECEIVED_INVOKE_AT * 1000) + headers['Docker-Lambda-Init-End'] = int(INIT_END * 1000) + INIT_END_SENT = True + + MOCKSERVER_CONN.request("POST", "/2018-06-01/runtime/invocation/%s/%s" % \ + (invokeid, "response" if errortype is None else "error"), result, headers) + resp = MOCKSERVER_CONN.getresponse() + if resp.status != 202: + raise Exception("/invocation/response return status %d" % resp.status) + resp.read() + + +def report_xray_exception(xray_json): + return + + +def log_bytes(msg, fileno): + global LOGS + + if STAY_OPEN: + if LOG_TAIL: + LOGS += msg + (ORIG_STDOUT if fileno == 1 else ORIG_STDERR).write(msg) + else: + ORIG_STDERR.write(msg) + + +def log_sb(msg): + return + + +def get_remaining_time(): + return DEADLINE_MS - int(time.time() * 1000) + + +def send_console_message(msg, byte_length): + log_bytes(msg + '\n', 1) diff --git a/python3.7/build/Dockerfile b/python3.7/build/Dockerfile index 50fa9eb0..98b20835 100644 --- a/python3.7/build/Dockerfile +++ b/python3.7/build/Dockerfile @@ -1,15 +1,24 @@ +FROM lambci/lambda:python3.7 + FROM lambci/lambda-base:build ENV PATH=/var/lang/bin:$PATH \ LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_python3.7 \ - PYTHONPATH=/var/runtime \ - PKG_CONFIG_PATH=/var/lang/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig + PKG_CONFIG_PATH=/var/lang/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig \ + PIPX_BIN_DIR=/var/lang/bin \ + PIPX_HOME=/var/lang/pipx -RUN rm -rf /var/runtime /var/lang /var/rapid && \ - curl https://lambci.s3.amazonaws.com/fs/python3.7.tgz | tar -zx -C / +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid # Add these as a separate layer as they get updated frequently -RUN pip install -U pip setuptools --no-cache-dir && \ - pip install -U virtualenv pipenv --no-cache-dir && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +RUN pip install -U pip setuptools wheel --no-cache-dir && \ + pip install pipx --no-cache-dir && \ + pipx install virtualenv && \ + pipx install pipenv && \ + pipx install poetry==1.1.4 && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/python3.8/build/Dockerfile b/python3.8/build/Dockerfile new file mode 100644 index 00000000..ecf9ab00 --- /dev/null +++ b/python3.8/build/Dockerfile @@ -0,0 +1,24 @@ +FROM lambci/lambda:python3.8 + +FROM lambci/lambda-base-2:build + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_python3.8 \ + PKG_CONFIG_PATH=/var/lang/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig \ + PIPX_BIN_DIR=/var/lang/bin \ + PIPX_HOME=/var/lang/pipx + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +# Add these as a separate layer as they get updated frequently +RUN pip install -U pip setuptools wheel --no-cache-dir && \ + pip install pipx --no-cache-dir && \ + pipx install virtualenv && \ + pipx install pipenv && \ + pipx install poetry==1.1.4 && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 diff --git a/python3.8/run/Dockerfile b/python3.8/run/Dockerfile new file mode 100644 index 00000000..ac587b3a --- /dev/null +++ b/python3.8/run/Dockerfile @@ -0,0 +1,22 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/python3.8.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_python3.8 + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap", "--enable-msg-logs"] + diff --git a/ruby2.5/build/Dockerfile b/ruby2.5/build/Dockerfile index 7b55b517..439b202b 100644 --- a/ruby2.5/build/Dockerfile +++ b/ruby2.5/build/Dockerfile @@ -1,17 +1,24 @@ +FROM lambci/lambda:ruby2.5 + FROM lambci/lambda-base:build ENV PATH=/var/lang/bin:$PATH \ LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ AWS_EXECUTION_ENV=AWS_Lambda_ruby2.5 \ GEM_HOME=/var/runtime \ - GEM_PATH=/var/task/vendor/bundle/ruby/2.5.0:/opt/ruby/gems/2.5.0 \ - RUBYLIB=/var/task:/var/runtime/lib:/opt/ruby/lib + GEM_PATH=/var/task/vendor/bundle/ruby/2.5.0:/opt/ruby/gems/2.5.0:/var/lang/lib/ruby/gems/2.5.0 \ + RUBYLIB=/var/task:/var/runtime/lib:/opt/ruby/lib \ + BUNDLE_SILENCE_ROOT_WARNING=1 -RUN rm -rf /var/runtime /var/lang /var/rapid && \ - curl https://lambci.s3.amazonaws.com/fs/ruby2.5.tgz | tar -zx -C / +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid # Add these as a separate layer as they get updated frequently -RUN gem update --system --no-document && \ - gem install --no-document bundler && \ - curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && \ - pip install -U awscli boto3 aws-sam-cli==0.10.0 aws-lambda-builders==0.1.0 --no-cache-dir +# The pipx workaround is due to https://github.com/pipxproject/pipx/issues/218 +RUN source /usr/local/pipx/shared/bin/activate && \ + pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 && \ + gem update --system --no-document && \ + gem install --no-document bundler -v '~> 2.1' diff --git a/ruby2.7/build/Dockerfile b/ruby2.7/build/Dockerfile new file mode 100644 index 00000000..c0fbeef3 --- /dev/null +++ b/ruby2.7/build/Dockerfile @@ -0,0 +1,22 @@ +FROM lambci/lambda:ruby2.7 + +FROM lambci/lambda-base-2:build + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_ruby2.7 \ + GEM_HOME=/var/runtime \ + GEM_PATH=/var/task/vendor/bundle/ruby/2.7.0:/opt/ruby/gems/2.7.0:/var/lang/lib/ruby/gems/2.7.0 \ + RUBYLIB=/var/task:/var/runtime/lib:/opt/ruby/lib \ + BUNDLE_SILENCE_ROOT_WARNING=1 + +COPY --from=0 /var/runtime /var/runtime +COPY --from=0 /var/lang /var/lang +COPY --from=0 /var/rapid /var/rapid + +# Add these as a separate layer as they get updated frequently +RUN pipx install awscli==1.* && \ + pipx install aws-lambda-builders==1.2.0 && \ + pipx install aws-sam-cli==1.15.0 && \ + gem update --system --no-document && \ + gem install --no-document bundler -v '~> 2.1' diff --git a/ruby2.7/run/Dockerfile b/ruby2.7/run/Dockerfile new file mode 100644 index 00000000..f42a59e5 --- /dev/null +++ b/ruby2.7/run/Dockerfile @@ -0,0 +1,21 @@ +FROM lambci/lambda-base + +RUN curl https://lambci.s3.amazonaws.com/fs/ruby2.7.tgz | tar -zx -C /opt + + +FROM lambci/lambda:provided + + +FROM lambci/lambda-base-2 + +ENV PATH=/var/lang/bin:$PATH \ + LD_LIBRARY_PATH=/var/lang/lib:$LD_LIBRARY_PATH \ + AWS_EXECUTION_ENV=AWS_Lambda_ruby2.7 + +COPY --from=0 /opt/* /var/ + +COPY --from=1 /var/runtime/init /var/rapid/init + +USER sbx_user1051 + +ENTRYPOINT ["/var/rapid/init", "--bootstrap", "/var/runtime/bootstrap", "--enable-msg-logs"]