Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Make Ubuntu & Linux Mint downloads available via a PPA #352

Open
Gitoffthelawn opened this issue Apr 9, 2024 · 8 comments
Open

FR: Make Ubuntu & Linux Mint downloads available via a PPA #352

Gitoffthelawn opened this issue Apr 9, 2024 · 8 comments

Comments

@Gitoffthelawn
Copy link

Is your feature request related to a problem? Please describe.
It's not a big deal, but having to check GitHub and then manually download and install the latest version of NAPS2 from GitHub is a little bit of a hassle.

Describe the solution you'd like
Make Ubuntu and Linux Mint downloads available via a PPA.

Describe alternatives you've considered
Make Linux downloads available via downstream repositories, such as the ones maintained by Debian, Ubuntu, or Linux Mint.

@cyanfish
Copy link
Owner

I've added some instructions here, try this:
https://www.naps2.com/linux-scanning#apt

@Gitoffthelawn
Copy link
Author

I've added some instructions here, try this: https://www.naps2.com/linux-scanning#apt

Thanks. From security, privacy, and availability points of views, do you think it makes more sense to set it up to get the files from the private naps2.com server, or from GitHub servers? Especially given that the signatures and executables would be coming from the same server (unless I'm misunderstanding), I wonder if GitHub is a slightly better choice. What do you think?

Separately, one of the things I really like about PPAs is that it that adding a PPA is so incredibly easy for users.

@cyanfish
Copy link
Owner

cyanfish commented Apr 10, 2024

www.naps2.com and downloads.naps2.com are different physical servers (though it's fair to say the separation isn't perfect as they're both under the same VPS account).

I would be happy to use Github but I don't know that it's possible - all the doc I had was based on local packages. And I don't think PPAs will work as Launchpad doesn't support binary packages.

The main security benefit you get is that you only download the public key once - in the event of a server compromise, you're only vulnerable if you're trying to do the initial Apt setup. And that's no less true if you're just downloading binaries directly.

@Gitoffthelawn
Copy link
Author

I followed your instructions, and they worked well. Thank you.

There has yet to be a NAPS2 update since you posted your reply, so when you release the next version, I'll know for sure if everything is a success.

If you have a few minutes, and feel like it, and want to explain a bit more why you think a PPA won't work for NAPS2, I'm interested in reading your thoughts. To date, I have not published a PPA myself, so I'm interested in learning more about potential obstacles. If you're too busy, or just don't feel writing more on the topic, that's not a problem, and I certainly understand.

@cyanfish
Copy link
Owner

NAPS2 currently only builds binary packages, not source packages. PPAs are published through Launchpad, which does not allow binary packages.

Note: We do not allow uploading pre-built binary packages.

And I'm not sure that making source packages would help, as I assume Launchpad can only use build dependencies that are provided through Ubuntu. NAPS2 uses the latest .NET SDK to build, and I usually upgrade to the newest version on release. But the Ubuntu-based releases tend to lag behind the official Microsoft releases and aren't supported on all the Ubuntu versions I support.

@Gitoffthelawn
Copy link
Author

Thanks. How are you defining "source package". The NAPS2 source is open (a big thank you!), and a makefile can be created to automate the build process. I get the sense there is more to it though. Is there?

Regarding the latest .NET SDK, yes, I could see that possibly being an issue. I'm currently not sure of Launchpad's dependency criteria either.

@cyanfish
Copy link
Owner

https://wiki.debian.org/Packaging/SourcePackage
https://wiki.debian.org/Packaging/BinaryPackage

@kgraefe
Copy link

kgraefe commented Jul 15, 2024

I've added some instructions here, try this: https://www.naps2.com/linux-scanning#apt

Thanks for that. Minor improvement: apt already handles armored key files if the file extension is .asc:

# Download the NAPS2 public key
sudo curl -fsSL https://www.naps2.com/naps2-public.pgp -o /etc/apt/keyrings/naps2.asc

# Add NAPS2 as an Apt source
echo "deb [signed-by=/etc/apt/keyrings/naps2.asc] https://downloads.naps2.com ./" | sudo tee /etc/apt/sources.list.d/naps2.list >/dev/null

# Install NAPS2
sudo apt update
sudo apt install naps2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants