This is originally coming from http://drupal.org/node/190283 (Yes, the polish is coming, finally :-), where some example code was developed as a side effect of installer testing.

It's pretty obvious, that a manual page for 6.x installer profiles developers needs to be written sooner or later. I'm feeling neither good enough on English, nor experienced enough to anticipate and well-describe all the things, so my intention is not to fully write that page. I'll left that to others.

But however, I have an example installation profile code, demonstrating the basic structure, usage of forms and custom pages and the like. As suggested by Gábor Hojtsy on the original issue, I added extensive comments to that, to make it a possible attachment/reference for the mentioned manual page.

Attaching the example.profile file. Although it's more of a documentation than real code, it really works if placed inside profiles/example.

P.S.: Changed extension to .txt to attach the file here. I really wonder whether http://drupal.org/node/171875 is going to be fixed some day!

CommentFileSizeAuthor
example.profile.txt15.38 KBJirkaRybka

Comments

webchick’s picture

Project: Drupal core » Documentation
Version: 6.x-dev »
Component: documentation » Documentation in CVS

Moving to documentation queue.

gábor hojtsy’s picture

Why not commit this to contrib/docs? So it even shows up on api.drupal.org in full syntax colored glory. And can be linked to :)

JirkaRybka’s picture

Hmm, seems like I'm missing something here, so I need to research drupal.org about how to do these things. Initially, I thought that this is no more than a raw material for further documentation efforts, but if the feedback suggests to put it somewhere as-is, I need to learn how to do that. Any suggestions where to go? (i.e. try to submit a manual page, or apply for a CVS account although this is not really a project, or something else I'm missing?) I'm going to learn about these things anyway, but a bit of advice may speed this up. Thanks.

gábor hojtsy’s picture

You need a CVS account, but otherwise http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/ is free for hacking by anyone having CVS accounts as far as I know. The examples folder there seems to be a good candidate for this example. Even if this is just raw material people can advance it. You can add big chunks of phpdoc, and api.drupal.org will pick it up.

JirkaRybka’s picture

Thanks for the tip, the help is greatly appreciated.

But this is going to take a bit longer on my part, unless someone with CVS experience goes forward and commit the file for me (I'm not really going to do anything more in CVS anyway). After reading http://drupal.org/node/59 and running into bash: cvs: command not found while attempting a checkout, and wasting hours and hours on resources linked from http://drupal.org/handbook/cvs/clients, being unable to find fitting downloads, running into additional requirements (Eclipse - download some 170MB to my poor ca. 800meg free harddisk space) etc. etc...

OK, sorry about this rant. Simply, I found out that setting up CVS on my poor system and applying for CVS account is more trouble than I expected, and given my current personal schedule, I'm postponing this (in my schedule, not the issue). The initial attachment is free for someone else to use.

gábor hojtsy’s picture

Given that you have bash, feel free to grab the http://packages.debian.org/etch/cvs package for your OS. Run your usual package manager or downloader and install that. It should be enough. Definitely no eclipse is required.

JirkaRybka’s picture

No way :-(

After successfully installing CVS client on my machine (finally, I needed to examine my built-in RPM manager, and not Drupal.org docs), I carefully filled the CVS application form at http://drupal.org/cvs-application, and got the following error:
Your application cannot be considered: CVS accounts are only granted to users wishing to maintain a module, theme or translation.
That's obviously because I checked "I want to maintain a module, theme or translation:" as "NO", but I'm really not going to lie there: I'm not going to maintain own projects for variety of reasons (including my personal time frame), I'm only going to contribute to the examples as mentioned above, and update my contributions there, perhaps (and I explained that carefully in my motivation message). I got rejected with that, without even being considered by a human. As a sidenote, install-profiles are not mentioned in the message at all, even if I wanted to maintain it as a project (which is not the case).

Please commit the file, someone with CVS account; I'm unable to do so. Thanks in advance.

wmostrey’s picture

JirkaRybka’s picture

Thanks a lot :)

But I must say here, that the filename should not include .php, it's just example.profile. Also #4 suggested to put it into http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/ - although I'm not sure on this, so the current location is probably fine too.

Thanks again.

I consider this issue fixed unless we are going to deal with the actual handbook page here too - not sure what to do with issue status in this case.

wmostrey’s picture

Ah nice, I followed Gábor's advice and put it there as well (without .php)

brunodbo’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Documentation in CVS » documentation
brunodbo’s picture

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443.

jhodgdon’s picture

Title: Install profiles developer's guide » Sample install profile
Project: Drupal core » Examples for Developers
Version: 7.x-dev »
Component: documentation » Other
Category: task » feature

It looks like this is a suggestion for a sample Install Profile. I'm going to move this into the Examples for Developers project.

By the way, I think there is another sample profile in the contrib respository already, called "example.profile", which may be the same one as this one, or not, I'm not sure...

rfay’s picture

ilo’s picture

mm IMHO, writting a profile example is not only about the .profile file, afaik the .make required for the Drupal.org packaging system should be addressed also. There are a lot of things explained in the documentation: [642116] but, the hardest part is how to batch operations what things can be done before and after database setup.. It may happen that if you try to enable simpletest during a profile setup as you would enable any other module, it wont work, because the hook_requirements checks for the existance of a variable, and database has not been installed already..

I'd be happy to share my own development profile, but I'd need to document it a little bit. It is very similar to the job done by snufkin at http://drupal.org/project/drupal_developer but including some tweakins: Manages some permissions, creates an snapshot of the site right after installation and others...

On the other hand we can make use of this drupal_developer profile and comment it better, as long as it is already published in d.o.

Hi again, ppl, I must say.. finally I'm back!

rfay’s picture

ilo is BACK! Yippee!

wmostrey’s picture

Status: Active » Closed (duplicate)

@ilo When this issue was created in 2007 there was no .make. I think that currently http://drupal.org/project/drupal_developer does a good job.

rfay’s picture

Status: Closed (duplicate) » Active

Excellent info! I'm going to leave this open until we figure out how to publicize that, though!

ilo’s picture

However drupal_developer only does 'module enable' stuff.. it does not even create a default node.. There are other install profiles that could fit better into this project as an example, but that would require a little research :(

Edited: IICR it also form_alters the administrator account with default values..

rfay’s picture

Status: Active » Closed (won't fix)

I don't think this can technically be done, as profiles need to go into /profiles.

I'm all in favor of it, but it will need to be done in a new project.