[SOLVED] Need a little Slackbuilds training Re: maintaining patches
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Need a little Slackbuilds training Re: maintaining patches
I am working on learning how to maintain Slackbuilds packages, and I'm having trouble dealing with patches. I think I understand the basic functionality of diff and patch, but they don't seem to be behaving how I expect.
So sagemath just got updated from 9.0 to 9.1. So I download the current SB, get the new source, change the version number in the Slackbuilds, and when I run it I got an error, apparently a file that is getting patched got a name change.
But I didn't apply the patch to the tarred sourceball yet, so I don't really understand why the script thinks I have. Do I need to more literally follow the naming scheme used by the original author (rename to .orig before editing)? Or am I just totally borking how this is supposed to work?
As chrisretusn implied, it seems that the patch is no longer needed as it seems upstream has fixed the source directly.
When bumping SlackBuild versions, it's usually best to try comment out any patches as hopefully they were already accepted in upstream. If the build fails (or the resulting package is still broken), you may want to uncomment the patch and try again.
Since the patch doesn't cleanly apply and is a single line, take a look at the code and if its still needed reapply it manually and then regenerate the patch with diff(1).
Quote:
Originally Posted by bassmadrigal
When bumping SlackBuild versions, it's usually best to try comment out any patches as hopefully they were already accepted in upstream. If the build fails (or the resulting package is still broken), you may want to uncomment the patch and try again.
And if the patch fixes an issue more subtle than a build failure you may very well not notice how its broken right away.
And if the patch fixes an issue more subtle than a build failure you may very well not notice how its broken right away.
I suppose it is best to look into the patch on each version bump and see if it is still necessary. I tend to comment the reason for the patches I use in my SlackBuilds, so it will hopefully be easier to see if they're still needed with version bumps.
Just a rhetorical question here. Did you attempt to run the SlackBuild without the patch?
It's not rhetorical - I tried to give the clear impression that I didn't know what I was doing!
Quote:
Originally Posted by bassmadrigal
When bumping SlackBuild versions, it's usually best to try comment out any patches as hopefully they were already accepted in upstream. If the build fails (or the resulting package is still broken), you may want to uncomment the patch and try again.
Indeed, I see why this is best practice, and it solved the problem. I guess I wasn't expecting upstream to care that much about our little corner of the community, but of course a) they might, and b) they might have fixed something unintentionally.
More to the point, c) maybe the patch does something I'm not aware of / can't test on my system, but if it can't build on my vanilla system, that point is moot.
Thanks all for the help - just trying to learn and contribute in whatever small way I can, rather then being a total mooch over here!
It's not rhetorical - I tried to give the clear impression that I didn't know what I was doing!
Oh... it was pretty clear. I don't always assume though, I've been there too. In a lot of areas I still am there. Clueless. hehe
Quote:
Indeed, I see why this is best practice, and it solved the problem. I guess I wasn't expecting upstream to care that much about our little corner of the community, but of course a) they might, and b) they might have fixed something unintentionally.
Most of the patches are found from other distributions and even from upstream but have not been implemented. Some are created from scratch. As already mentioned, commenting on patches is a good thing. I always add a comment on why I needed the patch and the source were I got the patch. I do this also with "patches" to code or layout that are done within the SlackBuild for example using sed to make a few quick changes or moving files around. Always good to document why.
I normally run a rebuild of a program without doing anything to the patches unless I know ahead of time a patch has been cleared. ChangeLogs help in that regard. If the build succeeds then good to go. I the build fails, then I start looking at why and if a patch could be the reason. My SlackBuild's are all coded to produce log output so I can go back and review problems. Have fun in your adventures with Slackware.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.