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

Proposed by 林博仁(Buo-ren, Lin) on 2019-03-09
Status: Approved
Approved by: moma on 2019-03-09
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 2019-03-09 Approve on 2019-03-09
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) on 2019-03-09

Additional changes:

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

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

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).

moma (osmoma) wrote :

all good

review: Approve
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

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) on 2019-03-09

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) on 2019-03-09

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

Subscribers

People subscribed via source and target branches

to all changes: