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

Update packaging.md for Ubuntu package building #3243

Merged
merged 2 commits into from
Jun 15, 2023
Merged

Update packaging.md for Ubuntu package building #3243

merged 2 commits into from
Jun 15, 2023

Conversation

pimvh
Copy link
Contributor

@pimvh pimvh commented Jun 14, 2023

Hi! I've tried building a package on Ubuntu Jammy Jellyfish with the command specified in this docs (with sudo, as my user was not in the docker group). I ran into the following issue however (nearing the end of the build):

....
....
....
Successfully tagged ubuntu-pkgs-make:jammy
docker \
        run --rm --pid=host --network=host --privileged -v /etc/os-release:/etc/os-release-host:ro -v /home/superpim/tracee:/tracee/tracee -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /sys/kernel/security:/sys/kernel/security:ro -e LIBBPFGO_OSRELEASE_FILE=/etc/os-release-host \
        -it ubuntu-pkgs-make:jammy \
        packaging/ubuntu-pkgs.sh bin jammy


fatal: detected dubious ownership in repository at '/tracee/tracee'
To add an exception for this directory, call:

        git config --global --add safe.directory /tracee/tracee
dpkg-buildpackage: warning:     debian/changelog(l1): version '~22.04~2306141456-' is invalid: revision cannot be empty
LINE: tracee (~22.04~2306141456-) jammy; urgency=medium
dpkg-buildpackage: info: source package tracee
dpkg-buildpackage: info: source version unknown
dpkg-buildpackage: error: version number does not start with digit
mv: cannot stat '../*.deb': No such file or directory
rm .ubuntu-pkgs-prepare-jammy .check_docker

Seems to be a permission issue.

I think adding this or something similar to the docs could be beneficial for the read-and-run documentation readers.

1. Explain what the PR does

It adds a little bit to the Ubuntu installation docs, to make this issue avoidable for other people.

2. Explain how to test it

You can run the commands to build a package on a Ubuntu machine, on which your user is not part of the docker group (you will have to sudo make ..., and if you did not clone the repo as root, you will get this issue.

Hi!  I've tried building a package on Ubuntu Jammy Jellyfish with the command specified in this docs (with `sudo`, as my user was not in the docker group). I ran into the following issues however:

```
....
Successfully tagged ubuntu-pkgs-make:jammy
docker \
        run --rm --pid=host --network=host --privileged -v /etc/os-release:/etc/os-release-host:ro -v /home/superpim/tracee:/tracee/tracee -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /sys/kernel/security:/sys/kernel/security:ro -e LIBBPFGO_OSRELEASE_FILE=/etc/os-release-host \
        -it ubuntu-pkgs-make:jammy \
        packaging/ubuntu-pkgs.sh bin jammy


fatal: detected dubious ownership in repository at '/tracee/tracee'
To add an exception for this directory, call:

        git config --global --add safe.directory /tracee/tracee
dpkg-buildpackage: warning:     debian/changelog(l1): version '~22.04~2306141456-' is invalid: revision cannot be empty
LINE: tracee (~22.04~2306141456-) jammy; urgency=medium
dpkg-buildpackage: info: source package tracee
dpkg-buildpackage: info: source version unknown
dpkg-buildpackage: error: version number does not start with digit
mv: cannot stat '../*.deb': No such file or directory
rm .ubuntu-pkgs-prepare-jammy .check_docker

```
Seems to be a permission issue.

I think adding this or something similar to the docs could be beneficial for the read-and-run documentation readers.
@CLAassistant
Copy link

CLAassistant commented Jun 14, 2023

CLA assistant check
All committers have signed the CLA.

@pimvh pimvh marked this pull request as ready for review June 14, 2023 20:48
@pimvh pimvh changed the title Update packaging.md Update packaging.md for Ubuntu package building Jun 14, 2023
Added same snippet to Fedora below
@rafaeldtinoco rafaeldtinoco merged commit 8a5c08f into aquasecurity:main Jun 15, 2023
2 checks passed
@rafaeldtinoco
Copy link
Contributor

Thanks for the contribution.

@pimvh pimvh deleted the patch-1 branch June 15, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants