hhvm / packaging

The sources for how we have built the HHVM packages.
MIT License
64 stars 63 forks source link

hhvm-dev (3.21.4-1~xenial) is not a dev package #161

Closed Rowern closed 6 years ago

Rowern commented 6 years ago

Previously the hhvm-dev package (3.21.3~xenial) had these dependencies:

Package: hhvm-dev
Versions:
3.21.3~xenial (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/dpkg/status
                  MD5: f03e33f3d051b667438430eb7f7e115e

3.11.1+dfsg-1ubuntu1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages)
 Description Language:
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages
                  MD5: a27478c4af11fba83560197b567c6365
 Description Language: en
                 File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial_universe_i18n_Translation-en
                  MD5: a27478c4af11fba83560197b567c6365

Reverse Depends:
Dependencies:
3.21.3~xenial - hhvm (0 (null)) autoconf (0 (null)) automake (0 (null)) binutils-dev (0 (null)) build-essential (0 (null)) cmake (0 (null)) g++ (0 (null)) git (0 (null)) libboost-thread-dev (0 (null)) libbz2-dev (0 (null)) libldap2-dev (0 (null)) libc-client2007e-dev (0 (null)) libcap-dev (0 (null)) libcurl4-openssl-dev (0 (null)) libdwarf-dev (0 (null)) libelf-dev (0 (null)) libevent-dev (0 (null)) zlib1g-dev (0 (null)) libxml2-dev (0 (null)) libtbb-dev (0 (null)) libpcre3-dev (0 (null)) libmysqlclient-dev (0 (null)) libjemalloc-dev (0 (null)) libicu-dev (0 (null)) libmemcached-dev (0 (null)) libgoogle-glog-dev (0 (null)) libdouble-conversion-dev (0 (null)) liblz4-dev (0 (null)) libzip-dev (0 (null)) libre2-dev (0 (null)) libpq-dev (0 (null)) libsnappy-dev (0 (null)) libsodium-dev (0 (null)) libnuma-dev (0 (null))
3.11.1+dfsg-1ubuntu1 - cmake (0 (null))
Provides:
3.21.3~xenial -
3.11.1+dfsg-1ubuntu1 -
Reverse Provides:

Now the "new" hhvm-dev package (3.21.4-1~xenial) has these dependencies:

Package: hhvm-dev
  Versions:
  3.21.4-1~xenial (/var/lib/apt/lists/dl.hhvm.com_ubuntu_dists_xenial-lts-3.21_main_binary-amd64_Packages) (/var/lib/dpkg/status)
   Description Language:
                   File: /var/lib/apt/lists/dl.hhvm.com_ubuntu_dists_xenial-lts-3.21_main_binary-amd64_Packages
                    MD5: b4c3a64853396f681758d9c2d44515e4

  3.11.1+dfsg-1ubuntu1 (/var/lib/apt/lists/eu-west-2.ec2.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages)
   Description Language:
                   File: /var/lib/apt/lists/eu-west-2.ec2.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages
                    MD5: a27478c4af11fba83560197b567c6365
   Description Language: en
                   File: /var/lib/apt/lists/eu-west-2.ec2.archive.ubuntu.com_ubuntu_dists_xenial_universe_i18n_Translation-en
                    MD5: a27478c4af11fba83560197b567c6365

  Reverse Depends:
  Dependencies:
  3.21.4-1~xenial - hhvm (5 3.21.4-1~xenial) cmake (0 (null))
  3.11.1+dfsg-1ubuntu1 - cmake (0 (null))
  Provides:
  3.21.4-1~xenial -
  3.11.1+dfsg-1ubuntu1 -
  Reverse Provides:

Also, I does not seem that the sources are put inside the /usr/include/hphp/ directory.

My solution is to freeze my package to hhvm-dev 3.21.3 but is it an intended modification of the dev package and if so is there a way to mimic the install of the previous dev package for the new version?

fredemmott commented 6 years ago

These changes are to make it a more standard-dev package.

Dependencies

As I understand it, the old behavior of listing all build-depends as dependencies of the -dev package was a bug, and was not consistent with standard packaging practices. For example, libsodium-dev only depends on libsodium. Is there a specific dependency that you think is being inappropriately omitted?

/usr/include/hphp

It's also not standard practice for -dev packages to contain sources, though this doesn't appear to have changed in these package versions:

# dpkg -i hhvm-dev_3.21.3~xenial_amd64.deb
... lots of warnings about not having main hhvm package installed ...
# find /usr/include/hphp -type f ! -name '*.h'
# find /usr/include/hphp -type f -name '*.h' | wc -l
4532
# apt-get remove -y hhvm-dev
# dpkg -i hhvm-dev_3.21.4~xenial_amd64.deb
... lots of warnings about not having main hhvm package installed ...
# find /usr/include/hphp -type f ! -name '*.h'
# find /usr/include/hphp -type f -name '*.h' | wc -l
4224

Can you give specific examples of files that you think should be included and are now not?

fredemmott commented 6 years ago

is there a way to mimic the install of the previous dev package for the new version?

We should now be publishing source packages, and it sounds like that might be what you want instead:

  1. Install apt-transport-https if you haven't already
  2. Add 'deb-src https://dl.hhvm.com/ubuntu xenial main' to /etc/apt/sources.list.d/hhvm
  3. apt-get update -y
  4. apt-get install -y dpkg-dev
  5. To get a source tree: apt-get source hhvm
  6. To get build dependcies: apt-get build-dep hhvm

To do what you asked (not recommended): Edit the dependencies on https://github.com/hhvm/packaging/blob/master/debian-9-stretch/debian/control#L86 to include all build-depends (Xenial currently shares files with stretch), and then follow the instructions in the README to rebuild.