Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Sha 7 review #52

Closed
wants to merge 17 commits into from
Closed

Sha 7 review #52

wants to merge 17 commits into from

Conversation

schneems
Copy link
Contributor

@schneems schneems commented Sep 5, 2024

No description provided.

schneems and others added 17 commits July 23, 2024 17:23
Currently the Ruby buildapack is tightly coupled to the URLs that are generated by this repo. I am in the process of introducing an inventory file that the buildpack can use as a lookup. To start that process this commit introduces generating tgz files with the first 7 SHA256 characters appended. This allows us to update the same version number in the future without worrying that it will break future digest checks of the URL.

With this change the builder will continue to generate the original URLs, but it will also generate "<filename>-<sha256>.tgz" files as well and append this information to a `jruby_inventory.toml` file.
- We now create only one sha named archive for jruby builds since both ARM and AMD point to the same source.
- Binary `inventory_check` takes in a  file and validates that all checksums are valid.
Before:

```
drwxr-xr-x 2 root   root       4096 Jul 25 22:34 .
drwxr-xr-x 3 runner docker     4096 Jul 25 22:32 ..
-rw-r--r-- 1 root   root   24061018 Jul 25 22:34 ruby-3.2.3.tgz
```

With these permissions we were unable to write to the directory. After:

After

```
drwxrwxrwx 2 root   root       4096 Jul 27 02:53 .
drwxr-xr-x 3 runner docker     4096 Jul 27 02:51 ..
-rw-r--r-- 1 root   root   24061325 Jul 27 02:53 ruby-3.2.3.tgz
```

Now we can copy the file to a new filename in the same directory.
@schneems schneems closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants