debputy (0.1.6) experimental; urgency=medium

  * Manifest changes:
    - Breaking change: Replace `exclude` with `discard` and remove inline
      `exclude` rule
    - Breaking change: Rename `exclude` (transformation) to `remove`
    - Breaking change: Symlink creation is now a transformation rule
    - Breaking change: Empty directory creation is now a transformation rule
    - Permit str/list forms of current install rules
    - Support `install-man` rule similar to `dh_installman`.  Note that `install-man`
      does *not* automatically fallback to guessing the language from the basename
      like `dh_installman`. The feature is supported but requires explicit opt-in.

  * Changes related to `migrate-from-dh`:
    - Fix invalid error message on `${env:FOO}` variables
    - The migration tool is now more clear on "unsupported" vs. "supported but there
      is no automatic migration feature".  The former will require an explicit
      "I know and I am ignoring it" parameter, whereas the latter gets a "manual
      migration" warning.
    - Automatic migration from `d/manpages` to the new `install-man` rule.  Be
      sure to double-check the `language` attribute (of lack thereof).  You may
      need to add `language: derive-from-basename` in some cases.
    - Automatic migration to translate `debian/not-installed` into `discard` rules.
    - The migration tool now detects unsupported dh sequence add-ons used.
    - The migration tool now detects missing `dh-sequence-debuty` (or the `-zz-`
      variant) in the Builds-Depends and provides you with a warning.

  * Plugin API changes:
    - `VirtualPath` now has a new `open` method.

  * d/changelog: Correct a `Closes` to specific it was a gitlab issue
  * IMPLEMENTATION-DECISIONS.md: New file that document some implementation
    decisions in a new document.
  * MANIFEST-FORMAT.md: Tweak some wording and remove an invalid exclude example
  * MANIFEST-FORMAT.md: Clarify that conditions may partially evaluate rules
  * Parse transformation rules via declarative parsers.  Same behaviour, just
    with better error messages.
  * Set `DPKG_NLS=0` when calling `dpkg-architecture`
  * FSPath: Support tracking ownership and rewrite mode tracking
  * Remove internal `show-manifest-rules` command
  * Avoid crash if two ELF binaries have the same build-id
  * Support running `dwz` for ELF binaries
  * GETTING-STARTED-WITH-dh-debputy.md: Improve migration section
  * Correct python public directory detection.  Previously, if the debug
    version of the directory was available, only that was checked for
    python scripts.  Now `debputy` checks both directories when they are
    both present.
  * Remove shlibs + symbols migration code it is no longer necessary.
  * migraition: Fix `min` that should have been `max` causing it to use the
    min dh-compat level rather than the max compat level required by
    migrations.
  * migrate-from-dh: Detect unsupported dh-addons and missing debputy B-D
  * debputy: Clarify that `plugin list --help` will list topics
  * Remove support for `menutest` and `isinstallable` scripts for now.
    There is no support for the deb maintscripts. It seems weird to have
    support for the udeb ones.
  * Generate the control root in a tempdir to reset state between runs.
  * shlibs.py: Fix crash when no `shlibs` and `symbols` files were provided
  * Generate temp names with `__` separating the original basename for making
    the original basename a little easier to spot.
  * Fix bug where perl shebang lines were always rewritten
  * debputy: Provide better contextual error messages
  * Default most scripts with shebang lines to 755 if no other rule matches it.
    This applies to any file having /usr/bin, /usr/sbin, /bin, or /sbin
    in its #!-line, where a more specific rule does not apply.
    (Closes: debputy#36)

 -- Niels Thykier <niels@thykier.net>  Sun, 01 Oct 2023 22:21:03 +0200

debputy (0.1.5) experimental; urgency=medium

  * New migration features:
    - Lower the min dh compat to 11 for the simplest cases.  Some cases
      will require higher compat levels (notably, any arch:any packages bumps
      the minimum to compat 12).

  * debputy: Breaking change:  Detect missing installation rules for `debian/tmp`
    similar to `dh_missing`. The `debputy` detects completely directories as
    possible integration points and provides a bit of context to what kind of
    path entry the missing file system object is.  The new install-time `exclude`
    rule can be used to deliberately ignore uninteresting path objects that is
    this feature detects.

  * Manifest changes:
    - Breaking change: Make `all-of` and `any-of` consistent (case-wise) with
      other conditions.
    - The `into` key on installation rules are now optional for single binary
      packages.
    - Fix bug where `dest-dir`, `as` and `when` was ignored for `install` (etc.)
    - Support symbolic mode for mode attributes in additional to octal modes.
    - Support `exclude` as an install rule (under `installations`) as an
      experimental feature.
    - Support `exclude` as an inline attribute in some `install` rules.

  * Fix error in built-in permission normalization rule that broke directory modes
    in some cases.
  * Support main-doc package in install rules and apply_compression
  * Remove support for debian/udev as it involves `/lib` and `debputy` should not
    be involved in the `/usr-merge` transition.
  * util.py: Fix bug in detect_fakeroot that would neuter the check
  * util.py: Implement an xargs-like interface
  * highlevel_manifest_parser.py: Prettify the definition reference
  * highlevel_manifest_parser.py: Detect typos if python3-levenshtein is installed
  * Remove debug symbols from static libraries (Closes: debputy#32)
  * Remove remaining code for supporting "install"- and "mtree"-like formats.
  * Provide a new declarative parser and migrate installation rules to use it.
  * Replace internal attribute path tracking strings with the new AttributePath
    class.
  * Improve handling of installation rules that are disabled by conditionals.
  * Ensure binNMU changelogs are split out of the main changelog
    (Closes: debputy#34)
  * Use declarative parser as a subparser for more parts of the manifest
  * MANIFEST-FORMAT.md: Installations is now its own top level section
  * Generate `${t64:Provides}` for the t64 migration (Closes: debputy#37)
  * Fix invalid root dir for multi-binary packages
  * MANIFEST-FORMAT.md: Write a conflict rule to apply to `installations` too.
  * Avoid assertion error when `owning-package` was used without
    `prior-to-version`.
  * Support bash-completion via python3-argcomplete. For now, this must be
    activated manually via `eval "$(register-python-argcomplete debputy)"`.  It is
    a bit slow due to start up times not being optimized for this case.
  * Breaking change: Rewrite command line handling to remove special case options
    (such as `-p`) from the root level.  On the other hand, the new logic supports
    providing default options on all subparsers, enabling default options such as
    `--debug` to appear in all subparsers.
  * Make symbols + shlibs "discoverable" by pretending they are packager provided
    files. Reuse the detection logic from provider provided files rather than
    "hand-rolling" a similar logic.

 -- Niels Thykier <niels@thykier.net>  Tue, 12 Sep 2023 20:43:15 +0200

debputy (0.1.4) experimental; urgency=medium

  * debputy.pm: Breaking change: The debputy dh sequence now removes the
    following debhelper tools from the sequence:

    - dh_installdirs
    - dh_install
    - dh_installdocs
    - dh_installchangelogs
    - dh_installexamples
    - dh_installman
    - dh_installcatalogs (!)
    - dh_installdebconf (!)
    - dh_installemacsen (!)
    - dh_installinfo
    - dh_installinit (!)
    - dh_installsysusers
    - dh_installsystemd (!)
    - dh_installsystemduser (!)
    - dh_installmenu (!)
    - dh_ucf (!)
    - dh_perl
    - dh_usrlocal (!)
    - dh_installwm (!)
    - dh_strip_nondeterminism (!)
    - dh_dwz (!)
    - dh_strip
    - dh_missing (!)

    At this point, basically any command *after* dh_auto_install (plus
    dh_installdirs, which runs before dh_auto_install) has been removed.
    As a consequence, the `debputy.pm` sequence no longer interacts very
    well with most debhelper sequence addons.  Basically any command
    relying on content in `debian/<pkg>` will no longer work with
    `dh-debputy`.

    Commands marked with (!) has no or almost no replacement support.
    If a package rely on these commands, odds are debputy will be
    unlikely to support that package.  Other commands will have
    support for common cases (similar to debhelper's default behavior).

  * debputy.py: Breaking change: Remove support for services, debhelper
    provided maintscripts and triggers.

  * New migration features:
    - Auto-migrate `debian/tmpfile` to `debian/tmpfiles`
    - Auto-migrate `debian/README.debian` to `debian/README.Debian`.
      (debhelper allowed both, debputy only supports the latter, which
      is the more common variant).
    - Auto-migrate `debian/doc-base.<suffix>` to
      `debian/<pkg>.<suffix>.doc-base`.  Note that debhelper and debputy
      are not aligned on the naming scheme here. Applying this migration
      causes debhelper to no longer see the doc-base files.
    - Auto-migrate common `debian/install`, `debian/docs` and
      `debian/examples` into the `installations` feature (see
      "manifest changes" below).  Some (but not 100%) dh-exec support
      provided as well.
    - Detect `debian/<foo>` files for unsupported debhelper tools or
      where no migration has been written yet and warn about their usage
      affecting the migration.
    - Migration now works with debhelper compat 13 rather than compat 14
      in most cases.  Notable exception being packages that have a
      `debian/pam`, which will still trigger a min compat of 14.

  * manifest changes:
    - Implement `installations` to replace `dh_install`, `dh_installdocs`
      and `dh_installexamples`.  Please see the `Installations` section
      in `MANIFEST-FORMAT.md` for how to use it.   Note that `debputy`
      installations work differently than debhelper when multiple
      patterns match the same path.

  * debuty plugin API: Important changes:
    - Detached paths are now less violatile. Notably, the `path`
      attribute will now always work for plugins.  The `parent_dir`
      attribute should still be avoided however. Additionally, the
      `.lookup` method will now always trigger an exception for a
      detached path (previously, it would "sometimes" trigger the
      exception depending on the path being resolved).
    - Plugins can now choose whether a Packager Provided File (PPF)
      should have name segments or have architecture specific
      segments.  Additionally, the plugin can request that
      `debian/foo` is considered a fallback for all packages for
      a given file.
    - The `BinaryPackagePath` type has been renamed to
      `VirtualPath`.

  * Improve wording in documentation and fix typos various places.
  * Remove `> /dev/null` for `systemd-tmpfiles`.
  * Add support for systemd's sysusers file.
  * Provide standard excludes for commonly unwanted things
  * Support pruning changelog files. When pruning NEWS, keep only entries listed in the dch
  * Ensure man, info pages, changelog files and Debian.NEWS files are always
    compressed.  Previously, these would only be compressed if they had a
    certain size. This change makes `debputy` match `dh_compress` better.
  * migration: Renames count as successful changes.  Previously, the migration
    tool would say it could do renames and then claim nothing could be done
    followed by not doing anything at the end.
  * Fix bug where mode was used as mtime for symlinks.
  * manifest/parser: Recognise -dbgsym packages.  The package names
    are now known and will not trigger an "unknown" package
    exception when used. However, currently no directives are allowed
    for dbgsym packages so the net result of specifying them is still
    an error.
  * Migrate to the python logging.  Along with a dependency on colorlogs,
    this means that output will have some color support. This changes means
    more "info" level messages now have basic colors.
  * util.py: Fix double quote handling when doing shell escapes.
  * debputy.py: Improve error reporting a bit.  Notably, previously
    some exceptions that should have been caught and rendered in a
    user-friendly way now are as intended.  Additionally, the debputy
    frontend now catches a common cause of exceptions (`RuntimeError`)
    and classifies them as "Unexpected exceptions" along with a note
    recommending filing a bug for debputy.
  * debputy.py: Hide unstable/internal commands.  Most of the frontend
    commands are now hidden behind an `internal-command` subcommand.
    this means that the default help output now only uses 1-2 lines on
    the internal or unstable subcommands.
  * debputy.py: Provide a `check-manifest` command to parse the manifest
    and check for obvious errors without having to build debs.
  * Do not mandate dpkg archs to be known. Previously, debputy
    would trigger an error if the manifest in the `arch-matches`
    condition listed an unknown dpkg arch.  This error has been
    removed as it is common practice to list new architectures
    long before dpkg in stable/oldstable knows the architecture.
  * Tweak the auto-generated maintscripts. Notably, indentation
    is now two spaces and applied better to avoid weird hanging
    lines. Additionally, the first line of a snippet is no longer
    accidentially merged into the condition line, which could
    cause syntax errors if the fixed line did not have
    indentation.
  * Detect and register python byte compiliation for public
    dist-packages dirs and default "package private" dirs
    similar to `dh_python3`.  This is done because `debptuy`
    cannot rely on `dh_python3` when it is self-hosting.
    Other `dh_python3` are not ported.
  * Move all of dh-debputy's files from `usr/share/debputy`
    to `usr/share/dh-debputy`. In tandem with the previous
    change, this causes debputy now to properly integrate with
    the python byte compilation system.
  * Correct the "inner" snippet order of generated maintscripts.
    All postrm and prerm snippets are supposed in reverse order
    and previously some snippets were not reordered correctly.
  * migrate-from-dh: Reduce the output to make warnings less likely
    to drown in other output.
  * migrate-from-dh: Better error reporting on failed executable
    dh config emulation.
  * migrate-from-dh: Require an explicit --apply-changes for
    migrations to performed.

 -- Niels Thykier <niels@thykier.net>  Thu, 24 Aug 2023 19:14:48 +0200

debputy (0.1.3) experimental; urgency=medium

  * debputy.pm: Breaking change: The debputy dh sequence now removes the
    following debhelper tools from the sequence:
    - dh_lintian
    - dh_bugfiles
    - dh_compress (note: hardlinks are not supported correctly)
  * Create a basic plugin API infrastructure and move some of the
    debputy into a plugin. Plugins can currently register packager
    provided files (`d/pkg.foo -> usr/.../pkg[.conf]`) and detection
    (and generation) of maintscript snippets, substvars and triggers.
    However, plugins cannot alter the contents of the data.tar.
    Additionally, the plugins are not loaded deterministically during
    builds (unclean chroot can load too many plugins), so they are not
    ready for prime time yet.
  * Fixed a bug in debputy's handling of icon-cache generation
    (dh_icons).
  * Detect kernel modules under /usr in addition to /lib.
  * debputy.py: When migrating from dh, detect use of `=>` in
    debhelper config files and report it as unsupported. The migrator
    would not generate the correct code for these lines. Currently,
    none of the debhelper tools where you can use `=>` would be migrated,
    so this is just future proofing.
  * debputy.py: Provide a `plugin` subcommand to interact with the
    plugins.  Currently, it can only list plugins and a bit of the
    content they provide.
  * all frontends: Show colorized error and warning messages similar to
    debhelper.
  * all frontends: Provide a `--version` that prints the version of
    debputy.
  * debputy.py: Detect `/usr/local` paths and abort as they are unhandled.
    Note that `dh_usrlocal` would normally be run and clean up these
    directories, so this is only an issue if you bypass `dh_usrlocal` or
    ask debputy to create content in `/usr/local`.

 -- Niels Thykier <niels@thykier.net>  Sun, 23 Jul 2023 07:52:46 +0000

debputy (0.1.2) experimental; urgency=medium

  * debputy.pm: Breaking change: The debputy dh sequence now removes the
    following debhelper tools from the sequence:
    - dh_installudev
    - dh_installgsettings
    - dh_makeshlibs
  * debputy.py: Breaking change: The manifest use `{{X}}` rather than
    `${X}` for substitution and remove support for environment variables
    in substitutions.
  * deb_packer.py: Support most of the dpkg-deb environment variables for
    compress settings (etc.).  Only known omission is thread count, which
    despite having a `--threads-max` option, `deb_packer.py` ignores the
    value in the name of compatibility.
  * deb_packer.py: Reset the `mtime` of control.tar members according
    to the SOURCE_DATE_EPOCH rules (clamping).  Previously, the `mtime`
    was unconditionally reset.  Most control.tar members are
    generated at runtime, so it only mattered when the control file
    is not generated.
  * deb_materialization.py: New internal command for materializing the
    data.tar part of the deb before assembly (or debugging). The
    command can also be used to assembling the materialized deb by
    using dpkg-deb or deb_packer.py (referred to as `debputy`).
  * debputy.py: Default to using `deb_materialization.py` to
    materialize the package and then assemble it with dpkg-deb where
    possible. However, automatically fallback to the internal assembly
    method when (fake)root is required and `Rules-Requires-Root` is
    `no`.
  * debputy.py: When using the `migrate-from-dh` subcommand, use
    `dh_assistant` to detect override targets that might cause issues
    with the migration.
  * debputy.py: Rename `show-manifest-changes` to `show-manifest-rules`
    and `--show-implicit-changes` to `--show-implicit-rules`.
  * builtin_manifest_rules.py: Correct permission for two bugreport
    builtin rules when matching a directory.  Previously, the
    directories would keep their file system mode. Now they are
    correctly normalized to 0755 as other directories would have been.
  * manifest_conditions.py: Fix a bug where the description of build
    profile conditionals where rendered poorly.
  * packages.py: Prevent assertion error when user provides a typo'ed
    package name for `-p`.

 -- Niels Thykier <niels@thykier.net>  Sun, 18 Jun 2023 14:30:41 +0000

debputy (0.1.1) experimental; urgency=medium

  * Initial release.  (Closes: #1029645)

 -- Niels Thykier <niels@thykier.net>  Sun, 05 Feb 2023 18:27:25 +0000
