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

DietPi-PREP | Assure manpages for installed packages are kept #3259

Closed
smudgered opened this issue Dec 9, 2019 · 10 comments
Closed

DietPi-PREP | Assure manpages for installed packages are kept #3259

smudgered opened this issue Dec 9, 2019 · 10 comments
Labels
Enhancement 💨 Installer 💠 Issues related to DietPi-Installer and/or pre-image used Solution available 🥂 Definite solution has been done
Milestone

Comments

@smudgered
Copy link

Creating a bug report/issue

Required Information

  • DietPi version | cat /DietPi/dietpi/.version
    DIETPI_VERSION_CORE=6
  • Distro version | echo $G_DISTRO_NAME or cat /etc/debian_version
    buster
  • Kernel version | uname -a
    Linuxx DietPi 4.19.75+ DietPi-System | Quirks noticed by v158 image update  #1270
  • SBC device | echo $G_HW_MODEL_DESCRIPTION or (EG: RPi3)
    RPi B (arm6l)
  • Power supply used | (EG: 5V 1A RAVpower)
    5V 2A Generic
  • SDcard used | (EG: SanDisk ultra)
    Lexar High Speed (Class 10)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
  • Bug report ID | sed -n 5p /DietPi/dietpi/.hw_model

Steps to reproduce

  1. Discover man is not installed by default.
  2. Install man-db manpages
  3. Try 'man apt' (or pwd, ls, apt-get etc)

Expected behaviour

  • man apt (or anything and not just "man man" should display the manpages for apt

Actual behaviour

-Response = "No manual entry for apt" Suggested action to "See 'man 7 undocumented'" > "No manual entry fod undocumented in section 7"
Try 'sudo man apt' - same response
Try 'man man' This works! Only this.

Extra details

  • ...I tried the usual sources via websearch and explored manpath config to no effect.
    Also uninstalled and reinstalled man-db and manpages afresh and rebooted to no effect.
@smudgered
Copy link
Author

smudgered commented Dec 9, 2019

Workaround appears to be 'man - u'
Prompt is ~$: What manual page do you want?
Submit ~$: apt

@MichaIng
Copy link
Owner

MichaIng commented Dec 9, 2019

Did you probably run dietpi-cleaner once? This also has an option to remove man pages, since most users prefer to see them via web browser from desktop system. In case apt install --reinstall apt would recover them for apt.

@smudgered
Copy link
Author

smudgered commented Dec 9, 2019 via email

@notDavid
Copy link

notDavid commented Dec 9, 2019

Same issue here, i never ran dietpi-cleaner

(DietPi v6.26.3)

@smudgered
Copy link
Author

smudgered commented Dec 9, 2019 via email

@MichaIng
Copy link
Owner

@smudgered
If you compare our image sizes with Raspbian Lite or Debian/Ubuntu server images, it is obvious that we take much more as optional 😉. If you go consequently with what the packages are marked as:

  • man-db: https://packages.debian.org/buster/man-db Priority: important (but not required or essential)
  • manpages: https://packages.debian.org/buster/manpages Priority: standard
  • Compare with grep: https://packages.debian.org/buster/grep Priority: essential, which means that other packages may use what grep provides without listing it as explicit dependency. Such packages must all exist on any Debian/APT system, else system scripts might call commands which do not exist or need libraries which are not present.
  • Packages with priority "required" must still be listed as dependencies by other packages, when they use them, however they are usually expected present to allow proper system maintenance, e.g. repairing the system, e.g. e2fsprogs which provides fsck for ext2/3/4 file systems.

We keep all essential and required packages, and those which are used by our own scripts or we think are used by very most users (sudo + nano) + firmware(WiFi)/kernel/bootloader for individual SBCs/devices. Everything else is purged.

I agree that the package man pages should remain on the system, so that when installing man-db one is able to access all man pages of all installed packages. I'll recheck and assure that for future images in case.

@MichaIng MichaIng added Enhancement 💨 Installer 💠 Issues related to DietPi-Installer and/or pre-image used labels Dec 11, 2019
@MichaIng MichaIng changed the title man-db manpages : man apt > No manual entry for apt (or ls or pwd etc) DietPi-PREP | Assure manpages for installed packages are kept Dec 11, 2019
@smudgered
Copy link
Author

smudgered commented Dec 11, 2019 via email

@MichaIng
Copy link
Owner

@smudgered
Of course all this is a question of individual needs and Debian package priorities finally a suggestion. Only thing that must be taken seriously is the "essential" packages, which are a must-have to assure other packages do not run into errors, at least unless you know what you're doing and how to interpret and fix potential issues. I am experimenting with purged "hostname" and "sysvinit-utils", but then some system services, cron jobs, APT installs etc produce errors due to missing "hostname" "pidof" command etc. 😉.
Everything else is moreless optional and a question of personal preferences. And as said, we (DietPi) like to ship things with least possible overhead, least "bloated" and instead offer easy ways to install/configure additions so that all eventual dependencies are pulled automatically (dietpi-software/dietpi-config/dietpi-drive_manager/...). E.g. install Python when there is actually any software installed that requires Python, instead of having this quite large library set pre-installed on all those SBCs with in cases small SDcards etc.

man pages are for very most users not required as well, when there are resources like: https://manpages.debian.org/
However I agree that it should be easily possible to add this feature without having to reinstall every single package, hence the rephrased issue topic 🙂.

@smudgered
Copy link
Author

smudgered commented Dec 11, 2019 via email

MichaIng added a commit that referenced this issue Dec 12, 2019
+ DietPi-PREP | Keep man pages and documentation for installed packages. Removing those can cause APT upgrade issues in rare cases, removing "doc" in particular should be kept for legal reasons, as it contains copyright files/info, and finally we should enable users to simply install man-db to view all installed package man pages. When removing those, each package must be reinstalled to restore its man pages and documentation files: #3259
+ DietPi-PREP | Align ARMbian service and file removal with DietPi-Patch, especially prevent file and new service install via dpkg exclusion config
+ DietPi-PREP | Be more verbose about files we remove
@MichaIng MichaIng added this to the v6.27 milestone Dec 12, 2019
@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Dec 12, 2019
@MichaIng
Copy link
Owner

MichaIng commented Dec 12, 2019

Okay, indeed we actively removed those documentation and man page files actively. I removed that from our image creation script: d198143
This is as well important for legal reasons: /usr/share/doc contains copyright files, which must be kept!
Changelog: 3cc5220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💨 Installer 💠 Issues related to DietPi-Installer and/or pre-image used Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants