[gentoo-user] Getting tar to keep going

2024-11-05 Thread Peter Humphrey
Greetings.

The Network Manager man page says to 'chattr +i /etc/resolv.conf', so I did, 
and that one move enabled the wireless network to work as it should.

Now I find it causes a problem when restoring a backup: tar fails in restoring 
that file, of course, and reports an error. The number of files restored is 
less 
than expected, so I assume that tar stops restoring and just continues to spin 
through the rest of the tarball without doing anything. Is that right?

I've tried setting the options  --ignore-command-error and --ignore-failed-
read, separately, but with no effect.

Is there a way to tell tar to 'keep going', as with portage? If not, I'm going 
to have to mess about with 'chattr [+/-]i' with all the opportunities that has 
for error. I don't need any more of those, thank-you-very-much!

-- 
Regards,
Peter.






Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Grant Taylor

On 11/5/24 9:38 AM, Peter Humphrey wrote:
The Network Manager man page says to 'chattr +i /etc/resolv.conf', 
so I did, and that one move enabled the wireless network to work as 
it should.


What?!?!?!  Network Manager can't be made to keep it's hands off of 
/etc/resolv.conf so the workaround is to leverage file system features 
to break Network Manager's hands when it tries to touch the file?


That's a hell of a bad design in my opinion.

The tar error will be related to the restore / write to disk, not 
reading from ""tape or command error.


You might explore an option to cause tar to exclude /etc/resolv.conf 
from the restore job.  I'm not sure what that would look like as I'm 
usually only messing with exclude during backups.


You might be able to mess with some even more esoteric (bind) mount 
options, but that will be quite similar to the chattr dance.


I'd go smack Network Manager with a bigger bat.



--
Grant. . . .



Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Peter Humphrey
On Tuesday 5 November 2024 16:27:57 GMT Grant Taylor wrote:
> On 11/5/24 9:38 AM, Peter Humphrey wrote:
> > The Network Manager man page says to 'chattr +i /etc/resolv.conf',
> > so I did, and that one move enabled the wireless network to work as
> > it should.
> 
> What?!?!?!  Network Manager can't be made to keep it's hands off of
> /etc/resolv.conf so the workaround is to leverage file system features
> to break Network Manager's hands when it tries to touch the file?
> 
> That's a hell of a bad design in my opinion.

Yes, I thought it might raise a laugh...

> The tar error will be related to the restore / write to disk, not
> reading from ""tape or command error.

I see what you mean: in my case, tar needs an --ignore-failed-write option.

> You might explore an option to cause tar to exclude /etc/resolv.conf
> from the restore job.  I'm not sure what that would look like as I'm
> usually only messing with exclude during backups.

There is an --exclude option; I can use that.

> You might be able to mess with some even more esoteric (bind) mount
> options, but that will be quite similar to the chattr dance.
> 
> I'd go smack Network Manager with a bigger bat.

I'll hold your coat...   :)

-- 
Regards,
Peter.






Re: [gentoo-user] Portage improved

2024-11-05 Thread Peter Humphrey
On Thursday 31 October 2024 11:56:41 GMT Peter Humphrey wrote:
> On Friday 11 October 2024 11:49:18 GMT I wrote:
> > On Saturday 14 September 2024 13:05:26 BST Peter Humphrey wrote:
> > > Just one little fly in the ointment: the status string became too long
> > > to
> > > show properly. Perhaps shorter phrases could be used, or numbers limited
> > > to two digits, or the 80-character line limit exceeded while running in
> > > an
> > > x-term.
> > 
> > And indeed the line limit has been relaxed: it uses the full 90 characters
> > of my Konsoles.
> 
> More to do yet though. The merge-wait idea works well with humongous
> packages like nodejs and the web engines, but it's too cautious with
> ordinary ones. I've been building (too many) new systems over the last
> fortnight, and when there are, say, a hundred packages to compile, the load
> steadies out at about 4, with several more in merge-wait. This is with i24
> l30 in make.conf.

There's also a logic problem. When a package enters the Installing phase, it's 
shown instead as Merge Wait, or it's added to that queue.

