#977643 equivs: Can't specify spoofed package version

#977643#5
Date:
2020-12-18 01:52:18 UTC
From:
To:
Version: 2.2.0

I can't manage to specify a package version on the template. In my particular case, I'm trying to fake a python version (I've already installed it through pyenv, so it's not recognized as an actual package), so I can install `python-dev (stable 2.7.16-1 amd64)` and get the damn `Python.h` to compile and install `pybluez`.

Anyway, I've tried with:
```
Provides: python 2.7.16-1
Provides: python: 2.7.16-1
Provides: python=2.7.16-1
Provides: python="2.7.16-1"
```

But when runing `equivs-build fakePython2.7.16` it's always rejected with some variant of:
`dpkg-gencontrol: warning: can't parse dependency python="2.7.16-1"`

Where the full contents of `fakePython2.7.16` are:
```
### Commented entries have reasonable defaults.
### Uncomment to edit them.
Source: fake.python
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: fake-python
Version: 1.1
# Maintainer: Your Name <yourname@example.com>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
Provides: python="2.7.16-1", libpython-dev, python2.7-dev, python2-dev
# Replaces: <comma-separated list of packages>
# Architecture: all
# Multi-Arch: <one of: foreign|same|allowed>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Links: <pair of space-separated paths; First is path symlink points at, second is filename of link>
# Files: <pair of space-separated paths; First is file to include, second is destination>
# <more pairs, if there's more than one file to include. Notice the starting space>
Description: <short description; defaults to some wise words>
long description and info
.
second paragraph
```

I've tried reading the source code of dpkg-gencontrol, but I just can't wrap my head around pearl (╯°□°)╯︵ ┻━┻
Any help would be greatly apreciated q.q

#977643#10
Date:
2020-12-18 02:15:22 UTC
From:
To:
Hi,

5990 wrote:
dependencies (and provides) in Debian packages:

Provides: python (= 2.7.16-1)

(The blank after the equal sign is optional.)

The format and syntax are documented in the Debian Policy, e.g. here:
https://www.debian.org/doc/debian-policy/ch-relationships.html

So from my point of view this is not really a bug. It though suggests
that there is a proper reference to the Debian policy for the format
of some fields missing.

Do you have any suggestion where to add such a reference? Where in the
equivs documentation did you look for such information?
[…]

  syntax error in control file: long description and info

In the last three lines (i.e. those after the line starting with
"Description:"), there must be at least one white space before every
line of the description. E.g. it should look like this:

Description: <short description; defaults to some wise words>
 long description and info
 .
 second paragraph

But maybe that was just a mail client or editor issue.

Kali should have much newer version of equivs than 2.2.0. It should
have 2.3.1.

		Regards, Axel

#977643#15
Date:
2020-12-18 04:29:08 UTC
From:
To:
Thanks for the blazing fast response!

That worked! ty
of some fields missing.

Firstly I looked into the github repo. The README.md is pretty much empty, so that wasn't usefull.

I then found the Debian Package Tracker webpage for this package.[1] I may have missed it, but afaik, there's no documentation there, so I followed the link to the git repository.[2] This repo didn't have a README, so it was another dead end.

I then decided to look for the online manpages of equivs-control (bc, on my experience, online manpages are more frequently updated than CLI manpages), and found it's testing release.[3] However, this release didn't really have much details on formatting. Appart from the template path (/usr/share/equivs/template.ctl), it doesn't tell much.

Finally, I decided to check this template file, but there wasn't any extra-info compared to that of a brand-new control file.

My recommendations would be to add a README.md on the git repo, and to add a comment with that link to the template file.

[1]: https://tracker.debian.org/pkg/equivs
[2]: https://salsa.debian.org/perl-team/modules/packages/equivs
[3]: https://manpages.debian.org/testing/equivs/equivs-control.1.en.html

#977643#20
Date:
2020-12-18 04:52:16 UTC
From:
To:
Woops, I forgot to answer a couple questions :p
have 2.3.1.

I don't know what to tell you, I did an `apt update` before installing `equivs`
This are the contents of my `/etc/apt/sources.list`:
```
# Debian packages for stable
deb http://debian.unnoba.edu.ar/debian/ stable main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://debian.unnoba.edu.ar/debian/ stable main contrib

# Security updates for stable
deb http://security.debian.org/ stable/updates main contrib
```
Yeah, I think so too. Somewhere along the way, the trailing space must've been removed.