Skip to content

Commit

Permalink
Add licenses to Linux AppImage.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Jul 23, 2024
1 parent 4e265ae commit 8abe941
Show file tree
Hide file tree
Showing 16 changed files with 6,691 additions and 11 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,27 @@ jobs:
xvfb-run cargo test
if: runner.os == 'Linux'

- name: Install cargo-license (Linux)
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: cargo-license

- name: Gather licenses (Linux)
# If the default shell is used, one command failing does not fail the action.
shell: bash
run: |
pip install license-expression
python wix/rust_licenses.py > appimage/packetry.AppDir/usr/share/doc/LICENSE-static-libraries.txt
mv wix/full-licenses appimage/packetry.AppDir/usr/share/doc
cp LICENSE appimage/packetry.AppDir/usr/share/doc/LICENSE-packetry.txt
- name: Run build appimage action (Linux)
uses: ./appimage/
with:
executable: ./target/release/packetry
icon-file: ./appimage/dist/icon.png
desktop-file: ./appimage/dist/packetry.desktop
executable: target/release/packetry
icon-file: appimage/dist/icon.png
desktop-file: appimage/dist/packetry.desktop
appdir: appimage/packetry.AppDir

- name: Upload AppImage binary (Linux)
uses: actions/upload-artifact@v4
Expand All @@ -68,6 +83,13 @@ jobs:
path: packetry-x86_64.AppImage
if-no-files-found: error

- name: Upload AppImage binary (Linux)
uses: actions/upload-artifact@v4
with:
name: Linux AppDir
path: appimage/packetry.AppDir
if-no-files-found: error


create-docker-image:
permissions:
Expand Down
45 changes: 38 additions & 7 deletions appimage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ name: "AppImage"
description: "Builds a Linux AppImage on Debian 10 (Buster)"
inputs:
executable:
description: "Executable file"
description: "Executable file to package into an AppImage."
required: true
icon-file:
description: "Icon file to use for Executable"
description: "Icon file to use for the AppImage."
required: true
desktop-file:
description: "Desktop file to use for Executable"
description: "Desktop file to use for the AppImage."
required: true
appdir:
description: "Path to use for the AppImage filesystem."
required: true


runs:
using: composite
Expand All @@ -21,7 +23,7 @@ runs:
run: |
DEPLOY_GTK_VERSION=4 linuxdeploy-x86_64.AppImage \
--appimage-extract-and-run \
--appdir packetry.AppDir \
--appdir ${{ inputs.appdir }} \
--executable=${{ inputs.executable }} \
--icon-file ${{ inputs.icon-file }} \
--plugin gtk \
Expand All @@ -31,7 +33,7 @@ runs:
shell: bash
run: |
# cd to AppDir lib directory
cd $GITHUB_WORKSPACE/packetry.AppDir/usr/lib
cd $GITHUB_WORKSPACE/${{ inputs.appdir }}/usr/lib
# fix symlinks
rm libgdk_pixbuf-2.0.so
Expand Down Expand Up @@ -94,9 +96,38 @@ runs:
# return to workspace directory
cd $GITHUB_WORKSPACE
- name: Gather licenses (Linux)
shell: bash
run: |
# cd to AppDir /usr/share/doc directory
cd $GITHUB_WORKSPACE/${{ inputs.appdir }}/usr/share/doc
# remove any system licenses we don't actually link to
rm -rf libblkid1
rm -rf libbsd0
rm -rf libcroco3
rm -rf libicu63
rm -rf librsvg2-2
rm -rf libxau6
rm -rf libxcb-render0
rm -rf libxcursor1
rm -rf libxdamage1
rm -rf libxdmcp6
rm -rf libxext6
rm -rf libxfixes3
rm -rf libxi6
rm -rf libxinerama1
rm -rf libxml2
rm -rf libxrandr2
rm -rf libxrender1
rm -rf libzstd1
# Return to workspace directory
cd $GITHUB_WORKSPACE
- name: Build packetry-x86_64.AppImage (Linux)
shell: bash
run: |
appimagetool-x86_64.AppImage \
--appimage-extract-and-run \
packetry.AppDir/
${{ inputs.appdir }}/
5 changes: 4 additions & 1 deletion appimage/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ WORKDIR $HOME