-- 
Regards,
Peter.






Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Eli Schwartz
On 11/5/24 11:27 AM, Grant Taylor wrote:
> On 11/5/24 9:38 AM, Peter Humphrey wrote:
>> The Network Manager man page says to 'chattr +i /etc/resolv.conf', so
>> I did, and that one move enabled the wireless network to work as it
>> should.
> 
> What?!?!?!  Network Manager can't be made to keep it's hands off of /
> etc/resolv.conf so the workaround is to leverage file system features to
> break Network Manager's hands when it tries to touch the file?
> 
> That's a hell of a bad design in my opinion.


Yeah, and it's also nonsense as far as I can tell. Here's what the man
page for Network Manager actually says:

dns
Set the DNS processing mode.

none: NetworkManager will not modify resolv.conf. This implies
rc-manager unmanaged


rc-manager
Set the resolv.conf management mode. This option is about how
NetworkManager writes to /etc/resolv.conf, if at all.


If you configure dns=none or make /etc/resolv.conf immutable
with chattr +i, NetworkManager will ignore this setting and
always choose unmanaged (below).


symlink: If /etc/resolv.conf is a regular file or does not
exist, NetworkManager will write the file directly.

file: NetworkManager will write /etc/resolv.conf as regular
file.

unmanaged: don't touch /etc/resolv.conf.


-- 
Eli Schwartz


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Dale
Peter Humphrey wrote:
> On Tuesday 5 November 2024 16:27:57 GMT Grant Taylor wrote:
>> On 11/5/24 9:38 AM, Peter Humphrey wrote:
>>> The Network Manager man page says to 'chattr +i /etc/resolv.conf',
>>> so I did, and that one move enabled the wireless network to work as
>>> it should.
>> What?!?!?!  Network Manager can't be made to keep it's hands off of
>> /etc/resolv.conf so the workaround is to leverage file system features
>> to break Network Manager's hands when it tries to touch the file?
>>
>> That's a hell of a bad design in my opinion.
> Yes, I thought it might raise a laugh...
>
>> The tar error will be related to the restore / write to disk, not
>> reading from ""tape or command error.
> I see what you mean: in my case, tar needs an --ignore-failed-write option.
>
>> You might explore an option to cause tar to exclude /etc/resolv.conf
>> from the restore job.  I'm not sure what that would look like as I'm
>> usually only messing with exclude during backups.
> There is an --exclude option; I can use that.
>
>> You might be able to mess with some even more esoteric (bind) mount
>> options, but that will be quite similar to the chattr dance.
>>
>> I'd go smack Network Manager with a bigger bat.
> I'll hold your coat...   :)
>


With my VPN, I needed certain entries in that file.  Thing is, other
stuff kept changing it.  I used the resolv.conf.head and tail file to
force it to do it my way and still work when the VPN is down.  This may
or may not be a option for you.  If it is, then maybe that will help if
you don't want to have issues with backups/copying etc. 

Dale

:-)  :-) 



Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Arsen Arsenović
Grant Taylor  writes:

> On 11/5/24 9:38 AM, Peter Humphrey wrote:
>> The Network Manager man page says to 'chattr +i /etc/resolv.conf', so I did,
>> and that one move enabled the wireless network to work as it should.
>
> What?!?!?!  Network Manager can't be made to keep it's hands off of
> /etc/resolv.conf so the workaround is to leverage file system features to 
> break
> Network Manager's hands when it tries to touch the file?

https://www.networkmanager.dev/docs/api/latest/NetworkManager.conf.html
under the dns key in the main section:

> none: NetworkManager will not modify resolv.conf. This implies
> rc-manager unmanaged

