LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   /bin/hostname is missing in recent upgrade (https://www.linuxquestions.org/questions/slackware-arm-108/bin-hostname-is-missing-in-recent-upgrade-4175620688/)

asarangan 01-01-2018 10:52 PM

/bin/hostname is missing in recent upgrade
 
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.

TheEzekielProject 01-01-2018 11:11 PM

Hard to say why it disappeared. You should just be able to reinstall from your distro repositories
Code:

apt-get install hostname
for instance. Obviously, use the package manager for your system

Penthux 01-02-2018 02:02 AM

Quote:

Originally Posted by asarangan (Post 5800402)
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.

Try this to see if it gives any output about your hostname:

Code:

root@vuur:~# uname -n
vuur

root@vuur:~# hostname
vuur

You could run 'netconfig' to use the Slackware setup wizard to try and resolve the issue:

Code:

root@vuur:~# netconfig
There's always the manual method:

Code:

root@vuur:~# hostname vesp
root@vuur:~# nano -w /etc/HOSTNAME

vesp.yourdomain.lan

root@vuur:~# nano -w /etc/hosts

# For loopbacking.
127.0.0.1              localhost
127.0.0.1              vesp.yourdomain.lan vesp

# End of hosts.

root@vuur:~# reboot

It should now be fixed. Try 'uname -n' command after rebooting.

Quote:

Originally Posted by TheEzekielProject (Post 5800403)
Hard to say why it disappeared. You should just be able to reinstall from your distro repositories
Code:

apt-get install hostname
for instance. Obviously, use the package manager for your system

Code:

root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

I personally wouldn't try (or advise) to fix this problem by installing any packages. Especially with 'apt-get'. :D

TheEzekielProject 01-02-2018 02:08 AM

Quote:

Originally Posted by Penthux (Post 5800426)



Code:

root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

I personally wouldn't try (or advise) to fix this problem by installing any packages. Especially with 'apt-get'. :D


If he is missing the binary in /bin, and apt-get is his package manager, that is certainly an appropriate course of action.

What issue do you have with apt-get? hostname is, in fact, a package
Code:

apt-cache search hostname
hostname - utility to set/show the host name or domain name


Penthux 01-02-2018 02:30 AM

Quote:

Originally Posted by TheEzekielProject (Post 5800429)
If he is missing the binary in /bin, and apt-get is his package manager, that is certainly an appropriate course of action.

What issue do you have with apt-get? hostname is, in fact, a package
Code:

apt-cache search hostname
hostname - utility to set/show the host name or domain name


Code:

root@vuur:~# slackpkg search hostname

Looking for hostname in package list. Please wait... DONE

No package name matches the pattern.

My issue is that this is Slackware. Not Debian/Ubuntu? Your advice may be good for the latter, but on Slackware there is no advanced package tool (apt) command/function.

Code:

root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

root@vuur:~# apt-cache search hostname
-bash: apt-cache: command not found

Why would you even want it on Slackware? Apt goes against the Slackware Way and takes control away from the Admin (i.e. me and you) with regards to package management.

Slackware uses 'pkgtool' (installpkg, removepkg, etc.) or 'slackpkg'. There is no 'apt-get' or 'apt-whatever' on my Slackware ARM system.

TheEzekielProject 01-02-2018 02:44 AM

Which is why I said in that very same post
Quote:

Originally Posted by TheEzekielProject (Post 5800403)
Obviously, use the package manager for your system

Also, you may not have it on your ARM system, but it is in current
https://packages.slackware.com/?r=sl....18-i586-1.txz

rworkman 01-02-2018 03:02 AM

I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.

drmozes 01-02-2018 03:03 AM

Quote:

Originally Posted by asarangan (Post 5800402)
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.

The package was split out -- the information is in the Change Log - search for "hostname".

Penthux 01-02-2018 03:20 AM

Quote:

Originally Posted by TheEzekielProject (Post 5800445)
Which is why I said in that very same post

Also, you may not have it on your ARM system, but it is in current
https://packages.slackware.com/?r=sl....18-i586-1.txz

Well, we deal with Slackware ARM in this forum. So, unless the OP has posted in the wrong section then he'll need the ARM version of the package you're referring to: ftp://ftp.arm.slackware.com/slackwar...3.18-arm-1.txz.

Furthermore, as you correctly stated, this package only exists in Slackware ARM -current. So, if the OP is running Slackware ARM 14.2 (as I did previously) he will not be able to install, or find, this package for his system. Slackware ARM 14.2 is the soft float port and -current is the hard float port.

Apologies for being a stickler but I love to see accurate and helpful advice. The whole 'apt-get' thing is not relevant to Slackware and with a little more time and effort a lot more concise information could have been relayed. We got there in the end. :hattip:

TheEzekielProject 01-02-2018 03:43 AM

Quote:

Originally Posted by Penthux (Post 5800456)
Apologies for being a stickler but I love to see accurate and helpful advice. The whole 'apt-get' thing is not relevant to Slackware and with a little more time and effort a lot more concise information could have been relayed. We got there in the end. :hattip:

Yes, I missed that this was the Slackware ARM forum, I was just searching in the 'View New Posts' section, and saw no mention of the distro in the OP or OP's bio. Which is why I made sure to clarify that the OP should use his distro's package manager. Sorry for confusing you.

I thought I had relayed the information well enough to the OP that he could figure it out.

Regardless, the fact stands that in current, hostname is a package.

It may not be in 14.2, but OP has not stated what he is running. Or I missed it

asarangan 01-02-2018 08:59 AM

Quote:

Originally Posted by rworkman (Post 5800451)
I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.

This is exactly what happened. Thank you for your reply. I didn't realize I had to run install-new, but that brings me to the question how to use it correctly. My system is minimal, and does not include the 'kde', 'xap' and a few other series. When I run install-new, it brings up every package in all the series, and I am not sure how to sort through that huge list to find out which packages to select. In this particular case it is obvious, because I know I am missing "hostname". But if I didn't know that, is there a way to bring up only the new packages that were not in the original installation of my system?

Penthux 01-02-2018 09:37 AM

Quote:

Originally Posted by asarangan (Post 5800563)
is there a way to bring up only the new packages that were not in the original installation of my system?

Code:

root@tvar:~# slackpkg install slackware
The above command will give you a list of all uninstalled Slackware packages on your system. From here you can select to install them.

Code:

root@tvar:~# man slackpkg
The above command will hopefully lead you to what you need to know. ;)

