Open orlitzky opened 7 years ago
+1
Everything is part of the project, using .gitattributes is a terrible hack.
I don't have a strong opinion on this. This was added in #39 at the request of composer users, who indeed do not need these files normally. I'd argue that dev-bin
doesn't belong in the release tarballs, but the tests and example would make sense.
@mlocati, thoughts?
Excluding unused files for normal users is much safer (otherwise we have check that eery included file doesn't have any flaw/security issues).
If you want to install the full package using composer, just run
composer install --prefer-source
If you are not using composer, but you still want the full package, just run
git clone --depth=1 https://github.com/maxmind/MaxMind-DB-Reader-php.git maxmind
rm -rf maxmind/.git
If you are not using composer, but you still want the full package, just run
git clone --depth=1 https://github.com/maxmind/MaxMind-DB-Reader-php.git maxmind rm -rf maxmind/.git
This doesn't help with the original problem: I'm creating a package for Gentoo...
@mlocati just a reminder, composer is NOT an installer (but a Dependency Manager for PHP )
PHP don't have any (well, the old pear/pecl command still work)
BTW, this have already been discussed ad nauseam... .gitattributes is an ack to workaround the lack of installer for PHP. You always have some work to "install" an appllication, composer install on the dev, generate the asset, minify, cleanup dev tools... etc... then deploy to prod.
@oschwald do what is simpler for you, we are now used to create git snapshot for downstream distribution (and we are the butt of all-non-php-developers jokes)
If you are not using composer, but you still want the full package, just run git clone --depth=1 https://github.com/maxmind/MaxMind-DB-Reader-php.git maxmind rm -rf maxmind/.git
This doesn't help with the original problem: I'm creating a package for Gentoo...
I don't know the Gentoo package creation process: what's needed for it?
@mlocati just a reminder, composer is NOT an installer (but a Dependency Manager for PHP )
@remicollet composer is not a system-wide installer, but a project dependency manager. That means that it can install dependencies on a project basis. So, it still installs packages.
You always have some work to "install" an appllication, composer install on the dev, generate the asset, minify, cleanup dev tools... etc... then deploy to prod.
Not always: for instance, this package doesn't have any asset to be generated, nothing to be minified. And for cleaning up dev tools we have .gitattributes
(I know, it has its downsides, but it's the only viable approach we have).
I don't know the Gentoo package creation process: what's needed for it?
Basically just a tarball. We're a source-based distribution, so a "package" is essentially a series of steps that will be executed on the user's machine to get the thing installed. Something like the following,
include_dir
, documentation somewhere else.The git clone
on the fly doesn't work for a few reasons:
git clone
is going to change.git clone
requires git, which pulls in a million other dependencies that aren't actually needed to install this library.And probably some others, yada yada. But basically we're all (distro packagers) trying to do the same thing. Take a fixed version from upstream and figure out a way to install it once, globally.
The existing release tarball already works, but we can't run the tests or install the examples, because they're not in there.
What about a TravisCI job (which can also be scheduled to be executed daily with a TravisCI cron job), scheduled daily, that updates the GitHub releases by adding a full-repository.tgz
file if it's missing?
So, for example, you could access the 1.4.0 repository by fetching https://github.com/maxmind/MaxMind-DB-Reader-php/releases/download/v1.4.0/full-repository.tgz
It sounds like that would work, though if you're feeling extra nice you could name them something like MaxMind-DB-Reader-php-1.4.0-full.tar.gz
so that we can tell the tarballs apart without renaming them (which is not a big deal, either).
Would uploading a "release" tarball to GitHub with everything but dev-bin
and the dot files (e.g., the Travis config) work for everyone? If so, we can add that to our release script.
Would uploading a "release" tarball to GitHub with everything but
dev-bin
and the dot files (e.g., the Travis config) work for everyone? If so, we can add that to our release script.
That sounds perfect.
Hi, I'm creating a Gentoo package for MaxMind-DB-Reader-php, and the examples and tests would be useful for us. The examples get installed globally, and we have the option to run the tests before installation to make sure that everything works as expected (before, say, proceeding with an upgrade).