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

Bugs in debian/package.sh #317

Open
TimSpence opened this issue Sep 22, 2020 · 2 comments
Open

Bugs in debian/package.sh #317

TimSpence opened this issue Sep 22, 2020 · 2 comments

Comments

@TimSpence
Copy link
Contributor

Some have been previously mentioned: #256. The script makes assumptions about system capabilities and fails to terminate when those assumptions aren't met. In particular, it assumes fakeroot is available. If fakeroot is not available, execution continues and multiple files are deleted from the working copy. This is the outcome:

❯ git status
On branch fix-builder
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   DEBIAN/control
        deleted:    package.sh
        deleted:    usr/share/doc/pathpicker/changelog

It also assumes the script executes from debian/, so it fails when run from project root.

I can fix this in two ways.

  1. Fix package.sh so that it terminates if any command returns a non-zero exit code.
  2. Dockerize the build process so that the end user can build and install fpp without having to understand the package build process.

Option 1 is simpler, but 2 is preferable (as long as we assume the user has Docker running). Option 2 also automates the build process, which may be desirable if Facebook wants to host the package in a mirror.

@bduffany
Copy link

It also assumes "python" is available which isn't true on Ubuntu 20.04 AFAIK. It depends on either an installation of python 2 or installing the package python-is-python3 (which symlinks python to python3)

@pcottle
Copy link
Contributor

pcottle commented Dec 24, 2020

Sorry about the delay here! Yes there are definitely a lot of assumptions in the build process -- having a dockerized version would be great but lets start by merging your PR so the script doesn't continue after errors.

Sorry for the delay in merging!

pcottle added a commit that referenced this issue Dec 24, 2020
Terminate debian/package.sh on error: Issue #317
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

No branches or pull requests

3 participants