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

Remove embedded DESTDIR in make variables, honour them #339

Merged
merged 19 commits into from
Sep 21, 2023

Commits on Aug 15, 2023

  1. Remove find-provides script

    It was used solely by the make_rpm machinery. With that one gone we can
    drop the script.
    
    The script seems outdated (no support for zstd modules) and
    undocumented. If we are to revive it (no objections there) we should
    address those two as a base acceptance entry.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    48de243 View commit details
    Browse the repository at this point in the history
  2. Remove lsb-release/lsb_release handling

    A while ago we started using os-release to get the distribution
    name/details. Since then all the distros that I've seen (apart from
    Debian and derivatives) have dropped lsb-release from their
    dependencies.
    
    Let's remove the final remanands, this in turns allows us to remove the
    special PATH mangling and the unmaintained in-tree lsb_release (see next
    commit).
    
    As a nice bonus - source the /etc/os-release in a sub-shell, so we don't
    get any other control flow/variables as side-effect.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    b4459be View commit details
    Browse the repository at this point in the history
  3. Remove lsb_release

    The codebase has moved to use /etc/os-release with a fallback to
    lsb_release. That said, the latter has two variants a data file in /etc
    or an executable in $PATH.
    
    The in-tree lsb_release is an executable script, although it's installed
    outside of $PATH and no distribution (that I can see) adjusts the
    environment variable or even uses external lsb_release dependency.
    
    Considering the lack of practical users, let's remove the script. We can
    worry about the remaining in-tree lsb-release references later on.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    2a40772 View commit details
    Browse the repository at this point in the history
  4. make: remove unused variables

    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    6668c44 View commit details
    Browse the repository at this point in the history
  5. make: create install directories with install

    mkdir inherits the umask of the environment. Using install gets us past
    that, while also being consistent with the rest of the codebase.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    ade4307 View commit details
    Browse the repository at this point in the history
  6. make: inline and ban VAR

    There are dozen of instances across the codebase, that use /var...
    although none of them actually honour the variable. Skimming through
    existing projects/distros - they all seem to use the default.
    
    Inline the instance and print a meaningful error in case it's set.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    0841034 View commit details
    Browse the repository at this point in the history
  7. make: inline and ban ETC

    There are dozen of instances across the codebase, that use /etc...
    although none of them actually honour the variable. Skimming through
    existing projects/distros - they all seem to use the default.
    
    Inline the instance and print a meaningful error in case it's set.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    8f99fe0 View commit details
    Browse the repository at this point in the history
  8. make: inline and ban BASHDIR

    There are dozen of instances across the codebase, that use /usr...
    although none of them actually honour the variable. Skimming through
    existing projects/distros - they all seem to use the default.
    
    Inline the instance and print a meaningful error in case it's set.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    d094f70 View commit details
    Browse the repository at this point in the history
  9. make: stop gzip compressing the man page

    The uncompressed manual is absolutely tiny, plus the decision to
    compress or not is up-to the distribution. In cases where people
    build/install dkms manually they can handle this themselves.
    
    For example: Gentoo has a workaround to remove the compression
    @AndrewAmmerlaan - you can now drop that \o/
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    6329917 View commit details
    Browse the repository at this point in the history
  10. make: inline and ban MAN

    There is a single instance of the variable, there's no Linux
    distributions that I can see overriding the default. Yet most
    importantly the variable should really be called MANDIR, to be
    consistent with the vast majority of projects out there.
    
    BSD, Solaris and friends tend to use different path, but dkms is not
    usually used on those.
    
    As needed we can reinstate the config toggle (as MANDIR really) if
    needed.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    9b66053 View commit details
    Browse the repository at this point in the history
  11. make: remove DESTDIR prefix for SYSTEMD

    Usual conventions dictates that DESTDIR is applied at the install stage.
    We currently embed it into each use-configurable toggle, which goes
    against that.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    c6230f2 View commit details
    Browse the repository at this point in the history
  12. make: inline and ban DOCDIR/SHAREDIR

    AFACIT no linux distro out there uses the non-default values. Similar to
    MAN - some BSD/Solaris distros might have differing path. Although until
    that proves to be an issue, let's remove these.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    10f7ed3 View commit details
    Browse the repository at this point in the history
  13. make: remove DESTDIR prefix for SBIN

    Usual conventions dictates that DESTDIR is applied at the install stage.
    We currently embed it into each use-configurable toggle, which goes
    against that.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    04ae020 View commit details
    Browse the repository at this point in the history
  14. make: reshuffle all/install/tarball target deps

    The current all target is a bit bonkers - it cleans all the generated
    files, does not explicitly regenerate them and creates a distribution
    tarball.
    
    With the latter having the side effect of regenerating the required
    files, by having a dependency list.
    
    Similar to the tarball target, install also has an explicit dependency
    list of files that need to be generated.
    
    All of this is fairly uncommon to how all the projects (that I've seen)
    operate. Namely:
    
    all: all_the_generated_targets
    
    install: all
       install steps
    
    tarball: all
    
    clean:
       foobar ... the target is never a dependency of any of the above
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    58e5ac6 View commit details
    Browse the repository at this point in the history
  15. Drop hard-coded /usr/sbin references

    If the user has provided SBIN we should honour it.
    
    The Makefile handling is a bit repetitive, but polishing that is an
    exercise for another day.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    530c9ac View commit details
    Browse the repository at this point in the history
  16. make: remove DESTDIR prefix for LIBDIR

    Usual conventions dictates that DESTDIR is applied at the install stage.
    We currently embed it into each use-configurable toggle, which goes
    against that.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    4f9defd View commit details
    Browse the repository at this point in the history
  17. Drop hard-coded /usr/lib/dkms references

    If the user has set LIBDIR we should honour it.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    7757403 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. make: remove DESTDIR prefix for KCONF

    Usual conventions dictates that DESTDIR is applied at the install stage.
    We currently embed it into each use-configurable toggle, which goes
    against that.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    f5a6b89 View commit details
    Browse the repository at this point in the history
  2. Drop hard-coded /etc/kernel references

    If the user has set KCONF we should honour it.
    
    Signed-off-by: Emil Velikov <[email protected]>
    evelikov committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    565079b View commit details
    Browse the repository at this point in the history