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

Generating DEB and RPM files with the source from the rocm-examples. #143

Merged
merged 26 commits into from
Jul 29, 2024

Conversation

Mustaballer
Copy link
Contributor

@Mustaballer Mustaballer commented Jul 17, 2024

Adds a script to automate the packaging of ROCm SDK examples into DEB and RPM packages. The script performs the following tasks:

  • Sets up necessary package metadata and directories.
  • Copies source files and directories to the build directory.
  • Creates DEB and RPM packages with the specified metadata and source files.
  • Cleans up previous build artifacts to ensure a fresh build environment.

@Mustaballer Mustaballer marked this pull request as draft July 17, 2024 15:33
@Mustaballer
Copy link
Contributor Author

Mustaballer commented Jul 17, 2024

@dgaliffiAMD I tested the deb file generated from my build_packages.sh , and it doesn't include the binary files that show up when I build with the CMakeLists.txt. You can view the contents of the deb file..

There are some issues with the rpm file generation in my script, so I will continue working on fixing those issues.

@Mustaballer
Copy link
Contributor Author

The rpm file generation also seems to be working, you can view file contents of the rpm file generated from build_packages.sh here
rpm-file-contents.txt

@Mustaballer Mustaballer marked this pull request as ready for review July 18, 2024 13:53
@Mustaballer
Copy link
Contributor Author

@dgaliffiAMD PR is ready for review! :)

build_packages.sh Outdated Show resolved Hide resolved
build_packages.sh Outdated Show resolved Hide resolved
build_packages.sh Outdated Show resolved Hide resolved
build_packages.sh Outdated Show resolved Hide resolved
build_packages.sh Outdated Show resolved Hide resolved
Mustaballer and others added 3 commits July 19, 2024 11:53
…OCm/rocm-examples into generate-deb-and-rpm-files-with-source
To match casing of the other subfolders

Signed-off-by: David Galiffi <[email protected]>
Scripts/Packaging/build_packages.sh Outdated Show resolved Hide resolved
Scripts/Packaging/build_packages.sh Outdated Show resolved Hide resolved
Scripts/Packaging/build_packages.sh Outdated Show resolved Hide resolved
@Beanavil
Copy link
Collaborator

Also, this is probably out of the scope of this PR, but AFAIK a GitHub action could be set up to build the packages and add them to the "Releases" section of the repo when, for instance, a release tagged branch rocm-x.y.z is pushed:

# Release workflow file
on:
  push:
    tags:
      - 'rocm-*'

jobs:
  package:
    steps:
      - name: Build packages
        run: Scripts/Package/build_packages.sh

      - name: Release packages
        uses: softprops/action-gh-release@v1
        with:
          draft: true
          files: /path/to/generated/packages

PACKAGE_VERSION,
PACKAGE_INSTALL_PREFIX,
BUILD_DIR as arguments and add default values
@dgaliffiAMD
Copy link
Collaborator

I'm not seeing the install prefix on the generated DEB file anymore. Everything is being installed directly to /. I'm not sure when this started.
Maybe it will help to incorporate the install prefix to you copy_source, when you are setting up the "staging area".

Mustaballer and others added 11 commits July 26, 2024 10:10
Using the "cat EOF" to create DEBIAN/control, rather than multiple "echo" statments. Similar to how the RPM spec files is generated.
Use "STAGING_DIR" constant rather than input parameter to helper functions. This matches the style of other constants being used, like BUILD_DIR and SOURCE_DIR
Useful for build logs.
@Mustaballer Mustaballer merged commit 2e4abc4 into develop Jul 29, 2024
4 checks passed
@dgaliffiAMD dgaliffiAMD deleted the generate-deb-and-rpm-files-with-source branch July 29, 2024 19:39
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.

None yet

3 participants