🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.os.linux.slackware
Article #84

Re: umask 027 and Slackbuilds

#84
From: jayjwa
Date: Fri, 04 Dec 2026 20:57
37 lines
2435 bytes
Marco Moock <mm@dorfdsl.de> writes:

>> Set umask 022 in the SlackBuild. That's what I do. If you need to
>> change permissions to something special later, you can do it with
>> doinst.sh or change the permissions manually in the staging area
>> before you run makepkg. 'makepkg -c n' will leave the permissions as
>> you set them.

> Is there a general way to do this for all builds?

> In that case I do not use sbo (because I want the latest version), but
> in case I do, that looks like PITA.

If you look at the examples that are submitted to the Sbo site itself,
they usually use something like (may wrap incorrectly):

chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \+ -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \+

in the source area. If you set umask before you start compiling and
installing files, everything should end up installed correctly in the
staging area - assuming the source build sets the permissions correctly
itself. Have a look in the staging area to make sure everything is set
as you like it before calling makepkg.

Only if you need to setuid or setcap something do you really need to
set doinst.sh and those are rare cases.

The best way is probably to check some examples. 

-- 
PGP Key ID: 781C A3E2 C6ED 70A6 B356  7AF5 B510 542E D460 5CAE
       "The Internet should always be the Wild West!"
Technical Details
Message-ID: <87ecbwhigl.fsf@atr2.ath.cx>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
References: <11esg4i$79kl$1@solani.org> <87qzfxw1q2.fsf@atr2.ath.cx> <11eul4f$8q8r$1@solani.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: jayjwa <jayjwa@atr2.ath.cx.invalid>
Newsgroups: alt.os.linux.slackware
Subject: Re: umask 027 and Slackbuilds
Date: Fri, 04 Dec 2026 15:57:46 -0500
Organization: Atr2 RG 2026
Message-ID: <87ecbwhigl.fsf@atr2.ath.cx>
References: <11esg4i$79kl$1@solani.org> <87qzfxw1q2.fsf@atr2.ath.cx>
	<11eul4f$8q8r$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: solani.org;
	logging-data="434062"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:SAd6emSwk3dkzzuvQzx5UF9fpKo= sha1:XCkvCGyRbL/9Nl2y0kUpMvkPjqc=
X-User-ID: eJwNxcEBgEAIA7CVQNpyjIMo+4+g+YQh1yREgcvdvxMV4W7PpVYhqyi9wGxTztswreQpc/8A9ScPkQ==