Forum › Forums › antiX-development › Development › Possible change to antiX updater
- This topic has 33 replies, 9 voices, and was last updated Oct 3-10:40 am by PPC.
- AuthorPosts
- January 19, 2023 at 12:09 pm #97685Forum Admin
anticapitalista
::Yes, latest nano causes this issue.
New debs should hit repos soon. (nano_7.2-1.0antix2)sudo apt -f install
should temporarily fix this (just don’t install try to reinstall nano until the new version is in the repos.)
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
January 19, 2023 at 1:49 pm #97691MemberXunzi_23
January 19, 2023 at 3:25 pm #97712Forum Adminanticapitalista
::Users can manually install fixed nano debs from here: http://download.tuxfamily.org/antix/Testing/
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
January 19, 2023 at 3:58 pm #97717MemberPPC
::@anticapitalista : thanks for the quick fix!
The latest version of the script is attached.
Changed:
-Implemented error handling, if any problem happens during the upgrade process.
-Moved every single “localizable” string to variables on the start of the script- this makes any change to the text much simpler in the future, and also makes the text simpler to be localized by the Translation Team.If no bug or error on the text is found, by the week end’s end, I’ll suggest that anticapitalista can update the antiX-updater script on the repo and put this new version up for localization.
Later, with fresher eyes, I’ll take a look at the text again, and I’ll try to find any mistakes- if anyone finds a bug or a mistake in the text, or has a better suggestion for the text, please report any suggestions here!
PS: In a way I’m glad this problem with the nano package came up, or else I would never think of adding error handling to this script!
Oooops!!! I already found a bug with the error handling… I’m trying to fix it (and keep the error handling part of the script, it can be of great help to users)
Anyone with scripting skills, please take a look at the script and point me to the right way to implement error handling if “apt dist-upgrade” produces any error!P.
- This reply was modified 10 months, 2 weeks ago by PPC.
Attachments:
January 19, 2023 at 4:33 pm #97723Forum Adminanticapitalista
::PS: In a way I’m glad this problem with the nano package came up, or else I would never think of adding error handling to this script!
I promise you that I did not do this on purpose … 🙂
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
January 19, 2023 at 4:48 pm #97724MemberPPC
::New version, bug squashed…
I’ll try to add a check, to exit the script with an error, if apt is being used by another program…
P.
Attachments:
January 19, 2023 at 5:35 pm #97726MemberPPC
::OK, folks. Latest version of the script is attached below.
Changes:
– The script now checks if apt is being used and, if so, exits with a warning
– Added some info in the window that displays the message that there are updates available.Request: any native English speaker, please send your suggestions to any text that does not “sound” 100% correct…
P.
Attachments:
January 19, 2023 at 6:40 pm #97738MemberXunzi_23
::Hi PPC, Thanks, hope Black Country english (Brummy from Brumagem, Birmingham) is acceptable :-), will run the script tomorrow. Tired now.
January 19, 2023 at 7:21 pm #97739ModeratorBrian Masinick
::Users can manually install fixed nano debs from here: http://download.tuxfamily.org/antix/Testing/
Thanks! I downloaded this and my instance of nano now shows GNU nano 7.2, and my existing customizations of nano from my .nanorc file continue to work as they have previously, so all is well.
--
Brian MasinickJanuary 19, 2023 at 7:37 pm #97744ModeratorBrian Masinick
::OK, folks. Latest version of the script is attached below.
Changes:
– The script now checks if apt is being used and, if so, exits with a warning
– Added some info in the window that displays the message that there are updates available.Request: any native English speaker, please send your suggestions to any text that does not “sound” 100% correct…
P.
@PPC: I’ve tried out several versions of your script and they all work. The newest one does indeed have additional apt checking.
I’m not sure what the precise condition is, but the newest version DID detect a version of apt running. To the best of my knowledge, there wasn’t one running, but just in case, I rebooted, then there DEFINITELY was not a version of apt running and it worked correctly, so that logic appears to be sound.As I was using it, however, I did think of something additional that could be added to make this script even more useful to the newcomer: don’t require the user to have to explicitly call the script with some version of su, sudo or any of the privileged user commands, instead provide whatever the script requires, including the correct 755 (rwxr-xr-x) script permission. If you add these two things plus any additional safeguards, I think this will be a very efficient and helpful tool indeed.
Thanks as always for your great ideas and implementations!
—Brian--
Brian MasinickJanuary 20, 2023 at 10:36 am #97792MemberPPC
::Dear “The Mas” – as always I take your advice serious, so I began to check for ways to make the script run without the user needing to enter the root password… But I realized that probably anticapitalista wont accept that – as we have seen with the recently reported bug related to the localization of the first layer of the menu- installing updates is not something that I think users should do without entering a password.
It’s true that I did not (for convinience sake) include “sudo -k” at the start of the script, to force the user to always enter the password, for convinience sake I choose not to do so.About the check if apt is running: I searched on-line for the easiest way to implement that and I adapted, after testing, a small routine I found here: http://saveriomiroddi.github.io/Handling-the-apt-lock-on-ubuntu-server-installations/ (I do mention it in my comments, on the script – I’m just sorry that I started doing that too late, so I did not include the links that helped me figure out how to show the terminal’s output in the initial yad window…)
@anticapitalista – if you think this is a good idea (running antiX – Updater without requiring users to type their password) please say so, and I’ll try to implement that (even if I have to ask for “The Mas”‘s help)- if it works, probably the easiest way to implement this should be adding the script to the sudoers file (that you can implement, in a future update of antiX’s defaults, I guess?)
- This reply was modified 10 months, 2 weeks ago by PPC.
Attachments:
January 20, 2023 at 11:26 am #97798Forum Adminanticapitalista
::@PPC I don’t think it is a good idea running antiX-Updater without prompting for a password.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
January 20, 2023 at 1:59 pm #97804ModeratorBrian Masinick
::No problem. Ensuring that the system is appropriately protected is fine. In my case I know what I am doing and if anyone ever compromised my stuff I would destroy and redo it all. It’s not a huge risk and I don’t have too much personal information easily available.
Personal information is most likely to be acquired at a grocery store! I say that because the only successful intrusion I’ve ever experienced personally was a credit card intrusion at my grocery store and the solution was to deactivate and replace the card.
Another time an intruder attempted a get rich scheme. Instead of falling for it I contacted my local police department. They worked with authorities worldwide and caught one Nigerian scammer.
There are risks every day. If we are aware and take precautions and have awareness they can be managed and sometimes good can result from adversity.
It’s worth keeping safe!
--
Brian MasinickFebruary 2, 2023 at 11:47 am #98706MemberPPC
::@anticapitalista – since PM’s seem to be down, I’m writing this to say that I propose that the current antiX updater script should be replaced by the one here: https://www.antixforum.com/forums/topic/possible-change-to-antix-updater/page/2/#post-97792
And that is should be put for localization (since it has many changes, sorry about that, localization team- future versions won’t need this redo in localizations, since all the text the GUI shows is now stored in variables, at the start of the script, their place wont ever change in the future).
PS: I just used my script 2 or 3 times, to update my recently antiX installs in my new work computer – it worked flawlessly, and, of course, the only non automated task (if the user choose the “Automatic” update process) is the dreaded Grub update – that does display the TUI to select where to install the bootloader – boy, it could, be default, if there is only one drive (that’s what most users have, I suspect), pre select the drive, so, if the user just presses enter, the system is not nuked (It happened to me once, a while back and I had to reboot from my live system and fix Grub)- the interface does not even explain how to select anything in it’s window, and it can even catch old Linux users off guard- so I suppose it was written by one of those RTFM gurus that has lots of tech skills, but no people skills.
P.
February 2, 2023 at 8:46 pm #98729ModeratorBrian Masinick
::@anticapitalista – since PM’s seem to be down, I’m writing this to say that I propose that the current antiX updater script should be replaced by the one here: https://www.antixforum.com/forums/topic/possible-change-to-antix-updater/page/2/#post-97792
And that is should be put for localization (since it has many changes, sorry about that, localization team- future versions won’t need this redo in localizations, since all the text the GUI shows is now stored in variables, at the start of the script, their place wont ever change in the future).
PS: I just used my script 2 or 3 times, to update my recently antiX installs in my new work computer – it worked flawlessly, and, of course, the only non automated task (if the user choose the “Automatic” update process) is the dreaded Grub update – that does display the TUI to select where to install the bootloader – boy, it could, be default, if there is only one drive (that’s what most users have, I suspect), pre select the drive, so, if the user just presses enter, the system is not nuked (It happened to me once, a while back and I had to reboot from my live system and fix Grub)- the interface does not even explain how to select anything in it’s window, and it can even catch old Linux users off guard- so I suppose it was written by one of those RTFM gurus that has lots of tech skills, but no people skills.
P.
I just installed the yad-updater331.sh from the yad-updater331..zip file, made sure after I unzipped it to make it mode 755, put it into my private bin directory and it works fine.
This time when I ran it, I received two prompts – the first one asked for the expected authentication, and the second question asked whether I wanted to have “automatic” updates or “manual” updates. Being the geek, I chose the manual ones and the behavior was exactly what I expect.
This is a helpful tool, and it’s worth including in our toolchest, either as our recommended tool or as an alternative.
I didn’t see it do anything strange or unexpected; it simply takes care of the usual “sudo apt-get update; sudo apt-get dist-upgrade” type of installation.
I also have my own command line aliases for a variety of similar tasks; for the casual user, this ought to be fine.
Nice tool.I didn’t look in the code to see if the adaptations suggested in the link
http://saveriomiroddi.github.io/Handling-the-apt-lock-on-ubuntu-server-installations/ have been implemented or not.
Seems to me that this would be a helpful addition to the tool. Other opinions?--
Brian Masinick - AuthorPosts
- You must be logged in to reply to this topic.