/srv/irclogs.ubuntu.com/2021/04/14/#ubuntu-server.txt

Sonihow do you keep apt from autostarting freshly-installed services, in particular network-enabled ones like lighthttpd, bitlbee, quassel, transmission-daemon, etc, before you have a chance to configure them?01:17
rbasakSoni: look up "policy-rc.d"01:38
rbasakExample: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html#parameter-policy_rc_d01:39
rbasakIMHO, setting it to 101 should be the default in tools like ansible, and it's a bug in these tools that it's not.01:39
rbasakBut at least you can do it properly with options like that01:39
lordievaderGood morning06:00
=== denningsrogue62 is now known as denningsrogue6
=== cpaelzer_ is now known as cpaelzer
Sonirbasak: how does that help someone installing stuff?10:01
P-NuTI am looking at using Modsecurity on ubuntu, but it seems a faff to use it with NGINX, whereas it seems easier to use with apache. I was wondering if anyone had any personal stories of running either in production that could advise.10:18
J_DarnleyDoes anyone know where might be the best place to ask a deep packaging question?  Specifically about giving an optional dependency on a minimum version of another package.11:38
TJ-J_Darnley: you mean in the debian/control Recommends: or "Depends:" ?12:09
pirxi am trying to upgrade a server from 18.04 to 20.04, and the upgrade fails (could not calculate upgrade). i see in /var/log/distupgrade/apt.log that its something with a package called python-is-python2, which kinda seems to be installed (or held??), but isnt according to dpkg etc. i have tried to purge it anyway, and install it even, but its just not to be found...12:33
pirxcan i manually look into this somehow? like, where are the DBs/lists of what packages the system possibly thinks it has?12:34
pirxi'd like to just nuke-purge it somehow and do the upgrade, and hope that 20.04 will have all the packages it needs:)  (also, i just bumped the server from 16.04 to 18.04)12:34
pirxi see this in apt.log: https://pastebin.com/67teZ9ZU12:34
pirxnow i have looked around in the files in /var/lib/apt/lists/ and python-is-python2 only seems to exist in 20.0412:35
J_DarnleyTJ-: yes one of those control fields12:49
J_DarnleyShould I just ask my question here?12:53
UssatFWIW I never "upgrade" prod servers like that, I always build new,  config w/ansible. I will upgrade a desktop I dont care about but thats it13:17
Ussatbuild new in parallel, take downtime, swap names/ip13:17
Ussatdone13:18
rbasak!ask | J_Darnley13:36
ubot3J_Darnley: Please don't ask to ask a question, simply ask the question (all on ONE line and in the channel, so that others can read and follow it easily). If anyone knows the answer they will most likely reply. :-) See also !patience13:36
J_DarnleyOkay then13:40
J_DarnleyI have a package X in which a user might use 1 of 3 options.  That option requires a minimum version of another package Y.  How can I ensure that the user can't install my package when they have a version of Y less than a specific version?13:43
rbasakPut "Breaks: X (< whatever)" in Y.13:55
rbasakNo sorry, that's backwards.13:55
rbasakI'm not sure I follow. Maybe "Depends: Y (>= version) | Y' | Y''"?13:56
rbasak(in X)13:56
J_DarnleyIt isn't a fixed dependency though.  Users of X don't need Y unless they use the Y option.13:58
J_DarnleyDo the lower levels of package relationships do strict version checking?  Could it be a recommends?13:59
J_DarnleyWhat do you mean by Y' and Y''?13:59
rbasakYour alternatives to Y14:00
rbasakMaybe Breaks is right then, but it needs to be the other way round.14:00
rbasakIn X, "Breaks: Y (< version)".14:00
rbasakThat will prevent X and older Y being installed together.14:00
rbasakHowever, if older Y is installed and the user installs X, and newer Y isn't available, apt will I think resolve by removing Y.14:01
rbasakIt's an odd request though. Which package is this?14:01
J_DarnleyOh I forgot to say I think this is always though dpkg14:01
J_DarnleyIt is my company's software14:02
J_DarnleyAnd we don't list the alternatives in depends (yet)14:02
tewardJ_Darnley: just because it's your company's software doesn't mean it can't be apt installed (`sudo apt install ./package_1.2.3-amd64.deb` for example)16:01
tewardand you really should be avoiding doing direct `dpkg` installations and just call the local debian files via `apt install` for dependency resolution.16:01
tewardbecause `dpkg` doesn't have the dependency knowledge as much as you think it would ;)16:01
tewardhence why rbasak suggests adjusting the package with the alternatives, breaks, etc.16:01
J_DarnleyHow am I supposed to keep track of the innumerable ways to install debian packages?16:02
tewardnot relevant to this conversation and rbasak's suggestions (which are critical to packaging policy for Debian packages regardless of how you install the package)16:02
sdezielJ_Darnley: the simple way is to always use apt16:03
J_DarnleyThen what is apt-get?16:04
mybalzitchone of the  tools people used before they unified all the apt stuff into just apt16:04
tewardJ_Darnley: apt-get is the older tool, apt is the more modern unified tool that does more than apt-get and handles a few things better16:05
tewarddpkg is really low level compared to apt-get and apt, and you should use `apt` where possible.16:06
teward(apt and apt-get both call dpkg, but dpkg is the low-level thing that doesn't really handle all the dependency resolution stuff)16:06
rbasakExcept for scripting. apt isn't suitable to use from scripts because it doesn't have a stable interface16:07
J_DarnleyI have noticed that message from apt.16:08
rbasakSee "SCRIPT USAGE AND ..." in apt(8)16:08
J_DarnleyIf I want to read about what I can do with `apt install` do I need to read the `apt-get` manpage?  Or just a newer ubuntu release with a better one?16:11
leftyfbrbasak: your last point about apt and scripting, have you seen any indication that that is being actively worked on? It's been more than a few years now16:34
kinghatwhats the process like of getting recent zfs on server?18:06
kinghatmaybe it will be backported in aug? https://www.reddit.com/r/Ubuntu/comments/k47ghh/will_openzfs_200_be_available_in_the_ubuntu_2004/ge8l8wh18:13
sarnoldmaaaaybe. last I heard the utils had to match the kernel closely18:13
sarnoldI don't know how we intend to handle that large of a backport18:13
sarnoldkinghat: I've seen https://launchpad.net/~jonathonf/+archive/ubuntu/zfs referenced before, but never tried it myself18:15
kinghatya i saw that too. maybe ill just give it gzip compression18:17
rbasakleftyfb: I don't think there's anything to work on. apt-get provides a stable CLI and isn't going away, and as the manpage says, all facilities provided by "apt" are available through the previously existing commands.18:33
rbasak"apt" is just a CLI-user-friendly wrapper that has defaults that might change; that's all.18:33
leftyfbit would be nice to take advantage of "the more modern unified tool that does more than apt-get and handles a few things better" in scripting18:35
rbasakI'm not sure where you got that idea. Did you read the manpage section I referenced above?18:40
=== StathisA_ is now known as StathisA
leftyfbrbasak: the quoted comment was from teward.18:45
tewardi was pinged18:45
tewardrbasak: that's my fault, apologies18:45
tewardbut for the purposes of installing a .deb package as an end user directly on the command line I'd suggest `apt` over `apt-get` but either work18:45
tewardi just would shy away from using `dpkg` directly unless I had no choice.18:46
leftyfbI didn't know apt was only meant to be a wrapper for apt-get/apt-cache and never meant to replace them. I thought it was a means to an end, incorrectly apparently18:48
tewardrbasak: if apt was not meant to replace apt-get then we need to do some work on apt-get20:07
tewardbecause apt lets you accept and check things triggered by apt-secure, in case someone changes something on the repository side of things (i.e. third party repo names get changed but are still otherwise identical)20:08
tewardor better documentation on fixing that via apt-secure calls or such20:08
rbasakteward: I'm pretty sure it's just default options that can all be tweaked21:58

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