[CentOS] C8 regression / tmp on tmpfs

Tue Oct 22 13:04:03 UTC 2019
Leon Fauster <leonfauster at googlemail.com>

Am 22.10.19 um 04:52 schrieb Orion Poplawski:
> On 10/21/19 3:42 PM, Leon Fauster via CentOS wrote:
>> Does someone have a working tmp on tmpfs via
>>
>> systemctl enable tmp.mount
>>
>> under CentOS8/RHEL8? This seems to work straight in EL7 ...
>>
>>
>> # LANG=C systemctl enable tmp.mount
>> The unit files have no installation config (WantedBy, RequiredBy, 
>> Also, Alias
>> settings in the [Install] section, and DefaultInstance for template 
>> units).
> 
> Looks like a known issue:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1667065
> 

It works in EL7 and F30. In EL8 it seems to be intentional :

$ rpm -q --changelog systemd |grep tmp.mount

- unit: don't add Requires for tmp.mount (#1619292)

$ grep -E 'tmpfs|tmp.mount' systemd.spec |grep -v devpts

Patch0004: 0004-Avoid-tmp-being-mounted-as-tmpfs-without-the-user-s-.patch
Patch0059: 0059-unit-don-t-add-Requires-for-tmp.mount.patch
# No tmp-on-tmpfs by default in RHEL. bz#876122 bz#1578772
rm -f 
%{buildroot}%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount
- unit: don't add Requires for tmp.mount (#1619292)
- avoid /tmp being mounted as tmpfs without the user's will (#1578772)
- do not mount /tmp as tmpfs (#1578772)
- Enable /var/run and /var/lock on tmpfs


The "remove" stanza leads to the missing "WantedBy".

Unfortunately all bz# are private ... so why they remove this 
functionality? We then at least known what impact it has when
enabled.


--
Leon