Linux system package builds hardcode the app version
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 40
Description
### Describe the bug
Briefcase raise an error when i am trying to build another binary.
The building process creates in the wrong directory the binary.
In my case it creates the actual binary in `pr-0.0.3` instead of `pr-0.0.4`.
### Steps to reproduce
1. Make a new app
2. Create the first build `briefcase build`
3. Update `'pyproject.toml'.version` (Any change of the version, e.g. `"0.0.1"` to `"0.0.2"`)
4. Try building `briefcase build`
5. See error
### Expected behavior
Expected:
A successful build of a debian package.
_Detailed:
Binary in the right directory._
### Screenshots
_No response_
### Environment
- Operating System: Linux, Ubuntu 22.04.3 LTS
- Python version: 3.10.12
- Software versions:
- Briefcase: 0.3.16
- Toga: 0.4.0
_also 0.3.1_
- ...
### Logs
```
[beeware_program] Building application... system.py:662
Build bootstrap binary... system.py:664
subprocess.py:711
>>> Running Command: subprocess.py:712
>>> make -C bootstrap install subprocess.py:713
>>> Working Directory: subprocess.py:720
>>> /home/user/beeware_project/beeware_program/beeware_program/build/beeware_program/ubuntu/jammy subprocess.py:721
make: Verzeichnis „/home/user/beeware_project/beeware_program/beeware_program/build/beeware_program/ubuntu/jammy/bootstrap“ wird subprocess.py:685
betreten
-> mkdir -p ../beeware_program-0.0.3/usr/bin subprocess.py:685
cp beeware_program ../beeware_program-0.0.3/usr/bin subprocess.py:685
make: Verzeichnis „/home/user/beeware_project/beeware_program/beeware_program/build/beeware_program/ubuntu/jammy/bootstrap“ wird subprocess.py:685
verlassen
>>> Return code: 0 subprocess.py:748
Building bootstrap binary... done system.py:665
Installing license... done system.py:694
Installing changelog... done system.py:708
Installing man page... done system.py:738
Update file permissions... system.py:752
Updating file permissions on beeware_program-0.0.4/usr/share/doc/beeware_program/copyright from 664 to 644 system.py:766
Updating file permissions... done system.py:753
subprocess.py:711
>>> Running Command: subprocess.py:712
>>> strip subprocess.py:713
/home/user/beeware_project/beeware_program/beeware_program/build/beeware_program/ubuntu/jammy/beeware_program-0.0.4/usr/bin/beeware_program
>>> Working Directory: subprocess.py:720
>>> /home/user/beeware_project/beeware_program/beeware_program subprocess.py:721
>>> Command Output: subprocess.py:737
>>> strip: subprocess.py:739
‚/home/user/beeware_project/beeware_program/beeware_program/build/beeware_program/ubuntu/jammy/beeware_program-0.0.4/usr/bin/beeware_program‛:
Keine solche Datei
>>> Return code: 1 subprocess.py:748
Stripping binary... system.py:773
```
```
CalledProcessError: Command '['strip', '/home/user/beeware_project/beeware_program/beeware_program/build/beeware_program/ubuntu/jammy/beeware_program-0.0.4/usr/bin/beeware_program']' returned non-zero exit status 1.
```
### Additional context
Work around:
Delete `pr/build/pr/ubuntu/` folder, than try building.
Contributor guide
Research direction
Start in system.py around the logged bootstrap build steps and inspect the `make -C bootstrap install` invocation and its working directory. Reproduce the build after changing `pyproject.toml.version`; done means the bootstrap binary is placed in the current versioned directory and the Debian package build completes without the `strip` error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100