Subject: Re: It's time to clean them up?: Do we need both template-scriptname and template-scriptname.in?
From: Richard Megginson
Date: Wed, 21 Feb 2007 13:02:05 -0700
To: Noriko Hosoi
CC: ldap-devel-list

Noriko Hosoi wrote:
Rich sent out the original email some time back.  Since we've (almost) finished the migration to the new style build, isn't it a good time to do it?  I think to-be-eliminated files are in admin/src and admin/src/scripts.  Could there be anywhere else?
I just did a quick search using this:
find . -type f -print | while read file ; do if [ -f $file.in ] ; then ls -al $file $file.in ; fi ; done

it matches your list below, so I guess there are no others.

/share/dev4/ds/ds72/builds/20070221.1/earthquake_rhel4/BUILD/fedora-ds-1.1.0-20070221/ldap/admin/src
$ ls ds_newinst.pl* scripts/template-*
ds_newinst.pl                      scripts/template-migrateInstance7
ds_newinst.pl.in                   scripts/template-migrateTo5*
scripts/template-bak2db            scripts/template-migrateTo6
scripts/template-bak2db.in*        scripts/template-migrateTo7
scripts/template-bak2db.pl         scripts/template-monitor
scripts/template-bak2db.pl.in      scripts/template-monitor.in*
scripts/template-cl-dump.pl*       scripts/template-ns-accountstatus.pl
scripts/template-cl-dump.pl.in*    scripts/template-ns-accountstatus.pl.in
scripts/template-db2bak            scripts/template-ns-activate.pl
scripts/template-db2bak.in*        scripts/template-ns-activate.pl.in
scripts/template-db2bak.pl         scripts/template-ns-inactivate.pl
scripts/template-db2bak.pl.in      scripts/template-ns-inactivate.pl.in
scripts/template-db2index          scripts/template-ns-newpwpolicy.pl*
scripts/template-db2index.in*      scripts/template-ns-newpwpolicy.pl.in*
scripts/template-db2index.pl       scripts/template-repl-monitor-cgi.pl*
scripts/template-db2index.pl.in    scripts/template-repl-monitor-cgi.pl.in*
scripts/template-db2ldif           scripts/template-repl-monitor.pl*
scripts/template-db2ldif.in*       scripts/template-repl-monitor.pl.in*
scripts/template-db2ldif.pl        scripts/template-restoreconfig
scripts/template-db2ldif.pl.in     scripts/template-restoreconfig.in*
scripts/template-dsml-activate.pl  scripts/template-saveconfig
scripts/template-ldif2db           scripts/template-saveconfig.in*
scripts/template-ldif2db.in*       scripts/template-start-slapd
scripts/template-ldif2db.pl        scripts/template-start-slapd.in*
scripts/template-ldif2db.pl.in     scripts/template-stop-slapd
scripts/template-ldif2ldap         scripts/template-stop-slapd.in*
scripts/template-ldif2ldap.in*     scripts/template-suffix2instance
scripts/template-migrate50to51     scripts/template-suffix2instance.in*
scripts/template-migrate5to6       scripts/template-upgradedb.in*
scripts/template-migrate5to7       scripts/template-verify-db.pl
scripts/template-migrate6to7       scripts/template-verify-db.pl.in
scripts/template-migrateInstance5  scripts/template-vlvindex
scripts/template-migrateInstance6  scripts/template-vlvindex.in*

--noriko

Richard Megginson wrote:
Nathan Kinder wrote:
Richard Megginson wrote:
Nathan Kinder wrote:
Richard Megginson wrote:
Nathan Kinder wrote:
Richard Megginson wrote:
I think we can remove the files called template-"scriptname" from CVS - I think we just need the template-"scriptname".in files, correct?
Aren't the old style builds still using these files?  If so, we should wait until we switch over to the new build on all platforms and remove them along with all of the old Makefiles.
With the way Makefile.am is written, it doesn't think it needs to create the template-scriptname files from the template-scriptname.in files because the template-scriptname files already exist.  So we will need to do some makefile hackery to get around this.
This would depend where you are building from.  If you build from the ldapserver directory, then what you say is true (the template-scriptname file already exists).  If you make a built directory and run configure and make from there, then this isn't an issue.  The script templates listed in task_SCRIPTS in Makefile.am is relative to the build directory.  I highly suggest building this way instead of building in-tree.  It's just much cleaner.
rpmbuild doesn't like to build that way, but it's easy to make it do that.
I guess we don't need to care about keeping the tree clean when using RPM build since it just gets cleaned up after the build.  Our SVbuild based builds will create a build directory though.  Either way, we should end up removing the "template-scriptname" files.  We can either cut over to the new autotools style-build and remove this stuff, or we can change Makefile.am to create the "template-scriptname" files in a directory other than the location of the old template files.  This second approach would still allow both style builds to work for now.
It's no big deal to change the rpmbuild to do this.  Let's wait a little while longer.