Skip to content

add Debian (Ubuntu) packages - #86

Open
oliverkurth wants to merge 7 commits into
masterfrom
topic/okurth/debian-package
Open

add Debian (Ubuntu) packages#86
oliverkurth wants to merge 7 commits into
masterfrom
topic/okurth/debian-package

Conversation

@oliverkurth

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +12 to +167
runs-on: ubuntu-latest
strategy:
matrix:
# Test on multiple Ubuntu versions
ubuntu-version: ['20.04', '22.04', '24.04']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
debhelper \
devscripts \
zlib1g-dev \
gcc \
fakeroot \
lintian \
dpkg-dev

- name: Install runtime dependencies for testing
run: |
sudo apt-get install -y \
coreutils \
grep \
python3-lxml \
python3-yaml \
sed \
tar \
util-linux \
zlib1g \
python3 \
python3-libxml2

- name: Build packages
run: |
echo "Building Debian packages..."
# Try standard build first, fall back to manual if fakeroot fails
if ! dpkg-buildpackage -us -uc --build=binary 2>/dev/null; then
echo "Standard build failed, trying manual build..."
debian/rules clean
debian/rules build
sudo debian/rules binary
sudo chown -R $(id -u):$(id -g) debian/ ../*.deb 2>/dev/null || true
fi

- name: List built packages
run: |
echo "Built packages:"
ls -la ../*.deb

- name: Verify package contents
run: |
echo "=== open-vmdk package info ==="
dpkg-deb -I ../open-vmdk_*.deb
echo ""
echo "=== open-vmdk package contents ==="
dpkg-deb -c ../open-vmdk_*.deb
echo ""
echo "=== ovfenv package info ==="
dpkg-deb -I ../ovfenv_*.deb
echo ""
echo "=== ovfenv package contents ==="
dpkg-deb -c ../ovfenv_*.deb

- name: Run lintian checks
run: |
echo "Running lintian checks..."
lintian --no-tag-display-limit ../open-vmdk_*.deb || true
lintian --no-tag-display-limit ../ovfenv_*.deb || true

- name: Install packages
run: |
echo "Installing packages..."
sudo dpkg -i ../open-vmdk_*.deb ../ovfenv_*.deb || true
# Fix any dependency issues
sudo apt-get install -f -y

- name: Test installed binaries
run: |
echo "Testing installed binaries..."

# Test vmdk-convert
echo "=== Testing vmdk-convert ==="
vmdk-convert --help || vmdk-convert -h || echo "vmdk-convert help not available"
which vmdk-convert
ls -la $(which vmdk-convert)

# Test ova-compose
echo "=== Testing ova-compose ==="
ova-compose --help || ova-compose -h || echo "ova-compose help not available"
which ova-compose
ls -la $(which ova-compose)

# Test mkova.sh
echo "=== Testing mkova.sh ==="
mkova.sh --help || mkova.sh -h || echo "mkova.sh help not available"
which mkova.sh
ls -la $(which mkova.sh)

# Test ovfenv
echo "=== Testing ovfenv ==="
ovfenv --help || ovfenv -h || echo "ovfenv help not available"
which ovfenv
ls -la $(which ovfenv)

- name: Test configuration files
run: |
echo "Testing configuration files..."
echo "=== /etc/open-vmdk.conf ==="
cat /etc/open-vmdk.conf

echo "=== /var/lib/ovfenv directory ==="
ls -la /var/lib/ovfenv/

- name: Test OVF templates
run: |
echo "Testing OVF templates..."
echo "=== Templates directory ==="
ls -la /usr/share/open-vmdk/
echo "=== Sample template content ==="
head -20 /usr/share/open-vmdk/template-hw20.ovf

- name: Basic functionality test
run: |
echo "Running basic functionality tests..."

# Create a small test image
dd if=/dev/zero of=test.img bs=1M count=10

# Test vmdk-convert
echo "Testing vmdk-convert with test image..."
vmdk-convert test.img test.vmdk || echo "vmdk-convert failed (expected in CI environment)"

# Clean up
rm -f test.img test.vmdk

- name: Upload packages as artifacts
uses: actions/upload-artifact@v4
with:
name: debian-packages-ubuntu-${{ matrix.ubuntu-version }}
path: |
../*.deb
retention-days: 30

- name: Upload build logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs-ubuntu-${{ matrix.ubuntu-version }}
path: |
debian/
retention-days: 7

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 11 months ago

To fix the problem, explicitly add a permissions block at the root workflow level, immediately after the name: and before on:, or at the top of the jobs: section if scoping per job. This ensures the GITHUB_TOKEN used by this workflow has only the least privilege required, following the principle of least privilege.
In this case, set permissions: contents: read at the workflow root. This gives read access to repository contents and is the minimal necessary permission for this workflow (since it only checks out code and uploads artifacts; it does not interact with issues, PRs, or make repo changes).
The required change is to insert the following block after the name: line, shifting all subsequent lines down.

Suggested changeset 1
.github/workflows/debian-build-test.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/debian-build-test.yml b/.github/workflows/debian-build-test.yml
--- a/.github/workflows/debian-build-test.yml
+++ b/.github/workflows/debian-build-test.yml
@@ -1,4 +1,6 @@
 name: Build and Test Debian Packages
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Build and Test Debian Packages
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I requested a fix patch in directory

Comment thread .github/workflows/multi-arch-test.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/debian-build-test.yml Fixed
Comment thread .github/workflows/multi-arch-test.yml Fixed
Comment thread .github/workflows/simple-multi-arch.yml Fixed
Comment thread .github/workflows/vcf.yml Fixed
@oliverkurth
oliverkurth force-pushed the topic/okurth/debian-package branch from 79fe413 to 0df8e0f Compare September 10, 2025 17:46
@megane-vilain

Copy link
Copy Markdown

Hello @oliverkurth ,

I recently came across your RFP on the mentors.debian.net.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042360
And i made a package for the latest release before seeing this pull request.

The package is waiting for a review at the moment
https://mentors.debian.net/package/open-vmdk/)/package/open-vmdk/

I'm not sure what you would prefer for open-vmdk. I could remove the request if you prefer to upload it yourself.
Or if you any notes about the packages i made.

Thanks.

@oliverkurth

Copy link
Copy Markdown
Contributor Author

Hello @oliverkurth ,

I recently came across your RFP on the mentors.debian.net. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042360 And i made a package for the latest release before seeing this pull request.

Nice! I almost don't remember the RFP, I thought it wasn't going to be addressed.

The package is waiting for a review at the moment https://mentors.debian.net/package/open-vmdk/)/package/open-vmdk/

There's a typo in the URL, correct seems to be https://mentors.debian.net/package/open-vmdk/ . Where can I see your changes? Do I need to login?

I'm not sure what you would prefer for open-vmdk. I could remove the request if you prefer to upload it yourself. Or if you any notes about the packages i made.

I didn't intend to upload to Debian, I do not think I have the bandwidth for maintenance. I created this so I can build it for my dev machine which runs Ubuntu, and maybe it's useful for others too. But it would be great to have it in Debian proper!

I'll have a look at your version, as soon as I am able to.

@megane-vilain

Copy link
Copy Markdown

You're right, sorry about the typo in the link.
You don't need to login to see the files for the packages.
https://mentors.debian.net/debian/pool/main/o/open-vmdk/

In there you have

  • the description file
  • the orig.tar.gz - the open-vmdk original tar file
  • open-vmdk_0.3.12-1.debian.tar.xz - the debian files

You can use this to download all the files with one command

dget -x https://mentors.debian.net/debian/pool/main/o/open-vmdk/open-vmdk_0.3.12-1.dsc

I'll continue with the debian process and maintain it when it gets accepted!
The version I uploaded cannot be updated until the review but maybe I'll make some changes after.
I didn't think about packaging ovfenv when I made it but it would be a nice addition.

Thanks for taking the time to look at it.

@carlos2martinize carlos2martinize left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this payload it is for data, the canister files lead them selfs into operation

@carlos2martinize carlos2martinize left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think master and main need to be remerged

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.

4 participants