Skip to content

Commit

Permalink
feat(rename): azure-nvme-utils -> azure-vm-utils (#40)
Browse files Browse the repository at this point in the history
To support expansion of scope for future utilities and udev
rules outside of NVMe support, rename azure-nvme-utils to
azure-vm-utils.

Signed-off-by: Chris Patterson <[email protected]>
  • Loading branch information
cjp256 authored Sep 5, 2024
1 parent 2c88497 commit 0f55fd7
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/debs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: Get tags from upstream, if needed
if: github.repository != 'Azure/azure-nvme-utils'
if: github.repository != 'Azure/azure-vm-utils'
run: |
git remote add upstream https://github.com/Azure/azure-nvme-utils.git
git remote add upstream https://github.com/Azure/azure-vm-utils.git
git fetch upstream --tags
- name: Setup
run: |
sudo apt update
sudo apt install gcc pandoc cmake devscripts debhelper -y
- name: Build debs
run: |
DEBEMAIL="Azure NVMe Utils CI <azure/azure-nvme[email protected]>" ./scripts/build-deb.sh
DEBEMAIL="Azure VM Utils CI <azure/azure-vm[email protected]>" ./scripts/build-deb.sh
- name: Lintian check
run: |
lintian out/*.deb
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Verify installation
run: |
set -x
dpkg -L azure-nvme-utils
dpkg -L azure-vm-utils
test -f /usr/share/initramfs-tools/hooks/azure-disk
test -f /usr/share/man/man8/azure-nvme-id.8.gz
test -f /usr/sbin/azure-nvme-id
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: Get tags from upstream, if needed
if: github.repository != 'Azure/azure-nvme-utils'
if: github.repository != 'Azure/azure-vm-utils'
run: |
git remote add upstream https://github.com/Azure/azure-nvme-utils.git
git remote add upstream https://github.com/Azure/azure-vm-utils.git
git fetch upstream --tags
- name: Setup
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0.0)
project(azure-nvme-utils VERSION 0.1.0 LANGUAGES C)
project(azure-vm-utils VERSION 0.1.0 LANGUAGES C)

if(NOT DEFINED VERSION)
execute_process(
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project
# azure-vm-utils

This project includes a utility to help identify Azure NVMe devices.
A collection of utilities and udev rules to make the most of the Linux experience on Azure.

## Quick Start

Expand All @@ -11,12 +11,18 @@ cmake .
make
```

To install /usr/local/bin/azure-nvme-id and /usr/local/lib/udev/rules.d/80-azure-disk.rules:
To install:

```
sudo make install
```

# Executables

## azure-nvme-id

`azure-nvme-id` is a utility to help identify Azure NVMe devices.

To run:

```
Expand All @@ -29,7 +35,13 @@ To run in udev mode:
DEVNAME=/dev/nvme0n1 azure-nvme-id --udev
```

## Contributing
# Rules for udev

## 80-azure-disk.rules

Provides helpful symlinks in /dev/disk/azure for local, data, and os disks.

# Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
Expand Down
2 changes: 1 addition & 1 deletion doc/azure-nvme-id.8
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ azure\-nvme\-id 0.1.2
.EE
.SH SEE ALSO
Source and documentation available at: \c
.UR https://github.com/Azure/azure-nvme-utils
.UR https://github.com/Azure/azure-vm-utils
.UE \c
2 changes: 1 addition & 1 deletion doc/azure-nvme-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ azure-nvme-id 0.1.2

# SEE ALSO

Source and documentation available at: <https://github.com/Azure/azure-nvme-utils>
Source and documentation available at: <https://github.com/Azure/azure-vm-utils>
11 changes: 5 additions & 6 deletions packaging/debian/control
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
Source: azure-nvme-utils
Source: azure-vm-utils
Section: utils
Priority: optional
Maintainer: Chris Patterson <[email protected]>
Build-Depends: cmake, pandoc, debhelper-compat (= 12)
Standards-Version: 4.5.0
Homepage: https://github.com/Azure/azure-nvme-utils
Homepage: https://github.com/Azure/azure-vm-utils
Rules-Requires-Root: no

Package: azure-nvme-utils
Package: azure-vm-utils
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Utilities to assist managing NVMe devices on Azure
This package provides azure-nvme-id for NVMe device identification and udev
rules to provide symlinks using available identifiers.
Description: A collection of utilities and udev rules to make the most of the
Linux experience on Azure.
6 changes: 3 additions & 3 deletions packaging/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: azure-nvme-utils
Upstream-Contact: https://github.com/Azure/azure-nvme-utils/issues
Source: https://github.com/Azure/azure-nvme-utils
Upstream-Name: azure-vm-utils
Upstream-Contact: https://github.com/Azure/azure-vm-utils/issues
Source: https://github.com/Azure/azure-vm-utils

Files: *
Copyright: 2024 Microsoft Corporation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: azure-nvme-utils
Name: azure-vm-utils
Version: %{__git_version}
Release: %{__git_release}%{?dist}
Summary: Utility and udev rules to help identify Azure NVMe devices
Summary: Utilities and udev rules for Linux on Azure

License: MIT
URL: https://github.com/Azure/%{name}
Expand All @@ -11,7 +11,8 @@ BuildRequires: cmake
BuildRequires: gcc

%description
Utility and udev rules to help identify Azure NVMe devices.
A collection of utilities and udev rules to make the most of the Linux
experience on Azure.

%prep
%autosetup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Name: azure-nvme-utils
Name: azure-vm-utils
Version: %{__git_version}
Release: %{__git_release}%{?dist}
Summary: Utility and udev rules to help identify Azure NVMe devices
Summary: Utilities and udev rules for Linux on Azure

License: MIT
URL: https://github.com/Azure/%{name}
Source0: azure-nvme-utils_dev.tgz
Source0: azure-vm-utils_dev.tgz

BuildRequires: binutils
BuildRequires: cmake
Expand All @@ -14,7 +14,8 @@ BuildRequires: glibc-devel
BuildRequires: kernel-headers

%description
Utility and udev rules to help identify Azure NVMe devices.
A collection of utilities and udev rules to make the most of the Linux
experience on Azure.

%prep
%autosetup
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ if [[ -z ${DEBEMAIL:-} ]]; then
git_email="$(git config user.email)"
export DEBEMAIL="${git_user} <${git_email}>"
fi
dch --create -v "${deb_version}" --package "azure-nvme-utils" "development build: ${git_version}"
dch --create -v "${deb_version}" --package "azure-vm-utils" "development build: ${git_version}"

debuild --no-tgz-check

mkdir -p "${output_dir}"
rm -f "${output_dir}"/*.deb
mv ../azure-nvme-utils*"${deb_version}"* "${output_dir}"/
mv ../azure-vm-utils*"${deb_version}"* "${output_dir}"/
10 changes: 5 additions & 5 deletions scripts/build-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ build_dir="$(mktemp -d)"
mkdir -p "${build_dir}"/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

# Create source tarball.
output_source="${build_dir}/SOURCES/azure-nvme-utils_dev.tgz"
output_source="${build_dir}/SOURCES/azure-vm-utils_dev.tgz"
cd "$project_dir"
git archive --verbose --format=tar.gz --prefix="azure-nvme-utils-${version}/" HEAD --output "${output_source}"
git archive --verbose --format=tar.gz --prefix="azure-vm-utils-${version}/" HEAD --output "${output_source}"

# Create spec file from template.
cd "${project_dir}/packaging/${distro}"

# Install dependencies.
sudo dnf builddep -y --spec azure-nvme-utils.spec
sudo dnf builddep -y --spec azure-vm-utils.spec

# Build RPM.
rpmbuild -ba --define "__git_version ${version}" --define "__git_release ${release}" --define "_topdir ${build_dir}" azure-nvme-utils.spec
rpmbuild -ba --define "__git_version ${version}" --define "__git_release ${release}" --define "_topdir ${build_dir}" azure-vm-utils.spec

# Copy RPM to output directory.
mkdir -p "${output_dir}"
rm -f "${output_dir}"/*.rpm
cp -v "${build_dir}"/RPMS/*/"azure-nvme-utils-${version}-${release}".*.rpm "${output_dir}"
cp -v "${build_dir}"/RPMS/*/"azure-vm-utils-${version}-${release}".*.rpm "${output_dir}"

0 comments on commit 0f55fd7

Please sign in to comment.