Skip to content

Instantly share code, notes, and snippets.

@TsvetanUsunov
Created July 22, 2014 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TsvetanUsunov/57f109b11381ea019b39 to your computer and use it in GitHub Desktop.
Save TsvetanUsunov/57f109b11381ea019b39 to your computer and use it in GitHub Desktop.
Building Debian rootfs from scratch
<jo0nas> HeHoPMaJIeH: Nice article on bootstrapping Debian - but please do not advice users to disable recommends, that is a recipe for a broken system!
* jo0nas is talking about https://olimex.wordpress.com/2014/07/21/how-to-create-bare-minimum-debian-wheezy-rootfs-from-scratch/
<HeHoPMaJIeH> jo0nas: i will take a point.. The goal of this article was how to build "minimal" rootfs. in this case i don not want all unnecessary recommended/suggested packages
<HeHoPMaJIeH> but you are right :) i will tell Tzvetan to remove it from article
<jo0nas> I assume you mean a minimal *working* system
<jo0nas> if you want a minimal *broken* system I strongly recommend that you indicate that more clearly in the article, to not confuse those seeking a working system
<jo0nas> Another way to say it: Remove the line "APT::Install-Recommends "0"; ", and users of such systems can confidently report bugs they experience directly to Debian
<jo0nas> remove that line, and instead advertise at the end of the article that Debian developers are happy to serve bugreports for such a system - just follow the guide at https://www.debian.org/Bugs/Reporting
* jo0nas is very happy about that article otherwise!
<HeHoPMaJIeH> jo0nas: as i said few lines above i will remove it from this article or i will apply a note , but i do not get how recommends makes system "broken" !
<HeHoPMaJIeH> or suggests :))
<jo0nas> HeHoPMaJIeH: another minor point: Instead of http://ftp.uk.debian.org/debian URLs, I recommend to use http://http.debian.net/debian/ - which dynamically resolves to geo-near host
<jo0nas> reason avoding recommends causes breakage is that by definition a recommendation is when needed in all but very unusual cases. Systematically ignoring means "this system is as unusual in all possible ways" which is hardly ever correct.
<jo0nas> historically there has been a lot of confusion about recommends, because the first implemented front-end to the APT engine - "apt-get", had a bug in that it treated recommends same way as suggests.
<jo0nas> that apt-get bug lead to a lot of Debian developers misunderstanding breakage and effectively papering over the real bug by using depends in situations where recommends where appropriate
<jo0nas> bug has since been fixed, but there is still a common misconception that systematically turning off recommends leads to a (properly working) tinier system
<HeHoPMaJIeH> ok i get it :) but when "some shit" is really needed it must be in depends not in recommends :)
<HeHoPMaJIeH> if the shit is NOT in depends, and you get your system broken, that's a packaging bug
<jo0nas> ...there is also one single very vocal Debian developer who still claim it is sensible to turn off recommends systematically, but he gets comments for that every time he mentions it on debian-devel@lists.debian.org
<jo0nas> if _always_ needed then depend on it
<jo0nas> if a single weird corner-case situation don't need it, recommend it
<jo0nas> for all sane regular installations, recommendations should be treated the same as dependencies
<jo0nas> in other words: if you ignore a recommendation, you should really know what you are doing!
<jo0nas> if you blindly ignore recommendations, you are _very_ likely to not know what you are doing
<jo0nas> ...and one concrete situation that might backfire is if you report bugs and after trying to solve the bug the developers realize that you ignored some recommendation without telling in the bugreport - that might result in angry developers
<HeHoPMaJIeH> so what is the conclusion here, when have depends and recommends, but we are not sure what we will use so come on and install all *shit* that developer wants
<jo0nas> it is *not* a packaging bug to recommend stuff
<HeHoPMaJIeH> to be sure that package will work !
<jo0nas> example: a package needs a SQL store - it could be a Postgres server remotely, or a SQLite locally - package recommends SQLite
<jo0nas> if you ignore recommends, result may be a non-working program
<jo0nas> ...and maybe that causes GNOME to not start at all
<t00lame> jo0nas: thats wrong. a program should be perfectly working while ignoring recommends. recommends are optional.
<jo0nas> ...until either the recommendation is followed, or the alternative (changing configuration to point to a fully working and prepared remote SQL service) is done
<t00lame> whatever is really required, should be in depends
<HeHoPMaJIeH> agreed ^
<t00lame> if you want fully functional gnome desktop, you are required to install it via "gnome" metapackage, which will pull all depends.
<jo0nas> you can agree with each other as much as you like - you are talking about a different system that Debian, then!
<t00lame> ignoring recommends is perfectly fine for one who knows what he wants, and what he is doing.
<jo0nas> Debian is tied to Debian Policy - which defines the purpose of the "Recommends:" hint pretty clearly!
<jo0nas> t00lame: I don't say otherwise
<jo0nas> my point is you need to know what you are doing!
<t00lame> recommends: This declares a strong, but not absolute, dependency
<t00lame> ^ should not break the system.
<jo0nas> ...because all sorts of odd details in your system may break, and _you_ are to blame for it if _you_ choose to ignore recommended package relationships!
<HeHoPMaJIeH> jo0nas: my point is "i need small system", and i do not need garbage at all
<t00lame> well, if you are creating a minimal arm image for some random board, you know what you are doing :)
<jo0nas> recommandations are not garbage
<t00lame> I did not say they are garbage.
<HeHoPMaJIeH> i said it :)
<t00lame> oh. :)
<jo0nas> marking suggestions as recommendations is a bug
<t00lame> jo0nas: sure. marking a critical dependency as recommend is a bug too. again, apt-get still shows you recommends, just doesnt instal them.
<jo0nas> t00lame: no, you do not necessaily know what you are doing when juggling with package relationships between 100s of packages
<jo0nas> I think we are looping - neither of us is providing new arguments, just repeating old ones
<HeHoPMaJIeH> :)
<t00lame> yes. the discussion is pointless. indeed ;)
<jo0nas> feel free to ignore recommends
<HeHoPMaJIeH> ok, i will put a note in a article and everything will be ok :)
<jo0nas> please do not in an article targeted others instruct them to do the same
<t00lame> I do, on 200+ servers,, nothing, ever, gets broken here /me hides :)
<jo0nas> t00lame: I also do lots of stuff on servers I maintain
<HeHoPMaJIeH> jo0nas: are you ok with this :)
<jo0nas> there is a huge difference between what I do myself and what I guide others to do!
<t00lame> however, NOT asking noobs to ignore recommends is a good idea.
<jo0nas> not asking _anyone_
<jo0nas> recommends is the proper thing for all Debian users, with the exception of only a certain kind of adventurers
<jo0nas> HeHoPMaJIeH: if I am ok that you add a note instead of removing that controversial line? Yes, if that note says something like "anyone but weirdos should ignore the following line" - but then again, I find it less offensive to those in the category of that certin kind of adventurers to simply drop the line instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment