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

Why does the deb package depend on git? #256

Open
iainelder opened this issue Jul 13, 2023 · 6 comments
Open

Why does the deb package depend on git? #256

iainelder opened this issue Jul 13, 2023 · 6 comments

Comments

@iainelder
Copy link

Describe the bug

$ apt depends cw-tail
cw-tail
  Depends: git
    git:i386
  Replaces: cw (<< 3.3.0)

In an Ubuntu 20 container it installs about 105MB of stuff when the executable itself is only about 9MB.

$ ls -lh "$(which cw)"
-rwxr-xr-x 1 root root 9.3M Apr 21 19:56 /usr/bin/cw

Copied from my CI install log.

+ sudo apt-get install --yes ./cw_amd64.deb
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  git git-man less libbsd0 libcbor0.6 libcurl3-gnutls libedit2 liberror-perl
  libexpat1 libfido2-1 libgdbm-compat4 libgdbm6 libperl5.30 libx11-6
  libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 netbase
  openssh-client patch perl perl-modules-5.30 xauth
Suggested packages:
  gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email
  git-gui gitk gitweb git-cvs git-mediawiki git-svn gdbm-l10n keychain
  libpam-ssh monkeysphere ssh-askpass ed diffutils-doc perl-doc
  libterm-readline-gnu-perl | libterm-readline-perl-perl make libb-debug-perl
  liblocale-codes-perl
The following NEW packages will be installed:
  cw-tail git git-man less libbsd0 libcbor0.6 libcurl3-gnutls libedit2
  liberror-perl libexpat1 libfido2-1 libgdbm-compat4 libgdbm6 libperl5.30
  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 netbase
  openssh-client patch perl perl-modules-5.30 xauth
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.7 MB/18.5 MB of archives.
After this operation, 105 MB of additional disk space will be used.

Expected behavior

One of the features is "No external dependencies", so I was surprised to see git as a dependency.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Terminal: bash
  • cw version: 4.1.3
@lucagrulla
Copy link
Owner

Thanks for finding this out!

I've had a look, and it's probably just an oversight in the package creation.
I have time over the coming weeks to confirm this hypothesis and eventually release a slimmer package.

@iainelder
Copy link
Author

Thanks for checking.

I'm not familiar with GoReleaser, but I think I found where this dependency is configured:

cw/.goreleaser.yml

Lines 101 to 102 in a578b3b

dependencies:
- git

Would the fix be as simple as removing these two lines?

@lucagrulla
Copy link
Owner

Yep,
That's the line.

It should be as simple as deleting the deps block, but I will check it to be sure.

@lucagrulla
Copy link
Owner

Test done:
removed the git dependency (and tested on a Debian), but the .deb package size is the same. 🤔🤷🏻‍♂️

The dependency is unnecessary and I'll remove it. For a smaller package, I need to dig deeper.

@lucagrulla
Copy link
Owner

Ignore my second comment: The ~10MB of the executable is correct (as you highlighted).

I will remove the unnecessary git dep, and from the next release, the package will contain only what is required.

@iainelder
Copy link
Author

Thanks for checking it!

Where I expect to see a difference is in apt's installation confirmation.

Instead of:

0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.7 MB/18.5 MB of archives.
After this operation, 105 MB of additional disk space will be used.

I'd expect something like this (??? means I don't know what to expect there!):

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get ??? of archives.
After this operation, 10 MB of additional disk space will be used.

I'll try again when you make the next release to confirm it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants