Merge lp:~buo-ren-lin/audio-recorder/audio-recorder into lp:audio-recorder

Proposed by 林博仁(Buo-ren, Lin)
Status: Approved
Approved by: moma
Approved revision: 1433
Proposed branch: lp:~buo-ren-lin/audio-recorder/audio-recorder
Merge into: lp:audio-recorder
Diff against target: 301 lines (+273/-0)
5 files modified
.bzrignore (+11/-0)
.editorconfig (+10/-0)
snap/local/launchers/audio-recorder-launch (+13/-0)
snap/local/patches/postprocess-desktop-entries.sed (+28/-0)
snap/snapcraft.yaml (+211/-0)
To merge this branch: bzr merge lp:~buo-ren-lin/audio-recorder/audio-recorder
Reviewer Review Type Date Requested Status
moma Approve
Review via email: mp+364203@code.launchpad.net

Commit message

Implement snap packaging, snaps are universal linux packages

This patch implements the changes to package Audio Recorder as a snap.

Signed-off-by: 林博仁(Buo-ren, Lin) <email address hidden>

To post a comment you must log in.
1433. By 林博仁(Buo-ren, Lin)

Additional changes:

* Drop unnecessary code
* Implement a launcher for runtime environment modification and snap maintenance

Signed-off-by: 林博仁(Buo-ren, Lin) <email address hidden>

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Before publishing the snap directly from this repository we will have to request a [snap namespace transfer](https://forum.snapcraft.io/search?q=name%20transfer%20category%3Astore) on [the Snapcraft Forum](http://forum.snapcraft.io).

Revision history for this message
moma (osmoma) wrote :

all good

review: Approve
Revision history for this message
Rootbrian (rootbrian2000) wrote :

Flatpak is more universal and is included, without having to install separately in Linux Mint and ubuntu based distributions. Same could be said with debian.

Sent from my BlackBerry 10 smartphone.
  Original Message
From: 林博仁(Buo-ren, Lin)
Sent: Saturday, March 9, 2019 4:36 AM
To: <email address hidden>
Reply To: <email address hidden>
Subject: [Audio-recorder] [Merge] lp:~buo-ren-lin/audio-recorder/audio-recorder into lp:audio-recorder

The proposal to merge lp:~buo-ren-lin/audio-recorder/audio-recorder into lp:audio-recorder has been updated.

Commit message changed to:

Implement snap packaging, snaps are universal linux packages

This patch implements the changes to package Audio Recorder as a snap.

Signed-off-by: 林博仁(Buo-ren, Lin) <email address hidden>

For more details, see:
https://code.launchpad.net/~buo-ren-lin/audio-recorder/audio-recorder/+merge/364203
--
Your team Audio-recorder is requested to review the proposed merge of lp:~buo-ren-lin/audio-recorder/audio-recorder into lp:audio-recorder.

--
Mailing list: https://launchpad.net/~audio-recorder
Post to : <email address hidden>
Unsubscribe : https://launchpad.net/~audio-recorder
More help : https://help.launchpad.net/ListHelp

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Though I have no objections in particular on adopting the Flatpak technology...

> Flatpak is more universal and is included, without having to install separately in Linux Mint and ubuntu based distributions

AFAICT only Snapd support is pre-installed in Ubuntu

Unmerged revisions

1433. By 林博仁(Buo-ren, Lin)

Additional changes:

* Drop unnecessary code
* Implement a launcher for runtime environment modification and snap maintenance

Signed-off-by: 林博仁(Buo-ren, Lin) <email address hidden>

1432. By 林博仁(Buo-ren, Lin)

Implement snap packaging, snaps are universal linux packages

This patch implements the changes to package Audio Recorder as a snap.

Signed-off-by: 林博仁(Buo-ren, Lin) <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2019-03-09 10:02:53 +0000
@@ -0,0 +1,11 @@
1# Ignore rules for Bazaar
2# Usage: bzr help ignore
3
4# Snap packaging specific rules
5./snap/.snapcraft
6./parts
7./stage
8./prime
9
10./*.snap
11./*_source.tar.*
012
=== added file '.editorconfig'
--- .editorconfig 1970-01-01 00:00:00 +0000
+++ .editorconfig 2019-03-09 10:02:53 +0000
@@ -0,0 +1,10 @@
1# Configuration for EditorConfig <https://EditorConfig.org>
2root = true
3
4[snap/snapcraft.yaml]
5indent_style = space
6indent_size = 4
7end_of_line = lf
8charset = utf-8
9trim_trailing_whitespace = true
10insert_final_newline = true
011
=== added directory 'snap'
=== added directory 'snap/local'
=== added directory 'snap/local/launchers'
=== added file 'snap/local/launchers/audio-recorder-launch'
--- snap/local/launchers/audio-recorder-launch 1970-01-01 00:00:00 +0000
+++ snap/local/launchers/audio-recorder-launch 2019-03-09 10:02:53 +0000
@@ -0,0 +1,13 @@
1#!/usr/bin/env bash
2# This is the maintainence launcher for the snap, make necessary runtime environment changes to make the snap work here. You may also insert security confinement/deprecation/obsoletion notice of the snap here.
3
4set \
5 -o errexit \
6 -o errtrace \
7 -o nounset \
8 -o pipefail
9
10#export IMPORTANT_ENVIRONMENT_VARIABLE=value
11
12# Finally run the next part of the command chain
13exec "${@}"
014
=== added directory 'snap/local/patches'
=== added file 'snap/local/patches/postprocess-desktop-entries.sed'
--- snap/local/patches/postprocess-desktop-entries.sed 1970-01-01 00:00:00 +0000
+++ snap/local/patches/postprocess-desktop-entries.sed 2019-03-09 10:02:53 +0000
@@ -0,0 +1,28 @@
1# This sed script processes desktop entries of the snapped
2# application.
3#
4# Documentation:
5#
6# * GNU Sed Manual
7# https://www.gnu.org/software/sed/manual
8# * `sed` script overview - `sed` scripts
9# * `sed` commands summary - `sed` scripts
10# * The `s` Command - `sed` scripts
11# * Overview of basic regular expression syntax - Regular
12# Expressions: selecting text
13# * Back-references and Subexpressions - Regular Expressions:
14# selecting text
15
16## Append '(Snappy Edition)' to the application name to make it
17## distinguishable with the other same application using different
18## software distribution technologies
19##
20## FIXME: The appended string is not localizable, the proper way to
21## implement this is to probably use a new X-Snappy-Name keys
22## with localestring format to let the translators fill in
23## additional localized string and use these values to replace
24## the Name keys here.
25s/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g
26
27## Fix-up application icon lookup
28s|^Icon=.*|Icon=\${SNAP}/meta/gui/icon.svg|
029
=== added file 'snap/snapcraft.yaml'
--- snap/snapcraft.yaml 1970-01-01 00:00:00 +0000
+++ snap/snapcraft.yaml 2019-03-09 10:02:53 +0000
@@ -0,0 +1,211 @@
1%YAML 1.1
2---
3name: audio-recorder
4summary: A free audio-recorder for Linux
5description: |
6 This amazing program allows you to record your favourite music or audio to a file.
7 It can record audio from your system's soundcard, microphones, browsers, webcams & more.
8 Put simply; if it plays out of your loudspeakers you can record it.
9
10 It has an advanced timer that can:
11
12 * Start, stop or pause recording at a given clock time.
13 * Start, stop or pause after a time period.
14 * Stop when the recorded file size exceeds a limit.
15 * Start recording on voice or sound (user can set the audio threshold and delay).
16 * Stop or pause recording on "silence" (user can set the audio threshold and delay).
17
18 The recording can be atomatically controlled by:
19
20 * RhytmBox audio player.
21 * Banshee audio player.
22 * Amarok, VLC, Audacious and other MPRIS2 compatible players.
23 * Skype. It can automatically record all your Skype calls without any user interaction.
24
25 This program supports several audio (output) formats such as OGG audio, Flac, MP3 and WAV.
26
27 User can also control the recorder from command line with --command <arg> option.
28 See audio-recorder --help for more information.
29
30 ## INFORMATION REGARDING TO SECURITY CONFINEMENT ##
31
32 Connect the snap to the `removable-media` slot to allow saving recordings to /media and /mnt:
33
34 sudo snap connect audio-recorder:removable-media
35
36icon: icons/hicolor/scalable/apps/audio-recorder.svg
37
38adopt-info: audio-recorder
39grade: stable
40confinement: strict
41
42plugs:
43 # graphical resources access
44 desktop:
45 desktop-legacy:
46 x11:
47 unity7:
48
49 # storage access
50 home:
51 removable-media:
52
53 # audio access
54 pulseaudio:
55
56 # FIXME: Yet to be evaluated
57 gsettings:
58 mpris:
59
60 # FIXME: Required by v4l2 plugin of Gstreamer, should be dropped.
61 hardware-observe:
62
63#slots:
64 # dbus access
65 #dbus-service:
66
67 # FIXME: Doesn't appear to work
68 #dbus-service:
69 #interface: dbus
70 #name: org.gnome.API.AudioRecorderInterface
71 #bus: session
72
73parts:
74 # Patches to fix other parts
75 patches:
76 source: snap/local/patches
77 source-type: local
78 plugin: dump
79
80 organize:
81 '*': patches/
82
83 prime:
84 - -*
85
86 # Launchers to deal with runtime problems
87 launchers:
88 source: snap/local/launchers
89 plugin: dump
90
91 organize:
92 '*': bin/
93
94 desktop-gtk3:
95
96 audio-recorder:
97 after:
98 - patches
99
100 source: lp:audio-recorder
101 override-pull: |
102 set -eu
103
104 bzr checkout \
105 --lightweight \
106 lp:audio-recorder \
107 .
108
109 upstream_version="$(
110 grep AC_INIT configure.ac \
111 | cut --delimiter=',' --field=2 \
112 | sed --regexp-extended 's/.*\[(.*)\].*$/\1/'
113 )"
114
115 upstream_dirtiness=''
116 if \
117 test \
118 "$(
119 bzr version-info \
120 --custom \
121 --template={clean}
122 )" \
123 -eq \
124 0; then
125 upstream_dirtiness=-dirty
126 fi
127
128 upstream_revision="$(
129 bzr version-info \
130 --custom \
131 --template={revno}
132 )"
133 cd ../../..
134
135 snapcraftctl set-version "${upstream_version}+rev${upstream_revision}${upstream_dirtiness}"
136
137 plugin: autotools
138 configflags:
139 - --datarootdir=/snap/$SNAPCRAFT_PROJECT_NAME/current/share
140 build-packages:
141 - gcc
142 - intltool
143 - libappindicator3-dev
144 - libc6-dev
145 - libglib2.0-dev
146 - libgstreamer1.0-dev
147 - libgstreamer-plugins-base1.0-dev
148 - libgtk-3-dev
149 - pkg-config
150 stage-packages:
151 - gstreamer1.0-libav
152 - gstreamer1.0-plugins-base
153 - gstreamer1.0-plugins-good
154 - gstreamer1.0-plugins-ugly
155 - gstreamer1.0-pulseaudio
156 - libappindicator3-1
157 - libglib2.0-0
158 - libgstreamer1.0-0
159 - libgstreamer-plugins-base1.0-0
160 - libgtk-3-0
161
162 # From automigration
163 - libdb5.3
164 - libgl1-mesa-glx
165 - libglu1-mesa
166 - libgpm2
167 - libxcb-glx0
168 - libxxf86vm1
169
170 organize:
171 snap/audio-recorder/current/: /
172 filesets:
173 app-resources:
174 - share/audio-recorder/*
175 cleanup-debris-from-organizing:
176 - -snap/*
177 executables:
178 - bin/*
179 desktop-entries:
180 - share/applications/*
181 files-from-staging-packages:
182 - usr/*
183 glib-schemas:
184 - share/glib-2.0/schemas/*
185 icons:
186 - share/icons/*
187 localization:
188 - share/locale/*
189 manpages:
190 - share/man/*
191 pixmaps:
192 - share/pixmaps/*
193 stage:
194 - $cleanup-debris-from-organizing
195 override-stage: |
196 set -eu
197
198 snapcraftctl stage
199
200 sed \
201 --file "${SNAPCRAFT_STAGE}"/patches/postprocess-desktop-entries.sed \
202 --in-place \
203 "${SNAPCRAFT_STAGE}"/share/applications/*.desktop
204
205apps:
206 audio-recorder:
207 command: >
208 desktop-launch
209 audio-recorder-launch
210 audio-recorder
211 desktop: share/applications/audio-recorder.desktop

Subscribers

People subscribed via source and target branches

to all changes: