<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>A new request with request id 14650 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is : <br><br>Title : Koha-devel Digest, Vol 192, Issue 3<br>Category : <br>Description : <div>Send Koha-devel mailing list submissions to<br>    koha-devel@lists.koha-community.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>or, via email, send a message with subject or body 'help' to<br>    koha-devel-request@lists.koha-community.org<br><br>You can reach the person managing the list at<br>    koha-devel-owner@lists.koha-community.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Koha-devel digest..."<br><br><br>Today's Topics:<br><br>   1. Re: custom core patches management (Michael Hafen (TECH))<br>   2. Re: custom core patches management (dcook@prosentient.com.au)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 3 Nov 2021 10:36:49 -0600<br>From: "Michael Hafen (TECH)" <michael.hafen@washk12.org><br>To: dcook@prosentient.com.au<br>Cc: David Schmidt <mail@davidschmidt.at>,<br>    koha-devel@lists.koha-community.org<br>Subject: Re: [Koha-devel] custom core patches management<br>Message-ID:<br>    <CAAh7UdkvWXOBc8ALaTkYL-fxUOm3F-6EBTdpdStwULGdJOpOrA@mail.gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>This is exactly how I manage my Koha installs, with the exception that<br>instead of using the packages I run my production servers from a dev<br>install.  When I have changes ready I just `git fetch; git reset --hard<br>origin/my_release_branch` to apply those changes, but then I have to<br>manually go through koha-upgrade-schema and koha-plack --restart for each<br>instance (I have 3 active instances).  So I have traded building and<br>distributing debian packages for manually doing the post upgrade work that<br>the packages would do for me.<br><br>On Tue, Nov 2, 2021 at 7:00 PM <dcook@prosentient.com.au> wrote:<br><br>> Hi David,<br>><br>><br>><br>> I won’t make a comment on good vs bad strategies, as those are just<br>> subjective judgements, and ultimately it really all depends on your context.<br>><br>><br>><br>> However, it sounds like you’re making a lot of work for yourself with<br>> those files. Using git commands, you could extract equivalents of those<br>> .orig, .changed, and .patched files.<br>><br>><br>><br>> Also, by patching prod files like that, you don’t necessarily know exactly<br>> what your application state is at any particular time. I suppose you could<br>> probably do a git-based manual patching deployment system using git hashes<br>> to represent versions, but I’ve found in practice that those cause more<br>> headaches than they solve.<br>><br>><br>><br>> Most Koha support providers (like the one I work for) will fork the<br>> branch(es) they want to customize, and then generate Debian packages which<br>> they distribute around the world as necessary. As soon as you’re running<br>> more than 1 Koha server, you really want a way to easily and quickly deploy<br>> changes across multiple machines. Koha is large and complex, so I think<br>> you’ll find that leveraging the work the community has done to build robust<br>> Debian packages is your best bet.<br>><br>><br>><br>> Carrying customizations forward through time takes work, so it’s best to<br>> upstream everything you can, but I think we all know that’s not always<br>> feasible. Again git commands can help you show the changes you’ve made<br>> between different versions, and then you can make periodic efforts to<br>> review your customizations and port over anything you need to when a new<br>> version comes out.<br>><br>><br>><br>> I hope that you find that helpful.<br>><br>><br>><br>> David Cook<br>><br>> Senior Software Engineer<br>><br>> Prosentient Systems<br>><br>> Suite 7.03<br>><br>> 6a Glen St<br>><br>> Milsons Point NSW 2061<br>><br>> Australia<br>><br>><br>><br>> Office: 02 9212 0899<br>><br>> Online: 02 8005 0595<br>><br>><br>><br>> *From:* Koha-devel <koha-devel-bounces@lists.koha-community.org> *On<br>> Behalf Of *David Schmidt<br>> *Sent:* Tuesday, 2 November 2021 9:01 PM<br>> *To:* Koha-devel@lists.koha-community.org<br>> *Subject:* [Koha-devel] custom core patches management<br>><br>><br>><br>> Hello koha community,<br>><br>><br>><br>> We made some changes to our Koha instance and are now looking for a<br>> mechanism to apply them to a new installation.<br>><br>><br>><br>> - some of the changes are simply new files, thats easy.<br>><br>> - some changes were possible to put into plugins or use existing hooks.<br>><br>><br>><br>> but how do you deal with changes to the koha sourcecode?<br>><br>><br>><br>> this is our strategy:<br>><br>><br>><br>> 1) we have a git repo with our koha source code.<br>><br>> 2) if we change code in Foobar.pm we create 3 files.<br>><br>> Foobar.pm.orig<br>><br>> Foobar.pm.changed<br>><br>> Foobar.pm.patch<br>><br>> 3) on a new koha instance next we have a script `install.sh` that compares<br>> Foobar.pm.orig with the installed file. if they match, the patch is applied.<br>><br>><br>><br>> Does that sound like a good idea?<br>><br>> How do YOU manage core changes that do not go upstream?<br>><br>><br>><br>> cheers,<br>><br>> david<br>> _______________________________________________<br>> Koha-devel mailing list<br>> Koha-devel@lists.koha-community.org<br>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>> website : https://www.koha-community.org/<br>> git : https://git.koha-community.org/<br>> bugs : https://bugs.koha-community.org/<br>><br><br><br>-- <br>Michael Hafen<br>Washington County School District Technology Department<br>Systems Analyst<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20211103/2912827d/attachment-0001.htm><br><br>------------------------------<br><br>Message: 2<br>Date: Thu, 4 Nov 2021 09:39:05 +1100<br>From: <dcook@prosentient.com.au><br>To: "'Michael Hafen \(TECH\)'" <michael.hafen@washk12.org><br>Cc: "'David Schmidt'" <mail@davidschmidt.at>,<br>    <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] custom core patches management<br>Message-ID: <0ed201d7d103$9bda48c0$d38eda40$@prosentient.com.au><br>Content-Type: text/plain; charset="utf-8"<br><br>I would actually be a bit more interested in git based deployments if we fixed up the directory layout for the Koha codebase. <br><br> <br><br>One downside to the git approach is that you’ll also need to manually update generated configuration files. Not a big problem for small scale deployments, but not something you really want to be doing when you’re updating 100 Koha instances across 15 servers across 3 continents at the same time (which is still small scale by some measures haha). I think the git-based installation makes it easier to wind up with a broken Koha by accident. <br><br> <br><br>Software deployment is a bit of a passion of mine, so really curious to hear from more people. I’m quite interested in using Carton to handle Koha’s Perl dependencies instead of using OS-based Perl dependencies. I’m planning to move that way for a different project, although I’m actually still using OS packages for deploying my app. Actually, that’s another reason to consider going with package-based deployments: dependency management. (That said, I have noticed an issue where Koha gets uninstalled when updating the OS. Something I still need to investigate. Think it is Zebra related.)<br><br> <br><br>At some point, I’d like to move to Docker-based deployments, but there’s still more work to do on that front. It’s very doable, but without a critical mass of Koha community members wanting to do it, I think it would be a waste of my time to invest too much in it. There’s a saying that you go faster alone but farther together, and I think that’s something worth keeping in mind.<br><br> <br><br>David Cook<br><br>Senior Software Engineer<br><br>Prosentient Systems<br><br>Suite 7.03<br><br>6a Glen St<br><br>Milsons Point NSW 2061<br><br>Australia<br><br> <br><br>Office: 02 9212 0899<br><br>Online: 02 8005 0595<br><br> <br><br>From: Michael Hafen (TECH) <michael.hafen@washk12.org> <br>Sent: Thursday, 4 November 2021 3:37 AM<br>To: dcook@prosentient.com.au<br>Cc: David Schmidt <mail@davidschmidt.at>; koha-devel@lists.koha-community.org<br>Subject: Re: [Koha-devel] custom core patches management<br><br> <br><br>This is exactly how I manage my Koha installs, with the exception that instead of using the packages I run my production servers from a dev install.  When I have changes ready I just `git fetch; git reset --hard origin/my_release_branch` to apply those changes, but then I have to manually go through koha-upgrade-schema and koha-plack --restart for each instance (I have 3 active instances).  So I have traded building and distributing debian packages for manually doing the post upgrade work that the packages would do for me.<br><br> <br><br>On Tue, Nov 2, 2021 at 7:00 PM <dcook@prosentient.com.au <mailto:dcook@prosentient.com.au> > wrote:<br><br>Hi David,<br><br> <br><br>I won’t make a comment on good vs bad strategies, as those are just subjective judgements, and ultimately it really all depends on your context.<br><br> <br><br>However, it sounds like you’re making a lot of work for yourself with those files. Using git commands, you could extract equivalents of those .orig, .changed, and .patched files. <br><br> <br><br>Also, by patching prod files like that, you don’t necessarily know exactly what your application state is at any particular time. I suppose you could probably do a git-based manual patching deployment system using git hashes to represent versions, but I’ve found in practice that those cause more headaches than they solve.  <br><br> <br><br>Most Koha support providers (like the one I work for) will fork the branch(es) they want to customize, and then generate Debian packages which they distribute around the world as necessary. As soon as you’re running more than 1 Koha server, you really want a way to easily and quickly deploy changes across multiple machines. Koha is large and complex, so I think you’ll find that leveraging the work the community has done to build robust Debian packages is your best bet.<br><br> <br><br>Carrying customizations forward through time takes work, so it’s best to upstream everything you can, but I think we all know that’s not always feasible. Again git commands can help you show the changes you’ve made between different versions, and then you can make periodic efforts to review your customizations and port over anything you need to when a new version comes out. <br><br> <br><br>I hope that you find that helpful.<br><br> <br><br>David Cook<br><br>Senior Software Engineer<br><br>Prosentient Systems<br><br>Suite 7.03<br><br>6a Glen St<br><br>Milsons Point NSW 2061<br><br>Australia<br><br> <br><br>Office: 02 9212 0899<br><br>Online: 02 8005 0595<br><br> <br><br>From: Koha-devel <koha-devel-bounces@lists.koha-community.org <mailto:koha-devel-bounces@lists.koha-community.org> > On Behalf Of David Schmidt<br>Sent: Tuesday, 2 November 2021 9:01 PM<br>To: Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> <br>Subject: [Koha-devel] custom core patches management<br><br> <br><br>Hello koha community,<br><br> <br><br>We made some changes to our Koha instance and are now looking for a mechanism to apply them to a new installation.<br><br> <br><br>- some of the changes are simply new files, thats easy.<br><br>- some changes were possible to put into plugins or use existing hooks.<br><br> <br><br>but how do you deal with changes to the koha sourcecode?<br><br> <br><br>this is our strategy:<br><br> <br><br>1) we have a git repo with our koha source code.<br><br>2) if we change code in Foobar.pm we create 3 files.<br><br>Foobar.pm.orig<br><br>Foobar.pm.changed<br><br>Foobar.pm.patch<br><br>3) on a new koha instance next we have a script `install.sh` that compares Foobar.pm.orig with the installed file. if they match, the patch is applied.<br><br> <br><br>Does that sound like a good idea?<br><br>How do YOU manage core changes that do not go upstream?<br><br> <br><br>cheers,<br><br>david<br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> <br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br><br>-- <br><br>Michael Hafen<br><br>Washington County School District Technology Department<br><br>Systems Analyst<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20211104/7c04d3a9/attachment.htm><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org<br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br>------------------------------<br><br>End of Koha-devel Digest, Vol 192, Issue 3<br>******************************************<br></div><br><br>NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.<br></body></html>