mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Merge pull request #25 from firstlookmedia/linux_packaging
Linux packaging
This commit is contained in:
commit
f279caeb16
6 changed files with 221 additions and 7 deletions
214
.circleci/config.yml
Normal file
214
.circleci/config.yml
Normal file
|
@ -0,0 +1,214 @@
|
|||
version: 2.1
|
||||
|
||||
jobs:
|
||||
|
||||
build-ubuntu-disco:
|
||||
docker:
|
||||
- image: ubuntu:19.04
|
||||
steps:
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
apt-get update
|
||||
apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg
|
||||
gem install --no-ri --no-rdoc rake
|
||||
gem install --no-ri --no-rdoc package_cloud
|
||||
- checkout
|
||||
- run:
|
||||
name: "Pull submodules"
|
||||
command: |
|
||||
git submodule init
|
||||
git submodule update --remote
|
||||
- run:
|
||||
name: Create the .deb package
|
||||
command: |
|
||||
./install/linux/build_deb.py
|
||||
dpkg -i deb_dist/dangerzone_*-1_all.deb
|
||||
- run:
|
||||
name: Deploy to packagecloud.io
|
||||
command: |
|
||||
VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2)
|
||||
package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/dangerzone_${VERSION}-1_all.deb
|
||||
package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/dangerzone_${VERSION}-1.dsc
|
||||
|
||||
build-ubuntu-eoan:
|
||||
docker:
|
||||
- image: ubuntu:19.10
|
||||
steps:
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
apt-get update
|
||||
apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg
|
||||
gem install --no-ri --no-rdoc rake
|
||||
gem install --no-ri --no-rdoc package_cloud
|
||||
- checkout
|
||||
- run:
|
||||
name: "Pull submodules"
|
||||
command: |
|
||||
git submodule init
|
||||
git submodule update --remote
|
||||
- run:
|
||||
name: Create the .deb package
|
||||
command: |
|
||||
./install/linux/build_deb.py
|
||||
dpkg -i deb_dist/dangerzone_*-1_all.deb
|
||||
- run:
|
||||
name: Deploy to packagecloud.io
|
||||
command: |
|
||||
VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2)
|
||||
package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/dangerzone_${VERSION}-1_all.deb
|
||||
package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/dangerzone_${VERSION}-1.dsc
|
||||
|
||||
build-debian-buster:
|
||||
docker:
|
||||
- image: debian:buster
|
||||
steps:
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
apt-get update
|
||||
apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg
|
||||
gem install --no-ri --no-rdoc rake
|
||||
gem install --no-ri --no-rdoc package_cloud
|
||||
- checkout
|
||||
- run:
|
||||
name: "Pull submodules"
|
||||
command: |
|
||||
git submodule init
|
||||
git submodule update --remote
|
||||
- run:
|
||||
name: Create the .deb package
|
||||
command: |
|
||||
./install/linux/build_deb.py
|
||||
dpkg -i deb_dist/dangerzone_*-1_all.deb
|
||||
- run:
|
||||
name: Deploy to packagecloud.io
|
||||
command: |
|
||||
VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2)
|
||||
package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1_all.deb
|
||||
package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1.dsc
|
||||
|
||||
build-debian-bullseye:
|
||||
docker:
|
||||
- image: debian:bullseye
|
||||
steps:
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
apt-get update
|
||||
apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg
|
||||
gem install --no-ri --no-rdoc rake
|
||||
gem install --no-ri --no-rdoc package_cloud
|
||||
- checkout
|
||||
- run:
|
||||
name: "Pull submodules"
|
||||
command: |
|
||||
git submodule init
|
||||
git submodule update --remote
|
||||
- run:
|
||||
name: Create the .deb package
|
||||
command: |
|
||||
./install/linux/build_deb.py
|
||||
dpkg -i deb_dist/dangerzone_*-1_all.deb
|
||||
- run:
|
||||
name: Deploy to packagecloud.io
|
||||
command: |
|
||||
VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2)
|
||||
package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1_all.deb
|
||||
package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1.dsc
|
||||
|
||||
build-fedora-30:
|
||||
docker:
|
||||
- image: fedora:30
|
||||
steps:
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-appdirs python3-click python3-pyxdg python3-requests
|
||||
gem install package_cloud
|
||||
- checkout
|
||||
- run:
|
||||
name: "Pull submodules"
|
||||
command: |
|
||||
git submodule init
|
||||
git submodule update --remote
|
||||
- run:
|
||||
name: Create the .rpm package
|
||||
command: |
|
||||
./install/linux/build_rpm.py
|
||||
dnf install -y dist/dangerzone-*-1.noarch.rpm
|
||||
- run:
|
||||
name: Deploy to packagecloud.io
|
||||
command: |
|
||||
VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2)
|
||||
package_cloud push firstlookmedia/code/fedora/30 dist/dangerzone-${VERSION}-1.noarch.rpm
|
||||
package_cloud push firstlookmedia/code/fedora/30 dist/dangerzone-${VERSION}-1.src.rpm
|
||||
|
||||
build-fedora-31:
|
||||
docker:
|
||||
- image: fedora:31
|
||||
steps:
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-appdirs python3-click python3-pyxdg python3-requests
|
||||
gem install package_cloud
|
||||
- checkout
|
||||
- run:
|
||||
name: "Pull submodules"
|
||||
command: |
|
||||
git submodule init
|
||||
git submodule update --remote
|
||||
- run:
|
||||
name: Create the .rpm package
|
||||
command: |
|
||||
./install/linux/build_rpm.py
|
||||
dnf install -y dist/dangerzone-*-1.noarch.rpm
|
||||
- run:
|
||||
name: Deploy to packagecloud.io
|
||||
command: |
|
||||
VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2)
|
||||
package_cloud push firstlookmedia/code/fedora/31 dist/dangerzone-${VERSION}-1.noarch.rpm
|
||||
package_cloud push firstlookmedia/code/fedora/31 dist/dangerzone-${VERSION}-1.src.rpm
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-tags:
|
||||
jobs:
|
||||
- build-ubuntu-disco:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- build-ubuntu-eoan:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- build-debian-buster:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- build-debian-bullseye:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- build-fedora-30:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- build-fedora-31:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
4
BUILD.md
4
BUILD.md
|
@ -12,7 +12,7 @@ git submodule update
|
|||
Install dependencies:
|
||||
|
||||
```sh
|
||||
sudo apt install -y python-all python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg
|
||||
sudo apt install -y python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg python3-requests
|
||||
```
|
||||
|
||||
Run from source tree:
|
||||
|
@ -32,7 +32,7 @@ Create a .deb:
|
|||
Install dependencies:
|
||||
|
||||
```sh
|
||||
sudo dnf install -y rpm-build python3 python3-qt5 python3-appdirs python3-click
|
||||
sudo dnf install -y rpm-build python3 python3-qt5 python3-appdirs python3-click python3-pyxdg python3-requests
|
||||
```
|
||||
|
||||
Run from source tree:
|
||||
|
|
|
@ -15,7 +15,7 @@ from .docker_installer import (
|
|||
DockerInstaller,
|
||||
)
|
||||
|
||||
dangerzone_version = "0.1.0"
|
||||
dangerzone_version = "0.0.1"
|
||||
|
||||
|
||||
class Application(QtWidgets.QApplication):
|
||||
|
|
|
@ -39,7 +39,7 @@ def main():
|
|||
"python3",
|
||||
"setup.py",
|
||||
"bdist_rpm",
|
||||
"--requires=python3-qt5,python3-appdirs,python3-click",
|
||||
"--requires=python3-qt5,python3-appdirs,python3-click,python3-pyxdg,python3-requests",
|
||||
]
|
||||
)
|
||||
|
||||
|
|
4
setup.py
4
setup.py
|
@ -32,10 +32,10 @@ setuptools.setup(
|
|||
("share/dangerzone/container", file_list("share/container")),
|
||||
("share/dangerzone/container/scripts", file_list("share/container/scripts")),
|
||||
],
|
||||
classifiers=(
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"Operating System :: OS Independent",
|
||||
),
|
||||
],
|
||||
entry_points={"console_scripts": ["dangerzone = dangerzone:main"]},
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[DEFAULT]
|
||||
Package3: dangerzone
|
||||
Depends3: docker.io, python3, python3-pyqt5, python3-appdirs, python3-click, python3-xdg
|
||||
Depends3: docker.io, python3, python3-pyqt5, python3-appdirs, python3-click, python3-xdg, python3-requests
|
||||
Build-Depends: python3, python3-all
|
||||
Suite: bionic
|
||||
X-Python3-Version: >= 3.7
|
Loading…
Reference in a new issue