Skip to content

Commit

Permalink
Set up github workflow for deb package build
Browse files Browse the repository at this point in the history
  • Loading branch information
blackhole89 committed Dec 25, 2020
1 parent 12009d6 commit c65c016
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/package-deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: deb package

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- name: inspect shady library
run: apt-cache showpkg libgcc-s1
- name: removing gcc10
run: sudo apt remove libgcc-10-dev
- name: setting the dependencies up
run: sudo apt install libfontconfig1-dev zlib1g-dev libjsoncpp-dev libgtksourceviewmm-3.0-dev libgtkmm-3.0-dev cmake debhelper=12.1.1ubuntu1~ubuntu18.04.1 dpkg-dev
- name: running debhelper
run: dpkg-buildpackage -b -uc
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-deb"
prerelease: true
title: "Ubuntu 18.04 package for development version"
files: ../notekit_0.1-1_amd64.deb

6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: notekit
Section: text
Priority: optional
Maintainer: Matvey Soloviev <[email protected]>
Build-Depends: cmake, debhelper-compat (= 13)
Build-Depends: cmake, libfontconfig1-dev, zlib1g-dev, libjsoncpp-dev, libgtksourceviewmm-3.0-dev, libgtkmm-3.0-dev, debhelper-compat (= 12)
Standards-Version: 4.5.1
Homepage: https://github.com/blackhole89/notekit
#Vcs-Browser: https://salsa.debian.org/debian/notekit
Expand All @@ -12,5 +12,5 @@ Rules-Requires-Root: no
Package: notekit
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Description: Markdown note-taking app with tablet support and LaTeX math

10 changes: 5 additions & 5 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@


%:
rm -f Makefile
./install-clatexmath.sh

This comment has been minimized.

Copy link
@sp1ritCS

sp1ritCS Dec 25, 2020

Contributor

Avoid using internet during build.

https://reproducible-builds.org/

dh $@


# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
override_dh_auto_configure:
dh_auto_configure -- \
-DHAVE_CLATEXMATH=ON
1 change: 1 addition & 0 deletions debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extend-diff-ignore = "^(cLaTeXMath/|data/|cmake-build-Release|config|sourceview|.git)"

3 comments on commit c65c016

@sp1ritCS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to use the OBS for packages?

@blackhole89
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the OBS?

This workflow wound up going nowhere anyway; Github's Ubuntu 18.04 is pretty messed up (they've backported gcc 10, resulting in every package obtaining a dependency on libgcc-s1 that can't actually be resolved on normal Ubuntu 18.04 or derivatives). I wound up making a deb build in a PPA instead, which was troublesome in its own way because their Ubuntu is simply old - but their build servers don't get internet access, so I had to slightly refactor the build process to not clone clatexmath. Maybe I'll be able to write a github workflow file to automatically upload to that eventually (though I'm not sure how, since I have to sign all uploads with my RSA key).

Also, don't actions like "marvinpinto/action-automatic-releases@latest" amount to "using the internet during build"? Presumably, the author could change the code of that action to anything.

@sp1ritCS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OBS in the sense of the Open Build Service developed by the openSUSE Community. The most popular instance is build.opensuse.org hosted by SUSE. Despite the development team, it builds packages for a lot of Linux distributions. (openSUSE, SLE, Arch, Raspbian, Debian, Fedora, ScientificLinux, RHEL, CentOS, Ubuntu, Univention, Mageia, IBM PowerKVM, AppImage & KIWI). Similar to ubuntus ppa's, they island-build all packages, so you cant use internet during build. They also generate a keypair and sign built packages (at least for rpm).
I'm already building openSUSE and Fedora packages for NoteKit and cLaTeXMath aswell as an AppImage.

Also, don't actions like "marvinpinto/action-automatic-releases@latest" amount to "using the internet during build"?

Well yeah, but at that point the binary is already compiled, so it should still be "reproducible".

Please sign in to comment.