Hi Utkarsh,

I've found a bootstrap path for resolving the circular build dependency
between php-twig and symfony.  Unfortunately, and as we suspected,
there's yet another build entanglement between symfony and doctrine.

Brace yourself.

Below is the steps I worked out today.  I had to go back and forth a
bunch to trial-and-error my way through, and likely have left some
errors in these directions.  Please run through the, correct my errors,
and see if you can press on ahead further than I got.


  - Step 0: Prerequisites
    + Enable proposed
    + sudo apt-get remove php*

  - Step 1: Interim php-symfony-contracts
    dget -x 
https://snapshot.debian.org/archive/debian/20191114T152956Z/pool/main/p/php-symfony-contracts/php-symfony-contracts_2.0.0-1.dsc
    cd php-symfony-contracts-2.0.0/
    install-build-deps
    DEB_BUILD_OPTIONS=nocheck debuild
    sudo dpkg -i ../php-symfony-cache-contracts_2.0.0-1_all.deb \
                 ../php-symfony-translation-contracts_2.0.0-1_all.deb

  - Step 2: Interim symfony
    
https://snapshot.debian.org/archive/debian/20191225T031557Z/pool/main/s/symfony/symfony_5.0.2-1.dsc
    DEB_BUILD_OPTIONS=nocheck debuild
    # 2a.  Get basic php-symfony bits in place
    sudo dpkg -i ../php-symfony-security-core_5.0.2-1_all.deb \
                 ../php-symfony-console_5.0.2-1_all.deb \
                 ../php-symfony-css-selector_5.0.2-1_all.deb \
                 ../php-symfony-mime_5.0.2-1_all.deb \
                 ../php-symfony-intl_5.0.2-1_all.deb \
                 ../php-symfony-yaml_5.0.2-1_all.deb \
                 ../php-symfony-http-foundation_5.0.2-1_all.deb \
                 ../php-symfony-phpunit-bridge_5.0.2-1_all.deb
    sudo dpkg -i ../php-symfony-event-dispatcher_5.0.2-1_all.deb

    # 2b.  Install the symfony kernel
    sudo apt-get install php-psr-log
    sudo dpkg -i ../php-symfony-error-handler_5.0.2-1_all.deb \
                 ../php-symfony-var-dumper_5.0.2-1_all.deb \
                 ../php-symfony-http-kernel_5.0.2-1_all.deb

    # 2c.  Install symfony cache
    sudo dpkg -i ../php-symfony-var-exporter_5.0.2-1_all.deb \
                 ../php-symfony-cache_5.0.2-1_all.deb

    # 2d.  Install the symfony framework bundle
    sudo apt-get install php-psr-container=1.0.0-2 \
                         php-psr-cache=1.0.1-2 \
                         php-symfony-service-contracts=1.1.10-2
    sudo dpkg -i ../php-symfony-config_5.0.2-1_all.deb \
                 ../php-symfony-dependency-injection_5.0.2-1_all.deb \
                 ../php-symfony-filesystem_5.0.2-1_all.deb \
                 ../php-symfony-finder_5.0.2-1_all.deb \
                 ../php-symfony-routing_5.0.2-1_all.deb \
                 ../php-symfony-framework-bundle_5.0.2-1_all.deb

    # 2e.  Install php-twig's prereq's
    sudo apt-get install php-twig=2.14.3-1
    sudo dpkg -i ../php-symfony-twig-bundle_5.0.2-1_all.deb

  - Step 3: Interim php-twig
    (Has already been uploaded to -proposed with needed changes, just needs 
rebuilt)
    apt-get source php-twig
    cd php-twig-3.3.2
    sudo apt-get install php-league-commonmark \
                 php-league-html-to-markdown \
                 php-lorenzo-pinky php-parsedown \
                 php-tijsverkoyen-css-to-inline-styles
    debuild
    sudo dpkg -i ../php-twig_3.3.2-1ubuntu1_all.deb \
                 ../php-twig-inky-extra_3.3.2-1ubuntu1_all.deb \
                 ../php-twig-markdown-extra_3.3.2-1ubuntu1_all.deb \
                 ../php-twig-cssinliner-extra_3.3.2-1ubuntu1_all.deb

  - Step 4: Interim php-doctrine-persistence
    dget -x 
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/php-doctrine-persistence/1.3.8-1/php-doctrine-persistence_1.3.8-1.dsc
    cd php-doctrine-persistence-1.3.8/
    sudo apt-get install php-doctrine-reflection
    DEB_BUILD_OPTIONS=nocheck debuild
    sudo dpkg -i ../php-doctrine-persistence_1.3.8-1_all.deb


