From paul at boddie.org.uk Fri Feb 25 17:59:27 2022 From: paul at boddie.org.uk (Paul Boddie) Date: Fri, 25 Feb 2022 23:59:27 +0100 Subject: [moin-devel] [moin-user] moinmoin 2.0 stable release In-Reply-To: <2284468.Tqf7axnP8n@jason> References: <2284468.Tqf7axnP8n@jason> Message-ID: <27432520.gMcah2eSUd@jason> (I've added moin-devel to the recipients, and maybe moin-user can be dropped in future.) On Wednesday, 23 February 2022 18:30:50 CET Paul Boddie wrote: > On Wednesday, 23 February 2022 05:24:10 CET Lukasz Szybalski wrote: > > > > - We need help from those who have worked on debian.org and can push the > > moinmoin2 to debian backports. Engage, ask for help, and report on > > progress. (They will also need migration instructions or scripts) > > Quite some time ago, I did look into Debian packaging for Moin 2.0 and > quickly became bogged down in all the dependencies that weren't packaged. > This is another situation where the Python developers have encouraged their > own way of working largely to the detriment of the broader ecosystem. While > people may enjoy virtualenvs, venvs, today's new envs, and so on, a > reliance on the shifting sands of an "agile" but unstable software stack > can be a hindrance to packaging for a relatively stable system. > > I suppose a review of this situation is possible. Debian packaging isn't > particularly enjoyable, but it is probably the most effective way of > bringing the software to the right audience. I looked into the Debian packaging requirements, and it seems to me that the following packages are needed (not being available in Debian): emeraldtree Flask-Theme flatland XStatic-CKEditor XStatic-autosize XStatic-jQuery-File-Upload XStatic-TWikiDraw-moin XStatic-AnyWikiDraw XStatic-svg-edit-moin XStatic-JQuery.TableSorter XStatic-Pygments There are already Flask and XStatic packages in Debian, but not those listed above. I have just been looking at the first three in this list, and it seems feasible to try and put together some quick packages for them, assuming that I can rediscover how to make Debian packages. Paul From paul at boddie.org.uk Mon Feb 28 13:36:23 2022 From: paul at boddie.org.uk (Paul Boddie) Date: Mon, 28 Feb 2022 19:36:23 +0100 Subject: [moin-devel] [moin-user] moinmoin 2.0 stable release In-Reply-To: References: <27432520.gMcah2eSUd@jason> Message-ID: <3261607.KDUla2LWIC@jason> (Dropping moin-user from this discussion...) On Monday, 28 February 2022 18:46:08 CET Lukasz Szybalski wrote: > On Fri, Feb 25, 2022 at 5:01 PM Paul Boddie wrote: > > > > I looked into the Debian packaging requirements, and it seems to me that > > the following packages are needed (not being available in Debian): > > Awsome. Thank you!! No problem! > > emeraldtree > > Flask-Theme > > flatland > > XStatic-CKEditor > > XStatic-autosize > > XStatic-jQuery-File-Upload > > XStatic-TWikiDraw-moin > > XStatic-AnyWikiDraw > > XStatic-svg-edit-moin > > XStatic-JQuery.TableSorter > > XStatic-Pygments > > > > There are already Flask and XStatic packages in Debian, but not those > > listed above. I have just been looking at the first three in this list, > > and it seems feasible to try and put together some quick packages for > > them, assuming that I can rediscover how to make Debian packages. > > If you do, and have the instructions please share, we can assist in > packaging the rest. I wonder if there is somone we should cc, that has in a > past packaged python packages like this, that would be able to guide us > through this over the next two weeks? OK, my approach has been as follows. First of all, I set up sbuild so that I can build packages cleanly. The Debian Wiki has instructions for this, but their styling is broken, making the code fragments difficult to read: https://wiki.debian.org/sbuild I found that installing sbuild and following the instructions mostly helped. You need to add yourself to the sbuild group and log out and in again, or use newgrp to get immediate access to the group. You also need to create a chroot for sbuild, which I did by copying from the sbuild-createchroot manual page: sudo sbuild-createchroot unstable /srv/chroot/unstable-amd64 \ --alias=sid --alias=UNRELEASED \ http://deb.debian.org/debian For each package, I obtain the unpackaged source code, which is usually just doing a git clone. So, something like this: git clone https://github.com/moinwiki/emeraldtree.git Then, I've made an "original source" archive from that for a given tag. Git's interface for this is cumbersome, of course, but here's what I do: cd emeraldtree git archive --format=tgz \ --prefix=emeraldtree-0.9.2/ \ --output=../emeraldtree_0.9.2.orig.tar.gz \ 0.9.2 This puts the archive in the parent directory. With that, I then found that it rather helped to actually check out the changeset corresponding to the chosen tag: git checkout 0.9.2 Otherwise, the Debian tools complain about the files not matching the "original source" archive. Now, at this point, the actual packaging files need to be written. Apparently, the debmake tool can initiate this process, but I just went and found reasonable enough files from other packages and then made my own packaging files. These all live in the debian directory within the repository being packaged. Here, "apt-get source " for similar packages can be helpful to see what they do. Finally, I run sbuild to perform the build: sbuild . Hopefully, this all works and you get a bunch of files produced in the parent directory. So, in summary, here's the process: cd git archive --format=tgz \ --prefix=-/ \ --output=../_.orig.tar.gz \ git checkout # <- Here we populate the debian directory. sbuild . I did find the following pages somewhat helpful: https://www.debian.org/doc/manuals/debmake-doc/index.en.html https://wiki.debian.org/Python/LibraryStyleGuide However, the documentation in general suffers from adding even more words and more links to a Web page, and if that doesn't help explain everything, just add even more. Consequently, the above process is probably not optimal, but then that is what happens when confronted with lots of apparent choices and special cases, even though the tooling has tried to automate a lot of the adaptation required. I have put my own packaging attempts here in Mercurial repositories: https://hg.boddie.org.uk/Moin/ What I do, when the process demands the debian directory, is to copy the directory out of my packaging repository: cp -R ../Packaging/emeraldtree/debian . None of this is elegant, but I did make it work in a reasonable amount of time without having to spend even longer second-guessing tools or hunting down the preferred tool or wrapper that would supposedly make it elegant. Anyway, I hope this is informative if not completely helpful. I suppose the next step would be for me to file an "intent to package" (ITP) issue in the Debian bug tracker for each package and then find a packaging mentor. That is what I did last time I packaged anything in Debian. Paul