The small linux problem thread

Ok thank you. I’ll look into it and see if I can get more info on it.

1 Like

it will download the first chunk in the m3u.
you will need to start your m3u entries at an earlier chunk but as far as i know they are timestamped and encrypted so you cant just increment a new chunk name from the list of chunks your using as a jump point.
so if you have access to the full clip. start your grab 20 seconds earlier and get the previous chunklist.m3u

lastly you cant just download the whole clip from your twitch panel?
if its your clip i think they allow it coz 1 of my tutors on twitch, uploads his edited version of the twitch stream to youtube.

I can, but it is a 4h highlight so I thought just downloading the part would be easier :wink:

Thinking about it, I could just make a 30s or 1m clip tho… :thinking: well, coulda thought of that earlier… thanks :smiley:

That’s overly complicated and not necessary either though, Twitch allows a straight export to YouTube when you link the accounts :slight_smile:
Unfortunately there seems to be no way to get the chat along with it because from what I know YouTube only supports the chat on Livestreams (which makes sense), so exporting the chat to YouTube is just not an option :frowning:

What does losetup -l say?

1 Like

That got it for me. Thanks @rcxb I now remember what those sizes were and why I thought they were familiar… They were VM disk sizes.

losetup -l
NAME      SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                           DIO LOG-SEC
/dev/loop1
                  0      0         1  0 /vmbox/images/101/vm-101-disk-0.raw   0     512
/dev/loop0
                  0      0         1  0 /vmbox/images/100/vm-100-disk-0.raw   0     512

So I have bit of a comprehension question regarding rpmbuild. It was suggested a while ago to use when building random software to keep track of files. Suppose I write the Spec file myself, I’m just wondering if I need to do anything for it to keep track of the files? Suppose I need to build with make install (like in the discussion linked above), wouldn’t that still write the files? Or does rpmbuild take care of not writing the files and putting them in the rpm instead?

edit:
On another note, wouldn’t using chroot /some/other/directory make install work to keep track of files too? Or am I misunderstanding what chroot does and/or how it works?
edit 2:
Actually that seems exactly what mock does, but I’m not sure why it needs a package for that?

Yup. You don’t have to worry about the details.

The BUILDROOT folder is the actual (temporary) destination for make install and everything else.

1 Like

I have a Logitech G604. I chose this mouse after watching a ton of reviews. It has everything I want from a hardware perspective. Previously, I’ve used Solaar with it, but that piece of software sucks. This mouse supposedly has hardware macro programming capabilities, but it is so dependent upon Logitech’s GHub software that I am not sure about that. For example, the mouse also has bluetooth mode for pairing over bluetooth. Stupidly enough, it can only pair with one device at a time, but I guess that may be a memory limitation and/or security feature. In order to remove said bluetooth profile, however, one has to remove it’s Bluetooth address with GHub. Anyway, all I want for now is the ability to program some of the macro buttons on this mouse. Does anyone know of software to allow me to do that on Linux?

Thanks, that clears some things.
But for the rpm to actually package the file (and remove it on removal I assume), that still requires the %files section of the RPM right? At least that’s what I gather from the documentation.

If that is the case I don’t quite understand the role of mock though (since they seem to use it in the Fedora Build service…). It appears that it builds a barebones “fake” root to then compile in, basically to figure out the BuildRequires, but that seems overly complicated for just that use?

Unfortunately I don’t know of one on Linux, but if the G604 works anything like my current G402 the profiles are saved on the mouse. I programmed mine years ago and have never since started the Logitech software, and the macros (well more like button reassignments for me) continue to work just fine under Linux.

2 Likes

You need a %files section, but it can be very simple, with wildcards and such.

Mock is a chroot before you build. It’s so you can build against a clean/vanilla image of your OS, so the binaries you build will link against the standard libs, instead of whatever (newer) versions you just happen to have installed on your system. It’s not useful unless you’re submitting your compiled RPMs for public repo use, or cross-compiling.

2 Likes

Ah thanks, that was sort of what I expected but I wasn’t sure :slight_smile:
I just happened to run across it when looking for a Spec file for makeMKV :smiley:
I guess if it’s already installed it would be best practice to use it too though, because why not? Just in case

ok maybe stupid question but… how do I add myself to a new user group? Normally usermod -a -G [group] [user] should do it, right? But I’m getting a permission denied (usermod: Permission denied. usermod: cannot lock /etc/group; try again later. to be precise), sudo also doesn’t do it. In the manpages it says (if I read this right) that I can’t modify a logged in user (which seems like a weird rule but OK?), so how would I do that then? I don’t have another account :thinking: Actually that only seems to apply when changing the user ID, name, or home-directory.

Searching around suggested that there might already be .lock files in place, but I can’t find any:

[tarulia@localhost]~% cd /etc && ls -l *.lock
zsh: no matches found: *.lock
[tarulia@localhost]/etc% 

YOU can’t add yourself to other groups, that would be a massive security hole. Root needs to do it.

At a low level, adding users to other groups is trivial. You have a coma separated list of users at the end of the group’s line in /etc/group. Notice that /etc/group is only writable by root.

The strange part is usermod not working with sudo. If there’s not a chroot involved, and this isn’t a read only file system, then possible explanations start to get weird.

1 Like

Did you SU or sudo -i to elevate to root, then try?

That’s what I thought and that kinda makes sense, which is why I tried it with sudo and with su, i.e. being root when I executed the command, but no dice either way.

Although when using root I get something completely different that doesn’t look good either (probably should have mentioned that, oops):

[tarulia@localhost]/etc% usermod -aG mock tarulia
usermod: Permission denied.
usermod: cannot lock /etc/group; try again later.
[tarulia@localhost]/etc% sudo !!
sudo usermod -aG mock tarulia
[sudo] password for tarulia: 
(2021-04-13  4:16:43:273513): [sss_cache] [confdb_get_enabled_domain_list] (0x0040): Failed to get [domains] from [sssd], error [2] (No such file or directory)
(2021-04-13  4:16:43:273579): [sss_cache] [init_domains] (0x0020): Could not initialize domains

su and regular sudo without options.

1 Like

It looks like you have LDAP or similar database installed. Is this a corporate computer?

1 Like

No, home PC on Fedora, maybe it was preinstalled or something because I don’t think I ever installed that