File: README.source.md

package info (click to toggle)
streamlink 8.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,564 kB
  • sloc: python: 51,188; sh: 184; makefile: 152
file content (199 lines) | stat: -rw-r--r-- 7,994 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Build procedure

Here are the commands to manage the package

## For unstable

```sh
# Switch to master branch
git checkout master

# Update gbp branches from remote
git fetch origin pristine-tar:pristine-tar upstream:upstream

# Update current branch
git pull

# Import patches into gbp
gbp pq import --force

# Go back to master branch
gbp pq switch

# Import upstream version and update Debian branch with new upstream release
gbp import-orig --uscan

# Update debian/patches
gbp pq rebase
gbp pq export

# Check licenses changes and update debian/copyright
git diff --name-only $(git describe --tags --abbrev=0) HEAD | grep -v '^debian' | xargs grep -ni '\bCopyright\b'

# Check licenses using licenserecon
lrc

# Check for new dependencies
git diff upstream^..upstream pyproject.toml docs/install.rst

# Check for new supported players
git diff upstream^..upstream docs/players.rst

# Check for important changes that may need other package changes (copyright, new patch, ...):
#  `https://github.com/streamlink/streamlink/compare/<old_tag>...<new_tag>`

# Update debian/changelog
gbp dch -Ra --commit

# Do test build with sbuild
gbp buildpackage "--git-builder=sbuild -v -As -d unstable --no-clean-source --source-only-changes --run-lintian --lintian-opts=\"-EviIL +pedantic\" --run-autopkgtest --autopkgtest-root-args= --autopkgtest-opts=\"-- schroot %r-%a-sbuild\" --build-failed-commands '%SBUILD_SHELL'"

# Check for build warnings or errors
grep -Pi 'error|warn' ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_amd64.build

# Diff with previous package version
diffoscope ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version -c1 -o1)_all.deb ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_all.deb --text-color=always | less -r -s
diffoscope ../build-area/python3-streamlink_$(dpkg-parsechangelog --show-field Version -c1 -o1)_all.deb ../build-area/python3-streamlink_$(dpkg-parsechangelog --show-field Version)_all.deb --text-color=always | less -r -s
diffoscope ../build-area/python3-streamlink-doc_$(dpkg-parsechangelog --show-field Version -c1 -o1)_all.deb ../build-area/python3-streamlink-doc_$(dpkg-parsechangelog --show-field Version)_all.deb --text-color=always | less -r -s

# Tag commit
gbp tag --sign-tags

# Push to git repository
git push origin experimental master upstream pristine-tar trixie-backports --tags

# Check salsa-ci: https://salsa.debian.org/amurzeau/streamlink/-/pipelines

# If needed, generate RFS mail
debian/create_rfs_mail.sh

# If not uploading to NEW, upload source-only to ftp-master FTP
dput ftp-master ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_source.changes

# If uploading to NEW, upload binary packages instead
dput ftp-master ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_amd64.changes

# If need to cancel upload (choose either one):
dcut ftp-master cancel -f streamlink_$(dpkg-parsechangelog --show-field Version)_source.changes
dcut ftp-master cancel -f streamlink_$(dpkg-parsechangelog --show-field Version)_amd64.changes
```

## For experimental

```sh
# Update debian/changelog
gbp dch -Ra --commit -Dexperimental

# Do test build with sbuild (using experimental as an alias to unstable schroot)
gbp buildpackage "--git-builder=sbuild -v -As -d experimental --no-clean-source --source-only-changes --run-lintian --lintian-opts=\"-EviIL +pedantic\" --run-autopkgtest --autopkgtest-root-args= --autopkgtest-opts=\"-- schroot %r-%a-sbuild\" --build-failed-commands '%SBUILD_SHELL'" --extra-repository='deb http://deb.debian.org/debian experimental main' --build-dep-resolver=aspcud
```

The rest is identical to unstable.


## For backports

```sh
# Switch to master branch to ensure it is updated
git checkout master

# Update master branch
git pull

# Update gbp branches from remote
git fetch origin pristine-tar:pristine-tar upstream:upstream

