[dev] bootstrapping a new horde library pear xml

Ralf Lang lang at b1-systems.de
Fri Mar 30 09:15:27 UTC 2018



Am 16.02.2018 um 14:58 schrieb Jan Schneider:
>
> Zitat von Ralf Lang <lang at b1-systems.de>:
>
>> Hi all,
>>
>> we are currently factoring out some bundled stuff into separate
>> libraries for re-use and code cleanliness. I wanted to use the
>> components helper app to bootstrap a new library, but I didn't get it
>> right first. I still feel I did not do it right, though I have some
>> autogenerated xml now.
>>
>>
>> I had /doc, /lib and /test paths, each having its /Horde/$Lib/ subpaths.
>>
>> I created a minimalistic .horde.yml and .gitignore
>>
>> I created a bogus CHANGES file
>>
>> ------------
>> v1.0.0alpha1
>> ------------
>>
>> First alpha release for Horde 5.
>>
>> I created a stub changelog.yml file
>>
>> ---
>> 1.0.0alpha1:
>>   api: 1.0.0
>>   state:
>>     release: alpha
>>     api: alpha
>>   date: 2018-02-08
>>   license:
>>     identifier: LGPL-2.1
>>     uri: http://www.horde.org/licenses/lgpl21
>>   notes:
>>     First alpha release for Horde 5.
>>
>> I ran php -d
>> include_path="/srv/www/vhosts.d/horde-dev2018.ralf-lang.de/libs/"
>> ../components/bin/horde-components update --regenerate
>>
>> horde-components: error: You are neither in a component directory nor
>> specified it as the first argument!
>>
>> I added a barebone package.xml (see attached) and ran again. That did
>> the trick. The script now updates with all existing files and I can
>> generate a valid pear package.
>>
>> maintaina:/srv/git/horde-dev2018/Query # php -d
>> include_path="/srv/www/vhosts.d/horde-dev2018.ralf-lang.de/libs/:/usr/share/php5/PEAR"
>>
>>  ../components/bin/horde-components snapshot
>> [   OK   ] Generated snapshot
>>           
>> /srv/git/horde-dev2018/Query/Horde_Query-1.0.0dev201802111949.tgz
>>
>> I wonder if I can strip any more data without breaking it.
>> The .horde.yml file seems to be the primary source for metadata, the
>> file list is autogenerated.
>>
>> Is there a documented process I should follow?
>> I'd like to add some boilerplate to the git-tools thing once I
>> understand what is required. I already moved the application skeleton
>> script into git-tools infrastructure.
>
> I don't think I have tested boilerplating a component after
> refactoring horde-components (which still isn't finished btw). It may
> very well be broken.
>
> I think the best approach would be to introduce a "horde-components
> init" command that creates all necessary files for a
> library/application to be manageable through horde-components.
>
> As for your original question: .horde.yml and changelog.yml should in
> the long term be the master information files which generate all other
> files. Anything else should be considered a bug.
>
I agree we need a new command. I have set up a scenario in a clean
developer container and for now, it seems to work if I provide
rudimentary .horde.yml, package.xml, doc/CHANGES, doc/changelog.yml.
The actual content of the xml does not matter as long as it is
well-formed and has all required sections. I will try to strip down as
much as possible, then build such an init function.


-- 
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



More information about the dev mailing list