blog/assets/js/b5a32f14.68cedca8.js
github-actions[bot] 0b9bf3d392 deploy: dadb0d51f7
2023-11-28 18:40:59 +00:00

1 line
No EOL
9.1 KiB
JavaScript

"use strict";(self.webpackChunkfi=self.webpackChunkfi||[]).push([[2433],{31976:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>c,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var t=o(85893),r=o(11151);const s={title:"How can Copr help with broken dependencies",description:"Copr comes to save you when maintainer doesn't care.",date:new Date("2023-08-02T00:00:00.000Z"),authors:[{key:"mf",title:"a.k.a. your opinionated admin"}],tags:["\ud83c\udfed","red-hat","copr","admin","vps"]},a=void 0,i={permalink:"/blog/2023/08/02/copr",editUrl:"https://github.com/mfocko/blog/tree/main/blog/2023-08-02-copr.md",source:"@site/blog/2023-08-02-copr.md",title:"How can Copr help with broken dependencies",description:"Copr comes to save you when maintainer doesn't care.",date:"2023-08-02T00:00:00.000Z",formattedDate:"August 2, 2023",tags:[{label:"\ud83c\udfed",permalink:"/blog/tags/\ud83c\udfed"},{label:"red-hat",permalink:"/blog/tags/red-hat"},{label:"copr",permalink:"/blog/tags/copr"},{label:"admin",permalink:"/blog/tags/admin"},{label:"vps",permalink:"/blog/tags/vps"}],readingTime:3.44,hasTruncateMarker:!0,authors:[{name:"Matej Focko",email:"me+blog@mfocko.xyz",title:"a.k.a. your opinionated admin",url:"https://gitlab.com/mfocko",imageURL:"https://github.com/mfocko.png",key:"mf"}],frontMatter:{title:"How can Copr help with broken dependencies",description:"Copr comes to save you when maintainer doesn't care.",date:"2023-08-02T00:00:00.000Z",authors:[{key:"mf",title:"a.k.a. your opinionated admin"}],tags:["\ud83c\udfed","red-hat","copr","admin","vps"]},unlisted:!1,nextItem:{title:"4th week of Advent of Code '22 in Rust",permalink:"/blog/aoc-2022/4th-week"}},d={authorsImageUrls:[void 0]},l=[{value:"How does Copr repositories work?",id:"how-does-copr-repositories-work",level:2},{value:"My issue",id:"my-issue",level:2},{value:"How can Copr help?",id:"how-can-copr-help",level:2},{value:"Conclusion",id:"conclusion",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",section:"section",strong:"strong",sup:"sup",...(0,r.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"When you decide to run Fedora on your VPS, you might get screwed over by using\nrandom repositories\u2026"}),"\n",(0,t.jsxs)(n.p,{children:["When I \u201creserved\u201d my VPS",(0,t.jsx)(n.sup,{children:(0,t.jsx)(n.a,{href:"#user-content-fn-1-d4045e",id:"user-content-fnref-1-d4045e","data-footnote-ref":!0,"aria-describedby":"footnote-label",children:"1"})})," back in June '20, I slapped Fedora on it without\nthinking. I bet 99% of people would say that I'm crazy for doing such thing",(0,t.jsx)(n.sup,{children:(0,t.jsx)(n.a,{href:"#user-content-fn-2-d4045e",id:"user-content-fnref-2-d4045e","data-footnote-ref":!0,"aria-describedby":"footnote-label",children:"2"})}),",\n",(0,t.jsx)(n.strong,{children:"BUT"})," I've been using Fedora on my PCs for some time already and it felt very\nstable and natural to just use, even for VPS."]}),"\n",(0,t.jsxs)(n.p,{children:["One of the first things I've done was setting up a mail server. You may guess\nwhat's the fun part about having a mail server\u2026 Yes, it's all the spam you\nreceive and only then you realize how much \u201ccrap\u201d gets filtered on free mail\nservices. To battle this problem I chose to use\n",(0,t.jsx)(n.a,{href:"https://github.com/rspamd/rspamd",children:"rspamd"})," that had CentOS support, but someone\nhad a ",(0,t.jsx)(n.a,{href:"https://copr.fedorainfracloud.org/",children:"Copr"})," repository that I used to\ninstall it."]}),"\n",(0,t.jsx)(n.h2,{id:"how-does-copr-repositories-work",children:"How does Copr repositories work?"}),"\n",(0,t.jsxs)(n.p,{children:["If you have ever used Ubuntu, you might be familiar with the concept since it is\nvery close to ",(0,t.jsx)(n.a,{href:"https://help.ubuntu.com/community/PPA",children:"PPAs"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"tl;dr of the whole process consists of"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"enabling the Copr repository, and"}),"\n",(0,t.jsx)(n.li,{children:"installing the desired package."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"So in shell you would do"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"# dnf copr enable \u2039copr-repository\u203a\n# dnf install \u2039package-from-the-repository\u203a\n"})}),"\n",(0,t.jsx)(n.p,{children:"And\u2026 that's it! Nothing else needed! Simple, right? And literally same process\nas you would do for the PPA."}),"\n",(0,t.jsx)(n.admonition,{title:"AUR",type:"tip",children:(0,t.jsx)(n.p,{children:"On the other hand, if you are familiar with the archLinux, you definitely know\nAUR and what it can do for you. Copr repository is pretty similar, but the\npackages are prebuilt in Copr and Copr repositories can carry the required\ndependencies for said packages, which simplifies the distribution, and can even\nhelp with installing singular packages (when you just need the dependency, not\neverything)."})}),"\n",(0,t.jsx)(n.h2,{id:"my-issue",children:"My issue"}),"\n",(0,t.jsx)(n.p,{children:"Now you might wonder how would I use it on my VPS. It's rather simple, once in\n6 months a new Fedora release comes out. And you need to upgrade to newer\nrelease\u2026 You don't need to do it right away and for such setup it probably isn't\neven recommended."}),"\n",(0,t.jsxs)(n.admonition,{type:"tip",children:[(0,t.jsx)(n.p,{children:"Fedora releases are supported for a year, i.e. they live 6 months till the next\nrelease and then another 6 months till another release."}),(0,t.jsxs)(n.p,{children:["Some people prefer to run one version \u201cbehind\u201d. If you ever decide to run it on\nyour home server or in a similar setup, it might be a pretty good idea to\nfollow. I'm using the \u201clatest greatest\u201d, cause why not ","\ud83d\ude04"]}),(0,t.jsx)(n.p,{children:"One way or another, you still need to bump the release every six months, unless\nyou'd bump 2 releases at once every year, which would be a decision, since, at\nleast I, cannot see any benefits in it\u2026 You don't go for \u201cstability\u201d, cause once\na year you switch to the latest release and then, before you bump, you use one\nyear old software, so you're not even using the latest."})]}),"\n",(0,t.jsx)(n.p,{children:"Fast-forward 2 years in the future, new Fedora release came out (October '22)\nand I was doing an upgrade. Dependencies of the rspamd have been updated and\nrspamd builds in Copr have failed and no one fixed it. Cool, so now I can\nupgrade, but can either ignore the dependencies or uninstall the rspamd\u2026"}),"\n",(0,t.jsx)(n.h2,{id:"how-can-copr-help",children:"How can Copr help?"}),"\n",(0,t.jsxs)(n.p,{children:["I have managed to find\n",(0,t.jsx)(n.a,{href:"https://github.com/rspamd/rspamd/blob/master/rpm/rspamd.spec",children:"specfile"})," for the\nrspamd package that they use for CentOS. There were some files apart from the\nspecfile, so I had to make an SRPM locally and then\u2026 I just uploaded the SRPM\nto the Copr to\n",(0,t.jsx)(n.a,{href:"https://copr.fedorainfracloud.org/coprs/mfocko/rspamd/build/5046567/",children:"build"}),"\nan RPM."]}),"\n",(0,t.jsx)(n.p,{children:"I have switched the previous Copr repository for rspamd with my own and happily\nproceeded with the upgrade."}),"\n",(0,t.jsx)(n.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,t.jsxs)(n.p,{children:["Copr is heavily used for testing builds on the upstream with\n",(0,t.jsx)(n.a,{href:"https://packit.dev",children:"Packit"}),". However, as you can see, it is possible to use it\n",(0,t.jsx)(n.strong,{children:"very well"})," for packaging your own stuff and avoiding issues (such as the one\nI have described above), if need be."]}),"\n",(0,t.jsxs)(n.section,{"data-footnotes":!0,className:"footnotes",children:[(0,t.jsx)(n.h2,{className:"sr-only",id:"footnote-label",children:"Footnotes"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{id:"user-content-fn-1-d4045e",children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://vpsfree.cz",children:"vpsFree.cz"})," ",(0,t.jsx)(n.a,{href:"#user-content-fnref-1-d4045e","data-footnote-backref":"","aria-label":"Back to reference 1",className:"data-footnote-backref",children:"\u21a9"})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{id:"user-content-fn-2-d4045e",children:["\n",(0,t.jsxs)(n.p,{children:["Even though I've been running archLinux on some Raspberry Pi's and also\non one of my \u201chome servers\u201d, before getting the VPS. You could say I like\nto live on the edge\u2026 ",(0,t.jsx)(n.a,{href:"#user-content-fnref-2-d4045e","data-footnote-backref":"","aria-label":"Back to reference 2",className:"data-footnote-backref",children:"\u21a9"})]}),"\n"]}),"\n"]}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},11151:(e,n,o)=>{o.d(n,{Z:()=>i,a:()=>a});var t=o(67294);const r={},s=t.createContext(r);function a(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);