RUN rm -rf \
.cache \
.pyenv \
gtk-$GTK_VERSION


Expand Down Expand Up @@ -198,6 +197,10 @@ ENV NVM_DIR="$HOME/.nvm"
ENV NODE_PATH="$NVM_DIR/versions/node/$NODE_VERSION/bin"
ENV PATH="$NVM_DIR:$NODE_PATH:$PATH"

# pyenv
ENV PYENV_ROOT="/home/runner/.pyenv"
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"

# rust
ENV PATH="$HOME/.cargo/bin:$PATH"

Expand Down
128 changes: 128 additions & 0 deletions appimage/packetry.AppDir/usr/share/doc/libgdk-pixbuf-2.0-0/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gdk-pixbuf
Source: https://download.gnome.org/sources/gdk-pixbuf/
Files-Excluded:
docs/gdk-pixbuf
docs/gdk-pixdata
tests/bug753605-atsize.jpg
Comment:
The documentation is rebuilt from source.
For the test see <https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/84>.

Files: *
Copyright:
Copyright (C) 1999-2016 Red Hat, Inc
Copyright (C) 1999-2003 The Free Software Foundation
Copyright (C) 1998-2018 Free Software Foundation, Inc.
Copyright (C) 1999, 2001 Tim Janik
Copyright (C) 2000 Havoc Pennington
Copyright (C) 2004 Dom Lachowicz
Copyright (C) 2008 Dominic Lachowicz
Copyright (C) 2008 Alberto Ruiz
Copyright (C) 2007 Google (Evan Stade)
Copyright (C) 1999 Mark Crichton
Copyright (C) 2007 Lyonel Vincent
Copyright (C) 2007 Bastien Nocera
Copyright (C) 1999 Michael Zucchi
Copyright (C) 2003 Josh. A. Beam
Copyright (C) 2008 Kevin Peng
Copyright (C) 1999 Nicola Girardi
Copyright (C) 1999 Mark Crichton
Copyright (C) 2001 Eazel, Inc
Copyright (C) 2001-2007 Sun Microsystems, Inc
Copyright (C) John Harper
Copyright (C) 1999 Michael Zucchi
Copyright (C) 2011-2016 Chun-wei Fan
Copyright (C) 2015 Kalev Lember
Copyright (C) 2003-2006 David Schleef
Copyright (C) 2004 Zuza Software Foundation
Copyright (C) 2004-2021 GNOME Foundation
Copyright (C) 2004 Adam Weinberger
Copyright (C) 2004-2007 Rosetta Contributors
Copyright (C) 2004-2014 Canonical Ltd.
Copyright (C) 2006 Lukas Novotny
Copyright (C) 2003-2005 Miloslav Trmac
Copyright (C) 2007-2010 The GNOME Project
Copyright (C) 2000-2005 Sharif FarsiWeb, Inc.
Copyright (C) 1999-2000 Jesus Bravo Alvarez
Copyright (C) 2003 OpenMN team
Copyright (C) 2005-2007 Free Software Foundation, Andhra Pradesh
Copyright (C) Croatiann Team
Copyright (C) 2004 Gurban Mühemmet Tewekgeli
Copyright (C) 2004 Kakilik - Turkmen free software developers community
Copyright (C) 2010 GNOME i18n Project for Vietnamese
License: LGPL-2+ and LGPL-2.1+ and CC0-1.0

Files:
tests/*
gdk-pixbuf/test-gdk-pixbuf.c
thumbnailer/*
Copyright:
Copyright (C) 2013-2016 Red Hat, Inc
Copyright (C) 2001 Søren Sandmann
Copyright (C) 2004 Matthias Clasen
Copyright (C) 2013-2016 Bastien Nocera
Copyright (C) 2014 Canonical Ltd.
Copyright (C) 2016 Martin Guy
License: GPL-2+

License: CC0-1.0
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
.
You should have received a copy of the CC0 Public Domain Dedication along with
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
.
On Debian systems, the complete text of the CC0 1.0 Universal license can be
found in "/usr/share/common-licenses/CC0-1.0".

License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.

License: LGPL-2+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL-2'.

License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
Loading

0 comments on commit 8abe941

Please sign in to comment.