BW-userx 01-02-2018 10:28 AM

Code:

Fri Dec 29 08:08:08 UTC 2017
a/kernel-modules-armv7-4.14.9_armv7-arm-1.txz: Upgraded.

#located in dir 'a'

a/hostname-3.18-arm-1.txz: Added.
      This is the latest version of the hostname utility, broken out into a new
      package to get rid of duplication between util-linux and net-tools.

http://www.slackware.com/changelog/current.php?cpu=arm

change log

abga 01-02-2018 12:09 PM

@asarangan

https://www.linuxquestions.org/quest...nt-4175618768/

(it's still on the first page of the Slackware ARM Forum)

asarangan 01-02-2018 12:23 PM

Quote:

Originally Posted by Penthux (Post 5800575)
Code:

root@tvar:~# slackpkg install slackware
The above command will give you a list of all uninstalled Slackware packages on your system. From here you can select to install them.

Code:

root@tvar:~# man slackpkg
The above command will hopefully lead you to what you need to know. ;)

Great, thank you. There is no way I would have figured out from the man page that "slackpkg install slackware" would bring up only the uninstalled packages. But when I do that, I get several hundred items to scroll through (because mine is a minimal system), and all of them are selected by default with the "*". I don't mean to sound lazy, but how do I deselect them all without having to deselect them one by one?

BW-userx 01-02-2018 12:37 PM

yep that is why I install everything. if you know the name of the prog I just google it then get it off a mirror download it then install it.

if you're just looking to find out what the hostname is or change it.
Code:

$ cat /etc/HOSTNAME
slackwhere.what.net

just sudo nano /etc/HOSTNAME to change it.

here is a copy of it from current (sight)

http://slackware.uk/slackwarearm/sla...t/slackware/a/

just download it and install it then see what happens

(package)
http://slackware.uk/slackwarearm/sla...3.18-arm-1.txz

Penthux 01-02-2018 02:52 PM

Quote:

Originally Posted by asarangan (Post 5800650)
Great, thank you. There is no way I would have figured out from the man page that "slackpkg install slackware" would bring up only the uninstalled packages.

There is this section that you might have overlooked...

Code:

install-new
            This action installs any new packages that are added to the  official
            Slackware  package  set.  Run this if you are upgrading your system to
            another Slackware version or if you are using -current. If you want to
            install all uninstalled Slackware packages onto your  system, use the
            following command instead of the install-new action:

                # slackpkg install slackware.

Quote:

Originally Posted by asarangan (Post 5800650)
But when I do that, I get several hundred items to scroll through (because mine is a minimal system), and all of them are selected by default with the "*". I don't mean to sound lazy, but how do I deselect them all without having to deselect them one by one?

OK. It's not lazy. It's how you work and Slackware is versatile enough to accommodate almost all users' needs. In order to make it so that all the packages in the slackpkg dialog interface are not selected by default you have to do a little editing. What you're asking for is actually a little known setting within the /etc/slackpkg/slackpkg.conf file. So, do this;

Code:

root@drie:~# nano -w /etc/slackpkg/slackpkg.conf
Then look for this section;

Code:

# The ONOFF variable sets the initial behavior of the dialog interface.
# If you set this to "on" then all packages will be selected by default.
# If you prefer the opposite option (all unchecked), then set this to "off".
ONOFF=on

Edit 'ONOFF=on' and change it to 'ONOFF=off'. Exit and save the file. Run 'slackpkg install slackware' again.

<edit> Found this command [option] solution which works great! All packages are deselected in the list.
Code:

root@drie:~# slackpkg -onoff=off install slackware
That should be what you're looking for. :cool:

abga 01-02-2018 05:14 PM

@Penthux
Quote:

Why would you even want it on Slackware? Apt goes against the Slackware Way and takes control away from the Admin (i.e. me and you) with regards to package management.
- actually it's even worse with the actual Slackware system updates implementation, slackpkg will uninstall some package without asking/warning and will leave a running system broken.

@rworkman
Quote:

I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.
- this procedure should maybe be on the top of this page and not only mentioned for the install-new usage. There's nothing to forget if one was never informed:
https://docs.slackware.com/slackware:slackpkg
Quote:

install-new

Running slackpkg with this argument generates a list of packages that were introduces to the Slackware recently, for example new dependencies to a package. It is advisable to run this command before updating the system if you synchronize to slackware-current.
While an experienced Slacker/Linux user will know what to do in such a case, a beginner will surely start a thread and get some people busy. Always checking the Changelog and "deducing" that when a package has been split updating it might break the running system is a little bit over a normal usability expectation/standard.
My simple proposal, which should be both necessary & sufficient is to add 2-3 extra words (warnings) in the Changelog and eventually modify slackpkg and display the changelog (directly inform with the last changes) before the package selection dialogue.

rworkman 01-02-2018 07:11 PM

https://docs.slackware.com/slackware...system_upgrade

abga 01-02-2018 07:21 PM

https://www.linuxquestions.org/quest...nt-4175618768/

Or, never use Slackware current and install it only from time to time as new/fresh and don't provide drmozes with any feedback at all. Problem solved. ;)

Exaga 01-05-2018 01:11 PM

Quote:

Originally Posted by abga (Post 5800779)
- actually it's even worse with the actual Slackware system updates implementation, slackpkg will uninstall some package without asking/warning and will leave a running system broken.

In the +13 years I've been running Slackware, and the +6 years I've been running Slackware ARM, the only time the system has been broken is when I've done something to break it, or because of hardware failure. slackpkg has never broke my system. In my experience I've never known slackpkg to remove any package without me requesting it, or knowing about it, beforehand.

Quote:

Originally Posted by abga (Post 5800846)
Or, never use Slackware current and install it only from time to time as new/fresh and don't provide drmozes with any feedback at all. Problem solved. ;)

I think Mozes would be more interested in feedback on Slackware ARM -current. Wouldn't you say?

rworkman 01-05-2018 01:21 PM

Quote:

Originally Posted by abga (Post 5800779)
@Penthux

- actually it's even worse with the actual Slackware system updates implementation, slackpkg will uninstall some package without asking/warning and will leave a running system broken.

No, slackpkg did not and does not *uninstall* any package without being told to do so.
In this particular case, it didn't uninstall the hostname utility either.

/bin/hostname used to be part of the net-tools package. It was split out into a separate package called hostname.
When the net-tools package was upgraded, it no longer contained /bin/hostname so that file was gone. If "slackpkg install-new" had been run *before* "slackpkg upgrade-all" then that would not have occurred.

Quote:

@rworkman
- this procedure should maybe be on the top of this page and not only mentioned for the install-new usage. There's nothing to forget if one was never informed:
https://docs.slackware.com/slackware:slackpkg
It was already mentioned in the "Full System Upgrade" section, and it would be out of place at the top of the page. I did, however, edit that docs page to add a reminder to read the entire page before using slackpkg.

