/srv/irclogs.ubuntu.com/2020/07/24/#launchpad.txt

matthewcroughanHey! Is this the right place to get help making a PPA package?12:20
matthewcroughanI'm really confused, having followed the Ubuntu docs, which seem outdated to the point of not actually functioning due to python versions.12:20
matthewcroughanhttps://packaging.ubuntu.com/html/packaging-new-software.html12:21
matthewcroughanthe step regarding BRZ fails completely due to an arbitrary python error: brz: ERROR: AttributeError: 'NoneType' object has no attribute 'initialize_on_transport'12:21
matthewcroughanfollowing the guide to a tee, root@4ac1c3f970f1:~# bzr dh-make hello 2.10 hello-2.10.tar.gz12:21
cjwatsonWe can help with the points where it interacts with Launchpad, but not generally with the bits before that.12:28
matthewcroughanThen I am confused. Maybe you can direct me to better docs that describe how to package?12:29
matthewcroughansince the ubuntu docs don't currently work12:29
cjwatsonYeah, I'm somewhat annoyed nobody has fixed those up for years, but haven't had time myself.  https://wiki.ubuntu.com/UbuntuDevelopment/#Packaging links to some other resources; I would probably suggest starting with the Debian resources there, since for the most part the only required difference for uploading stuff to a PPA should be selecting an appropriate version number (for which, ...12:33
cjwatson... https://help.launchpad.net/Packaging/PPA/BuildingASourcePackage#Versioning)12:33
matthewcroughanWhy is this such voodoo? I made an AUR package in seconds lol.12:33
matthewcroughanAll I want to do is provide something I'm doing on Github, to people.12:34
cjwatsonOK, and I've given you some better pointers, please don't give me a hard time about it.12:34
matthewcroughanI'm not, I hope :D12:34
cjwatsonI guarantee it would take me hours to make an AUR package; there's a significant amount of familiarity involved ...12:35
cjwatson(at minimum)12:35
matthewcroughanLol it's just one file.12:35
cjwatsonOK, this is not going to be a productive conversation.12:35
matthewcroughanThe wiki makes it seem very complex. But it is just one file. In which there's a function and some variables.12:35
matthewcroughanSo what is it in this case? All I need to do is X. What is X?12:36
matthewcroughanI need to make a deb source file. Then use dput to give that to Launchpad. Is this correct?12:36
matthewcroughanThat seems simple, but I can't figure out that first step.12:37
matthewcroughanBut anyway, is it true that all I have to do is *SOMEHOW* get a deb source file out of my code. Then, upload that deb to launchpad with dput?12:38
cjwatsonYep12:38
matthewcroughan> You can learn how to create .deb packages for Ubuntu by following the Ubuntu packaging guide.12:39
matthewcroughanAgain, I'm in this loop where I can't get to the stage of packaging the deb due to the docs being incorrect.12:40
cjwatsonProbably easiest is if you ditch the old bzr stuff that the packaging guide talks about and just use "dh_make" to set up a skeleton.12:40
matthewcroughanThe resources it links to are not Ubuntu. They're debian.12:40
matthewcroughanSo as a result, launchpad is now incorrect. Since Launchpad keeps highlighting the significance of everything being done in accordance with Ubuntu's guidelines.12:40
cjwatsonI agree that it is a problem that the Ubuntu packaging guide refers to obsolete stuff.  That's something the Ubuntu people need to fix12:40
matthewcroughanYes, but pragmatically, how does this present a problem for me?12:40
matthewcroughanIf I make a debian style deb source package (whatever that looks like) will it not be invalid?12:41
cjwatsonNo.12:41
matthewcroughanCan that file just be the binary file? How does launchpad know or care?12:41
cjwatsonIn general Debian and Ubuntu source packages are pretty similar in structure.12:41
cjwatsonWhat do you mean by "binary file"?12:41
matthewcroughanI know that, but all the guides on the internet I've seen and failed to follow so far tell me that Ubuntu structures things differently, meaning making a ppa is non-standard.12:42
matthewcroughancjwatson providing only the compiled code inside of the deb file12:42
matthewcroughanthe resultant binary of my personal local output of `make`12:42
cjwatson.deb is the binary package file - Launchpad will not accept that.  Launchpad only accepts source package uploads12:42
matthewcroughanWhat is the extension for that?12:42
cjwatson.dsc12:42
matthewcroughanAh brilliant12:42
matthewcroughanAnd what tools create dsc files?12:43
matthewcroughanThis is hard to google for. I can't find anything for "debian source" "debian source package" as it just gets conflated with open source, source code, etc.12:43
matthewcroughanFound it. https://wiki.debian.org/Packaging/SourcePackage?action=show&redirect=SourcePackage#How_to_build_the_Debian_package12:44
matthewcroughanYet I can only find docs on interfacing with them. Not creating a source package.12:44
cjwatsonThe normal way to build a source package is "debuild -S"12:45
matthewcroughanMana from heaven.. You're saving me here12:45
matthewcroughanMy sanity is being restored.12:45
cjwatsonYou run it in a source tree with a debian/ subdirectory - the various bits of packaging rules and metadata should all be in there12:45
dokomaybe start reading at the table of contents? https://wiki.debian.org/Packaging12:45
matthewcroughandoko I found it https://wiki.debian.org/SimplePackagingTutorial12:46
matthewcroughancjwatson So you think if I use debuild to make a source package, the resultant dsc will be compatible with Ubuntu *and* Debian via Launchpad?12:46
cjwatsonThere can often be quirks depending on the details of your project, but in principle yes.  I upload to both distributions all the time that way.12:47
cjwatson(I'll try to see if I can find somebody to revamp the Ubuntu packaging guide to be uh actually current.  No promises)12:48
matthewcroughanThe project builds a static binary, it's golang.12:51
matthewcroughanhttps://blog.packagecloud.io/debian/debuild/packaging/2015/06/08/buildling-deb-packages-with-debuild/12:53
matthewcroughanGood guide here by the looks of things. I'm really happy you were able to get me to this conclusion.12:53
matthewcroughanThanks12:53
matthewcroughancjwatson The `debian/control` file is basically identical in function to what the PKGBUILD in the AUR is doing. Amazing.12:56
matthewcroughanI really wonder how people manage not to get stuck at this stage. I went directly to Launchpad and Ubuntu docs to learn about this, how are people otherwise getting around it? I only discovered this through chatting with you.12:57
cjwatsondebian/control has declarative metadata like descriptions and build-dependencies; debian/rules has executable bits12:57
cjwatson(debian/rules can often just be a very minimal skeleton because debhelper is pretty smart these days, but sometimes you need to override it)12:57
cjwatsonThe absolute bare minimum is debian/{changelog,control,rules}12:58
matthewcroughanAlright, that's great. Will fit right into my CI system too12:58
matthewcroughanSo is it common for projects that support debian to have a debian/ directory in their github sources?12:59
cjwatsonGently discouraged.  It's more usual to maintain the packaging as a branch13:19
matthewcroughanWhat about as a separate repo cjwatson ?14:07
matthewcroughanAlso discouraged? Or is it common too?14:07
cjwatsonWell, a branch in a separate repo is still a branch :)14:10
cjwatsonIt's common for the person doing the packaging not to be the same as the person doing upstream development, so packaging often ends up living in a separate repo14:11
cjwatsonBut if you don't want to bother with that then it technically works to keep them all together, and that may make sense if it's a small thing you don't expect anyone else to work on14:12
=== DNS is now known as snd

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!