fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.33k stars 306 forks source link

File permissions are not correctly set on install #628

Closed christian-heusel closed 2 months ago

christian-heusel commented 2 months ago

Despite the code setting the mode to 644 the systemd file and the pam snippet are installed with the wrong mode:

https://github.com/fairyglade/ly/blob/291e0d836be33412a5f1c12ae5504cc5bb8624ef/build.zig#L137 https://github.com/fairyglade/ly/blob/291e0d836be33412a5f1c12ae5504cc5bb8624ef/build.zig#L214

$ find pkg/ly -type f -exec ls -l {} \;
[...]
--w----r-T 1 builduser builduser 131 Jul  2 17:28 pkg/ly/etc/pam.d/ly
--w----r-T 1 builduser builduser 326 Jul  2 17:28 pkg/ly/usr/lib/systemd/system/ly.service

I'll just chmod them for now, but I thought I'd let you know 😊

Edit: The used Zig version is 0.12.1-1 (see https://archlinux.org/packages/extra/x86_64/zig/)

AnErrupTion commented 2 months ago

I'm able to reproduce on both Zig 0.12.0 and 0.12.1. I'll investigate this later, but the modes shown in your ls output don't even make any sense to me (they're both different and it's not like it's a straight octal<->decimal conversion).

christian-heusel commented 2 months ago

Did you investigation bring any results so far? 😊

AnErrupTion commented 2 months ago

@christian-heusel Yup, so I just had to prefix the numbers with 0o so they use octal instead of decimal. Very silly mistake :D

I pushed the code to master, does it work for you now?

christian-heusel commented 2 months ago

Yes this works nicely with 49b8697546d373b3aa8a3ddad6f4dced953d43bd applied 😊 Could we maybe get a 1.0.1 released with all these small improvements? 😄

AnErrupTion commented 2 months ago

Yes this works nicely with 49b8697 applied 😊 Could we maybe get a 1.0.1 released with all these small improvements? 😄

Yeah sure! If it makes life easy for you I can release it right now.

AnErrupTion commented 2 months ago

I've just released it. Closing this issue since it's now fixed :D

christian-heusel commented 2 months ago

Yeah sure! If it makes life easy for you I can release it right now.

I can manage of course, but at some point it gets out of hand:

prepare() {
    cd "$pkgname"
    git cherry-pick -n cbe7b37564f307fddfeba3732c68d5024d30f4f7
    git cherry-pick -n 49b8697546d373b3aa8a3ddad6f4dced953d43bd
    git cherry-pick -n e4abf79ad5d5548d64981293409efbde2bb3219d \
                       dc8d143fac5b1a621f2b13f16c56f7a68d0065ff \
                       3dc148260373c7bae47341d88bf8a1601aea2576
}

So thanks for the relase and the overall very nice collaboration! ❤️