From: paper42 <paper42@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] base-files: remove non-portable behaviour
Date: Fri, 24 Sep 2021 17:10:28 +0200 [thread overview]
Message-ID: <20210924151028.NW_waKM8V5NXbKhWtqlzpc3oVsw_GIgGUiKmrAP_2ns@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-33088@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 531 bytes --]
There is an updated pull request by paper42 against master on the void-packages repository
https://github.com/paper42/void-packages base-files-posix-sh
https://github.com/void-linux/void-packages/pull/33088
base-files: remove non-portable behaviour
On some minimal systems like OpenWrt, the install command doesn't exist
which results in xbps not creating the required directories when creating
a void chroot.
This PR needs testing.
A patch file from https://github.com/void-linux/void-packages/pull/33088.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-base-files-posix-sh-33088.patch --]
[-- Type: text/x-diff, Size: 3554 bytes --]
From 1d3edc9017a69c26bf1457f04b51c8e17b564694 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sat, 18 Sep 2021 21:27:09 +0200
Subject: [PATCH] base-files: remove non-portable behaviour
On some minimal systems like OpenWrt, the install command doesn't exist
which results in xbps not creating the required directories when creating
a void chroot.
---
srcpkgs/base-files/INSTALL | 46 ++++++++++++++++++-------------------
srcpkgs/base-files/template | 4 ++--
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/srcpkgs/base-files/INSTALL b/srcpkgs/base-files/INSTALL
index 85a7f92cd4ee..29e8c7412684 100644
--- a/srcpkgs/base-files/INSTALL
+++ b/srcpkgs/base-files/INSTALL
@@ -2,38 +2,37 @@ make_system_dirs() {
#
# Install FHS system directories.
#
+ umask 022
for d in boot etc etc/modprobe.d etc/modules-load.d \
etc/skel home dev proc usr mnt opt sys media var run/lock; do
- [ ! -d ${d} ] && install -d ${d}
+ mkdir -p ${d}
done
- [ ! -d root ] && install -dm750 root
+ mkdir -p root && chmod 750 root
# Don't try to create var/mail in the correct place if the user
# is updating from an old system that has var/mail as a symlink
- [ ! -L var/mail ] && [ ! -d var/mail ] && install -dm1777 var/mail
+ [ ! -L var/mail ] && mkdir -p var/mail && chmod 1777 var/mail
- [ ! -d var/spool ] && install -d var/spool
+ mkdir -p var/spool
for d in local local/bin local/sbin local/include local/lib \
bin include lib src; do
- [ ! -d usr/${d} ] && install -d usr/${d}
+ mkdir -p usr/${d}
done
for d in locale misc terminfo zoneinfo doc info; do
- [ ! -d usr/share/${d} ] && install -d usr/share/${d}
- [ ! -d usr/local/share/${d} ] && install -d usr/local/share/${d}
+ mkdir -p usr/share/${d}
+ mkdir -p usr/local/share/${d}
done
for d in 1 2 3 4 5 6 7 8; do
- [ ! -d usr/share/man/man${d} ] && \
- install -d usr/share/man/man${d}
- [ ! -d usr/local/share/man/man${d} ] && \
- install -d usr/local/share/man/man${d}
+ mkdir -p usr/share/man/man${d}
+ mkdir -p usr/local/share/man/man${d}
done
for d in empty log opt cache lib; do
- [ ! -d var/${d} ] && install -d var/${d}
+ mkdir -p var/${d}
done
# Create /var/run and /var/lock symlinks.
@@ -44,18 +43,19 @@ make_system_dirs() {
fi
done
- cd var
- ln -sf ../run .
- ln -sf ../run/lock .
- [ ! -d spool/mail ] && ln -sfn ../mail spool/mail
- if [ -L spool/mail/mail -a "$(readlink spool/mail/mail)" = spool/mail ]; then
- # Get rid of broken symlink created by older versions of base-files.
- rm spool/mail/mail
- fi
- cd ..
+ (
+ cd var || return
+ ln -sf ../run .
+ ln -sf ../run/lock .
+ [ ! -d spool/mail ] && ln -sfn ../mail spool/mail
+ if [ -L spool/mail/mail -a "$(readlink spool/mail/mail)" = spool/mail ]; then
+ # Get rid of broken symlink created by older versions of base-files.
+ rm spool/mail/mail
+ fi
+ )
- install -dm1777 tmp
- install -dm1777 var/tmp
+ mkdir -p tmp && chmod 1777 tmp
+ mkdir -p var/tmp && chmod 1777 var/tmp
# remove leftover polkit rules from live systems
[ -e etc/polkit-1/rules.d/void-live.rules ] && rm etc/polkit-1/rules.d/void-live.rules
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index 758cd54ad147..06022fadb48d 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
# Template file for 'base-files'
pkgname=base-files
-version=0.142
-revision=11
+version=0.143
+revision=1
bootstrap=yes
depends="xbps-triggers"
short_desc="Void Linux base system files"
next prev parent reply other threads:[~2021-09-24 15:10 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 14:21 [PR PATCH] " paper42
2021-09-24 14:23 ` [PR REVIEW] " ericonr
2021-09-24 14:24 ` q66
2021-09-24 14:25 ` q66
2021-09-24 14:26 ` ericonr
2021-09-24 14:27 ` ericonr
2021-09-24 14:27 ` q66
2021-09-24 14:28 ` q66
2021-09-24 14:29 ` paper42
2021-09-24 14:31 ` q66
2021-09-24 14:34 ` [PR PATCH] [Updated] " paper42
2021-09-24 14:35 ` paper42
2021-09-24 14:37 ` ericonr
2021-09-24 14:39 ` [PR REVIEW] " q66
2021-09-24 14:39 ` q66
2021-09-24 14:46 ` ahesford
2021-09-24 14:46 ` ahesford
2021-09-24 14:59 ` paper42
2021-09-24 15:04 ` [PR REVIEW] " paper42
2021-09-24 15:06 ` ahesford
2021-09-24 15:10 ` paper42 [this message]
2021-10-03 22:56 ` CameronNemo
2021-10-03 22:56 ` CameronNemo
2021-10-03 23:02 ` CameronNemo
2021-10-03 23:05 ` CameronNemo
2022-06-05 2:14 ` github-actions
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210924151028.NW_waKM8V5NXbKhWtqlzpc3oVsw_GIgGUiKmrAP_2ns@z \
--to=paper42@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).