abga 01-05-2018 04:53 PM

@Exaga
I'm also a Slacker for more than 20 years (first used it in 1996 - switching from FreeBSD) but never cared about officially updating it or what the Slackware Team (I only knew about Patrick) was patching, but taking it as it is, installing new releases and recompiling/patching on my own whatever was requested (mainly kernel and some services packages I needed, sources I never took from Slackware, but from the official developers repositories). And that's why I love it, it never slapped my fingers, whatever I tried to hack on it.
Please do read trough the thread here and see for yourself that slackpkg does break a system under -current, in that it removes a package that was previously bundled together with another and doesn't install it back as new:
https://www.linuxquestions.org/quest...nt-4175618768/
Quote:

I think Mozes would be more interested in feedback on Slackware ARM -current. Wouldn't you say?
Please do ask him, I was replying to rworkman. ;)

@rworkman
Thanks for the reply, I agree with all your points, but the end effect for a user that is not reinstalling -current on every update (as suggested by drmozes) and is not aware about the install-new > upgrade-all sequence, which was documented only for system upgrades, nor is he warned in the changelog (maybe not even reading it before an update - which I don't, by the way, never remember the link), is that he'll get a system with some packages missing and will come over here on the forum and ask for help. That's why I proposed some minimal changes, just for directly informing & warning a simple user. Just a very minimalistic usability improvement, if you will.

drmozes 01-05-2018 06:07 PM

Quote:

Originally Posted by abga (Post 5802628)
reinstalling -current on every update (as suggested by drmozes)

Read the thread you have linked to. I corrected you there about that already. Please don't put sentences in my mouth that I didn't say.

Thanks.

abga 01-05-2018 06:44 PM

Quote:

Originally Posted by drmozes (Post 5802648)
Read the thread you have linked to. I corrected you there about that already. Please don't put sentences in my mouth that I didn't say.

Thanks.

Oh, you did, first in another recent thread (related to qpaeq):
https://www.linuxquestions.org/quest...2/#post5785494
Quote:

None of these problems exist on a fresh installation of -current.
&
Quote:

You might want to reinstall your machine. If you were using a tool to update, I'd recommend doing it manually and reading the change log.
And then repeatedly hinting in the Survival Guide thread:
https://www.linuxquestions.org/quest...8/#post5787566
Quote:

I did not say this. I said that you should reinstall _your_ system.
https://www.linuxquestions.org/quest...8/#post5787715
Quote:

Your logic puzzles me. If anything it's pre-(some months)-15.0.
- in respect to my "unwillingness" to reinstall / install fresh a -current system which was solid, installed clean from the very beginning
And then, in the same post you actually made me feel uncomfortable in using slackpkg with your statement:
Quote:

As regarding slackpkg - I don't use it, never have apart from to test the epoch date-quit patch I made for it.
Now, I won't put any more effort in this, as I feel like in Kindergarten throwing toys around. I'm just curious, if you don't use slackpkg, why care then?
:)

drmozes 01-06-2018 03:12 AM

Quote:

Originally Posted by abga (Post 5802657)
Now, I won't put any more effort in this, as I feel like in Kindergarten throwing toys around. I'm just curious, if you don't use slackpkg, why care then?
:)

You seem to like taking quotes out of context. I have explained why you should reinstall your system, and you seem to have forgotten those reasons.
I often reinstall the machine since I am the developer of the OS, and I test the installer when I build a new kernel (every couple of weeks, normally) - so I often have a fresh installation upon which to test any reported concerns. Each package is upgraded after it's built - the system isn't reinstalled after every package update.

Also I have explained why I have made corrections in response to some of your posts: some of your statements are based on misunderstandings of how the system works, and if people follow some of your ideas such as symlinking libraries, they'll screw their system up.

Anyway, I think that's enough of this.

Exaga 01-06-2018 03:38 AM

Quote:

Originally Posted by abga (Post 5802657)
Now, I won't put any more effort in this, as I feel like in Kindergarten throwing toys around. I'm just curious, if you don't use slackpkg, why care then? :)

Your question, if answered, would only invite further acrimony. Although you should already know the answer.

People have tried to help and advise you but all you seem intent on doing is trying to discredit them and the work they do. I really don't know what your real issue is.

Quote:

Originally Posted by drmozes (Post 5802776)
Anyway, I think that's enough of this.

Damn. You beat me to it!


All times are GMT -5. The time now is 03:02 PM.