main/alpine-baselayout: symlink /var/lock to /run/lock

Closes #15930
This commit is contained in:
Sertonix 2024-07-14 23:03:15 +02:00 committed by Natanael Copa
parent 625c5f4342
commit be4d493525
2 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-baselayout
pkgver=3.6.5
pkgver=3.6.6
pkgrel=0
pkgdesc="Alpine base dir structure and init scripts"
url="https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout"
@ -129,8 +129,6 @@ package() {
var/lib \
var/lib/misc \
var/local \
var/lock \
var/lock/subsys \
var/log \
var/opt \
var/spool \
@ -138,6 +136,7 @@ package() {
var/mail
ln -s /run var/run
ln -s /run/lock var/lock
install -d -m 0555 var/empty
install -d -m 0700 "$pkgdir"/root
install -d -m 1777 "$pkgdir"/tmp "$pkgdir"/var/tmp

View File

@ -21,6 +21,14 @@ if [ -d var/run ] && [ ! -L var/run ]; then
ln -s ../run var/run
fi
# migrate /var/lock directory to /run/lock
if [ -d var/lock ] && [ ! -L var/lock ]; then
mkdir -p run/lock/subsys
cp -a var/lock/* run/lock 2>/dev/null
rm -rf var/lock
ln -s ../run/lock var/lock
fi
# migrate /var/spool/mail directory to /var/mail
if [ -d var/spool/mail ] && [ ! -L var/spool/mail ]; then
mkdir -p var/mail