Skip to content

Bugs in debian/package.sh #317

Open
Open

Description

@TimSpence

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.

Activity

  1. bduffany commented on Dec 15, 2020

    @bduffany

    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)

  2. pcottle commented on Dec 24, 2020

    @pcottle
    Contributor

    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!

  3. added a commit that references this issue on Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions