Le Wed, 27 May 2009 14:21:24 +0200,
Florian Fainelli <[email protected]> a écrit :

> Salut Raphaël,
> 
> Le Wednesday 27 May 2009 11:40:08 Raphaël HUCK, vous avez écrit :
> > Hi,
> >
> > I've been thinking lately on what could be done in OpenWrt to
> > ease the maintenance of a firmware based on it.
> >
> > It is quite easy to integrate third-party applications by putting
> > them into packages and using the feeds, so they stay out of the
> > trunk and don't have to be worried about.
> >
> > Then you have the base system and the packages:
> >
> > 1. you'd like to stay synchronized with the OpenWrt repository
> >
> > 2. you'd like to contribute your fixes and enhancements to OpenWrt
> >
> > In order to be able to do this easily, you want to minimize the
> > differences between the files and the merging you have to do.
> >
> > New files are easy to handle, while differences between files are
> > not.
> >
> > For patches, it is not a problem, you can just add a patch that
> > fixes your specific problem, you'll just have one more file in your
> > repository than in openwrt repository.
> >
> > However, for configuration files, init files and Makefiles this is
> > more problematic. There is a lot of manual merging to do, and it's
> > more difficult to contribute a patch to OpenWrt.
> >
> > For example:
> >
> > packages/admin/syslog-ng/files/syslog-ng.conf
> > packages/libs/lzo/Makefile
> > packages/net/lighttpd/files/lighttpd.init
> >
> > For init and conf files, it could install .init.default
> > and .conf.default files if corresponding .init and .conf files are
> > not present.
> 
> Some packages tend to follow the Debian convention by installing a
> POSIX shell fragment in /etc/default/. Your solution sounds more
> general though.

Yes, I have seen this, and believe it is a good thing.

What I was trying to say is that most of the time, the configuration
file provided with the package has to be edited heavily for ones needs,
so it is more a kind of example with lots of commented options to show
what is possible.

So I believe it would be a good idea to provide a package.conf.default
which would get installed if a package.conf is not present. This way
you don't have to worry about overwriting or merging your conf file when
syncing with openwrt.

> > As for packages, the main issue comes from static and shared
> > libraries. Sometimes, you don't want the shared libraries to be
> > installed.
> >
> > That's why it would be great to introduce an InstallShared rule.
> 
> Yes, this sounds like a good idea though it would require to change
> almost all packages to split out the part of their Define
> Package/foo/install to separate the shared libraries installation.
> What about taking the other way and by default let everything like
> this but add a Build options configuration option which removes the
> shared libraries from the packages ?

Why not do it this way then:

- don't change any of the current packages and don't change their
  behavior either

- when a package is changed and shared libraries installation is
  separated in InstallShared, call "InstallShared" right after "install"
  by default, so the behavior is still the same

- provide a way to disable shared libraries installation on a
  per-package basis

What do you think?

Regards,

--Raphaël HUCK

Attachment: signature.asc
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to