Skip to content

wombelix/aws-neuron-driver-publish-source

Repository files navigation

AWS Neuron Driver - Publish Source

Disclaimer

This is a personal project and not related to, or endorsed by, Amazon Web Services.


This repository contains a command line tool, written in Go, to publish the source code of new AWS Neuron Driver releases.

Why? The driver is licensed under GPL-2.0 but currently only distributed as rpm package with a DKMS wrapper. The code is not available as archive or in a public git repository.

The tool is used to add releases and code updates to the unofficial aws-neuron-driver repository. Checksum and GPG verifications are performed and metadata added. This creates an audit trail and allows to validate that the code is coming from the official repository yum.repos.neuron.amazonaws.com and wasn't altered.

REUSE status

Table of Contents

Usage

Prerequisites

  • Go 1.23 or later
  • Local git repository where driver source code will be stored
  • Internet connection to access AWS Neuron repositories

Note: You need to manually clone/create and manage the target git repository. The tool populates this repository with extracted driver source code but does not handle git remote operations. See aws-neuron-driver as an example of a repository maintained using this tool.

Installation

go build -tags pgp3 -o aws-neuron-driver-publish-source

Note: The -tags pgp3 flag is required to enable support for PGP version 3 signatures used by AWS Neuron RPM packages.

Alternative using Makefile:

make build

Basic Usage

./aws-neuron-driver-publish-source [options]

Command Line Options

Flag Default Description
-repopath ./ Path to the local git repository for
aws-neuron-driver source code
-archive-folder archive Sub-folder in git repo to store
processed files
-archive-rpm-folder rpm Sub-folder within archive directory
for RPM files
-source-folder src Sub-folder in git repo for
aws-neuron-driver source code
-loglevel INFO Log level (INFO or DEBUG)

Examples

Basic usage with default settings:

./aws-neuron-driver-publish-source

Custom repository path and debug logging:

./aws-neuron-driver-publish-source -repopath /path/to/aws-neuron-driver \
  -loglevel DEBUG

Custom folder structure:

./aws-neuron-driver-publish-source \
  -repopath /path/to/repo \
  -archive-folder downloads \
  -archive-rpm-folder packages \
  -source-folder driver-src

What the Tool Does

  1. Downloads repository metadata from https://yum.repos.neuron.amazonaws.com
  2. Verifies GPG signatures and SHA256 checksums of all files
  3. Extracts source code from RPM packages into your git repository
  4. Creates detailed git commits with package metadata and release notes
  5. Tags each release with its version number
  6. Maintains an audit trail of all processed packages

Output Structure

your-repo/
├── archive/
│   ├── rpm/
│   │   ├── aws-neuronx-dkms-*.rpm
│   │   └── *.sha256
│   ├── repomd.xml
│   ├── primary.xml.gz
│   └── GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB
└── src/
    ├── Makefile
    ├── neuron.c
    └── [other driver source files]

Source

The primary location is: git.sr.ht/~wombelix/aws-neuron-driver-publish-source

Mirrors are available on Codeberg, Gitlab and GitHub.

Contribute

Please don't hesitate to provide Feedback, open an Issue or create a Pull / Merge Request.

Just pick the workflow or platform you prefer and are most comfortable with.

Feedback, bug reports or patches to my sr.ht list ~wombelix/inbox@lists.sr.ht or via Email and Instant Messaging are also always welcome.

License

Unless otherwise stated: MIT

All files contain license information either as header comment or corresponding .license file.

REUSE from the FSFE implemented to verify license and copyright compliance.

About

CLI tool to publish the source code of new AWS Neuron Driver releases. Mirror of https://git.sr.ht/~wombelix/aws-neuron-driver-publish-source

Resources

License

Stars

Watchers

Forks

Packages

No packages published