FOTM, doing a FTS over all manuals (which is slow because man-pages are
awful):
~$ man -K chattr
--Man-- next: rm(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: ostree-prepare-root(1) [ view (return) | skip (Ctrl-D) | quit 
(Ctrl-C) ]
--Man-- next: chattr(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: systemd-dissect(1) [ view (return) | skip (Ctrl-D) | quit 
(Ctrl-C) ]
--Man-- next: socat1(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: btrfs-property(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) 
]
--Man-- next: utime(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: ioctl_iflags(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: fallocate(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: statx(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: utimensat(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: mount(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: archive_read_disk(3) [ view (return) | skip (Ctrl-D) | quit 
(Ctrl-C) ]
--Man-- next: archive_write_disk(3) [ view (return) | skip (Ctrl-D) | quit 
(Ctrl-C) ]
--Man-- next: ext3(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: tmpfiles.d(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: sysupdate.d(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: nm-system-settings.conf(5) [ view (return) | skip (Ctrl-D) | quit 
(Ctrl-C) ]
--Man-- next: slapd-relay(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: slapo-rwm(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: slapd-meta(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: btrfs(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]

nm-system-settings.conf says:

> If you configure dns=none or make /etc/resolv.conf immutable with
> chattr +i, NetworkManager will ignore this setting and always choose
> unmanaged (below).

so, certainly not what was said above..
-- 
Arsen Arsenović


signature.asc
Description: PGP signature


Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Grant Taylor

On 11/5/24 10:27 AM, Grant Taylor wrote:
What?!?!?!  Network Manager can't be made to keep it's hands off of 
/etc/resolv.conf so the workaround is to leverage file system features 
to break Network Manager's hands when it tries to touch the file?


Clarifying, after some replies that I've seen.

I was surprised by, and doubted, the idea that Network Manager might not 
be able to be configured to leave /etc/resolv.conf alone.


I assumed that Network Manager can be configured to leave 
/etc/resolv.conf alone.


As such, I'd think it is better to configure Network Manager to leave 
/etc/resolv.conf alone and not fall back to something like setting the 
immutable attribute on the file to prevent it being messed with.




--
Grant. . . .



Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Eli Schwartz
On 11/5/24 6:41 PM, Grant Taylor wrote:
> Clarifying, after some replies that I've seen.
> 
> I was surprised by, and doubted, the idea that Network Manager might not
> be able to be configured to leave /etc/resolv.conf alone.


Oops, yeah, sorry. My reply was badly worded -- I responded to your post
because your post included that shock and skepticism which was a good
lead-in to my quote of the actual manual.

I 100% agree with you that it doesn't sound like the way things would
actually work.

But my reply was really intended for Peter. I don't quite understand
what Peter read (when saying "the Network Manager man page says to
chattr") to overlook the fact that the manpage is fairly clear in the
only place it talks about chattr, that chattr is not your only option.


-- 
Eli Schwartz


OpenPGP_signature.asc
Description: OpenPGP digital signature


[gentoo-user] sinit (suckless init) + daemontools-encore on Gentoo

2024-11-05 Thread Eduardo Santos
I searched for sinit on the gentoo-user archives and couldn't find
anything, there's only a few Reddit threads which don't help much. Would it
be possible to follow the steps here[1] to use sinit + daemontools-encore
on Gentoo, or are there hard dependencies on OpenRC that make this
impossible?

This is completely for fun. I'm aware of discussions of this init vs. that
init and I don't hate systemd/OpenRC or anything like that. Again, this is
just for fun.

I'm willing to do a lot of work myself to make this work, but if Portage or
some other core Gentoo subsystem doesn't play well with sinit or
daemontools-encore it'd be just a waste of time.

[1] https://troubleshooters.com/linux/diy/suckless_init_on_plop.htm


Re: [gentoo-user] Getting tar to keep going

2024-11-05 Thread Peter Humphrey
On Wednesday 6 November 2024 00:08:12 GMT Eli Schwartz wrote:

> But my reply was really intended for Peter. I don't quite understand
> what Peter read (when saying "the Network Manager man page says to
> chattr") to overlook the fact that the manpage is fairly clear in the
> only place it talks about chattr, that chattr is not your only option.

I didn't just make it up. I did actually read it; I was sure it was in the man 
page, but it seems I was mistaken.

Back to the drawing-board then, but with a better idea of what to do.

Thanks all for dragging me back to reality.   ;)

-- 
Regards,
Peter.