File permission on Linux is confusing for new packager. Simplifying the install step by using macro instead of number would make the process easier. We already have the example from boulder.
The related repo wide transition can be discussed after work on this is underway, but I have notes from my conversation with @ermo :
07:44 PM
current solus:
install -Dm0755 something tosomehwere/
proposed solus:
%install_exe something tosomewhere/
(edited)
07:45 PM
in this case, you can programmatically replace the first install -Dm0755 invocation with %install_exe, and the command will be idempotent, so you won't need to bump the recipe. (edited)
hence "No Functional Change", as the recipe will be built with the macros the next time it's bumped.
07:46 PM
Then, the next time it's bumped and people try to build it, you will discover if the replace worked as you expected.
Rather than having to manually trawl through all of the replaces and check if they build now
hence "amortising".
It's much cheaper for solus to do it this way in terms of human attention hours here and now (edited)
07:49 PM
the regexp would look something like this sed -E -e 's|(^[[:blank:]])install -Dm0755|\1%install_exe|g'
Fair enough if you think I'm talking rubbish. It's just how I'd do it, after I'd tested that all the new %install_ macros work on recipes where it matters and then I'd auto-replace in all other recipes and punt the checking of those to when they need a bump anyway. (edited)
07:51 PM
(I am unsure if the - needs \ style escapes when using posix regexps)
07:53 PM
Ok, I understand now what you meant.
If we can do it programatically, that would he awesome.
07:55 PM
find -name package.yml -exec <the sed expression from above, but add -i for "replace-in-place"> '{}' ; (edited)
07:55 PM
I did think of doing the repo wide transition would be a good old fashioned cleanup crew task.
07:55 PM
it's pretty simple to do.
The cleanup crew can still do it
but if you test that all the replaces work, you're almost there.
HTH
07:57 PM
so you'd do tests on leaf-packages with each kind of expression
(i.e. bump, test macros, commit)
Then do a full-repo [NFC] replace.
because you've just tested that the regexps and the outcomes are good.
simple enough in theory.
Then you only need to hand-edit the recipes that are being "difficult"
07:59 PM
We are kinda getting ahead here. The macro is not in Solus yet.
I like the macro, because i think new packager can understand the term easier compared to understanding nix file permission.
(I know this because I was confused about it and still is)
08:05 PM
Now you know why I created it and insisted on using it 😉 (edited)
08:05 PM
The method you proposed sounds like good one. I will keep all that in mind (Heck I will save it one notes too👍️)
08:05 PM
I know. I am showing you the cost of doing it if you do it the smart way =)
New Messages
08:06 PM
(apologies for sounding like an intolerable smart-alec)
File permission on Linux is confusing for new packager. Simplifying the install step by using macro instead of number would make the process easier. We already have the example from
boulder.The related repo wide transition can be discussed after work on this is underway, but I have notes from my conversation with @ermo :