# Switch to backport branch
git checkout <backport-branch>

# Update current branch
git pull

# Merge master branch
git merge master

# Update debian/changelog
gbp dch -Ra --bpo --commit

# Do test build with sbuild
gbp buildpackage "--git-builder=sbuild -v -As -d trixie-backports --no-clean-source --source-only-changes --run-lintian --lintian-opts=\"-EviIL +pedantic\" --run-autopkgtest --autopkgtest-root-args= --autopkgtest-opts=\"-- schroot %r-%a-sbuild\" --build-failed-commands '%SBUILD_SHELL' --build-dep-resolver=aptitude"

# Check for build warnings or errors
grep -Pi 'error|warn' ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_amd64.build

# Diff with previous package version
diffoscope ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version -c1 -o1)_all.deb ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_all.deb --text-color=always | less -r -s
diffoscope ../build-area/python3-streamlink_$(dpkg-parsechangelog --show-field Version -c1 -o1)_all.deb ../build-area/python3-streamlink_$(dpkg-parsechangelog --show-field Version)_all.deb --text-color=always | less -r -s
diffoscope ../build-area/python3-streamlink-doc_$(dpkg-parsechangelog --show-field Version -c1 -o1)_all.deb ../build-area/python3-streamlink-doc_$(dpkg-parsechangelog --show-field Version)_all.deb --text-color=always | less -r -s

# Tag commit
gbp tag --sign-tags

# Push to git repository
git push origin experimental master upstream pristine-tar trixie-backports --tags

# Check salsa-ci: https://salsa.debian.org/amurzeau/streamlink/-/pipelines

# If needed, generate RFS mail
debian/create_rfs_mail.sh

# If not uploading to NEW, upload source-only to ftp-master FTP
dput ftp-master ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_source.changes

# If uploading to NEW, upload binary packages instead
dput ftp-master ../build-area/streamlink_$(dpkg-parsechangelog --show-field Version)_amd64.changes

# If need to cancel upload (choose either one):
dcut ftp-master cancel -f streamlink_$(dpkg-parsechangelog --show-field Version)_source.changes
dcut ftp-master cancel -f streamlink_$(dpkg-parsechangelog --show-field Version)_amd64.changes
```

# Building package from streamlink unreleased version

- Checkout master (andd update it if needed)
- Ensure git status return no modification (no dirty working copy)
- Generate python tarball: python3 ./setup.py sdist
- Import with gbp and filtering: `gbp import-orig --interactive --verbose --rollback ../streamlink_0.14.2-170-g3946184.orig.tar.gz --filter-pristine-tar --filter=docs/_themes/sphinx_rtd_theme_violet/static/fonts`


# Packages structure

## streamlink

This package contains the command line tool which use the public Python module available in python3-streamlink package.

This package contains the Python module `streamlink_cli` which is private and so goes to /usr/share/streamlink.
The command line script is also in /usr/share/streamlink so it can find the Python module.
/usr/bin/streamlink is a symlink to the command line script.

See also an advice about why not putting the command line script in /usr/bin:
  https://lists.debian.org/debian-python/2016/05/msg00046.html

As recommended in dh_installman manpage, manpage installation is defined in streamlink.manpages.

## python3-streamlink

This package contains the public Python module `streamlink`.

## python3-streamlink-doc

This package contains streamlink documentation in html format.

# sbuild setup

## Creating a schroot

To create a stable schroot in `/srv/chroot/stable-amd64`, use this command:
```
sbuild-createchroot --extra-repository="deb http://deb.debian.org/debian stable-backports main" --include=eatmydata --alias=trixie-backports --command-prefix=eatmydata --chroot-prefix=trixie-backports stable /srv/chroot/stable-amd64 http://deb.debian.org/debian
```

For unstable:
```
sbuild-createchroot unstable /srv/chroot/unstable-amd64 http://deb.debian.org/debian
```

For testing:
```
sbuild-createchroot testing /srv/chroot/testing-amd64 http://deb.debian.org/debian
```