mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 22:07:19 +02:00
main/alpine-base: split release data into its own package
At present, the Alpine docker image build process and tools like apko have to recreate the release data. By providing it as a distinct package, it is possible to get the authoritative release data without having to pull in the entirety of alpine-base.
This commit is contained in:
parent
4e65e7567e
commit
23e66e85c9
@ -2,16 +2,16 @@
|
|||||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
pkgname=alpine-base
|
pkgname=alpine-base
|
||||||
pkgver=3.17_alpha20220809
|
pkgver=3.17_alpha20220809
|
||||||
pkgrel=0
|
pkgrel=1
|
||||||
pkgdesc="Meta package for minimal alpine base"
|
pkgdesc="Meta package for minimal alpine base"
|
||||||
url="https://alpinelinux.org"
|
url="https://alpinelinux.org"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
depends="alpine-baselayout alpine-conf apk-tools busybox busybox-suid busybox-initscripts
|
depends="alpine-baselayout alpine-conf apk-tools busybox busybox-suid busybox-initscripts
|
||||||
openrc libc-utils alpine-keys"
|
openrc libc-utils alpine-release"
|
||||||
makedepends=""
|
makedepends=""
|
||||||
install=""
|
install=""
|
||||||
subpackages=""
|
subpackages="alpine-release:release"
|
||||||
replaces="alpine-baselayout"
|
replaces="alpine-baselayout"
|
||||||
source=""
|
source=""
|
||||||
|
|
||||||
@ -20,9 +20,16 @@ build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
mkdir -p "$pkgdir"/etc
|
mkdir -p "$pkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
release() {
|
||||||
|
depends="alpine-keys"
|
||||||
|
pkgdesc="Alpine release data"
|
||||||
|
|
||||||
|
mkdir -p "$subpkgdir"/etc
|
||||||
# create /etc/alpine-release
|
# create /etc/alpine-release
|
||||||
echo $pkgver > "$pkgdir"/etc/alpine-release
|
echo $pkgver > "$subpkgdir"/etc/alpine-release
|
||||||
local _ver="$(echo "$pkgver" | grep -E -o '^[0-9]+\.[0-9]+')"
|
local _ver="$(echo "$pkgver" | grep -E -o '^[0-9]+\.[0-9]+')"
|
||||||
local _rel="v$_ver"
|
local _rel="v$_ver"
|
||||||
case "$pkgver" in
|
case "$pkgver" in
|
||||||
@ -33,14 +40,14 @@ package() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# create /etc/issue
|
# create /etc/issue
|
||||||
cat >"$pkgdir"/etc/issue<<EOF
|
cat >"$subpkgdir"/etc/issue<<EOF
|
||||||
Welcome to Alpine Linux $_ver
|
Welcome to Alpine Linux $_ver
|
||||||
Kernel \\r on an \\m (\\l)
|
Kernel \\r on an \\m (\\l)
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# create os-release
|
# create os-release
|
||||||
cat >"$pkgdir"/etc/os-release<<EOF
|
cat >"$subpkgdir"/etc/os-release<<EOF
|
||||||
NAME="Alpine Linux"
|
NAME="Alpine Linux"
|
||||||
ID=alpine
|
ID=alpine
|
||||||
VERSION_ID=$pkgver
|
VERSION_ID=$pkgver
|
||||||
@ -50,8 +57,8 @@ BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# create secfixes.d repository list
|
# create secfixes.d repository list
|
||||||
mkdir -p "$pkgdir"/etc/secfixes.d
|
mkdir -p "$subpkgdir"/etc/secfixes.d
|
||||||
cat >"$pkgdir"/etc/secfixes.d/alpine<<EOF
|
cat >"$subpkgdir"/etc/secfixes.d/alpine<<EOF
|
||||||
https://secdb.alpinelinux.org/$_rel/main.json
|
https://secdb.alpinelinux.org/$_rel/main.json
|
||||||
https://secdb.alpinelinux.org/$_rel/community.json
|
https://secdb.alpinelinux.org/$_rel/community.json
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user