################################
### HERE BELOW BE YE DRAGONS ###
################################

  - Step TBD: Maybe build more interim versions of symfony??
    + e.g. symfony (5.2.1+dfsg-1) or symfony (5.2.5+dfsg-1)
    + I don't see anything in the changelog that makes me feel that's a
      viable path, but if we can't get Step x (below) to work then it
      might be worth trying.

  - Step x: Build symfony 5.2.6
    apt-get source symfony
    cd symfony-5.2.6+dfsg/

    # Install more prereqs from the interim symfony
    sudo apt-get install php-doctrine-event-manager=1.1.1-1

    sudo apt-get install \
         php-amqp php-apcu php-apcu-bc php-uuid php-gd \
         php-cache-integration-tests php-curl \
         php-guzzlehttp-promises php-http-httplug php-ldap \
         php-psr-http-client php-psr-link php-psr-simple-cache \
         php-masterminds-html5 php-memcached php-monolog php-nrk-predis \
         php-nyholm-psr7 php-pda-pheanstalk php-phpdbg \
         php-sqlite3

    sudo apt-get install  php-symfony-polyfill-php80 \
         php-email-validator  \
         php-friendsofphp-proxy-manager-lts \
         php-symfony-security-acl \
         composer

    # Install the rest of the symfony contracts packages, needed by php doctrine
    sudo dpkg -i ../../php-symfony-contracts-2.0.0/../*_2.0.0-1_all.deb

    # Note: This won't work with the php-doctrine-persistence in the
    #       archive, and requires the 1.3.8-1 version from Step 4.
    sudo dpkg -i ../php-symfony-doctrine-bridge_5.0.2-1_all.deb

    sudo apt-get install php-doctrine-bundle

    # Installing these causes some of the earlier php-symfony stuff to
    # upgrade, such as php-symfony-http-kernel and php-symfony-twig-bundle
    sudo apt-get install php-async-aws-ses php-async-aws-sqs

    # Installing these causes upgrades of some of the php-doctrine stuff
    # we just installed, and things go off the rails.  Be careful not to
    # let any php-symfony-4.4.x bits get installed.
    sudo apt-get install php-doctrine-data-fixtures php-doctrine-orm

    # Unfortunately, the above command causes php-doctrine-bundle to be
    # removed.  symfony requires php-doctrine-bundle as well as the
    # other pieces, but I haven't figured out how to get them all
    # co-installed.  It is possible we need to install older versions of
    # php-doctrine-common and doctrine.  I found that
    # php-doctrine-common 3.1.0 builds ok, but it needs the newer
    # php-doctrine-persistence (which then breaks
    # php-symfony-doctrine-bridge).  php-doctrine-common 2.13.3-1 builds
    # if we disable its testsuite, but also requires an old
    # php-doctrine-inflector... and at this point I'm out of steam.
    #
    # Good luck.

    debuild

  - Step Last: Revert php-twig changes
    + Essentially just resync/rebuild from debian dropping all Ubuntu
      changes


If all the above can be made to work locally, the next step would be to
start putting the above into PPAs.  I suspect it'd be helpful to provide
AA's with at least two PPAs, the first with the initial interim
packages, the latter with the final packages.

Bryce

-- 
ubuntu-server mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Reply via email to