1

Reopen request:

Yes, this is marked as duplicate.

** What I am asking is a shell script that can help me achieve updating packages with .deb and .tar.gz, but NOT how .deb will affect apt-get update, and NOT just manually compile the .tar.gz and manually update the package.

As I've mentioned before:

This one queries the adding of PPA in /etc/apt/sources.list.d/, which is not what I wanted, because I said there is no PPA available already. Also, I don't like using other PPAs, I prefer a script that is viewable and editable by me at any time I want.

This one shows no sign of (even) automatically downloading the .tar.gz packages. Also, what it talks about is manually updating source code packages, but what I want is a custom script that I can automatically download the source code, compile it and also automatically install it.

For some more information, I already know the existence of Arch Linux's AUR, and according to this post which previously also flagged suggested duplicate, it is saying that an equivalent to Arch Linux's AUR is Ubuntu's PPA, which is not what I wanted.

I am now requesting to reopen this question. Please, and please understand what I want, not just marking some topics I don't need, and then say "This is a duplicate question".

Also check out the meta thread regarding this question on this.


Question:

I know that we can automatically update packages using apt or apt-get if they are installed via PPA.

However, recently I found out that a package I installed, which is downloaded from the Internet in .deb format, is seriously outdated. There is no offical or unoffical PPA available for that program.

Also, another program that I complied long ago (also downloaded from the Internet, .tar.gz format) is also outdated.

Is it possible to have a shell script that can automatically check for updates online, download the .deb and .tar.gz packages, automatically compile it, and install it in Ubuntu?


For reference only:

  1. Preferred: wget, make, crontab

  2. I understand the risk of using such scripts (risk of malicious downloads), I can personally bear it because I know how to remove infections when the system got infected by viruses.

  3. If anyone want me to specify a package I want to update, please use WPS Office and MultiBootUSB (it's .tar.gz package).

  • 3
    I can't see why not. i've written scripts that search online (specific site) & wget later files than whatever i already had. I can't see why it can't be cron'd, then dpkg/make... if downloaded file was of that 'file` type - but I don't think I'd want to run it myself. I'd rather script notify me (email etc) & suggest/request permission to install. – guiverc Sep 20 '17 at 05:15
  • 3
    The use of PPAs is already unsafe, but a script that downloads executable software from the internet and installs it without any user control? I consider this plain dangerous and strongly suggest you make it at least ask you before installing anything. – dessert Sep 20 '17 at 05:15
  • 1
    I can see trouble being given an invitation -- I hope you know what your asking for? – George Udosen Sep 20 '17 at 05:17
  • 1
  • 2
    Then it's too broad. Software can be downloaded from a veriety of places, built in a variety of ways, have a variety of possibly changing dependencies. – muru Sep 20 '17 at 05:51
  • No, what I want is just a shell script that can achieve updating by downloading and compiling and installing automatically. – Cynplytholowazy Sep 20 '17 at 05:53
  • Of what? From where? How? – muru Sep 20 '17 at 05:53
  • A pretty general script that I can use. If very needed to be specific, take WPS Office as an example. It's a .deb file, and I want the script to automatically check for updates, download it and install it. – Cynplytholowazy Sep 20 '17 at 05:54
  • 2
    You're essentially asking from something like Arch Linux's AUR, except you haven't given any source of necessary information like the download location, dependency information, build instructions, and haven't said anything about how to obtain those. – muru Sep 20 '17 at 05:55
  • Yes, of course I know Arch Linux's AUR, I just wonder if I can do similar things in Ubuntu. – Cynplytholowazy Sep 20 '17 at 05:55
  • 1
    Take a look at https://askubuntu.com/questions/599135/does-ubuntu-have-an-equivalent-to-the-aur-arch-user-repository. – dessert Sep 20 '17 at 06:19
  • For WPS, you could do wget -qO- http://wps-community.org/downloads | pup "a:contains(\"$(dpkg-architecture -q DEB_HOST_ARCH)\") attr{href}" | head -n1 to get the latest deb file's URL, then download it and use apt install; but obviously that depends on the site structure and may or may not be generalisable to other software sites. – muru Sep 20 '17 at 06:22
  • I insist, the answer to your question is already given here: Yes, PPAs. That's the closest you can get right now. If you don't think they're equivalent enough for you, then the answer right now is simply "no". – dessert Sep 20 '17 at 08:40
  • I am asking for shell scripts; not PPAs. If *no, why not answer no*, but close it as irrelevant ^duplicate^ topics???? – Cynplytholowazy Sep 20 '17 at 08:41
  • Well because the answer no is already given to multiple similar questions. They may not be 1:1 identical of course, but they give all the answers possible. – dessert Sep 20 '17 at 08:47
  • Maybe tarbells is a no, but how about .debs? muru already suggested a comment that may solve the problem, and if question are not 1:1 identical and a "no" can be given to answers, then why not open a thread with an answer "no" and then direct all posts like this to the thread? – Cynplytholowazy Sep 20 '17 at 08:49
  • I am not trying to be rude. Instead, I want to point out that this is not the type of questions the previous topics are asking. I want to state that people should not mark something duplicate just because they are of the same topic. – Cynplytholowazy Sep 20 '17 at 08:50
  • Please post suggestions how to improve Ask Ubuntu on https://meta.askubuntu.com. – dessert Sep 20 '17 at 08:51
  • 1
    I'm voting to reopen to then close as "too broad" since you're asking for a general approach which doesn't exist barring the training of an artificial intelligence to do what package maintainers and system administrators are doing today. – David Foerster Sep 20 '17 at 10:23
  • I would not object. – Cynplytholowazy Sep 20 '17 at 11:38
  • Probably your best option would be to look at the LFS or gentoo methods of updating. – Panther Sep 20 '17 at 13:12

0 Answers0