this post was submitted on 06 Sep 2024
195 points (99.0% liked)

Linux

48208 readers
718 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

On Debian-based distros, when an app is available as a DEB or an AppImage (that doesn't self-update), but no APT repository, PPA or Flatpak, the only option is to manually download each update, and usually manually check even whether there are updates.

But, what if those would be upgraded at the same time as everything else using the tools you're familiar with ?

dynapt is a local web server that fetches those DEBs (and AppImages to be wrapped into DEBs) wherever those are, then serves these to APT like any package repository does.

I started building it a few months ago, and after using it to upgrade apps on my computers and servers for some time, I pre-released it for the first time last week.

The stable version will come with a CLI wizard to avoid this manual configuration.

Feedback is welcome :)

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 months ago (1 children)

Willing to give this a go. My go-to for getting non-repo debs automatically has been deb-get which works well but seems susceptible to issues when changes in the software it lists causes it to break and whilst the fix itself is usually made pretty quickly, it seems to go long periods of time between PR merges and releases (which includes adding new software). If this is a viable replacement for it then i'd love to start using it.

[–] [email protected] 1 points 1 month ago

Willing to give this a go.

Alright, don't hesitate to ask questions if you have any and request help if you need any

My go-to for getting non-repo debs automatically has been deb-get

Yes, I mentioned it in the Differences with deb-get & AM section of my tutorial.

it seems to go long periods of time between PR merges and releases (which includes adding new software)

Yeah, I could reiterate in that section that my app allows the user to add apps themselves.

[–] [email protected] 3 points 2 months ago (1 children)

Is that autotiling on cinnamon? Didn't know it could do that

[–] [email protected] 5 points 2 months ago

It doesn't, that's provided by Cortile.

[–] [email protected] 1 points 2 months ago

I would test this out on termux. It's annoying to have very limited supported programs.

[–] [email protected] 1 points 2 months ago (1 children)

Neat project!

While this might not solve all of your use cases, did you consider a tool like mise?

Theres a number of other options out there such as asdf-vm and others who's names I can't recall. I recently moved from asdf to miss but its a great way to install things on different machines and track it with your dotfiles, or any other repo you want to use. Mise has tons of configuration options for allowing overrides and local machine specific versions.

It won't tie into apt for your upgrades but you could just alias your apt update to include && mise up.

[–] [email protected] 1 points 2 months ago

My main use case is end user desktops.

[–] [email protected] 1 points 2 months ago (1 children)

This is somewhat re-inventing some things Ansible can do, which is download and install software whether it has a formal or informal source.

Ansible is the automation I use to manage personal and professional servers.

[–] [email protected] 3 points 2 months ago

Which isn't user-friendly.

[–] [email protected] 8 points 2 months ago (3 children)

Sorry to be that guy, but this sounds like a cybersecurity nightmare. While everybody was busy to come up with schemes that make absolutely sure that only trusted sources can update a system to avoid having malicious players push their code to users, this one just takes any rando's pile of whatever and injects it straight into the system's core? Like, that doesn't sound like a good idea.

[–] [email protected] 3 points 2 months ago (1 children)

I see it more as a local repo. Like, setup the repo to do what you would have done manually so that you don't have to do it on multiple computers. I could be misunderstanding it though.

[–] [email protected] 1 points 2 months ago

You understand perfectly.

[–] [email protected] 2 points 2 months ago (1 children)

No matter where you install from, you have to trust the source. Indeed, you have to trust every step in the supply chain.

If you are getting your code straight from the author, you are eliminating an exploit that’s introduced by a compromised account of a packager.

Carry on.

[–] [email protected] -2 points 2 months ago

If you are getting your code straight from the author,

Which is not what you are doing at all with a .deb file. A .deb file is a binary with a bunch of scripts to "properly" install your package. Building from source is what you SHOULD be doing. Debian has an entire policy handbook on how packages are supposed to be packaged. Progrmatically you can review the quality of a package with 'lintian'. .debs made by developers following a wiki tutorial can't even come close. remember, apt installs happen as root and can execute arbitrary code.

Also, debian packagers can be project maintainers, so they can be "the author."

[–] [email protected] 11 points 2 months ago (2 children)

Well, I'm just automating what people currently have to do manually : visit GitHub and download DEB and install DEB.

If the automated process would be dangerous then the manual process also would be, and that would be on the maintainer for not providing an APT repository or a Flatpak, not on the user for just downloading from GitHub.

[–] [email protected] 0 points 2 months ago (1 children)

It’s a cool concept, but automation breeds laziness (by design, to an extent) and lazy end users tend to shoot themselves in the foot. So it isn’t great for security, but it also isn’t that much worse for security :)

Since some people with money tend to be litigious, and, of course, I am not a lawyer, I would advise a warning message (or part of the license if you don’t want to muck up your CLI), if you don’t have one, to force the user to accept and acknowledge that the software they are installing using this tool is not verified to be safe.

[–] [email protected] 2 points 2 months ago (1 children)

How is the manual step more secure though ?

What does the user do before downloading a DEB that makes that gap between manual and automated ?

I'd be willing to try and reproduce that, but I don't see anything.

[–] [email protected] 0 points 2 months ago (1 children)

I didn’t say it was more secure, I said it’s about the same.

The difference is a person being forced to go to a website to download software means more steps and more time to consider the safety of what they’re doing. It’s part psychological.

Not all such packages are retrieved from GitHub, I remember downloading numerous .deb files direct over the past 25 years (even as recent as downloading Discord manually some years back).

The main point I’m making is that you should legally protect yourself, it’s a low and reasonable effort.

[–] [email protected] 1 points 2 months ago (1 children)

I didn’t say it was more secure, I said it’s about the same.

You said automation breeds laziness (by design, to an extent) and lazy end users tend to shoot themselves in the foot.

So, my question is : what part of automating download of DEBs from a specific source can be shooting oneself in the foot compared to doing the same thing manually every time ?

you should legally protect yourself

The MIT license will take care of that.

Also, to force the user to accept and acknowledge that the software they are installing using this tool is not verified to be safe is inducing fear and/or guilt, therefore is bad UX, I'm not doing that.

[–] [email protected] 1 points 2 months ago

I already answered that first question.

And then all those app store fronts that say whether a flatpak is verified or not is inducing fear and/or guilt and is therefore bad UX. It's not, but you are free to have your opinion.

Have fun then, I'm done wasting my time here.

[–] [email protected] -2 points 2 months ago* (last edited 2 months ago) (1 children)

Well, I’m just automating what people currently have to do manually : visit GitHub and download DEB and install DEB.

Yeah. You should never do that. Like ever. Build from source; or use a vendored tarball. https://wiki.debian.org/DontBreakDebian

.deb is a terribly insecure nightmare thats held up by the excellent debian packagers, gpg , and checksums, and stable release model. don't use .deb files.

[–] [email protected] 7 points 2 months ago (1 children)

I'm and end user working for end users.

[–] [email protected] -2 points 2 months ago* (last edited 2 months ago) (1 children)

I’m and end user

Yeah, we all are. What's your point?

End users are also developers. All computer users are developers. You are developing.

user working for end users

By making a script that lets me get backdoors and shitty packages with ease? The linux package distribution system is a nightmare, Debian is the least bad approach. There is basically always a better option to using a .deb file. If you come across something that isn't packaged, I recommend Flatpak, building from source (and installing unprivileged), or using the developers vendored tarball (installing unprivileged).

https://wiki.debian.org/SecureApt

By using local .debs you lose the benefit of:

Reproducible builds

GPG checksums

Stable release model

debian security team

[–] [email protected] 5 points 2 months ago

My point is that I'm working a solution for end users.

The solutions you're offering are not user-friendly.

[–] [email protected] 6 points 2 months ago* (last edited 2 months ago) (3 children)

This might be for the better, but Discord was so infuriating about updates and forcing you to download them what felt like 50% of the time I opened it, I gave up and just use it in Ungoogled Chromium now. I'm pretty sure within a few months I ended up having 15+ debs of Discord in my Downloads folder.

For anyone else trying to use the native Discord app on Debian, I think they'll find this a major treat.

[–] [email protected] 5 points 2 months ago (1 children)

Discord not automating downloads of DEBs is one of the reasons motivating me to do this.

Personally I need the desktop client because I mod it with plugins that are so useful that I can't do without these anymore.

Alternatively, there are third-party repositories here and here.

There still is delay between Discord releases and repository updates so I still believe dynapt to be the better solution.

[–] [email protected] 1 points 2 months ago (1 children)

Personally I need the desktop client because I mod it with plugins that are so useful that I can’t do without these anymore.

Discord client modifications are against the Terms of Service. https://www.gnu.org/philosophy/free-sw.en.html

[–] [email protected] 1 points 2 months ago

I don't care.

[–] [email protected] 0 points 2 months ago (1 children)
[–] [email protected] 5 points 2 months ago (1 children)

I didn't know there was one, that's interesting, thanks.

Updates must still be delayed because of being third-party though.

[–] [email protected] 1 points 2 months ago

I've never had an issue with the flatpak version being out of date. 😊

[–] [email protected] 2 points 2 months ago

This is 100% of the reason that I use the discord flatpak.

[–] [email protected] 3 points 2 months ago (1 children)
[–] [email protected] 2 points 2 months ago
[–] [email protected] 8 points 2 months ago* (last edited 2 months ago) (2 children)

Looks great, well done.

Personally, the deb-related annoyance that I have encountered most often in recent years is that there is an APT repo but I have to jump thru hoops to add it. An example is signal-desktop, where the handy one-click installation goes like this:

# 1. Install our official public software signing key:
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null

# 2. Add our repository to your list of repositories:
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
  sudo tee /etc/apt/sources.list.d/signal-xenial.list

# 3. Update your package database and install Signal:
sudo apt update && sudo apt install signal-desktop

Why does Debian-Ubuntu not provide a simple command for this? Yes there is add-apt-repository but for some reason it doesn't deal with keys. I've had to deal with this PITA on multiple occasions, what's up with this?

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

Why does Debian-Ubuntu not provide a simple command for this?

You aren't supposed to add repos. Ever. https://wiki.debian.org/UntrustedDebs

Apt is not built with security in mind, at all. The partial sandboxing it does do is trivial to bypass. Adding a repo is basically a RAT Trojan on your computer.

An example is signal-desktop Yeah don't use signal. They restrict freedom 3 by making distribution difficult. Thats why they trick you into using their RAT repo.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842943

The least bad option is the unofficial flatpak.

[–] [email protected] 3 points 2 months ago (1 children)

Apt is not built with security in mind, at all. The partial sandboxing it does do is trivial to bypass. Adding a repo is basically a RAT Trojan on your computer.

OK. I suppose this is the correct answer.

The least bad option [for Signal] is the unofficial flatpak.

Unless I'm missing something, here we will disagree. Secure or not, FOSS principle-respecting or not, if I'm choosing to install software by X then I'm going to get it straight from X and not involve third-party Y too.

[–] [email protected] 0 points 2 months ago

Unless I’m missing something, here we will disagree. Secure or not, FOSS principle-respecting or not, if I’m choosing to install software by X then I’m going to get it straight from X and not involve third-party Y too.

Source code is like a recipe. Getting your food from the chef who made the recipe is fine, but getting it from another chef who... followed the same exact recipe is no different.

This is how the linux software distribution model works, distro maintainers are a CHECK on upstream.

[–] [email protected] 2 points 2 months ago

Thanks, and agreed !

Fortunately, copy/pasting works and you only have to do it once.

load more comments
view more: next ›