blob: aa6ba4cbeef761f31de9e07a173ac618ee4c7764 (
plain)
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
|
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 License.
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>
_distro=trisquel
_suite=etiona
pkgname="${_distro}-${_suite}"
pkgver=9.0
pkgrel=2
pkgdesc="Trisquel docker image(s)"
arch=('x86_64')
url='https://trisquel.info'
license=('FSDG')
depends=('debuerreotype'
'trisquel-keyring')
# This docker image follows the Free System Distribution Guidelines (GNU FSDG)
# The FSDG itself is under the CC-BY-ND-4.0
source=('free-system-distribution-guidelines.html'
'CC-BY-ND-4.0.txt'
"https://gitlab.trisquel.org/trisquel/package-helpers/-/raw/${_suite}/helpers/DATA/apt/trisquel/sources.list.in"
"${pkgname}.tar.xz.sha512")
sha512sums=('SKIP'
'SKIP'
'6650ab124609b42235145c247dbf496cc1e8d2e5dad4ba9105f42f0042d343851a09055def03edf06ad5553daf8285b956885fbba17b88afbb4b66d2030f6703'
'SKIP')
build(){
# Generate sources.list without ${_suite}-security and ${_suite}-updates
# to make sure that the image is reproducible
sed "s/&trisquel-codename;/${_suite}/" sources.list.in | \
grep " ${_suite} " > sources.list
install -d rootfs
# debuerreotype really requires root, see the following bug report for
# more details:
# https://github.com/debuerreotype/debuerreotype/issues/66
sudo debuerreotype-init --non-debian rootfs "${_suite}" https://archive.trisquel.info/trisquel
sudo debuerreotype-minimizing-config rootfs
# Add /etc/apt/sources.list
sudo install -m644 \
--owner=root --group=root \
-t rootfs/etc/apt sources.list
sudo debuerreotype-apt-get rootfs update
sudo debuerreotype-apt-get rootfs install -y dpkg-dev # for dpkg-source
sudo debuerreotype-apt-get rootfs source -y \
$(dpkg --root rootfs --get-selections | cut -f 1)
sudo debuerreotype-tar rootfs "${_distro}-${_suite}.tar"
# docker import ${_distro}-${_suite}.tar.xz works, so it's better to
# have the smallest file possible as xz compresses quite well and we
# will at least have one docker image per FSDG distribution if
# possible.
sudo xz -9e --verbose -T 0 "${_distro}-${_suite}.tar"
}
package(){
install -d "${pkgdir}/usr/share/docker-images/${pkgname}/"
install "${_distro}-${_suite}.tar.xz" -t "${pkgdir}/usr/share/docker-images/${pkgname}/"
install -d "${pkgdir}/usr/share/licenses/${pkgname}/"
install free-system-distribution-guidelines.html -t "${pkgdir}/usr/share/licenses/${pkgname}/"
install CC-BY-ND-4.0.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
check(){
sudo sha512sum -c "${_distro}-${_suite}.tar.xz.sha512"
}
|